KhronosGroup / KhronosGroup/OpenCL-CTS
incorrect cl_half test for specialization constants
- Dominant language
- C++
- Stars
- 232
- Forks
- 235
- Avg merge
- 8d 7h
- Merged PRs (30d)
- 18
Description
```
#define TEST_SPEC_CONSTANT(NAME, type, init_buffer, spec_constant_value) \
TEST_SPIRV_FUNC_VERSION(op_spec_constant_##NAME##_simple, Version(2, 2)) \
{ \
type init_value = init_buffer; \
type final_value = init_value + spec_constant_value; \
return test_spec_constant( \
deviceID, context, queue, "op_spec_constant_" #NAME "_simple", \
init_value, (type)spec_constant_value, final_value); \
}
// type name, type, value init, spec constant value
TEST_SPEC_CONSTANT(uint, cl_uint, 25, 43)
TEST_SPEC_CONSTANT(uchar, cl_uchar, 19, 4)
TEST_SPEC_CONSTANT(ushort, cl_ushort, 6000, 3000)
TEST_SPEC_CONSTANT(ulong, cl_ulong, 9223372036854775000UL, 200)
TEST_SPEC_CONSTANT(float, cl_float, 1.5, -3.7)
TEST_SPEC_CONSTANT(half, cl_half, 1, 2)
TEST_SPEC_CONSTANT(double, cl_double, 14534.53453, 1.53453)
```
cl_half, alias unsigned short, when calcuate final_value, get 3, however when as half in kernel, should be a denormal number, so always fail.
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the TEST_SPEC_CONSTANT macro and its cl_half specialization in the OpenCL-CTS tests. Compare the host-side final_value calculation with the value produced by the kernel for the half case, then run the relevant specialization-constant tests to confirm the corrected test passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100