Visible to Intel only — GUID: GUID-64117CB8-A6BB-4256-922D-F4F8506A1962
Visible to Intel only — GUID: GUID-64117CB8-A6BB-4256-922D-F4F8506A1962
DPCT1101
Message
<expression text> expression was replaced with a value. Modify the code to use the original expression, provided in comments, if it is correct.
Detailed Help
Identities, including constant variable names, types, and macros, used in the migrated SYCL* code are replaced with their value since they may not be available in the code scope. User can replace the value with the original expression listed in the comment manually after confirming that the identities are available in the code scope.
Suggestions to Fix
Use a macro or const variable to replace the value.
For example, this original CUDA* code:
__global__ void f() { const int x = 2; __shared__ int fold[x]; } int main() { f<<<1, 1>>>(); return 0; }
results in the following migrated SYCL code:
void f(int *fold) { const int x = 2; } int main() { dpct::get_default_queue().submit([&](sycl::handler &cgh) { sycl::local_accessor<int, 1> fold_acc_ct1(sycl::range<1>(2 /*x*/), cgh); cgh.parallel_for( sycl::nd_range<3>(sycl::range<3>(1, 1, 1), sycl::range<3>(1, 1, 1)), [=](sycl::nd_item<3> item_ct1) { f(fold_acc_ct1.get_pointer()); }); }); return 0; }
which is rewritten to:
const int x = 2; void f(int *fold) { } int main() { dpct::get_default_queue().submit([&](sycl::handler &cgh) { sycl::local_accessor<int, 1> fold_acc_ct1(sycl::range<1>(x), cgh); cgh.parallel_for( sycl::nd_range<3>(sycl::range<3>(1, 1, 1), sycl::range<3>(1, 1, 1)), [=](sycl::nd_item<3> item_ct1) { f(fold_acc_ct1.get_pointer()); }); }); return 0; }