Skip to content

Commit c14eae2

Browse files
[SYCLomatic] Add 12 runtime APIs for query-api-mapping (#2933)
Signed-off-by: chenwei.sun <chenwei.sun@intel.com>
2 parents 0fe9d81 + 21d03b9 commit c14eae2

17 files changed

+248
-6
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Option: --use-experimental-features=bindless_images
2+
3+
void test() {
4+
// clang-format off
5+
// Start
6+
static texture<float4, 3> tex3;
7+
cudaMipmappedArray_t pMipMapArr;
8+
cudaBindTextureToMipmappedArray(tex3 /*const struct texture<T, dim, readMode>*/, pMipMapArr /*cudaMipmappedArray_const_t*/);
9+
// End
10+
// clang-format on
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Option: --use-experimental-features=bindless_images
2+
3+
void test() {
4+
static texture<float4, 3> tex3;
5+
cudaMipmappedArray_t pMipMapArr;
6+
// clang-format off
7+
// Start
8+
cudaChannelFormatDesc halfChn = cudaCreateChannelDescHalf();
9+
// End
10+
// clang-format on
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Option: --use-experimental-features=bindless_images
2+
3+
void test() {
4+
static texture<float4, 3> tex3;
5+
cudaMipmappedArray_t pMipMapArr;
6+
// clang-format off
7+
// Start
8+
cudaChannelFormatDesc half1Chn = cudaCreateChannelDescHalf1();
9+
// End
10+
// clang-format on
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Option: --use-experimental-features=bindless_images
2+
3+
void test() {
4+
static texture<float4, 3> tex3;
5+
cudaMipmappedArray_t pMipMapArr;
6+
// clang-format off
7+
// Start
8+
cudaChannelFormatDesc half2Chn = cudaCreateChannelDescHalf2();
9+
// End
10+
// clang-format on
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Option: --use-experimental-features=bindless_images
2+
3+
void test() {
4+
static texture<float4, 3> tex3;
5+
cudaMipmappedArray_t pMipMapArr;
6+
// clang-format off
7+
// Start
8+
cudaChannelFormatDesc half4Chn = cudaCreateChannelDescHalf4();
9+
// End
10+
// clang-format on
11+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Option: --use-experimental-features=bindless_images
2+
#include <cuda.h>
3+
#include <cuda_runtime.h>
4+
5+
void test() {
6+
cudaSurfaceObject_t surf;
7+
cudaResourceDesc resDesc;
8+
// clang-format off
9+
// Start
10+
cudaCreateSurfaceObject(&surf /*cudaSurfaceObject_t* */, &resDesc /*const cudaResourceDesc* */);
11+
// End
12+
// clang-format on
13+
}
14+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Option: --use-experimental-features=bindless_images
2+
#include <cuda.h>
3+
#include <cuda_runtime.h>
4+
5+
void test() {
6+
cudaSurfaceObject_t surf;
7+
// clang-format off
8+
// Start
9+
cudaDestroySurfaceObject(surf /*cudaSurfaceObject_t*/);
10+
// End
11+
// clang-format on
12+
}
13+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include <cuda_runtime.h>
2+
3+
void test(int i) {
4+
// Start
5+
cudaDeviceProp *pd;
6+
cudaGetDeviceProperties_v2(pd /*cudaDeviceProp* */, i /*int*/);
7+
// End
8+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Option: --use-experimental-features=bindless_images
2+
#include <cuda.h>
3+
#include <cuda_runtime.h>
4+
5+
void test() {
6+
cudaSurfaceObject_t surf;
7+
cudaResourceDesc resDesc;
8+
// clang-format off
9+
// Start
10+
cudaGetSurfaceObjectResourceDesc(&resDesc /*cudaResourceDesc* */, surf /*cudaSurfaceObject_t*/);
11+
// End
12+
// clang-format on
13+
}
14+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Option: --use-experimental-features=graph
2+
#include <cuda.h>
3+
#include <cuda_runtime.h>
4+
5+
void test() {
6+
cudaGraph_t graph;
7+
cudaGraphNode_t node4[10];
8+
cudaGraphNode_t node5[10];
9+
// clang-format off
10+
// Start
11+
cudaGraphAddDependencies(graph /*cudaGraph_t*/, node4 /*const cudaGraphNode_t* */, node5 /*const cudaGraphNode_t* */, 10 /*size_t*/);
12+
// End
13+
// clang-format on
14+
}
15+

0 commit comments

Comments
 (0)