Skip to content

Commit 44fac3d

Browse files
authored
[SYCLomatic] Fix driver-stream-and-event.cu LIT failure (#2630)
Signed-off-by: Jiang, Zhiwei <zhiwei.jiang@intel.com>
1 parent 685602a commit 44fac3d

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

clang/test/dpct/driver-stream-and-event.cu

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,3 @@ unsigned getEventFlags(bool enabledSyncBlock) {
183183

184184
return flags;
185185
}
186-
187-
// CHECK: void test_stream_and_context(dpct::queue_ptr stream, int &context) {
188-
void test_stream_and_context(CUstream stream, CUcontext& context) {
189-
// CHECK: context = dpct::get_device_id(stream->get_device());
190-
cuStreamGetCtx(stream, &context);
191-
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// UNSUPPORTED: cuda-8.0
2+
// UNSUPPORTED: v8.0
3+
// RUN: dpct -out-root %T/driver-stream-and-event_after8.0 %s --cuda-include-path="%cuda-path/include"
4+
// RUN: FileCheck --match-full-lines --input-file %T/driver-stream-and-event_after8.0/driver-stream-and-event_after8.0.dp.cpp %s
5+
// RUN: %if build_lit %{icpx -c -fsycl %T/driver-stream-and-event_after8.0/driver-stream-and-event_after8.0.dp.cpp -o %T/driver-stream-and-event_after8.0/driver-stream-and-event_after8.0.dp.o %}
6+
7+
#include "cuda.h"
8+
9+
// CHECK: void test_stream_and_context(dpct::queue_ptr stream, int &context) {
10+
void test_stream_and_context(CUstream stream, CUcontext& context) {
11+
// CHECK: context = dpct::get_device_id(stream->get_device());
12+
cuStreamGetCtx(stream, &context);
13+
}

0 commit comments

Comments
 (0)