|
3 | 3 |
|
4 | 4 | // RUN:dpct --enable-profiling --no-dpcpp-extensions=enqueued_barriers --format-range=none -out-root %T/event_record_with_flags_no_qb %s --cuda-include-path="%cuda-path/include" --sycl-named-lambda -- -std=c++14 -x cuda --cuda-host-only
|
5 | 5 | // RUN: FileCheck --input-file %T/event_record_with_flags_no_qb/event_record_with_flags_no_qb.dp.cpp --match-full-lines %s
|
| 6 | +// RUN: %if build_lit %{icpx -c -fsycl -DNO_BUILD_TEST %T/event_record_with_flags_no_qb/event_record_with_flags_no_qb.dp.cpp -o %T/event_record_with_flags_no_qb/event_record_with_flags_no_qb.dp.o %} |
| 7 | + |
6 | 8 |
|
7 | 9 | // CHECK:#define DPCT_PROFILING_ENABLED
|
8 | 10 | // CHECK-NEXT:#include <sycl/sycl.hpp>
|
9 | 11 | // CHECK-NEXT:#include <dpct/dpct.hpp>
|
10 | 12 | #include <cuda_runtime.h>
|
11 | 13 |
|
12 |
| -// CHECK: void cudaEventRecordWithFlags_test() { |
13 |
| -// CHECK-NEXT: dpct::event_ptr start, stop; |
| 14 | +// CHECK: void cudaEventRecordWithFlags_1() { |
| 15 | +// CHECK-NEXT: dpct::event_ptr start; |
14 | 16 | // CHECK-NEXT: dpct::queue_ptr stream;
|
15 | 17 | // CHECK-NEXT: *start = stream->single_task([=](){});
|
| 18 | +// CHECK-NEXT: } |
| 19 | +void cudaEventRecordWithFlags_1() { |
| 20 | + cudaEvent_t start; |
| 21 | + cudaStream_t stream; |
| 22 | + cudaEventRecordWithFlags(start, stream, cudaEventRecordDefault); |
| 23 | +} |
| 24 | + |
| 25 | +#ifndef NO_BUILD_TEST |
| 26 | +// CHECK: void cudaEventRecordWithFlags_2() { |
| 27 | +// CHECK-NEXT: dpct::event_ptr start; |
| 28 | +// CHECK-NEXT: dpct::queue_ptr stream; |
16 | 29 | // CHECK-NEXT: /*
|
17 | 30 | // CHECK-NEXT: DPCT1028:{{[0-9a-f]+}}: The cudaEventRecordWithFlags was not migrated because parameter cudaEventRecordExternal is unsupported.
|
18 | 31 | // CHECK-NEXT: */
|
19 |
| -// CHECK-NEXT: cudaEventRecordWithFlags(stop, stream, cudaEventRecordExternal); |
20 |
| -// CHECK-NEXT:} |
21 |
| -void cudaEventRecordWithFlags_test() { |
22 |
| - cudaEvent_t start, stop; |
| 32 | +// CHECK-NEXT: cudaEventRecordWithFlags(start, stream, cudaEventRecordExternal); |
| 33 | +// CHECK-NEXT: } |
| 34 | +void cudaEventRecordWithFlags_2() { |
| 35 | + cudaEvent_t start; |
23 | 36 | cudaStream_t stream;
|
24 |
| - cudaEventRecordWithFlags(start, stream, cudaEventRecordDefault); |
25 |
| - cudaEventRecordWithFlags(stop, stream, cudaEventRecordExternal); |
| 37 | + cudaEventRecordWithFlags(start, stream, cudaEventRecordExternal); |
26 | 38 | }
|
| 39 | +#endif |
0 commit comments