Skip to content

Commit d50a05e

Browse files
authored
[SYCLomatic] Add query-api-mapping for 11 runtime APIs (#2932)
Signed-off-by: Jiang, Zhiwei <zhiwei.jiang@intel.com>
1 parent 78435a6 commit d50a05e

14 files changed

+209
-11
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Option: --use-experimental-features=graph
2+
3+
void test(cudaGraphExec_t graph_exec) {
4+
// Start
5+
cudaGraphExecDestroy(graph_exec /*cudaGraphExec_t*/);
6+
// End
7+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Option: --use-experimental-features=graph
2+
3+
void test(cudaGraphExec_t graph_exec, cudaGraph_t graph, cudaGraphNode_t *node,
4+
cudaGraphExecUpdateResult *result) {
5+
// Start
6+
cudaGraphExecUpdate(graph_exec /*cudaGraphExec_t*/, graph /*cudaGraph_t*/,
7+
node /*cudaGraphNode_t **/,
8+
result /*cudaGraphExecUpdateResult **/);
9+
// End
10+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Option: --use-experimental-features=graph
2+
3+
void test(cudaGraph_t graph, cudaGraphNode_t *nodes, size_t *num_nodes) {
4+
// Start
5+
cudaGraphGetNodes(graph /*cudaGraph_t*/, nodes /*cudaGraphNode_t **/,
6+
num_nodes /*size_t **/);
7+
// End
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Option: --use-experimental-features=graph
2+
3+
void test(cudaGraph_t graph, cudaGraphNode_t *nodes, size_t *num_nodes) {
4+
// Start
5+
cudaGraphGetRootNodes(graph /*cudaGraph_t*/, nodes /*cudaGraphNode_t **/,
6+
num_nodes /*size_t **/);
7+
// End
8+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Option: --use-experimental-features=graph
2+
3+
void test(cudaGraphExec_t *graph_exec, cudaGraph_t graph, cudaGraphNode_t *node,
4+
char *buffer, size_t buffer_size) {
5+
// Start
6+
cudaGraphInstantiate(graph_exec /*cudaGraphExec_t **/, graph /*cudaGraph_t*/,
7+
node /*cudaGraphNode_t **/, buffer /*char **/,
8+
buffer_size /*size_t*/);
9+
// End
10+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Option: --use-experimental-features=graph
2+
3+
void test(cudaGraphExec_t graph_exec, cudaStream_t stream) {
4+
// Start
5+
cudaGraphLaunch(graph_exec /*cudaGraphExec_t*/, stream /*cudaStream_t*/);
6+
// End
7+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Option: --use-experimental-features=graph
2+
3+
void test(cudaGraphNode_t node, cudaGraphNodeType *node_type) {
4+
// Start
5+
cudaGraphNodeGetType(node /*cudaGraphNode_t*/,
6+
node_type /*cudaGraphNodeType **/);
7+
// End
8+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Option: --use-experimental-features=bindless_images
2+
3+
template <class T>
4+
__global__ void test(T *ptr, int x, cudaSurfaceBoundaryMode boundary_mode,
5+
cudaSurfaceObject_t obj) {
6+
// Start
7+
surf1Dread<T>(obj /*cudaSurfaceObject_t*/, x /*int*/,
8+
boundary_mode /*cudaSurfaceBoundaryMode*/);
9+
surf1Dread(ptr /*T **/, obj /*cudaSurfaceObject_t*/, x /*int*/,
10+
boundary_mode /*cudaSurfaceBoundaryMode*/);
11+
// End
12+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Option: --use-experimental-features=bindless_images
2+
3+
template <class T>
4+
__global__ void test(T val, int x, cudaSurfaceBoundaryMode boundary_mode,
5+
cudaSurfaceObject_t obj) {
6+
// Start
7+
surf1Dwrite(val /*T*/, obj /*cudaSurfaceObject_t*/, x /*int*/,
8+
boundary_mode /*cudaSurfaceBoundaryMode*/);
9+
// End
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Option: --use-experimental-features=bindless_images
2+
3+
template <class T>
4+
__global__ void test(T *ptr, float x, int layer, cudaTextureObject_t tex) {
5+
// Start
6+
tex1DLayered<T>(tex /*cudaTextureObject_t*/, x /*float*/, layer /*int*/);
7+
tex1DLayered(ptr /*T **/, tex /*cudaTextureObject_t*/, x /*float*/,
8+
layer /*int*/);
9+
// End
10+
}

0 commit comments

Comments
 (0)