-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCLomatic] Enable migration of cudaStreamCaptureStatus enum and SYC…
…L graphs exp option Signed-off-by: Ahmed, Daiyaan <[email protected]>
- Loading branch information
1 parent
7a56e37
commit 4b6d51d
Showing
6 changed files
with
65 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// UNSUPPORTED: cuda-8.0, cuda-9.0, cuda-9.1, cuda-9.2 | ||
// UNSUPPORTED: v8.0, v9.0, v9.1, v9.2 | ||
// RUN: dpct --format-range=none --use-experimental-features=graphs -out-root %T/cuda-stream-api-cuda10-after %s --cuda-include-path="%cuda-path/include" -- -x cuda --cuda-host-only --std=c++14 | ||
// RUN: FileCheck --input-file %T/cuda-stream-api-cuda10-after/cuda-stream-api-cuda10-after.dp.cpp --match-full-lines %s | ||
// RUN: %if build_lit %{icpx -c -fsycl %T/cuda-stream-api-cuda10-after/cuda-stream-api-cuda10-after.dp.cpp -o %T/cuda-stream-api-cuda10-after/cuda-stream-api-cuda10-after.dp.o %} | ||
|
||
template <typename T> | ||
// CHECK: void my_error_checker(T ReturnValue, char const *const FuncName) { | ||
void my_error_checker(T ReturnValue, char const *const FuncName) { | ||
} | ||
|
||
#define MY_ERROR_CHECKER(CALL) my_error_checker((CALL), #CALL) | ||
|
||
int main() { | ||
cudaStream_t s0; | ||
// CHECK: sycl::ext::oneapi::experimental::queue_state captureStatus = sycl::ext::oneapi::experimental::queue_state::executing; | ||
// CHECK-NEXT: captureStatus = sycl::ext::oneapi::experimental::queue_state::recording; | ||
// CHECK-NEXT: captureStatus = sycl::ext::oneapi::experimental::queue_state::executing; | ||
cudaStreamCaptureStatus captureStatus = cudaStreamCaptureStatusNone; | ||
captureStatus = cudaStreamCaptureStatusActive; | ||
captureStatus = cudaStreamCaptureStatusInvalidated; | ||
// CHECK: /* | ||
// CHECK-NEXT: DPCT1027:{{[0-9]+}}: The call to cudaStreamIsCapturing was replaced with 0 because SYCL currently does not support capture operations on queues. | ||
// CHECK-NEXT: */ | ||
// CHECK: MY_ERROR_CHECKER(0); | ||
MY_ERROR_CHECKER(cudaStreamIsCapturing(s0, &captureStatus)); | ||
|
||
return 0; | ||
} |