DPCT1060#
Message#
SYCL range can only be a 1D, 2D, or 3D vector. Adjust the code.
Detailed Help#
This warning is emitted when the number of dimensions of memory in the original code exceeds 3. Since SYCL* range supports only 1, 2 or 3 dimensions, the resulting code is not SYCL-compliant.
To fix the resulting code you can use the low-dimensional arrays to simulate high-dimensional arrays.
The following fix example demonstrates how to use a 3D array to simulate a 4D array.
The following migrated SYCL code:
1 dpct::constant_memory<int, 4> array(dimX, dimY, dimZ, dimW);
2 void kernel(sycl::id<1> idx,
3 dpct::accessor<int, dpct::constant, 4> const_array) {
4 ...
5 ... = const_array[x][y][z][w];
6 ...
7 }
is manually adjusted to:
1 dpct::constant_memory<int, 3> array(dimX, dimY, dimZ * dimW);
2 void kernel(sycl::id<1> idx,
3 dpct::accessor<int, dpct::constant, 3> const_array) {
4 ... = const_array[x][y][w * dimZ + z];
5 ...
6 }
Suggestions to Fix#
You may need to rewrite this code.