DPCT1088
Contents
DPCT1088#
Message#
The macro definition has multiple migration results in the dimension of free queries function that could not be unified. You may need to modify the code.
Detailed Help#
IntelĀ® DPC++ Compatibility Tool was unable to migrate the code correctly. You need to modify the code manually.
For example, this original CUDA* code:
1 #define TB(x) cg::thread_block x = cg::this_thread_block()
2
3 __global__ void kernel1() {
4 int id = threadIdx.x;
5 TB(a);
6 }
7 __global__ void kernel3() {
8 int id = threadIdx.z;
9 TB(b);
10 }
migrated with options --assume-nd-range-dim=1
and
--use-experimental-features=free-function-queries
, results in the following
migrated SYCL code:
1 #define TB(x) auto x = sycl::this_group< Placeholder /* Fix the dimension manually */>()
2 // It should be this_group<1>() when used in kernel1 and this_group<3>() when used in kernel3
3
4 void kernel1() {
5 int id = sycl::this_nd_item<1>().get_local_id(0);
6 TB(a);
7 }
8 void kernel3() {
9 int id = sycl::this_nd_item<3>().get_local_id(0);
10 TB(b);
11 }
which is manually adjusted to:
1 #define TB(x, dimensions) auto x = sycl::this_group< dimensions >()
2
3 void kernel1() {
4 int id = sycl::this_nd_item<1>().get_local_id(0);
5 TB(a, 1);
6 }
7 void kernel3() {
8 int id = sycl::this_nd_item<3>().get_local_id(0);
9 TB(b, 3);
10 }
Suggestions to Fix#
Rewrite the code manually.