KhronosGroup / OpenCL-CTS

The OpenCL Conformance Tests
Apache License 2.0
178 stars 187 forks source link

typo for array index in https://github.com/KhronosGroup/OpenCL-CTS/blob/main/test_conformance/math_brute_force/unary_double.cpp#L292,L293 #1994

Closed haonanya closed 2 days ago

haonanya commented 4 days ago

https://github.com/KhronosGroup/OpenCL-CTS/blob/main/test_conformance/math_brute_force/unary_double.cpp#L292,L293

input is cl_double p = (cl_double )gIn + thread_id buffer_elements; instead of (cl_double )gIn)[j], output ref is cl_double r = (cl_double )gOut_Ref + thread_id * buffer_elements; instead of gOut_Ref. Can you please double check? Thanks very much.

+@svenvh, @bashbaug

svenvh commented 4 days ago

I think the current expressions are wrong indeed, thanks for reporting it! Ideally we'd align with unary_float.cpp and use s[j] and t[j].

Are you happy to open a PR to fix it?

haonanya commented 4 days ago

I think the current expressions are wrong indeed, thanks for reporting it! Ideally we'd align with unary_float.cpp and use s[j] and t[j].

Are you happy to open a PR to fix it?

Sure! Thanks for quickly reply.

svenvh commented 4 days ago

Looking through the other tests, I think test_conformance/math_brute_force/macro_unary_double.cpp may have a similar issue (it's a multi-threaded test that directly indexes into gIn without taking the thread ID into account).

svenvh commented 2 days ago

All issues have been fixed by #1995 now.