DPCT1028

メッセージ

<reason> により、オリジナルの <API name> は移行されませんでした。

説明

インテル® DPC++ 互換性ツールは、CUDA* デバイス属性として使用されるパラメーター値を認識できませんでした。

修正方法の提案

コードロジックを再設計して、デバイス属性を削除します。

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


1 void foo(int *result, CUdevice device) { 
2 cuDeviceGetAttribute(result, CU_DEVICE_ATTRIBUTE_GPU_OVERLAP, device); 
3 }

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


1 void foo(int *result, int device) { 
2 /* 
3 DPCT1028:0: The cuDeviceGetAttribute was not migrated because parameter 
4 CU_DEVICE_ATTRIBUTE_GPU_OVERLAP is unsupported.
5 */ 
6 cuDeviceGetAttribute(result, CU_DEVICE_ATTRIBUTE_GPU_OVERLAP, device); 
7 }

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


1 void foo(int *result, int device) { 
2 // Assume the HW supports copy memory and execute a kernel concurrently 
3 *result = 1; 
4 }