|
32 | 32 | // CUDAUNBINDTEXTURE-NEXT: cudaUnbindTexture(ptr /*const textureReference **/); |
33 | 33 | // CUDAUNBINDTEXTURE-NEXT: Is migrated to (with the option --use-experimental-features=bindless_images): |
34 | 34 | // CUDAUNBINDTEXTURE-NEXT: ptr->detach(); |
| 35 | + |
| 36 | +// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cudaBindTextureToMipmappedArray | FileCheck %s -check-prefix=cudaBindTextureToMipmappedArray |
| 37 | +// cudaBindTextureToMipmappedArray: CUDA API: |
| 38 | +// cudaBindTextureToMipmappedArray-NEXT: static texture<float4, 3> tex3; |
| 39 | +// cudaBindTextureToMipmappedArray-NEXT: cudaMipmappedArray_t pMipMapArr; |
| 40 | +// cudaBindTextureToMipmappedArray-NEXT: cudaBindTextureToMipmappedArray(tex3 /*const struct texture<T, dim, readMode>*/, pMipMapArr /*cudaMipmappedArray_const_t*/); |
| 41 | +// cudaBindTextureToMipmappedArray-NEXT: Is migrated to (with the option --use-experimental-features=bindless_images): |
| 42 | +// cudaBindTextureToMipmappedArray-NEXT: dpct::experimental::bindless_image_wrapper<sycl::float4, 3> tex3; |
| 43 | +// cudaBindTextureToMipmappedArray-NEXT: dpct::experimental::image_mem_wrapper_ptr pMipMapArr; |
| 44 | +// cudaBindTextureToMipmappedArray-NEXT: tex3.attach(pMipMapArr); |
| 45 | + |
| 46 | +// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cudaCreateChannelDescHalf | FileCheck %s -check-prefix=cudaCreateChannelDescHalf |
| 47 | +// cudaCreateChannelDescHalf: CUDA API: |
| 48 | +// cudaCreateChannelDescHalf-NEXT: cudaChannelFormatDesc halfChn = cudaCreateChannelDescHalf(); |
| 49 | +// cudaCreateChannelDescHalf-NEXT: Is migrated to (with the option --use-experimental-features=bindless_images): |
| 50 | +// cudaCreateChannelDescHalf-NEXT: dpct::image_channel halfChn = dpct::image_channel::create<sycl::half>(); |
| 51 | + |
| 52 | +// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cudaCreateChannelDescHalf1 | FileCheck %s -check-prefix=cudaCreateChannelDescHalf1 |
| 53 | +// cudaCreateChannelDescHalf1: CUDA API: |
| 54 | +// cudaCreateChannelDescHalf1-NEXT: cudaChannelFormatDesc half1Chn = cudaCreateChannelDescHalf1(); |
| 55 | +// cudaCreateChannelDescHalf1-NEXT: Is migrated to (with the option --use-experimental-features=bindless_images): |
| 56 | +// cudaCreateChannelDescHalf1-NEXT: dpct::image_channel half1Chn = dpct::image_channel::create<sycl::half>(); |
| 57 | + |
| 58 | +// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cudaCreateChannelDescHalf2 | FileCheck %s -check-prefix=cudaCreateChannelDescHalf2 |
| 59 | +// cudaCreateChannelDescHalf2: CUDA API: |
| 60 | +// cudaCreateChannelDescHalf2-NEXT: cudaChannelFormatDesc half2Chn = cudaCreateChannelDescHalf2(); |
| 61 | +// cudaCreateChannelDescHalf2-NEXT: Is migrated to (with the option --use-experimental-features=bindless_images): |
| 62 | +// cudaCreateChannelDescHalf2-NEXT: dpct::image_channel half2Chn = dpct::image_channel::create<sycl::half2>(); |
| 63 | + |
| 64 | +// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cudaCreateChannelDescHalf4 | FileCheck %s -check-prefix=cudaCreateChannelDescHalf4 |
| 65 | +// cudaCreateChannelDescHalf4: CUDA API: |
| 66 | +// cudaCreateChannelDescHalf4-NEXT: cudaChannelFormatDesc half4Chn = cudaCreateChannelDescHalf4(); |
| 67 | +// cudaCreateChannelDescHalf4-NEXT: Is migrated to (with the option --use-experimental-features=bindless_images): |
| 68 | +// cudaCreateChannelDescHalf4-NEXT: dpct::image_channel half4Chn = dpct::image_channel::create<sycl::half4>(); |
| 69 | + |
| 70 | +// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cudaCreateSurfaceObject | FileCheck %s -check-prefix=cudaCreateSurfaceObject |
| 71 | +// cudaCreateSurfaceObject: CUDA API: |
| 72 | +// cudaCreateSurfaceObject-NEXT: cudaCreateSurfaceObject(&surf /*cudaSurfaceObject_t* */, &resDesc /*const cudaResourceDesc* pResDesc */); |
| 73 | +// cudaCreateSurfaceObject-NEXT: Is migrated to (with the option --use-experimental-features=bindless_images): |
| 74 | +// cudaCreateSurfaceObject-NEXT: surf = dpct::experimental::create_bindless_image(resDesc); |
| 75 | + |
| 76 | +// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cudaDestroySurfaceObject | FileCheck %s -check-prefix=cudaDestroySurfaceObject |
| 77 | +// cudaDestroySurfaceObject: CUDA API: |
| 78 | +// cudaDestroySurfaceObject-NEXT: cudaDestroySurfaceObject(surf /*cudaSurfaceObject_t*/); |
| 79 | +// cudaDestroySurfaceObject-NEXT: Is migrated to (with the option --use-experimental-features=bindless_images): |
| 80 | +// cudaDestroySurfaceObject-NEXT: dpct::experimental::destroy_bindless_image(surf, dpct::get_in_order_queue()); |
| 81 | + |
| 82 | +// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cudaGetSurfaceObjectResourceDesc | FileCheck %s -check-prefix=cudaGetSurfaceObjectResourceDesc |
| 83 | +// cudaGetSurfaceObjectResourceDesc: CUDA API: |
| 84 | +// cudaGetSurfaceObjectResourceDesc-NEXT: cudaGetSurfaceObjectResourceDesc(&resDesc /*cudaResourceDesc* */, surf /*cudaSurfaceObject_t*/); |
| 85 | +// cudaGetSurfaceObjectResourceDesc-NEXT: Is migrated to (with the option --use-experimental-features=bindless_images): |
| 86 | +// cudaGetSurfaceObjectResourceDesc-NEXT: resDesc = dpct::experimental::get_data(surf); |
| 87 | + |
| 88 | +// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cudaGraphAddDependencies | FileCheck %s -check-prefix=cudaGraphAddDependencies |
| 89 | +// cudaGraphAddDependencies: CUDA API: |
| 90 | +// cudaGraphAddDependencies-NEXT: cudaGraphAddDependencies(graph /*cudaGraph_t*/, node4 /*const cudaGraphNode_t* */, node5 /*const cudaGraphNode_t* */, 10 /*size_t */); |
| 91 | +// cudaGraphAddDependencies-NEXT: Is migrated to (with the option --use-experimental-features=graph): |
| 92 | +// cudaGraphAddDependencies-NEXT: dpct::experimental::add_dependencies(graph, node4, node5, 10); |
| 93 | + |
| 94 | +// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cudaGraphAddEmptyNode | FileCheck %s -check-prefix=cudaGraphAddEmptyNode |
| 95 | +// cudaGraphAddEmptyNode: CUDA API: |
| 96 | +// cudaGraphAddEmptyNode-NEXT: cudaGraphAddEmptyNode(&node /*cudaGraphNode_t* */, graph /*cudaGraph_t*/, node4 /*const cudaGraphNode_t* */, 10 /*size_t*/); |
| 97 | +// cudaGraphAddEmptyNode-NEXT: Is migrated to (with the option --use-experimental-features=graph): |
| 98 | +// cudaGraphAddEmptyNode-NEXT: dpct::experimental::add_empty_node(&node, graph, node4, 10); |
| 99 | + |
| 100 | +// RUN: dpct --cuda-include-path="%cuda-path/include" --query-api-mapping=cudaGraphDestroy | FileCheck %s -check-prefix=cudaGraphDestroy |
| 101 | +// cudaGraphDestroy: CUDA API: |
| 102 | +// cudaGraphDestroy-NEXT: cudaGraphDestroy(graph /*cudaGraph_t*/); |
| 103 | +// cudaGraphDestroy-NEXT: Is migrated to (with the option --use-experimental-features=graph): |
| 104 | +// cudaGraphDestroy-NEXT: delete (graph); |
0 commit comments