Skip to content

Commit 80c8508

Browse files
author
JackAKirk
committed
cl_khr_fp64 and cl_khr_fp16 extensions are now connected to the cuda plugin.
This change ensures that all Reduction tests run for the cuda backend. The cl_khr_fp64 extension is used for all cuda devices by default, since sm_XX wherer XX < 13 has been unsupported by the cuda driver since cuda 8.0. The test fp16-with-unnamed-lambda.cpp has been deleted because it has a duplicate in the test suite (in the dir SYCL/Regression). In both cases the triple is missing on the first line which needs to be added to the llvm-test-suite copy to avoid a test failure now that the test is not skipped for the cuda backend. Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
1 parent f95f28c commit 80c8508

File tree

2 files changed

+20
-44
lines changed

2 files changed

+20
-44
lines changed

sycl/plugins/cuda/pi_cuda.cpp

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,26 @@ pi_result cuda_piDeviceGetInfo(pi_device device, pi_device_info param_name,
13711371
return getInfo(param_value_size, param_value, param_value_size_ret, "");
13721372
}
13731373
case PI_DEVICE_INFO_EXTENSIONS: {
1374-
return getInfo(param_value_size, param_value, param_value_size_ret, "");
1374+
1375+
std::string SupportedExtensions = "cl_khr_fp64 ";
1376+
int major = 0;
1377+
int minor = 0;
1378+
1379+
cl::sycl::detail::pi::assertion(
1380+
cuDeviceGetAttribute(&major,
1381+
CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR,
1382+
device->get()) == CUDA_SUCCESS);
1383+
cl::sycl::detail::pi::assertion(
1384+
cuDeviceGetAttribute(&minor,
1385+
CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR,
1386+
device->get()) == CUDA_SUCCESS);
1387+
1388+
if ((major >= 6) || ((major == 5) && (minor >= 3))) {
1389+
SupportedExtensions += "cl_khr_fp16 ";
1390+
}
1391+
1392+
return getInfo(param_value_size, param_value, param_value_size_ret,
1393+
SupportedExtensions.c_str());
13751394
}
13761395
case PI_DEVICE_INFO_PRINTF_BUFFER_SIZE: {
13771396
// The minimum value for the FULL profile is 1 MB.

sycl/test/regression/fp16-with-unnamed-lambda.cpp

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)