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.
This issue is fixed in the latest oneAPI Update. Below is a simple testcase which we tested this against.
$ cat cudastream.cu
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"
Processed 1 file(s) in -in-root folder "/home/anoop/CUDASTREAM"
See Diagnostics Reference to resolve warnings and complete the migration:
$ cat dpct_output/cudastream.dp.cpp
template <int MAX_DISPARITY> void foo(sycl::queue *stream);