DPCT1017

メッセージ

<CUDA API name> 呼び出しの代わりに <SYCL API name> 呼び出しが使用されます。この 2 つの呼び出しは同じ機能を提供するものではありません。生成されたコードの潜在的な精度やパフォーマンスの問題を確認してください。

説明

インテル® DPC++ 互換性ツールは、同機能の SYCL* 関数が見つからなかったため、最も近いものを使用しました。これは、コードの精度やパフォーマンスに影響する可能性があります。コードの正当性とパフォーマンスを検証してください。

修正方法の提案

コードの正当性とパフォーマンスを検証してください。

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


1__global__ void k(float *out, float *in) {
2 *out = normf(3, in);
3}

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


1void k(float *out, float *in) {
2 /* 
3 DPCT1017:0: The dpct::length call is used instead of the normf call.These two 
4 calls do not provide exactly the same functionality.Check the potential 
5 precision and/or performance issues for the generated code.   
6  */
7 *out = dpct::length(in, 3);
8}

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


1#include <sycl/ext/intel/math.hpp>
2void k(float *out, float *in) {
3 /*
4 If the extension API sycl::ext::intel::math::norm is available, the following
5 line can alternately be migrated to *out = sycl::ext::intel::math::norm(3, in);
6 */
7 *out = dpct::length(in, 3);
8}