Fix build program errors for half type kernels in work_group_reduce_{add, max, min) (#2713)

Add missing cl_khr_fp16 pragma for newly added half type tests in
https://github.com/KhronosGroup/OpenCL-CTS/pull/2525.

- work_group_reduce_add
- work_group_reduce_max
- work_group_reduce_min
This commit is contained in:
Jose Lopez 2026-06-04 13:07:13 +01:00 committed by GitHub
parent 9733888aba
commit 4246ca5afc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -36,6 +36,7 @@ static std::string make_kernel_string(const std::string &type,
// }
std::ostringstream os;
if (type == "half") os << "#pragma OPENCL EXTENSION cl_khr_fp16 : enable\n";
os << "__kernel void " << kernelName << "(global " << type
<< " *input, global " << type << " *output) {\n";
os << " int tid = get_global_id(0);\n";