-
Notifications
You must be signed in to change notification settings - Fork 96
Expand file tree
/
Copy pathcudaGraph_test_default_option.cu
More file actions
108 lines (85 loc) · 4.81 KB
/
cudaGraph_test_default_option.cu
File metadata and controls
108 lines (85 loc) · 4.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// 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 -out-root %T/cudaGraph_test_default_option %s --cuda-include-path="%cuda-path/include" -- -x cuda --cuda-host-only --std=c++14
// RUN: FileCheck --input-file %T/cudaGraph_test_default_option/cudaGraph_test_default_option.dp.cpp --match-full-lines %s
// RUN: %if build_lit %{icpx -c -DNO_BUILD_TEST -fsycl %T/cudaGraph_test_default_option/cudaGraph_test_default_option.dp.cpp -o %T/cudaGraph_test_default_option/cudaGraph_test.dp.o %}
#ifndef NO_BUILD_TEST
#include <cuda.h>
int main() {
// CHECK: /*
// CHECK-NEXT: DPCT1119:{{[0-9]+}}: Migration of cudaGraph_t is not supported, please try to remigrate with option: --use-experimental-features=graph.
// CHECK-NEXT: */
cudaGraph_t graph;
// CHECK: /*
// CHECK-NEXT: DPCT1119:{{[0-9]+}}: Migration of cudaGraphExec_t is not supported, please try to remigrate with option: --use-experimental-features=graph.
// CHECK-NEXT: */
cudaGraphExec_t execGraph;
cudaStream_t stream;
cudaStreamCreate(&stream);
// CHECK: /*
// CHECK-NEXT: DPCT1119:{{[0-9]+}}: Migration of cudaStreamBeginCapture is not supported, please try to remigrate with option: --use-experimental-features=graph.
// CHECK-NEXT: */
cudaStreamBeginCapture(stream, cudaStreamCaptureModeGlobal);
// CHECK: /*
// CHECK-NEXT: DPCT1119:{{[0-9]+}}: Migration of cudaStreamEndCapture is not supported, please try to remigrate with option: --use-experimental-features=graph.
// CHECK-NEXT: */
cudaStreamEndCapture(stream, &graph);
// CHECK: /*
// CHECK-NEXT: DPCT1119:{{[0-9]+}}: Migration of cudaStreamCaptureStatus is not supported, please try to remigrate with option: --use-experimental-features=graph.
// CHECK-NEXT: */
cudaStreamCaptureStatus captureStatus;
// CHECK: /*
// CHECK-NEXT: DPCT1119:{{[0-9]+}}: Migration of cudaStreamCaptureStatusActive is not supported, please try to remigrate with option: --use-experimental-features=graph.
// CHECK-NEXT: */
captureStatus = cudaStreamCaptureStatusActive;
// CHECK: /*
// CHECK-NEXT: DPCT1119:{{[0-9]+}}: Migration of cudaStreamCaptureStatusNone is not supported, please try to remigrate with option: --use-experimental-features=graph.
// CHECK-NEXT: */
captureStatus = cudaStreamCaptureStatusNone;
// CHECK: /*
// CHECK-NEXT: DPCT1007:{{[0-9]+}}: Migration of cudaStreamCaptureStatusInvalidated is not supported.
// CHECK-NEXT: */
captureStatus = cudaStreamCaptureStatusInvalidated;
// CHECK: /*
// CHECK-NEXT: DPCT1119:{{[0-9]+}}: Migration of cudaStreamIsCapturing is not supported, please try to remigrate with option: --use-experimental-features=graph.
// CHECK-NEXT: */
cudaStreamIsCapturing(stream, &captureStatus);
// CHECK: /*
// CHECK-NEXT: DPCT1119:{{[0-9]+}}: Migration of cudaGraphNode_t is not supported, please try to remigrate with option: --use-experimental-features=graph.
// CHECK-NEXT: */
cudaGraphNode_t node;
// CHECK: /*
// CHECK: DPCT1119:{{[0-9]+}}: Migration of cudaGraphAddEmptyNode is not supported, please try to remigrate with option: --use-experimental-features=graph.
// CHECK-NEXT: */
cudaGraphAddEmptyNode(&node, graph, NULL, 0);
// CHECK: /*
// CHECK-NEXT: DPCT1119:{{[0-9]+}}: Migration of cudaGraphAddDependencies is not supported, please try to remigrate with option: --use-experimental-features=graph.
// CHECK-NEXT: */
cudaGraphAddDependencies(graph, NULL, NULL, 0);
// CHECK: /*
// CHECK-NEXT: DPCT1119:{{[0-9]+}}: Migration of cudaGraphInstantiate is not supported, please try to remigrate with option: --use-experimental-features=graph.
// CHECK-NEXT: */
cudaGraphInstantiate(&execGraph, graph, nullptr, nullptr, 0);
// CHECK: /*
// CHECK-NEXT: DPCT1119:{{[0-9]+}}: Migration of cudaGraphLaunch is not supported, please try to remigrate with option: --use-experimental-features=graph.
// CHECK-NEXT: */
cudaGraphLaunch(execGraph, stream);
// CHECK: /*
// CHECK-NEXT: DPCT1007:{{[0-9]+}}: Migration of cudaGraphExecUpdateResult is not supported.
// CHECK-NEXT: */
cudaGraphExecUpdateResult status;
// CHECK: /*
// CHECK-NEXT: DPCT1119:{{[0-9]+}}: Migration of cudaGraphExecUpdate is not supported, please try to remigrate with option: --use-experimental-features=graph.
// CHECK-NEXT: */
cudaGraphExecUpdate(execGraph, graph, nullptr, &status);
// CHECK: /*
// CHECK-NEXT: DPCT1119:{{[0-9]+}}: Migration of cudaGraphExecDestroy is not supported, please try to remigrate with option: --use-experimental-features=graph.
// CHECK-NEXT: */
cudaGraphExecDestroy(execGraph);
// CHECK: /*
// CHECK-NEXT: DPCT1119:{{[0-9]+}}: Migration of cudaGraphDebugDotPrint is not supported, please try to remigrate with option: --use-experimental-features=graph.
// CHECK-NEXT: */
cudaGraphDebugDotPrint(graph, "graph.dot", 1);
return 0;
}
#endif