DPCT1005#
Message#
The SYCL device version is different from CUDA Compute Compatibility. You may need to rewrite this code.
Detailed Help#
SYCLomatic detected a usage of CUDA* Compute Capability-dependent logic in the original program.
DPC++ does not support CUDA Compute Capability. The logic in the generated code
uses a version extracted from the cl::sycl::info::device::version
, which is
different than CUDA Compute Capability.
Suggestions to Fix#
Review the logic and adjust it.
For example, this original CUDA code:
1int main() {
2 cudaDeviceProp deviceProp;
3 int deviceID = 0;
4 cudaGetDeviceProperties(&deviceProp, deviceID);
5 if (deviceProp.major >= 3) {
6 // Use functionality from Compute Capability 3.0+
7 }
8 return 0;
9}
results in the following migrated SYCL* code:
1int main() {
2 dpct::device_info deviceProp;
3 dpct::dev_mgr::instance().get_device(0).get_device_info(deviceProp);
4 /*
5 DPCT1005:0: The SYCL device version is different from CUDA Compute
6 Compatibility. You may need to rewrite this code.
7 */
8 if (deviceProp.get_major_version() >= 3) {
9 // Invoke kernel using __shfl() which requires Compute Capability 3.0+
10 }
11 return 0;
12}
which is rewritten to:
1 int main() {
2 // sycl::select_from_group is supported in SYCL 2020.
3 if (SYCL_LANGUAGE_VERSION >= 202000) {
4 // Invoke kernel using sycl::select_from_group
5 ...
6 }
7 return 0;
8 }