DPCT1073#

Message#

The field values of parameter <parameter name> could not be deduced, so the call was not migrated. You need to update this code manually.

Detailed Help#

SYCLomatic could not deduce the field values of the call parameter, which is used in the migrated code.

Suggestions to Fix#

Manually replace the non-migrated call with a DPC++ expression using the actual field values of the parameters.

For example, this original CUDA* code:

 1CUDA_ARRAY_DESCRIPTOR desc;
 2
 3void bar(CUDA_ARRAY_DESCRIPTOR *desc_ptr) {
 4  CUarray arr;
 5  cuArrayCreate(&arr, desc_ptr);
 6}
 7
 8void foo(CUarray_format f, size_t h, unsigned int n, size_t w) {
 9  desc.Height = h;
10  desc.Width = w;
11  desc.Format = f;
12  desc.NumChannels = n;
13  bar(&desc);
14}

results in the following migrated SYCL* code:

 1size_t desc_x_ct1, desc_y_ct1;
 2unsigned desc_channel_num_ct1;
 3sycl::image_channel_type desc_channel_type_ct1;
 4
 5/*
 6DPCT1082:1: Migration of CUDA_ARRAY_DESCRIPTOR * type is not supported.
 7*/
 8void bar(CUDA_ARRAY_DESCRIPTOR *desc_ptr) {
 9  dpct::image_matrix_p arr;
10  /*
11  DPCT1073:0: The field values of parameter 'desc_ptr' could not be deduced, so
12  the call was not migrated. You need to update this code manually.
13  */
14  cuArrayCreate(&arr, desc_ptr);
15}
16
17void foo(sycl::image_channel_type f, size_t h, unsigned int n, size_t w) {
18  desc_y_ct1 = h;
19  desc_x_ct1 = w;
20  desc_channel_type_ct1 = f;
21  desc_channel_num_ct1 = n;
22  bar(&desc);
23}

which is manually adjusted to:

 1size_t desc_x_ct1, desc_y_ct1;
 2unsigned desc_channel_num_ct1;
 3sycl::image_channel_type desc_channel_type_ct1;
 4
 5void bar() {
 6  dpct::image_matrix_p arr;
 7  arr = new dpct::image_matrix(desc_channel_type_ct1, desc_channel_num_ct1,
 8                               desc_x_ct1, desc_y_ct1);
 9}
10
11void foo(sycl::image_channel_type f, size_t h, unsigned int n, size_t w) {
12  desc_y_ct1 = h;
13  desc_x_ct1 = w;
14  desc_channel_type_ct1 = f;
15  desc_channel_num_ct1 = n;
16  bar();
17}