adds SPIR-V tests for scalar printf operands (#2211)

Adds targeted SPIR-V tests for printf with scalar operands.  See:

* https://github.com/KhronosGroup/OpenCL-Docs/issues/1211
* https://github.com/KhronosGroup/OpenCL-Docs/pull/1236

The fp32 test is likely to be the most interesting, especially on
devices that support fp64, because printf with scalar fp32 operands is
not generated by default in this case with Clang and the SPIR-V LLVM
Translator.
This commit is contained in:
Ben Ashbaugh
2025-02-11 08:55:39 -08:00
committed by GitHub
parent 0bfe516318
commit a61feea656
11 changed files with 1051 additions and 1 deletions

View File

@@ -577,7 +577,7 @@ char* get_temp_filename()
close(fd);
#elif defined(_WIN32)
UINT ret = GetTempFileName(".", "tmp", 0, gFileName);
if (ret == 0) return gFileName;
if (ret == 0) return strdup(gFileName);
#else
MTdata d = init_genrand((cl_uint)time(NULL));
sprintf(gFileName, "tmpfile.%u", genrand_int32(d));