DPCT1035#

メッセージ#

すべての SYCL* デバイスは、ホストがタスクを送信するために使用できます。コードを調整する必要があります。

詳細な説明#

SYCL* では、ホストはすべての SYCL* デバイスに任意にタスクを送信できます。デバイスの計算モードをチェックする必要はありません。

修正方法の提案

コードを確認して、調整してください。

例えば、以下のオリジナル CUDA* コードについて考えてみます。


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   }

このコードは、以下の SYCL* コードに移行されます。


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  }

このコードは次のように書き換えられます。


1   void foo(dpct::device_info deviceProp) { 
2     ... // code path 1 
3   }