DPCT1023

メッセージ

SYCL* のサブグループは、<API name>.<修正方法の提案> のマスクオプションをサポートしていません。

説明

この警告は、移行に使用される SYCL* サブグループ関数にマスク・パラメーターがない場合に生成されます。オリジナルのマスク・パラメーターが使用されていない場合、この警告は無視できます。

修正方法の提案

コードの正当性を検証してください。

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


1 __device__ void d(unsigned mask, int val, int srcLane) { 
2 __shfl_sync(mask, val, srcLane); 
3 }

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


1 void d(unsigned mask, int val, int srcLane, 
2 const sycl::nd_item<3> &item_ct1) { 
3 /* 
4 DPCT1023:0: The SYCL sub-group does not support mask options for 
5 dpct::select_from_sub_group.You can specify 
6 "--use-experimental-features=masked-sub-group-operation" to use the dpct 
7 experimental helper function to migrate __shfl_sync.8 */ 
9 dpct::select_from_sub_group(item_ct1.get_sub_group(), val, srcLane); 
10 }

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


1 void d(unsigned mask, int val, int srcLane, 
2 const sycl::nd_item<3> &item_ct1) { 
3 // If this compiler & runtime support group non-uniform shuffle, then you can 
4 // use this API 
5 dpct::experimental::select_from_sub_group(mask, item_ct1.get_sub_group(), val, srcLane); 
6 }