Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion clang/lib/DPCT/ASTTraversal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7983,7 +7983,8 @@ void StreamAPICallRule::runRule(const MatchFinder::MatchResult &Result) {
} else if (FuncName == "cudaStreamWaitEvent" ||
FuncName == "cuStreamWaitEvent") {
std::string ReplStr;
auto StmtStr1 = getStmtSpelling(CE->getArg(1));
ExprAnalysis EA(CE->getArg(1));
std::string StmtStr1 = EA.getReplacedString();
if (!DpctGlobalInfo::useEnqueueBarrier()) {
// ext_oneapi_submit_barrier is specified in the value of option
// --no-dpcpp-extensions.
Expand Down
4 changes: 2 additions & 2 deletions clang/test/dpct/cuda-stream-api.cu
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ static void func()
MY_ERROR_CHECKER(cudaStreamAttachMemAsync(s0, nullptr));

cudaEvent_t e;
// CHECK: s0->ext_oneapi_submit_barrier({*e});
cudaStreamWaitEvent(s0, e, 0);
// CHECK: s0->ext_oneapi_submit_barrier({*(dpct::event_ptr)e});
cudaStreamWaitEvent(s0, (cudaEvent_t)e, 0);

// CHECK: /*
// CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudaStreamQuery was removed because SYCL currently does not support query operations on queues.
Expand Down