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

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

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

 

Tags (1)
0 Kudos
2 Replies
RahulV_intel
Moderator
184 Views

Hi Gagan,

Thanks for reporting this bug.

I will escalate this issue to the concerned team.

 

--Rahul

Anoop_M_Intel
Employee
66 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-us...


$ cat dpct_output/cudastream.dp.cpp

#include <CL/sycl.hpp>

#include <dpct/dpct.hpp>

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



Reply