DPCT1072

メッセージ

SYCL* は、現在のデバイスで利用可能なメモリーの取得をサポートしていません。コードを調整する必要があります。

説明

SYCL* は、現在のデバイスで利用可能なメモリーの取得をサポートしていません。

修正方法の提案

次を試します: (1) --no-dpcpp-extensions=device_info オプションを使用しないでコードを再度移行します。 または、 (2) コードを手動で書き直します。

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


1void foo() { 
2 size_t result1, result2; 
3 cudaMemGetInfo(&result1, &result2); 
4}

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


1void foo() { 
2 size_t result1, result2; 
3 /* 
4 DPCT1072:0: SYCL currently does not support getting the available memory on 
5 the current device. You may need to adjust the code. 
6 */ 
7 result2 = dpct::get_current_device().get_device_info().get_global_mem_size(); 
8}

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


1void foo() { 
2 size_t result1, result2; 
3 dpct::get_current_device().get_memory_info(result1, result2); 
4}