DPCT1035#
Message#
All SYCL devices can be used by the host to submit tasks. You may need to adjust this code.
Detailed Help#
In SYCL*, the host can freely submit tasks to all SYCL devices. There’s no need to check for device compute mode.
Suggestions to Fix#
Review the code and adjust accordingly.
For example, this original CUDA* code:
1 void foo(cudaDeviceProp deviceProp) {
2 if (deviceProp.computeMode == cudaComputeModeDefault) {
3 ... // code path 1
4 } else if (deviceProp.computeMode == cudaComputeModeExclusive) {
5 ... // code path 2
6 } else if (deviceProp.computeMode == cudaComputeModeProhibited) {
7 ... // code path 3
8 }
9 }
results in the following migrated SYCL code:
1 void foo(dpct::device_info deviceProp) {
2 /*
3 DPCT1035:0: All SYCL devices can be used by the host to submit tasks. You may
4 need to adjust this code.
5 */
6 if (true) {
7 ... // code path 1
8 /*
9 DPCT1035:1: All SYCL devices can be used by the host to submit tasks. You may
10 need to adjust this code.
11 */
12 } else if (false) {
13 ... // code path 2
14 /*
15 DPCT1035:2: All SYCL devices can be used by the host to submit tasks. You may
16 need to adjust this code.
17 */
18 } else if (false) {
19 ... // code path 3
20 }
21 }
which is rewritten to:
1 void foo(dpct::device_info deviceProp) {
2 ... // code path 1
3 }