mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-23 15:39:03 +00:00
Added support for cl_ext_float_atomics in CBasicTestFetchAdd with atomic_float (#2345)
Related to #2142, according to the work plan, extending CBasicTestFetchAdd with support for atomic_float.
This commit is contained in:
@@ -34,6 +34,7 @@ cl_device_atomic_capabilities gAtomicMemCap,
|
||||
cl_half_rounding_mode gHalfRoundingMode = CL_HALF_RTE;
|
||||
bool gFloatAtomicsSupported = false;
|
||||
cl_device_fp_atomic_capabilities_ext gHalfAtomicCaps = 0;
|
||||
cl_device_fp_atomic_capabilities_ext gFloatAtomicCaps = 0;
|
||||
|
||||
test_status InitCL(cl_device_id device) {
|
||||
auto version = get_device_cl_version(device);
|
||||
@@ -132,6 +133,11 @@ test_status InitCL(cl_device_id device) {
|
||||
if (is_extension_available(device, "cl_ext_float_atomics"))
|
||||
{
|
||||
gFloatAtomicsSupported = true;
|
||||
|
||||
cl_int error = clGetDeviceInfo(
|
||||
device, CL_DEVICE_SINGLE_FP_ATOMIC_CAPABILITIES_EXT,
|
||||
sizeof(gFloatAtomicCaps), &gFloatAtomicCaps, nullptr);
|
||||
test_error_ret(error, "clGetDeviceInfo failed!", TEST_FAIL);
|
||||
if (is_extension_available(device, "cl_khr_fp16"))
|
||||
{
|
||||
cl_int error = clGetDeviceInfo(
|
||||
|
||||
Reference in New Issue
Block a user