Community
cancel
Showing results for 
Search instead for 
Did you mean: 
269 Views

dpct generating spurious '>' in converted code

Hi,

This is to report an issue that dpct is generating spurious > symbol when converting nested kernel call.

I converted cuda code /winner_takes_all.cu from repo libSGM. In the converted code, dpct is generating spurious '>' at two places, on line 251 and line 273. Converted file (winner_takes_all.dp.cpp) is attached too for reference.

cuda code:

		winner_takes_all_kernel<MAX_DISPARITY, 8, compute_disparity_subpixel<MAX_DISPARITY>><<<gdim, bdim, 0, stream>>>(
			left_dest, right_dest, src, width, height, pitch, uniqueness);

converted code:

 winner_takes_all_kernel<MAX_DISPARITY, 8,
                                    compute_disparity_subpixel<MAX_DISPARITY>> >
                (left_dest, right_dest, src, width, height, pitch, uniqueness,
                 item_ct1,
                 dpct::accessor<uint16_t, dpct::local, 3>(
                     smem_cost_sum_acc_ct1, smem_cost_sum_range_ct1));

There is a spurious > after compute_disparity_subpixel<MAX_DISPARITY>>

Regards,
Gagan

 

Tags (1)
0 Kudos
4 Replies
AbhishekD_Intel
Moderator
269 Views

Hi Gagan,

We tried migrating winner_takes_all.cu and we have also got the same issue but there is a way which will help you to resolve such an issue.

You can provide a space(<MAX_DISPARITY>><<<...>>> to <MAX_DISPARITY> ><<<...>>>) in your original cuda file (winner_takes_all.cu) like given below:

                         winner_takes_all_kernel<MAX_DISPARITY, 8, compute_disparity_subpixel<MAX_DISPARITY> ><<<gdim, bdim, 0, stream>>>(
                            left_dest, right_dest, src, width, height, pitch, uniqueness);

Make above change on both the lines and then migrate the code with DPCT, this will solve your problem of extra ">" in the migrated code.

Do let us know if it is working for you or not.

 

Warm Regards,

Abhishek

 

269 Views

Thanks for looking into the issue, Abhishek.

Actually the issue I reported was that dpct is generating an extra '>'.

The code dpct generated is: compute_disparity_subpixel<MAX_DISPARITY>> where the highlighted (in bold) '>' is not required. I resolved the error by removing that extra '>' symbol. It did not need extra space between preceding two '>' symbols.

Original cuda code is: winner_takes_all_kernel<MAX_DISPARITY, 8, compute_disparity_subpixel<MAX_DISPARITY>>, which also contains only two '>' symbols. So the issue is that dpct is generating an extra '>' symbol out of nowhere and is not even needed.

Hope that clarifies the issue I tried to report.

Regards,
Gagan

 

AbhishekD_Intel
Moderator
253 Views

Hi Gagan,

As you want this feature in the DPCT we are forwarding this feature request to our concerned team.

 

 

Warm Regards,

Abhishek


193 Views

This issue has been resolved and we will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only


Reply