Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
585 Discussions

dpct not converting cudaStream_t stream to sycl::queue *stream in template instantiation code

Shukla__Gagandeep
1,086 Views

Hi,

This is just to report an issue with dpct that it is not converting cudaStream_t stream to sycl::queue *stream in template instantiation code.

For reference, I noticed it while converting horizontal_path_aggregation.cu file from repo libSGM and in template function "enqueue_aggregate_left2right_path", dpct converted function parameter cudaStream_t stream to sycl::queue *stream. Just after this function body, there is code to instantiate same functions with different template parameters like 

template void enqueue_aggregate_left2right_path<64u>(
	....
	cudaStream_t stream);

template void enqueue_aggregate_left2right_path<128u>(
	....
	cudaStream_t stream);

But dpct did not convert the patameter type from cudaStream_t to sycl::queue.

May be you want to look into that.

Regards,
Gagan

 

0 Kudos
2 Replies
RahulV_intel
Moderator
1,086 Views

Hi Gagan,

Thanks for reporting this bug.

I will escalate this issue to the concerned team.

 

--Rahul

0 Kudos
Anoop_M_Intel
Employee
968 Views

This issue is fixed in the latest oneAPI Update. Below is a simple testcase which we tested this against.


$ cat cudastream.cu

#include<cuda.h>

template<int MAX_DISPARITY>

void foo(cudaStream_t stream);


$ dpct cudastream.cu

NOTE: Could not auto-detect compilation database for file 'cudastream.cu' in '/home/anoop/CUDASTREAM' or any parent directory.

The directory "dpct_output" is used as "out-root"

Processing: /home/anoop/CUDASTREAM/cudastream.cu

Processed 1 file(s) in -in-root folder "/home/anoop/CUDASTREAM"


See Diagnostics Reference to resolve warnings and complete the migration:

https://software.intel.com/content/www/us/en/develop/documentation/intel-dpcpp-compatibility-tool-user-guide/top/diagnostics-reference.html


$ cat dpct_output/cudastream.dp.cpp

#include <CL/sycl.hpp>

#include <dpct/dpct.hpp>

template <int MAX_DISPARITY> void foo(sycl::queue *stream);



0 Kudos
Reply