diff --git a/README.md b/README.md index e9e983c4..ede663db 100644 --- a/README.md +++ b/README.md @@ -456,94 +456,97 @@ Linux 5.13.0-21-generic - Platform OS 64 - hipify-clang binary bitness 64 - python 3.9.7 binary bitness ======================================== --- Testing: 85 tests, 12 threads -- -PASS: hipify :: unit_tests/casts/reinterpret_cast.cu (1 of 85) -PASS: hipify :: unit_tests/device/atomics.cu (2 of 85) -PASS: hipify :: unit_tests/compilation_database/cd_intro.cu (3 of 85) -PASS: hipify :: unit_tests/device/device_symbols.cu (4 of 85) -PASS: hipify :: unit_tests/device/math_functions.cu (5 of 85) -PASS: hipify :: unit_tests/headers/headers_test_01.cu (6 of 85) -PASS: hipify :: unit_tests/headers/headers_test_02.cu (7 of 85) -PASS: hipify :: unit_tests/headers/headers_test_03.cu (8 of 85) -PASS: hipify :: unit_tests/headers/headers_test_05.cu (9 of 85) -PASS: hipify :: unit_tests/headers/headers_test_06.cu (10 of 85) -PASS: hipify :: unit_tests/headers/headers_test_04.cu (11 of 85) -PASS: hipify :: unit_tests/headers/headers_test_07.cu (12 of 85) -PASS: hipify :: unit_tests/headers/headers_test_10.cu (13 of 85) -PASS: hipify :: unit_tests/headers/headers_test_11.cu (14 of 85) -PASS: hipify :: unit_tests/headers/headers_test_08.cu (15 of 85) -PASS: hipify :: unit_tests/kernel_launch/kernel_launch_01.cu (16 of 85) -PASS: hipify :: unit_tests/headers/headers_test_09.cu (17 of 85) -PASS: hipify :: unit_tests/libraries/CAFFE2/caffe2_02.cu (18 of 85) -PASS: hipify :: unit_tests/libraries/CAFFE2/caffe2_01.cu (19 of 85) -PASS: hipify :: unit_tests/libraries/cuBLAS/cublas_0_based_indexing.cu (20 of 85) -PASS: hipify :: unit_tests/libraries/CUB/cub_03.cu (21 of 85) -PASS: hipify :: unit_tests/libraries/CUB/cub_01.cu (22 of 85) -PASS: hipify :: unit_tests/libraries/CUB/cub_02.cu (23 of 85) -PASS: hipify :: unit_tests/libraries/cuBLAS/cublas_sgemm_matrix_multiplication.cu (24 of 85) -PASS: hipify :: unit_tests/libraries/cuBLAS/rocBLAS/cublas_0_based_indexing_rocblas.cu (25 of 85) -PASS: hipify :: unit_tests/libraries/cuBLAS/rocBLAS/cublas_1_based_indexing_rocblas.cu (26 of 85) -PASS: hipify :: unit_tests/libraries/cuBLAS/cublas_1_based_indexing.cu (27 of 85) -PASS: hipify :: unit_tests/libraries/cuComplex/cuComplex_Julia.cu (28 of 85) -PASS: hipify :: unit_tests/libraries/cuDNN/cudnn_softmax.cu (29 of 85) -PASS: hipify :: unit_tests/libraries/cuFFT/simple_cufft.cu (30 of 85) -PASS: hipify :: unit_tests/libraries/cuBLAS/rocBLAS/cublas_sgemm_matrix_multiplication_rocblas.cu (31 of 85) -PASS: hipify :: unit_tests/libraries/cuRAND/poisson_api_example.cu (32 of 85) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_03.cu (33 of 85) -PASS: hipify :: unit_tests/libraries/cuRAND/benchmark_curand_generate.cpp (34 of 85) -PASS: hipify :: unit_tests/libraries/cuRAND/benchmark_curand_kernel.cpp (35 of 85) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_04.cu (36 of 85) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_05.cu (37 of 85) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_06.cu (38 of 85) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_07.cu (39 of 85) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_08.cu (40 of 85) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_09.cu (41 of 85) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_11.cu (42 of 85) -PASS: hipify :: unit_tests/namespace/ns_kernel_launch.cu (43 of 85) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_10.cu (44 of 85) -PASS: hipify :: unit_tests/pp/pp_if_else_conditionals.cu (45 of 85) -PASS: hipify :: unit_tests/pp/pp_if_else_conditionals_01.cu (46 of 85) -PASS: hipify :: unit_tests/pp/pp_if_else_conditionals_01_LLVM_10.cu (47 of 85) -PASS: hipify :: unit_tests/pp/pp_if_else_conditionals_LLVM_10.cu (48 of 85) -PASS: hipify :: unit_tests/samples/2_Cookbook/11_texture_driver/tex2dKernel.cpp (49 of 85) -PASS: hipify :: unit_tests/samples/2_Cookbook/0_MatrixTranspose/MatrixTranspose.cpp (50 of 85) -PASS: hipify :: unit_tests/samples/2_Cookbook/11_texture_driver/texture2dDrv.cpp (51 of 85) -PASS: hipify :: unit_tests/samples/2_Cookbook/13_occupancy/occupancy.cpp (52 of 85) -PASS: hipify :: unit_tests/samples/2_Cookbook/1_hipEvent/hipEvent.cpp (53 of 85) -PASS: hipify :: unit_tests/samples/2_Cookbook/2_Profiler/Profiler.cpp (54 of 85) -PASS: hipify :: unit_tests/samples/2_Cookbook/7_streams/stream.cpp (55 of 85) -PASS: hipify :: unit_tests/samples/MallocManaged.cpp (56 of 85) -PASS: hipify :: unit_tests/samples/2_Cookbook/8_peer2peer/peer2peer.cpp (57 of 85) -PASS: hipify :: unit_tests/samples/allocators.cu (58 of 85) -PASS: hipify :: unit_tests/samples/coalescing.cu (59 of 85) -PASS: hipify :: unit_tests/samples/dynamic_shared_memory.cu (60 of 85) -PASS: hipify :: unit_tests/samples/axpy.cu (61 of 85) -PASS: hipify :: unit_tests/samples/cudaRegister.cu (62 of 85) -PASS: hipify :: unit_tests/samples/intro.cu (63 of 85) -PASS: hipify :: unit_tests/samples/square.cu (64 of 85) -PASS: hipify :: unit_tests/samples/static_shared_memory.cu (65 of 85) -PASS: hipify :: unit_tests/samples/vec_add.cu (66 of 85) -PASS: hipify :: unit_tests/kernel_launch/kernel_launch_syntax.cu (67 of 85) -PASS: hipify :: unit_tests/synthetic/driver_structs.cu (68 of 85) -PASS: hipify :: unit_tests/synthetic/driver_enums.cu (69 of 85) -PASS: hipify :: unit_tests/synthetic/driver_defines.cu (70 of 85) -PASS: hipify :: unit_tests/synthetic/driver_typedefs.cu (71 of 85) -PASS: hipify :: unit_tests/synthetic/driver_functions.cu (72 of 85) -PASS: hipify :: unit_tests/synthetic/driver_functions_internal.cu (73 of 85) -PASS: hipify :: unit_tests/synthetic/driver_unions.cu (74 of 85) -PASS: hipify :: unit_tests/synthetic/runtime_defines.cu (75 of 85) -PASS: hipify :: unit_tests/synthetic/runtime_enums.cu (76 of 85) -PASS: hipify :: unit_tests/synthetic/runtime_unions.cu (77 of 85) -PASS: hipify :: unit_tests/synthetic/runtime_structs.cu (78 of 85) -PASS: hipify :: unit_tests/synthetic/runtime_typedefs.cu (79 of 85) -PASS: hipify :: unit_tests/synthetic/runtime_functions.cu (80 of 85) -PASS: hipify :: unit_tests/graph/simple_mechs.cu (81 of 85) -PASS: hipify :: unit_tests/options/kernel-execution-syntax/both-kernel-execution-syntax.cu (82 of 85) -PASS: hipify :: unit_tests/options/kernel-execution-syntax/cuda-kernel-execution-syntax.cu (83 of 85) -PASS: hipify :: unit_tests/options/kernel-execution-syntax/hip-kernel-execution-syntax.cu (84 of 85) -PASS: hipify :: unit_tests/options/kernel-execution-syntax/none-kernel-execution-syntax.cu (85 of 85) -Testing Time: 6.03s - Expected Passes : 85 +-- Testing: 88 tests, 12 threads -- +PASS: hipify :: unit_tests/casts/reinterpret_cast.cu (1 of 88) +PASS: hipify :: unit_tests/device/atomics.cu (2 of 88) +PASS: hipify :: unit_tests/compilation_database/cd_intro.cu (3 of 88) +PASS: hipify :: unit_tests/device/device_symbols.cu (4 of 88) +PASS: hipify :: unit_tests/device/math_functions.cu (5 of 88) +PASS: hipify :: unit_tests/headers/headers_test_01.cu (6 of 88) +PASS: hipify :: unit_tests/headers/headers_test_02.cu (7 of 88) +PASS: hipify :: unit_tests/headers/headers_test_03.cu (8 of 88) +PASS: hipify :: unit_tests/headers/headers_test_05.cu (9 of 88) +PASS: hipify :: unit_tests/headers/headers_test_06.cu (10 of 88) +PASS: hipify :: unit_tests/headers/headers_test_04.cu (11 of 88) +PASS: hipify :: unit_tests/headers/headers_test_07.cu (12 of 88) +PASS: hipify :: unit_tests/headers/headers_test_10.cu (13 of 88) +PASS: hipify :: unit_tests/headers/headers_test_11.cu (14 of 88) +PASS: hipify :: unit_tests/headers/headers_test_08.cu (15 of 88) +PASS: hipify :: unit_tests/kernel_launch/kernel_launch_01.cu (16 of 88) +PASS: hipify :: unit_tests/headers/headers_test_09.cu (17 of 88) +PASS: hipify :: unit_tests/libraries/CAFFE2/caffe2_02.cu (18 of 88) +PASS: hipify :: unit_tests/libraries/CAFFE2/caffe2_01.cu (19 of 88) +PASS: hipify :: unit_tests/libraries/cuBLAS/cublas_0_based_indexing.cu (20 of 88) +PASS: hipify :: unit_tests/libraries/CUB/cub_03.cu (21 of 88) +PASS: hipify :: unit_tests/libraries/CUB/cub_01.cu (22 of 88) +PASS: hipify :: unit_tests/libraries/CUB/cub_02.cu (23 of 88) +PASS: hipify :: unit_tests/libraries/cuBLAS/cublas_sgemm_matrix_multiplication.cu (24 of 88) +PASS: hipify :: unit_tests/libraries/cuBLAS/rocBLAS/cublas_0_based_indexing_rocblas.cu (25 of 88) +PASS: hipify :: unit_tests/libraries/cuBLAS/rocBLAS/cublas_1_based_indexing_rocblas.cu (26 of 88) +PASS: hipify :: unit_tests/libraries/cuBLAS/cublas_1_based_indexing.cu (27 of 88) +PASS: hipify :: unit_tests/libraries/cuBLAS/cublas_v1.cu (28 of 88) +PASS: hipify :: unit_tests/libraries/cuComplex/cuComplex_Julia.cu (29 of 88) +PASS: hipify :: unit_tests/libraries/cuDNN/cudnn_softmax.cu (30 of 88) +PASS: hipify :: unit_tests/libraries/cuFFT/simple_cufft.cu (31 of 88) +PASS: hipify :: unit_tests/libraries/cuBLAS/rocBLAS/cublas_sgemm_matrix_multiplication_rocblas.cu (32 of 88) +PASS: hipify :: unit_tests/libraries/cuRAND/poisson_api_example.cu (33 of 88) +PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_03.cu (34 of 88) +PASS: hipify :: unit_tests/libraries/cuRAND/benchmark_curand_generate.cpp (35 of 88) +PASS: hipify :: unit_tests/libraries/cuRAND/benchmark_curand_kernel.cpp (36 of 88) +PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_04.cu (37 of 88) +PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_05.cu (38 of 88) +PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_06.cu (39 of 88) +PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_07.cu (40 of 88) +PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_08.cu (41 of 88) +PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_09.cu (42 of 88) +PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_11.cu (43 of 88) +PASS: hipify :: unit_tests/namespace/ns_kernel_launch.cu (44 of 88) +PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_10.cu (45 of 88) +PASS: hipify :: unit_tests/pp/pp_if_else_conditionals.cu (46 of 88) +PASS: hipify :: unit_tests/pp/pp_if_else_conditionals_01.cu (47 of 88) +PASS: hipify :: unit_tests/pp/pp_if_else_conditionals_01_LLVM_10.cu (48 of 88) +PASS: hipify :: unit_tests/pp/pp_if_else_conditionals_LLVM_10.cu (49 of 88) +PASS: hipify :: unit_tests/samples/2_Cookbook/11_texture_driver/tex2dKernel.cpp (50 of 88) +PASS: hipify :: unit_tests/samples/2_Cookbook/0_MatrixTranspose/MatrixTranspose.cpp (51 of 88) +PASS: hipify :: unit_tests/samples/2_Cookbook/11_texture_driver/texture2dDrv.cpp (52 of 88) +PASS: hipify :: unit_tests/samples/2_Cookbook/13_occupancy/occupancy.cpp (53 of 88) +PASS: hipify :: unit_tests/samples/2_Cookbook/1_hipEvent/hipEvent.cpp (54 of 88) +PASS: hipify :: unit_tests/samples/2_Cookbook/2_Profiler/Profiler.cpp (55 of 88) +PASS: hipify :: unit_tests/samples/2_Cookbook/7_streams/stream.cpp (56 of 88) +PASS: hipify :: unit_tests/samples/MallocManaged.cpp (57 of 88) +PASS: hipify :: unit_tests/samples/2_Cookbook/8_peer2peer/peer2peer.cpp (58 of 88) +PASS: hipify :: unit_tests/samples/allocators.cu (59 of 88) +PASS: hipify :: unit_tests/samples/coalescing.cu (60 of 88) +PASS: hipify :: unit_tests/samples/dynamic_shared_memory.cu (61 of 88) +PASS: hipify :: unit_tests/samples/axpy.cu (62 of 88) +PASS: hipify :: unit_tests/samples/cudaRegister.cu (63 of 88) +PASS: hipify :: unit_tests/samples/intro.cu (64 of 88) +PASS: hipify :: unit_tests/samples/square.cu (65 of 88) +PASS: hipify :: unit_tests/samples/static_shared_memory.cu (66 of 88) +PASS: hipify :: unit_tests/samples/vec_add.cu (67 of 88) +PASS: hipify :: unit_tests/kernel_launch/kernel_launch_syntax.cu (68 of 88) +PASS: hipify :: unit_tests/synthetic/driver_structs.cu (69 of 88) +PASS: hipify :: unit_tests/synthetic/driver_enums.cu (70 of 88) +PASS: hipify :: unit_tests/synthetic/driver_defines.cu (71 of 88) +PASS: hipify :: unit_tests/synthetic/driver_typedefs.cu (72 of 88) +PASS: hipify :: unit_tests/synthetic/driver_functions.cu (73 of 88) +PASS: hipify :: unit_tests/synthetic/driver_functions_internal.cu (74 of 88) +PASS: hipify :: unit_tests/synthetic/driver_unions.cu (75 of 88) +PASS: hipify :: unit_tests/synthetic/runtime_defines.cu (76 of 88) +PASS: hipify :: unit_tests/synthetic/runtime_enums.cu (77 of 88) +PASS: hipify :: unit_tests/synthetic/runtime_unions.cu (78 of 88) +PASS: hipify :: unit_tests/synthetic/runtime_structs.cu (79 of 88) +PASS: hipify :: unit_tests/synthetic/runtime_typedefs.cu (80 of 88) +PASS: hipify :: unit_tests/synthetic/runtime_functions.cu (81 of 88) +PASS: hipify :: unit_tests/synthetic/runtime_functions_11010.cu (82 of 88) +PASS: hipify :: unit_tests/synthetic/libraries/cublas2hipblas.cu (83 of 88) +PASS: hipify :: unit_tests/graph/simple_mechs.cu (84 of 88) +PASS: hipify :: unit_tests/options/kernel-execution-syntax/both-kernel-execution-syntax.cu (85 of 88) +PASS: hipify :: unit_tests/options/kernel-execution-syntax/cuda-kernel-execution-syntax.cu (86 of 88) +PASS: hipify :: unit_tests/options/kernel-execution-syntax/hip-kernel-execution-syntax.cu (87 of 88) +PASS: hipify :: unit_tests/options/kernel-execution-syntax/none-kernel-execution-syntax.cu (88 of 88) +Testing Time: 6.22s + Expected Passes : 88 [100%] Built target test-hipify ``` ### hipify-clang: Windows @@ -552,16 +555,16 @@ Testing Time: 6.03s | **LLVM** | **CUDA** | **cuDNN** | **Visual Studio (latest)** | **cmake** | **Python** | |----------------:|-------------:|---------------:|-----------------------------------------:|---------------:|-------------:| -| 4.0.0 - 5.0.2 | 8.0 | 5.1.10 - 7.1.4 | 2015.14.0, 2017.15.5.2 | 3.5.1, 3.18.0 | 3.6.4, 3.8.5 | -| 6.0.0 - 6.0.1 | 9.0 | 7.0.5 - 7.6.5 | 2015.14.0, 2017.15.5.5 | 3.6.0, 3.18.0 | 3.7.2, 3.8.5 | -| 7.0.0 - 7.1.0 | 9.2 | 7.6.5 | 2017.15.9.11 | 3.13.3, 3.18.0 | 3.7.3, 3.8.5 | -| 8.0.0 - 8.0.1 | 10.0 | 7.6.5 | 2017.15.9.15 | 3.14.2, 3.18.0 | 3.7.4, 3.8.5 | -| 9.0.0 - 9.0.1 | 10.1 | 7.6.5 | 2017.15.9.20, 2019.16.4.5 | 3.16.4, 3.18.0 | 3.8.0, 3.8.5 | -| 10.0.0 - 11.0.0 | 8.0 - 11.1 | 7.6.5 - 8.0.5 | 2017.15.9.30, 2019.16.8.3 | 3.19.2 | 3.9.1 | -| 11.0.1 - 11.1.0 | 8.0 - 11.2.2 | 7.6.5 - 8.0.5 | 2017.15.9.31, 2019.16.8.4 | 3.19.3 | 3.9.2 | -| 12.0.0 - 13.0.1 | 8.0 - 11.5.1 | 7.6.5 - 8.3.2 | 2017.15.9.43, 2019.16.11.9 | 3.22.2 | 3.10.2 | -| 14.0.0 - 14.0.6 | 8.0 - 11.7.1 | 8.0.5 - 8.4.1 | 2017.15.9.49, 2019.16.11.17, 2022.17.2.6 | 3.24.0 | 3.10.6 | -| 15.0.0git | 8.0 - 11.7.1 | 8.0.5 - 8.4.1 | 2017.15.9.49, 2019.16.11.17, 2022.17.2.6 | 3.24.0 | 3.10.6 | +| 4.0.0 - 5.0.2 | 7.0 - 8.0 | 5.1.10 - 7.1.4 | 2015.14.0, 2017.15.5.2 | 3.5.1, 3.18.0 | 3.6.4, 3.8.5 | +| 6.0.0 - 6.0.1 | 7.0 - 9.0 | 7.0.5 - 7.6.5 | 2015.14.0, 2017.15.5.5 | 3.6.0, 3.18.0 | 3.7.2, 3.8.5 | +| 7.0.0 - 7.1.0 | 7.0 - 9.2 | 7.6.5 | 2017.15.9.11 | 3.13.3, 3.18.0 | 3.7.3, 3.8.5 | +| 8.0.0 - 8.0.1 | 7.0 - 10.0 | 7.6.5 | 2017.15.9.15 | 3.14.2, 3.18.0 | 3.7.4, 3.8.5 | +| 9.0.0 - 9.0.1 | 7.0 - 10.1 | 7.6.5 | 2017.15.9.20, 2019.16.4.5 | 3.16.4, 3.18.0 | 3.8.0, 3.8.5 | +| 10.0.0 - 11.0.0 | 7.0 - 11.1 | 7.6.5 - 8.0.5 | 2017.15.9.30, 2019.16.8.3 | 3.19.2 | 3.9.1 | +| 11.0.1 - 11.1.0 | 7.0 - 11.2.2 | 7.6.5 - 8.0.5 | 2017.15.9.31, 2019.16.8.4 | 3.19.3 | 3.9.2 | +| 12.0.0 - 13.0.1 | 7.0 - 11.5.1 | 7.6.5 - 8.3.2 | 2017.15.9.43, 2019.16.11.9 | 3.22.2 | 3.10.2 | +| 14.0.0 - 14.0.6 | 7.0 - 11.7.1 | 8.0.5 - 8.4.1 | 2017.15.9.49, 2019.16.11.17, 2022.17.2.6 | 3.24.0 | 3.10.6 | +| 16.0.0git | 7.0 - 11.7.1 | 8.0.5 - 8.4.1 | 2017.15.9.50, 2019.16.11.18, 2022.17.3.0 | 3.24.0 | 3.10.6 | *Building with testing support by `Visual Studio 17 2022` on `Windows 10`:* diff --git a/bin/hipify-perl b/bin/hipify-perl index 07914304..22781216 100755 --- a/bin/hipify-perl +++ b/bin/hipify-perl @@ -715,191 +715,60 @@ my %removed_funcs = ( ); my %experimental_funcs = ( - "cudaUUID_t" => "5.2.0", - "cudaThreadExchangeStreamCaptureMode" => "5.2.0", - "cudaMemPool_t" => "5.2.0", - "cudaMemPoolTrimTo" => "5.2.0", - "cudaMemPoolSetAttribute" => "5.2.0", - "cudaMemPoolSetAccess" => "5.2.0", - "cudaMemPoolReuseFollowEventDependencies" => "5.2.0", - "cudaMemPoolReuseAllowOpportunistic" => "5.2.0", - "cudaMemPoolReuseAllowInternalDependencies" => "5.2.0", - "cudaMemPoolPtrExportData" => "5.2.0", - "cudaMemPoolProps" => "5.2.0", - "cudaMemPoolImportPointer" => "5.2.0", - "cudaMemPoolImportFromShareableHandle" => "5.2.0", - "cudaMemPoolGetAttribute" => "5.2.0", - "cudaMemPoolGetAccess" => "5.2.0", - "cudaMemPoolExportToShareableHandle" => "5.2.0", - "cudaMemPoolExportPointer" => "5.2.0", - "cudaMemPoolDestroy" => "5.2.0", - "cudaMemPoolCreate" => "5.2.0", - "cudaMemPoolAttrUsedMemHigh" => "5.2.0", - "cudaMemPoolAttrUsedMemCurrent" => "5.2.0", - "cudaMemPoolAttrReservedMemHigh" => "5.2.0", - "cudaMemPoolAttrReservedMemCurrent" => "5.2.0", - "cudaMemPoolAttrReleaseThreshold" => "5.2.0", - "cudaMemPoolAttr" => "5.2.0", - "cudaMemLocationTypeInvalid" => "5.2.0", - "cudaMemLocationTypeDevice" => "5.2.0", - "cudaMemLocationType" => "5.2.0", - "cudaMemLocation" => "5.2.0", - "cudaMemHandleTypeWin32Kmt" => "5.2.0", - "cudaMemHandleTypeWin32" => "5.2.0", - "cudaMemHandleTypePosixFileDescriptor" => "5.2.0", - "cudaMemHandleTypeNone" => "5.2.0", - "cudaMemAllocationTypePinned" => "5.2.0", - "cudaMemAllocationTypeMax" => "5.2.0", - "cudaMemAllocationTypeInvalid" => "5.2.0", - "cudaMemAllocationType" => "5.2.0", - "cudaMemAllocationHandleType" => "5.2.0", - "cudaMemAccessFlagsProtReadWrite" => "5.2.0", - "cudaMemAccessFlagsProtRead" => "5.2.0", - "cudaMemAccessFlagsProtNone" => "5.2.0", - "cudaMemAccessFlags" => "5.2.0", - "cudaMemAccessDesc" => "5.2.0", - "cudaMallocFromPoolAsync" => "5.2.0", - "cudaMallocAsync" => "5.2.0", - "cudaLaunchHostFunc" => "5.2.0", - "cudaKernelNodeAttributeCooperative" => "5.2.0", - "cudaKernelNodeAttributeAccessPolicyWindow" => "5.2.0", - "cudaKernelNodeAttrValue" => "5.2.0", - "cudaKernelNodeAttrID" => "5.2.0", - "cudaGraphKernelNodeSetAttribute" => "5.2.0", - "cudaGraphKernelNodeGetAttribute" => "5.2.0", - "cudaGraphInstantiateFlags" => "5.2.0", - "cudaGraphInstantiateFlagAutoFreeOnLaunch" => "5.2.0", - "cudaFreeAsync" => "5.2.0", - "cudaDeviceSetMemPool" => "5.2.0", - "cudaDeviceGetMemPool" => "5.2.0", - "cudaDeviceGetDefaultMemPool" => "5.2.0", - "cudaDevAttrMemoryPoolsSupported" => "5.2.0", - "cudaAccessPropertyStreaming" => "5.2.0", - "cudaAccessPropertyPersisting" => "5.2.0", - "cudaAccessPropertyNormal" => "5.2.0", - "cudaAccessProperty" => "5.2.0", - "cudaAccessPolicyWindow" => "5.2.0", - "cuThreadExchangeStreamCaptureMode" => "5.2.0", - "cuMemUnmap" => "5.2.0", - "cuMemSetAccess" => "5.2.0", - "cuMemRetainAllocationHandle" => "5.2.0", - "cuMemRelease" => "5.2.0", - "cuMemPoolTrimTo" => "5.2.0", - "cuMemPoolSetAttribute" => "5.2.0", - "cuMemPoolSetAccess" => "5.2.0", - "cuMemPoolImportPointer" => "5.2.0", - "cuMemPoolImportFromShareableHandle" => "5.2.0", - "cuMemPoolGetAttribute" => "5.2.0", - "cuMemPoolGetAccess" => "5.2.0", - "cuMemPoolExportToShareableHandle" => "5.2.0", - "cuMemPoolExportPointer" => "5.2.0", - "cuMemPoolDestroy" => "5.2.0", - "cuMemPoolCreate" => "5.2.0", - "cuMemMapArrayAsync" => "5.2.0", - "cuMemMap" => "5.2.0", - "cuMemImportFromShareableHandle" => "5.2.0", - "cuMemGetAllocationPropertiesFromHandle" => "5.2.0", - "cuMemGetAllocationGranularity" => "5.2.0", - "cuMemGetAccess" => "5.2.0", - "cuMemFreeAsync" => "5.2.0", - "cuMemExportToShareableHandle" => "5.2.0", - "cuMemCreate" => "5.2.0", - "cuMemAllocFromPoolAsync" => "5.2.0", - "cuMemAllocAsync" => "5.2.0", - "cuMemAddressReserve" => "5.2.0", - "cuMemAddressFree" => "5.2.0", - "cuLaunchHostFunc" => "5.2.0", - "cuGraphKernelNodeSetAttribute" => "5.2.0", - "cuGraphKernelNodeGetAttribute" => "5.2.0", - "cuDeviceSetMemPool" => "5.2.0", - "cuDeviceGetUuid_v2" => "5.2.0", - "cuDeviceGetUuid" => "5.2.0", - "cuDeviceGetMemPool" => "5.2.0", - "cuDeviceGetDefaultMemPool" => "5.2.0", - "CUuuid_st" => "5.2.0", - "CUuuid" => "5.2.0", - "CUmemoryPool" => "5.2.0", - "CUmemPool_attribute_enum" => "5.2.0", - "CUmemPool_attribute" => "5.2.0", - "CUmemPoolPtrExportData_v1" => "5.2.0", - "CUmemPoolPtrExportData_st" => "5.2.0", - "CUmemPoolPtrExportData" => "5.2.0", - "CUmemPoolProps_v1" => "5.2.0", - "CUmemPoolProps_st" => "5.2.0", - "CUmemPoolProps" => "5.2.0", - "CUmemPoolHandle_st" => "5.2.0", - "CUmemOperationType_enum" => "5.2.0", - "CUmemOperationType" => "5.2.0", - "CUmemLocation_v1" => "5.2.0", - "CUmemLocation_st" => "5.2.0", - "CUmemLocationType_enum" => "5.2.0", - "CUmemLocationType" => "5.2.0", - "CUmemLocation" => "5.2.0", - "CUmemHandleType_enum" => "5.2.0", - "CUmemHandleType" => "5.2.0", - "CUmemGenericAllocationHandle_v1" => "5.2.0", - "CUmemGenericAllocationHandle" => "5.2.0", - "CUmemAllocationType_enum" => "5.2.0", - "CUmemAllocationType" => "5.2.0", - "CUmemAllocationProp_v1" => "5.2.0", - "CUmemAllocationProp_st" => "5.2.0", - "CUmemAllocationProp" => "5.2.0", - "CUmemAllocationHandleType_enum" => "5.2.0", - "CUmemAllocationHandleType" => "5.2.0", - "CUmemAllocationGranularity_flags_enum" => "5.2.0", - "CUmemAllocationGranularity_flags" => "5.2.0", - "CUmemAccess_flags_enum" => "5.2.0", - "CUmemAccess_flags" => "5.2.0", - "CUmemAccessDesc_v1" => "5.2.0", - "CUmemAccessDesc_st" => "5.2.0", - "CUmemAccessDesc" => "5.2.0", - "CUkernelNodeAttrValue_v1" => "5.2.0", - "CUkernelNodeAttrValue_union" => "5.2.0", - "CUkernelNodeAttrValue" => "5.2.0", - "CUkernelNodeAttrID_enum" => "5.2.0", - "CUkernelNodeAttrID" => "5.2.0", - "CUgraphInstantiate_flags_enum" => "5.2.0", - "CUgraphInstantiate_flags" => "5.2.0", - "CUarraySparseSubresourceType_enum" => "5.2.0", - "CUarraySparseSubresourceType" => "5.2.0", - "CUaccessProperty_enum" => "5.2.0", - "CUaccessProperty" => "5.2.0", - "CUaccessPolicyWindow_st" => "5.2.0", - "CUaccessPolicyWindow" => "5.2.0", - "CU_MEM_OPERATION_TYPE_UNMAP" => "5.2.0", - "CU_MEM_OPERATION_TYPE_MAP" => "5.2.0", - "CU_MEM_LOCATION_TYPE_INVALID" => "5.2.0", - "CU_MEM_LOCATION_TYPE_DEVICE" => "5.2.0", - "CU_MEM_HANDLE_TYPE_WIN32_KMT" => "5.2.0", - "CU_MEM_HANDLE_TYPE_WIN32" => "5.2.0", - "CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR" => "5.2.0", - "CU_MEM_HANDLE_TYPE_NONE" => "5.2.0", - "CU_MEM_HANDLE_TYPE_GENERIC" => "5.2.0", - "CU_MEM_ALLOC_GRANULARITY_RECOMMENDED" => "5.2.0", - "CU_MEM_ALLOC_GRANULARITY_MINIMUM" => "5.2.0", - "CU_MEM_ALLOCATION_TYPE_PINNED" => "5.2.0", - "CU_MEM_ALLOCATION_TYPE_MAX" => "5.2.0", - "CU_MEM_ALLOCATION_TYPE_INVALID" => "5.2.0", - "CU_MEM_ACCESS_FLAGS_PROT_READWRITE" => "5.2.0", - "CU_MEM_ACCESS_FLAGS_PROT_READ" => "5.2.0", - "CU_MEM_ACCESS_FLAGS_PROT_NONE" => "5.2.0", - "CU_MEMPOOL_ATTR_USED_MEM_HIGH" => "5.2.0", - "CU_MEMPOOL_ATTR_USED_MEM_CURRENT" => "5.2.0", - "CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES" => "5.2.0", - "CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC" => "5.2.0", - "CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES" => "5.2.0", - "CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH" => "5.2.0", - "CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT" => "5.2.0", - "CU_MEMPOOL_ATTR_RELEASE_THRESHOLD" => "5.2.0", - "CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE" => "5.2.0", - "CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW" => "5.2.0", - "CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED" => "5.2.0", - "CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL" => "5.2.0", - "CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL" => "5.2.0", - "CU_ACCESS_PROPERTY_STREAMING" => "5.2.0", - "CU_ACCESS_PROPERTY_PERSISTING" => "5.2.0", - "CU_ACCESS_PROPERTY_NORMAL" => "5.2.0", - "CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH" => "5.2.0" + "cudaUserObject_t" => "5.3.0", + "cudaUserObjectRetainFlags" => "5.3.0", + "cudaUserObjectRetain" => "5.3.0", + "cudaUserObjectRelease" => "5.3.0", + "cudaUserObjectNoDestructorSync" => "5.3.0", + "cudaUserObjectFlags" => "5.3.0", + "cudaUserObjectCreate" => "5.3.0", + "cudaMemoryTypeManaged" => "5.3.0", + "cudaLimitStackSize" => "5.3.0", + "cudaGraphUserObjectMove" => "5.3.0", + "cudaGraphUpload" => "5.3.0", + "cudaGraphRetainUserObject" => "5.3.0", + "cudaGraphReleaseUserObject" => "5.3.0", + "cudaGraphNodeTypeExtSemaphoreWait" => "5.3.0", + "cudaGraphNodeTypeExtSemaphoreSignal" => "5.3.0", + "cudaGraphMemAttributeType" => "5.3.0", + "cudaGraphMemAttrUsedMemHigh" => "5.3.0", + "cudaGraphMemAttrUsedMemCurrent" => "5.3.0", + "cudaGraphMemAttrReservedMemHigh" => "5.3.0", + "cudaGraphMemAttrReservedMemCurrent" => "5.3.0", + "cudaDeviceSetLimit" => "5.3.0", + "cudaDeviceSetGraphMemAttribute" => "5.3.0", + "cudaDeviceGraphMemTrim" => "5.3.0", + "cudaDeviceGetGraphMemAttribute" => "5.3.0", + "cuUserObjectRetain" => "5.3.0", + "cuUserObjectRelease" => "5.3.0", + "cuUserObjectCreate" => "5.3.0", + "cuGraphUpload" => "5.3.0", + "cuGraphRetainUserObject" => "5.3.0", + "cuGraphReleaseUserObject" => "5.3.0", + "cuGetErrorString" => "5.3.0", + "cuGetErrorName" => "5.3.0", + "cuDeviceSetGraphMemAttribute" => "5.3.0", + "cuDeviceGraphMemTrim" => "5.3.0", + "cuDeviceGetGraphMemAttribute" => "5.3.0", + "cuCtxSetLimit" => "5.3.0", + "CUuserObject_st" => "5.3.0", + "CUuserObject_flags_enum" => "5.3.0", + "CUuserObject_flags" => "5.3.0", + "CUuserObjectRetain_flags_enum" => "5.3.0", + "CUuserObjectRetain_flags" => "5.3.0", + "CUuserObject" => "5.3.0", + "CUgraphMem_attribute_enum" => "5.3.0", + "CUgraphMem_attribute" => "5.3.0", + "CU_USER_OBJECT_NO_DESTRUCTOR_SYNC" => "5.3.0", + "CU_LIMIT_STACK_SIZE" => "5.3.0", + "CU_GRAPH_USER_OBJECT_MOVE" => "5.3.0", + "CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT" => "5.3.0", + "CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL" => "5.3.0", + "CU_GRAPH_MEM_ATTR_USED_MEM_HIGH" => "5.3.0", + "CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT" => "5.3.0", + "CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH" => "5.3.0", + "CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT" => "5.3.0", + "CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED" => "5.3.0" ); $print_stats = 1 if $examine; @@ -1037,194 +906,60 @@ sub subst { } sub experimentalSubstitutions { - subst("cuDeviceGetDefaultMemPool", "hipDeviceGetDefaultMemPool", "device"); - subst("cuDeviceGetMemPool", "hipDeviceGetMemPool", "device"); - subst("cuDeviceGetUuid", "hipDeviceGetUuid", "device"); - subst("cuDeviceGetUuid_v2", "hipDeviceGetUuid", "device"); - subst("cuDeviceSetMemPool", "hipDeviceSetMemPool", "device"); - subst("cudaDeviceGetDefaultMemPool", "hipDeviceGetDefaultMemPool", "device"); - subst("cudaDeviceGetMemPool", "hipDeviceGetMemPool", "device"); - subst("cudaDeviceSetMemPool", "hipDeviceSetMemPool", "device"); - subst("cudaFreeAsync", "hipFreeAsync", "memory"); - subst("cudaMallocAsync", "hipMallocAsync", "memory"); - subst("cudaMallocFromPoolAsync", "hipMallocFromPoolAsync", "memory"); - subst("cudaMemPoolCreate", "hipMemPoolCreate", "memory"); - subst("cudaMemPoolDestroy", "hipMemPoolDestroy", "memory"); - subst("cudaMemPoolExportPointer", "hipMemPoolExportPointer", "memory"); - subst("cudaMemPoolExportToShareableHandle", "hipMemPoolExportToShareableHandle", "memory"); - subst("cudaMemPoolGetAccess", "hipMemPoolGetAccess", "memory"); - subst("cudaMemPoolGetAttribute", "hipMemPoolGetAttribute", "memory"); - subst("cudaMemPoolImportFromShareableHandle", "hipMemPoolImportFromShareableHandle", "memory"); - subst("cudaMemPoolImportPointer", "hipMemPoolImportPointer", "memory"); - subst("cudaMemPoolSetAccess", "hipMemPoolSetAccess", "memory"); - subst("cudaMemPoolSetAttribute", "hipMemPoolSetAttribute", "memory"); - subst("cudaMemPoolTrimTo", "hipMemPoolTrimTo", "memory"); - subst("cuMemAddressFree", "hipMemAddressFree", "virtual_memory"); - subst("cuMemAddressReserve", "hipMemAddressReserve", "virtual_memory"); - subst("cuMemCreate", "hipMemCreate", "virtual_memory"); - subst("cuMemExportToShareableHandle", "hipMemExportToShareableHandle", "virtual_memory"); - subst("cuMemGetAccess", "hipMemGetAccess", "virtual_memory"); - subst("cuMemGetAllocationGranularity", "hipMemGetAllocationGranularity", "virtual_memory"); - subst("cuMemGetAllocationPropertiesFromHandle", "hipMemGetAllocationPropertiesFromHandle", "virtual_memory"); - subst("cuMemImportFromShareableHandle", "hipMemImportFromShareableHandle", "virtual_memory"); - subst("cuMemMap", "hipMemMap", "virtual_memory"); - subst("cuMemMapArrayAsync", "hipMemMapArrayAsync", "virtual_memory"); - subst("cuMemRelease", "hipMemRelease", "virtual_memory"); - subst("cuMemRetainAllocationHandle", "hipMemRetainAllocationHandle", "virtual_memory"); - subst("cuMemSetAccess", "hipMemSetAccess", "virtual_memory"); - subst("cuMemUnmap", "hipMemUnmap", "virtual_memory"); - subst("cuMemAllocAsync", "hipMallocAsync", "stream_ordered_memory"); - subst("cuMemAllocFromPoolAsync", "hipMallocFromPoolAsync", "stream_ordered_memory"); - subst("cuMemFreeAsync", "hipFreeAsync", "stream_ordered_memory"); - subst("cuMemPoolCreate", "hipMemPoolCreate", "stream_ordered_memory"); - subst("cuMemPoolDestroy", "hipMemPoolDestroy", "stream_ordered_memory"); - subst("cuMemPoolExportPointer", "hipMemPoolExportPointer", "stream_ordered_memory"); - subst("cuMemPoolExportToShareableHandle", "hipMemPoolExportToShareableHandle", "stream_ordered_memory"); - subst("cuMemPoolGetAccess", "hipMemPoolGetAccess", "stream_ordered_memory"); - subst("cuMemPoolGetAttribute", "hipMemPoolGetAttribute", "stream_ordered_memory"); - subst("cuMemPoolImportFromShareableHandle", "hipMemPoolImportFromShareableHandle", "stream_ordered_memory"); - subst("cuMemPoolImportPointer", "hipMemPoolImportPointer", "stream_ordered_memory"); - subst("cuMemPoolSetAccess", "hipMemPoolSetAccess", "stream_ordered_memory"); - subst("cuMemPoolSetAttribute", "hipMemPoolSetAttribute", "stream_ordered_memory"); - subst("cuMemPoolTrimTo", "hipMemPoolTrimTo", "stream_ordered_memory"); - subst("cuThreadExchangeStreamCaptureMode", "hipThreadExchangeStreamCaptureMode", "stream"); - subst("cudaThreadExchangeStreamCaptureMode", "hipThreadExchangeStreamCaptureMode", "stream"); - subst("cuLaunchHostFunc", "hipLaunchHostFunc", "execution"); - subst("cudaLaunchHostFunc", "hipLaunchHostFunc", "execution"); - subst("cuGraphKernelNodeGetAttribute", "hipGraphKernelNodeGetAttribute", "graph"); - subst("cuGraphKernelNodeSetAttribute", "hipGraphKernelNodeSetAttribute", "graph"); - subst("cudaGraphKernelNodeGetAttribute", "hipGraphKernelNodeGetAttribute", "graph"); - subst("cudaGraphKernelNodeSetAttribute", "hipGraphKernelNodeSetAttribute", "graph"); - subst("CUaccessPolicyWindow", "hipAccessPolicyWindow", "type"); - subst("CUaccessPolicyWindow_st", "hipAccessPolicyWindow", "type"); - subst("CUaccessProperty", "hipAccessProperty", "type"); - subst("CUaccessProperty_enum", "hipAccessProperty", "type"); - subst("CUarrayMapInfo", "hipArrayMapInfo", "type"); - subst("CUarrayMapInfo_st", "hipArrayMapInfo", "type"); - subst("CUarrayMapInfo_v1", "hipArrayMapInfo", "type"); - subst("CUarraySparseSubresourceType", "hipArraySparseSubresourceType", "type"); - subst("CUarraySparseSubresourceType_enum", "hipArraySparseSubresourceType", "type"); - subst("CUgraphInstantiate_flags", "hipGraphInstantiateFlags", "type"); - subst("CUgraphInstantiate_flags_enum", "hipGraphInstantiateFlags", "type"); - subst("CUkernelNodeAttrID", "hipKernelNodeAttrID", "type"); - subst("CUkernelNodeAttrID_enum", "hipKernelNodeAttrID", "type"); - subst("CUkernelNodeAttrValue", "hipKernelNodeAttrValue", "type"); - subst("CUkernelNodeAttrValue_union", "hipKernelNodeAttrValue", "type"); - subst("CUkernelNodeAttrValue_v1", "hipKernelNodeAttrValue", "type"); - subst("CUmemAccessDesc", "hipMemAccessDesc", "type"); - subst("CUmemAccessDesc_st", "hipMemAccessDesc", "type"); - subst("CUmemAccessDesc_v1", "hipMemAccessDesc", "type"); - subst("CUmemAccess_flags", "hipMemAccessFlags", "type"); - subst("CUmemAccess_flags_enum", "hipMemAccessFlags", "type"); - subst("CUmemAllocationGranularity_flags", "hipMemAllocationGranularity_flags", "type"); - subst("CUmemAllocationGranularity_flags_enum", "hipMemAllocationGranularity_flags", "type"); - subst("CUmemAllocationHandleType", "hipMemAllocationHandleType", "type"); - subst("CUmemAllocationHandleType_enum", "hipMemAllocationHandleType", "type"); - subst("CUmemAllocationProp", "hipMemAllocationProp", "type"); - subst("CUmemAllocationProp_st", "hipMemAllocationProp", "type"); - subst("CUmemAllocationProp_v1", "hipMemAllocationProp", "type"); - subst("CUmemAllocationType", "hipMemAllocationType", "type"); - subst("CUmemAllocationType_enum", "hipMemAllocationType", "type"); - subst("CUmemGenericAllocationHandle", "hipMemGenericAllocationHandle_t", "type"); - subst("CUmemGenericAllocationHandle_v1", "hipMemGenericAllocationHandle_t", "type"); - subst("CUmemHandleType", "hipMemHandleType", "type"); - subst("CUmemHandleType_enum", "hipMemHandleType", "type"); - subst("CUmemLocation", "hipMemLocation", "type"); - subst("CUmemLocationType", "hipMemLocationType", "type"); - subst("CUmemLocationType_enum", "hipMemLocationType", "type"); - subst("CUmemLocation_st", "hipMemLocation", "type"); - subst("CUmemLocation_v1", "hipMemLocation", "type"); - subst("CUmemOperationType", "hipMemOperationType", "type"); - subst("CUmemOperationType_enum", "hipMemOperationType", "type"); - subst("CUmemPoolHandle_st", "ihipMemPoolHandle_t", "type"); - subst("CUmemPoolProps", "hipMemPoolProps", "type"); - subst("CUmemPoolProps_st", "hipMemPoolProps", "type"); - subst("CUmemPoolProps_v1", "hipMemPoolProps", "type"); - subst("CUmemPoolPtrExportData", "hipMemPoolPtrExportData", "type"); - subst("CUmemPoolPtrExportData_st", "hipMemPoolPtrExportData", "type"); - subst("CUmemPoolPtrExportData_v1", "hipMemPoolPtrExportData", "type"); - subst("CUmemPool_attribute", "hipMemPoolAttr", "type"); - subst("CUmemPool_attribute_enum", "hipMemPoolAttr", "type"); - subst("CUmemoryPool", "hipMemPool_t", "type"); - subst("CUuuid", "hipUUID", "type"); - subst("CUuuid_st", "hipUUID_t", "type"); - subst("cudaAccessPolicyWindow", "hipAccessPolicyWindow", "type"); - subst("cudaAccessProperty", "hipAccessProperty", "type"); - subst("cudaGraphInstantiateFlags", "hipGraphInstantiateFlags", "type"); - subst("cudaKernelNodeAttrID", "hipKernelNodeAttrID", "type"); - subst("cudaKernelNodeAttrValue", "hipKernelNodeAttrValue", "type"); - subst("cudaMemAccessDesc", "hipMemAccessDesc", "type"); - subst("cudaMemAccessFlags", "hipMemAccessFlags", "type"); - subst("cudaMemAllocationHandleType", "hipMemAllocationHandleType", "type"); - subst("cudaMemAllocationType", "hipMemAllocationType", "type"); - subst("cudaMemLocation", "hipMemLocation", "type"); - subst("cudaMemLocationType", "hipMemLocationType", "type"); - subst("cudaMemPoolAttr", "hipMemPoolAttr", "type"); - subst("cudaMemPoolProps", "hipMemPoolProps", "type"); - subst("cudaMemPoolPtrExportData", "hipMemPoolPtrExportData", "type"); - subst("cudaMemPool_t", "hipMemPool_t", "type"); - subst("cudaUUID_t", "hipUUID", "type"); - subst("CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH", "hipGraphInstantiateFlagAutoFreeOnLaunch", "numeric_literal"); - subst("CU_ACCESS_PROPERTY_NORMAL", "hipAccessPropertyNormal", "numeric_literal"); - subst("CU_ACCESS_PROPERTY_PERSISTING", "hipAccessPropertyPersisting", "numeric_literal"); - subst("CU_ACCESS_PROPERTY_STREAMING", "hipAccessPropertyStreaming", "numeric_literal"); - subst("CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL", "hipArraySparseSubresourceTypeMiptail", "numeric_literal"); - subst("CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL", "hipArraySparseSubresourceTypeSparseLevel", "numeric_literal"); - subst("CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED", "hipDeviceAttributeMemoryPoolsSupported", "numeric_literal"); - subst("CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW", "hipKernelNodeAttributeAccessPolicyWindow", "numeric_literal"); - subst("CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE", "hipKernelNodeAttributeCooperative", "numeric_literal"); - subst("CU_MEMPOOL_ATTR_RELEASE_THRESHOLD", "hipMemPoolAttrReleaseThreshold", "numeric_literal"); - subst("CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT", "hipMemPoolAttrReservedMemCurrent", "numeric_literal"); - subst("CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH", "hipMemPoolAttrReservedMemHigh", "numeric_literal"); - subst("CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES", "hipMemPoolReuseAllowInternalDependencies", "numeric_literal"); - subst("CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC", "hipMemPoolReuseAllowOpportunistic", "numeric_literal"); - subst("CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES", "hipMemPoolReuseFollowEventDependencies", "numeric_literal"); - subst("CU_MEMPOOL_ATTR_USED_MEM_CURRENT", "hipMemPoolAttrUsedMemCurrent", "numeric_literal"); - subst("CU_MEMPOOL_ATTR_USED_MEM_HIGH", "hipMemPoolAttrUsedMemHigh", "numeric_literal"); - subst("CU_MEM_ACCESS_FLAGS_PROT_NONE", "hipMemAccessFlagsProtNone", "numeric_literal"); - subst("CU_MEM_ACCESS_FLAGS_PROT_READ", "hipMemAccessFlagsProtRead", "numeric_literal"); - subst("CU_MEM_ACCESS_FLAGS_PROT_READWRITE", "hipMemAccessFlagsProtReadWrite", "numeric_literal"); - subst("CU_MEM_ALLOCATION_TYPE_INVALID", "hipMemAllocationTypeInvalid", "numeric_literal"); - subst("CU_MEM_ALLOCATION_TYPE_MAX", "hipMemAllocationTypeMax", "numeric_literal"); - subst("CU_MEM_ALLOCATION_TYPE_PINNED", "hipMemAllocationTypePinned", "numeric_literal"); - subst("CU_MEM_ALLOC_GRANULARITY_MINIMUM", "hipMemAllocationGranularityMinimum", "numeric_literal"); - subst("CU_MEM_ALLOC_GRANULARITY_RECOMMENDED", "hipMemAllocationGranularityRecommended", "numeric_literal"); - subst("CU_MEM_HANDLE_TYPE_GENERIC", "hipMemHandleTypeGeneric", "numeric_literal"); - subst("CU_MEM_HANDLE_TYPE_NONE", "hipMemHandleTypeNone", "numeric_literal"); - subst("CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR", "hipMemHandleTypePosixFileDescriptor", "numeric_literal"); - subst("CU_MEM_HANDLE_TYPE_WIN32", "hipMemHandleTypeWin32", "numeric_literal"); - subst("CU_MEM_HANDLE_TYPE_WIN32_KMT", "hipMemHandleTypeWin32Kmt", "numeric_literal"); - subst("CU_MEM_LOCATION_TYPE_DEVICE", "hipMemLocationTypeDevice", "numeric_literal"); - subst("CU_MEM_LOCATION_TYPE_INVALID", "hipMemLocationTypeInvalid", "numeric_literal"); - subst("CU_MEM_OPERATION_TYPE_MAP", "hipMemOperationTypeMap", "numeric_literal"); - subst("CU_MEM_OPERATION_TYPE_UNMAP", "hipMemOperationTypeUnmap", "numeric_literal"); - subst("cudaAccessPropertyNormal", "hipAccessPropertyNormal", "numeric_literal"); - subst("cudaAccessPropertyPersisting", "hipAccessPropertyPersisting", "numeric_literal"); - subst("cudaAccessPropertyStreaming", "hipAccessPropertyStreaming", "numeric_literal"); - subst("cudaDevAttrMemoryPoolsSupported", "hipDeviceAttributeMemoryPoolsSupported", "numeric_literal"); - subst("cudaGraphInstantiateFlagAutoFreeOnLaunch", "hipGraphInstantiateFlagAutoFreeOnLaunch", "numeric_literal"); - subst("cudaKernelNodeAttributeAccessPolicyWindow", "hipKernelNodeAttributeAccessPolicyWindow", "numeric_literal"); - subst("cudaKernelNodeAttributeCooperative", "hipKernelNodeAttributeCooperative", "numeric_literal"); - subst("cudaMemAccessFlagsProtNone", "hipMemAccessFlagsProtNone", "numeric_literal"); - subst("cudaMemAccessFlagsProtRead", "hipMemAccessFlagsProtRead", "numeric_literal"); - subst("cudaMemAccessFlagsProtReadWrite", "hipMemAccessFlagsProtReadWrite", "numeric_literal"); - subst("cudaMemAllocationTypeInvalid", "hipMemAllocationTypeInvalid", "numeric_literal"); - subst("cudaMemAllocationTypeMax", "hipMemAllocationTypeMax", "numeric_literal"); - subst("cudaMemAllocationTypePinned", "hipMemAllocationTypePinned", "numeric_literal"); - subst("cudaMemHandleTypeNone", "hipMemHandleTypeNone", "numeric_literal"); - subst("cudaMemHandleTypePosixFileDescriptor", "hipMemHandleTypePosixFileDescriptor", "numeric_literal"); - subst("cudaMemHandleTypeWin32", "hipMemHandleTypeWin32", "numeric_literal"); - subst("cudaMemHandleTypeWin32Kmt", "hipMemHandleTypeWin32Kmt", "numeric_literal"); - subst("cudaMemLocationTypeDevice", "hipMemLocationTypeDevice", "numeric_literal"); - subst("cudaMemLocationTypeInvalid", "hipMemLocationTypeInvalid", "numeric_literal"); - subst("cudaMemPoolAttrReleaseThreshold", "hipMemPoolAttrReleaseThreshold", "numeric_literal"); - subst("cudaMemPoolAttrReservedMemCurrent", "hipMemPoolAttrReservedMemCurrent", "numeric_literal"); - subst("cudaMemPoolAttrReservedMemHigh", "hipMemPoolAttrReservedMemHigh", "numeric_literal"); - subst("cudaMemPoolAttrUsedMemCurrent", "hipMemPoolAttrUsedMemCurrent", "numeric_literal"); - subst("cudaMemPoolAttrUsedMemHigh", "hipMemPoolAttrUsedMemHigh", "numeric_literal"); - subst("cudaMemPoolReuseAllowInternalDependencies", "hipMemPoolReuseAllowInternalDependencies", "numeric_literal"); - subst("cudaMemPoolReuseAllowOpportunistic", "hipMemPoolReuseAllowOpportunistic", "numeric_literal"); - subst("cudaMemPoolReuseFollowEventDependencies", "hipMemPoolReuseFollowEventDependencies", "numeric_literal"); + subst("cuGetErrorName", "hipDrvGetErrorName", "error"); + subst("cuGetErrorString", "hipDrvGetErrorString", "error"); + subst("cudaDeviceSetLimit", "hipDeviceSetLimit", "device"); + subst("cuCtxSetLimit", "hipDeviceSetLimit", "context"); + subst("cuDeviceGetGraphMemAttribute", "hipDeviceGetGraphMemAttribute", "graph"); + subst("cuDeviceGraphMemTrim", "hipDeviceGraphMemTrim", "graph"); + subst("cuDeviceSetGraphMemAttribute", "hipDeviceSetGraphMemAttribute", "graph"); + subst("cuGraphReleaseUserObject", "hipGraphReleaseUserObject", "graph"); + subst("cuGraphRetainUserObject", "hipGraphRetainUserObject", "graph"); + subst("cuGraphUpload", "hipGraphUpload", "graph"); + subst("cuUserObjectCreate", "hipUserObjectCreate", "graph"); + subst("cuUserObjectRelease", "hipUserObjectRelease", "graph"); + subst("cuUserObjectRetain", "hipUserObjectRetain", "graph"); + subst("cudaDeviceGetGraphMemAttribute", "hipDeviceGetGraphMemAttribute", "graph"); + subst("cudaDeviceGraphMemTrim", "hipDeviceGraphMemTrim", "graph"); + subst("cudaDeviceSetGraphMemAttribute", "hipDeviceSetGraphMemAttribute", "graph"); + subst("cudaGraphReleaseUserObject", "hipGraphReleaseUserObject", "graph"); + subst("cudaGraphRetainUserObject", "hipGraphRetainUserObject", "graph"); + subst("cudaGraphUpload", "hipGraphUpload", "graph"); + subst("cudaUserObjectCreate", "hipUserObjectCreate", "graph"); + subst("cudaUserObjectRelease", "hipUserObjectRelease", "graph"); + subst("cudaUserObjectRetain", "hipUserObjectRetain", "graph"); + subst("CUgraphMem_attribute", "hipGraphMemAttributeType", "type"); + subst("CUgraphMem_attribute_enum", "hipGraphMemAttributeType", "type"); + subst("CUuserObject", "hipUserObject_t", "type"); + subst("CUuserObjectRetain_flags", "hipUserObjectRetainFlags", "type"); + subst("CUuserObjectRetain_flags_enum", "hipUserObjectRetainFlags", "type"); + subst("CUuserObject_flags", "hipUserObjectFlags", "type"); + subst("CUuserObject_flags_enum", "hipUserObjectFlags", "type"); + subst("CUuserObject_st", "hipUserObject", "type"); + subst("cudaGraphMemAttributeType", "hipGraphMemAttributeType", "type"); + subst("cudaUserObjectFlags", "hipUserObjectFlags", "type"); + subst("cudaUserObjectRetainFlags", "hipUserObjectRetainFlags", "type"); + subst("cudaUserObject_t", "hipUserObject_t", "type"); + subst("CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED", "hipDeviceAttributeVirtualMemoryManagementSupported", "numeric_literal"); + subst("CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT", "hipGraphMemAttrReservedMemCurrent", "numeric_literal"); + subst("CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH", "hipGraphMemAttrReservedMemHigh", "numeric_literal"); + subst("CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT", "hipGraphMemAttrUsedMemCurrent", "numeric_literal"); + subst("CU_GRAPH_MEM_ATTR_USED_MEM_HIGH", "hipGraphMemAttrUsedMemHigh", "numeric_literal"); + subst("CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL", "hipGraphNodeTypeExtSemaphoreSignal", "numeric_literal"); + subst("CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT", "hipGraphNodeTypeExtSemaphoreWait", "numeric_literal"); + subst("CU_GRAPH_USER_OBJECT_MOVE", "hipGraphUserObjectMove", "numeric_literal"); + subst("CU_LIMIT_STACK_SIZE", "hipLimitStackSize", "numeric_literal"); + subst("CU_USER_OBJECT_NO_DESTRUCTOR_SYNC", "hipUserObjectNoDestructorSync", "numeric_literal"); + subst("cudaGraphMemAttrReservedMemCurrent", "hipGraphMemAttrReservedMemCurrent", "numeric_literal"); + subst("cudaGraphMemAttrReservedMemHigh", "hipGraphMemAttrReservedMemHigh", "numeric_literal"); + subst("cudaGraphMemAttrUsedMemCurrent", "hipGraphMemAttrUsedMemCurrent", "numeric_literal"); + subst("cudaGraphMemAttrUsedMemHigh", "hipGraphMemAttrUsedMemHigh", "numeric_literal"); + subst("cudaGraphNodeTypeExtSemaphoreSignal", "hipGraphNodeTypeExtSemaphoreSignal", "numeric_literal"); + subst("cudaGraphNodeTypeExtSemaphoreWait", "hipGraphNodeTypeExtSemaphoreWait", "numeric_literal"); + subst("cudaGraphUserObjectMove", "hipGraphUserObjectMove", "numeric_literal"); + subst("cudaLimitStackSize", "hipLimitStackSize", "numeric_literal"); + subst("cudaMemoryTypeManaged", "hipMemoryTypeManaged", "numeric_literal"); + subst("cudaUserObjectNoDestructorSync", "hipUserObjectNoDestructorSync", "numeric_literal"); } sub rocSubstitutions { @@ -1599,6 +1334,7 @@ sub rocSubstitutions { subst("cublasZtrsv", "rocblas_ztrsv", "library"); subst("cublasZtrsv_v2", "rocblas_ztrsv", "library"); subst("cublas.h", "rocblas.h", "include_cuda_main_header"); + subst("cublas_v2.h", "rocblas.h", "include_cuda_main_header_v2"); subst("cublasAtomicsMode_t", "rocblas_atomics_mode", "type"); subst("cublasContext", "_rocblas_handle", "type"); subst("cublasDataType_t", "rocblas_datatype", "type"); @@ -1652,20 +1388,28 @@ sub simpleSubstitutions { subst("cuDeviceGet", "hipDeviceGet", "device"); subst("cuDeviceGetAttribute", "hipDeviceGetAttribute", "device"); subst("cuDeviceGetCount", "hipGetDeviceCount", "device"); + subst("cuDeviceGetDefaultMemPool", "hipDeviceGetDefaultMemPool", "device"); + subst("cuDeviceGetMemPool", "hipDeviceGetMemPool", "device"); subst("cuDeviceGetName", "hipDeviceGetName", "device"); + subst("cuDeviceGetUuid", "hipDeviceGetUuid", "device"); + subst("cuDeviceGetUuid_v2", "hipDeviceGetUuid", "device"); + subst("cuDeviceSetMemPool", "hipDeviceSetMemPool", "device"); subst("cuDeviceTotalMem", "hipDeviceTotalMem", "device"); subst("cuDeviceTotalMem_v2", "hipDeviceTotalMem", "device"); subst("cudaChooseDevice", "hipChooseDevice", "device"); subst("cudaDeviceGetAttribute", "hipDeviceGetAttribute", "device"); subst("cudaDeviceGetByPCIBusId", "hipDeviceGetByPCIBusId", "device"); subst("cudaDeviceGetCacheConfig", "hipDeviceGetCacheConfig", "device"); + subst("cudaDeviceGetDefaultMemPool", "hipDeviceGetDefaultMemPool", "device"); subst("cudaDeviceGetLimit", "hipDeviceGetLimit", "device"); + subst("cudaDeviceGetMemPool", "hipDeviceGetMemPool", "device"); subst("cudaDeviceGetP2PAttribute", "hipDeviceGetP2PAttribute", "device"); subst("cudaDeviceGetPCIBusId", "hipDeviceGetPCIBusId", "device"); subst("cudaDeviceGetSharedMemConfig", "hipDeviceGetSharedMemConfig", "device"); subst("cudaDeviceGetStreamPriorityRange", "hipDeviceGetStreamPriorityRange", "device"); subst("cudaDeviceReset", "hipDeviceReset", "device"); subst("cudaDeviceSetCacheConfig", "hipDeviceSetCacheConfig", "device"); + subst("cudaDeviceSetMemPool", "hipDeviceSetMemPool", "device"); subst("cudaDeviceSetSharedMemConfig", "hipDeviceSetSharedMemConfig", "device"); subst("cudaDeviceSynchronize", "hipDeviceSynchronize", "device"); subst("cudaFuncSetCacheConfig", "hipFuncSetCacheConfig", "device"); @@ -1789,6 +1533,7 @@ sub simpleSubstitutions { subst("cuMipmappedArrayGetLevel", "hipMipmappedArrayGetLevel", "memory"); subst("cudaFree", "hipFree", "memory"); subst("cudaFreeArray", "hipFreeArray", "memory"); + subst("cudaFreeAsync", "hipFreeAsync", "memory"); subst("cudaFreeHost", "hipHostFree", "memory"); subst("cudaFreeMipmappedArray", "hipFreeMipmappedArray", "memory"); subst("cudaGetMipmappedArrayLevel", "hipGetMipmappedArrayLevel", "memory"); @@ -1803,12 +1548,25 @@ sub simpleSubstitutions { subst("cudaMalloc3D", "hipMalloc3D", "memory"); subst("cudaMalloc3DArray", "hipMalloc3DArray", "memory"); subst("cudaMallocArray", "hipMallocArray", "memory"); + subst("cudaMallocAsync", "hipMallocAsync", "memory"); + subst("cudaMallocFromPoolAsync", "hipMallocFromPoolAsync", "memory"); subst("cudaMallocHost", "hipHostMalloc", "memory"); subst("cudaMallocManaged", "hipMallocManaged", "memory"); subst("cudaMallocMipmappedArray", "hipMallocMipmappedArray", "memory"); subst("cudaMallocPitch", "hipMallocPitch", "memory"); subst("cudaMemAdvise", "hipMemAdvise", "memory"); subst("cudaMemGetInfo", "hipMemGetInfo", "memory"); + subst("cudaMemPoolCreate", "hipMemPoolCreate", "memory"); + subst("cudaMemPoolDestroy", "hipMemPoolDestroy", "memory"); + subst("cudaMemPoolExportPointer", "hipMemPoolExportPointer", "memory"); + subst("cudaMemPoolExportToShareableHandle", "hipMemPoolExportToShareableHandle", "memory"); + subst("cudaMemPoolGetAccess", "hipMemPoolGetAccess", "memory"); + subst("cudaMemPoolGetAttribute", "hipMemPoolGetAttribute", "memory"); + subst("cudaMemPoolImportFromShareableHandle", "hipMemPoolImportFromShareableHandle", "memory"); + subst("cudaMemPoolImportPointer", "hipMemPoolImportPointer", "memory"); + subst("cudaMemPoolSetAccess", "hipMemPoolSetAccess", "memory"); + subst("cudaMemPoolSetAttribute", "hipMemPoolSetAttribute", "memory"); + subst("cudaMemPoolTrimTo", "hipMemPoolTrimTo", "memory"); subst("cudaMemPrefetchAsync", "hipMemPrefetchAsync", "memory"); subst("cudaMemRangeGetAttribute", "hipMemRangeGetAttribute", "memory"); subst("cudaMemRangeGetAttributes", "hipMemRangeGetAttributes", "memory"); @@ -1839,6 +1597,34 @@ sub simpleSubstitutions { subst("make_cudaExtent", "make_hipExtent", "memory"); subst("make_cudaPitchedPtr", "make_hipPitchedPtr", "memory"); subst("make_cudaPos", "make_hipPos", "memory"); + subst("cuMemAddressFree", "hipMemAddressFree", "virtual_memory"); + subst("cuMemAddressReserve", "hipMemAddressReserve", "virtual_memory"); + subst("cuMemCreate", "hipMemCreate", "virtual_memory"); + subst("cuMemExportToShareableHandle", "hipMemExportToShareableHandle", "virtual_memory"); + subst("cuMemGetAccess", "hipMemGetAccess", "virtual_memory"); + subst("cuMemGetAllocationGranularity", "hipMemGetAllocationGranularity", "virtual_memory"); + subst("cuMemGetAllocationPropertiesFromHandle", "hipMemGetAllocationPropertiesFromHandle", "virtual_memory"); + subst("cuMemImportFromShareableHandle", "hipMemImportFromShareableHandle", "virtual_memory"); + subst("cuMemMap", "hipMemMap", "virtual_memory"); + subst("cuMemMapArrayAsync", "hipMemMapArrayAsync", "virtual_memory"); + subst("cuMemRelease", "hipMemRelease", "virtual_memory"); + subst("cuMemRetainAllocationHandle", "hipMemRetainAllocationHandle", "virtual_memory"); + subst("cuMemSetAccess", "hipMemSetAccess", "virtual_memory"); + subst("cuMemUnmap", "hipMemUnmap", "virtual_memory"); + subst("cuMemAllocAsync", "hipMallocAsync", "stream_ordered_memory"); + subst("cuMemAllocFromPoolAsync", "hipMallocFromPoolAsync", "stream_ordered_memory"); + subst("cuMemFreeAsync", "hipFreeAsync", "stream_ordered_memory"); + subst("cuMemPoolCreate", "hipMemPoolCreate", "stream_ordered_memory"); + subst("cuMemPoolDestroy", "hipMemPoolDestroy", "stream_ordered_memory"); + subst("cuMemPoolExportPointer", "hipMemPoolExportPointer", "stream_ordered_memory"); + subst("cuMemPoolExportToShareableHandle", "hipMemPoolExportToShareableHandle", "stream_ordered_memory"); + subst("cuMemPoolGetAccess", "hipMemPoolGetAccess", "stream_ordered_memory"); + subst("cuMemPoolGetAttribute", "hipMemPoolGetAttribute", "stream_ordered_memory"); + subst("cuMemPoolImportFromShareableHandle", "hipMemPoolImportFromShareableHandle", "stream_ordered_memory"); + subst("cuMemPoolImportPointer", "hipMemPoolImportPointer", "stream_ordered_memory"); + subst("cuMemPoolSetAccess", "hipMemPoolSetAccess", "stream_ordered_memory"); + subst("cuMemPoolSetAttribute", "hipMemPoolSetAttribute", "stream_ordered_memory"); + subst("cuMemPoolTrimTo", "hipMemPoolTrimTo", "stream_ordered_memory"); subst("cuMemAdvise", "hipMemAdvise", "addressing"); subst("cuMemPrefetchAsync", "hipMemPrefetchAsync", "addressing"); subst("cuMemRangeGetAttribute", "hipMemRangeGetAttribute", "addressing"); @@ -1864,6 +1650,7 @@ sub simpleSubstitutions { subst("cuStreamSynchronize", "hipStreamSynchronize", "stream"); subst("cuStreamUpdateCaptureDependencies", "hipStreamUpdateCaptureDependencies", "stream"); subst("cuStreamWaitEvent", "hipStreamWaitEvent", "stream"); + subst("cuThreadExchangeStreamCaptureMode", "hipThreadExchangeStreamCaptureMode", "stream"); subst("cudaStreamAddCallback", "hipStreamAddCallback", "stream"); subst("cudaStreamAttachMemAsync", "hipStreamAttachMemAsync", "stream"); subst("cudaStreamBeginCapture", "hipStreamBeginCapture", "stream"); @@ -1879,6 +1666,7 @@ sub simpleSubstitutions { subst("cudaStreamQuery", "hipStreamQuery", "stream"); subst("cudaStreamSynchronize", "hipStreamSynchronize", "stream"); subst("cudaStreamWaitEvent", "hipStreamWaitEvent", "stream"); + subst("cudaThreadExchangeStreamCaptureMode", "hipThreadExchangeStreamCaptureMode", "stream"); subst("cuEventCreate", "hipEventCreateWithFlags", "event"); subst("cuEventDestroy", "hipEventDestroy", "event"); subst("cuEventDestroy_v2", "hipEventDestroy", "event"); @@ -1916,6 +1704,7 @@ sub simpleSubstitutions { subst("cuStreamWriteValue64", "hipStreamWriteValue64", "stream_memory"); subst("cuStreamWriteValue64_v2", "hipStreamWriteValue64", "stream_memory"); subst("cuFuncGetAttribute", "hipFuncGetAttribute", "execution"); + subst("cuLaunchHostFunc", "hipLaunchHostFunc", "execution"); subst("cuLaunchKernel", "hipModuleLaunchKernel", "execution"); subst("cudaConfigureCall", "hipConfigureCall", "execution"); subst("cudaFuncGetAttributes", "hipFuncGetAttributes", "execution"); @@ -1924,6 +1713,7 @@ sub simpleSubstitutions { subst("cudaLaunch", "hipLaunchByPtr", "execution"); subst("cudaLaunchCooperativeKernel", "hipLaunchCooperativeKernel", "execution"); subst("cudaLaunchCooperativeKernelMultiDevice", "hipLaunchCooperativeKernelMultiDevice", "execution"); + subst("cudaLaunchHostFunc", "hipLaunchHostFunc", "execution"); subst("cudaLaunchKernel", "hipLaunchKernel", "execution"); subst("cudaSetupArgument", "hipSetupArgument", "execution"); subst("cuGraphAddChildGraphNode", "hipGraphAddChildGraphNode", "graph"); @@ -1957,7 +1747,9 @@ sub simpleSubstitutions { subst("cuGraphInstantiate", "hipGraphInstantiate", "graph"); subst("cuGraphInstantiateWithFlags", "hipGraphInstantiateWithFlags", "graph"); subst("cuGraphInstantiate_v2", "hipGraphInstantiate", "graph"); + subst("cuGraphKernelNodeGetAttribute", "hipGraphKernelNodeGetAttribute", "graph"); subst("cuGraphKernelNodeGetParams", "hipGraphKernelNodeGetParams", "graph"); + subst("cuGraphKernelNodeSetAttribute", "hipGraphKernelNodeSetAttribute", "graph"); subst("cuGraphKernelNodeSetParams", "hipGraphKernelNodeSetParams", "graph"); subst("cuGraphLaunch", "hipGraphLaunch", "graph"); subst("cuGraphMemcpyNodeGetParams", "hipGraphMemcpyNodeGetParams", "graph"); @@ -2009,7 +1801,9 @@ sub simpleSubstitutions { subst("cudaGraphHostNodeSetParams", "hipGraphHostNodeSetParams", "graph"); subst("cudaGraphInstantiate", "hipGraphInstantiate", "graph"); subst("cudaGraphInstantiateWithFlags", "hipGraphInstantiateWithFlags", "graph"); + subst("cudaGraphKernelNodeGetAttribute", "hipGraphKernelNodeGetAttribute", "graph"); subst("cudaGraphKernelNodeGetParams", "hipGraphKernelNodeGetParams", "graph"); + subst("cudaGraphKernelNodeSetAttribute", "hipGraphKernelNodeSetAttribute", "graph"); subst("cudaGraphKernelNodeSetParams", "hipGraphKernelNodeSetParams", "graph"); subst("cudaGraphLaunch", "hipGraphLaunch", "graph"); subst("cudaGraphMemcpyNodeGetParams", "hipGraphMemcpyNodeGetParams", "graph"); @@ -3277,6 +3071,7 @@ sub simpleSubstitutions { subst("cusparse.h", "hipsparse.h", "include_cuda_main_header"); subst("cusparse_v2.h", "hipsparse.h", "include_cuda_main_header"); subst("nvrtc.h", "hiprtc.h", "include_cuda_main_header"); + subst("cublas_v2.h", "hipblas.h", "include_cuda_main_header_v2"); subst("CUDAContext", "HIPContext", "type"); subst("CUDA_ARRAY3D_DESCRIPTOR", "HIP_ARRAY3D_DESCRIPTOR", "type"); subst("CUDA_ARRAY3D_DESCRIPTOR_st", "HIP_ARRAY3D_DESCRIPTOR", "type"); @@ -3331,9 +3126,18 @@ sub simpleSubstitutions { subst("CUDA_TEXTURE_DESC_v1", "HIP_TEXTURE_DESC", "type"); subst("CUGLDeviceList", "hipGLDeviceList", "type"); subst("CUGLDeviceList_enum", "hipGLDeviceList", "type"); + subst("CUaccessPolicyWindow", "hipAccessPolicyWindow", "type"); + subst("CUaccessPolicyWindow_st", "hipAccessPolicyWindow", "type"); + subst("CUaccessProperty", "hipAccessProperty", "type"); + subst("CUaccessProperty_enum", "hipAccessProperty", "type"); subst("CUaddress_mode", "HIPaddress_mode", "type"); subst("CUaddress_mode_enum", "HIPaddress_mode_enum", "type"); subst("CUarray", "hipArray_t", "type"); + subst("CUarrayMapInfo", "hipArrayMapInfo", "type"); + subst("CUarrayMapInfo_st", "hipArrayMapInfo", "type"); + subst("CUarrayMapInfo_v1", "hipArrayMapInfo", "type"); + subst("CUarraySparseSubresourceType", "hipArraySparseSubresourceType", "type"); + subst("CUarraySparseSubresourceType_enum", "hipArraySparseSubresourceType", "type"); subst("CUarray_format", "hipArray_Format", "type"); subst("CUarray_format_enum", "hipArray_Format", "type"); subst("CUarray_st", "hipArray", "type"); @@ -3371,6 +3175,8 @@ sub simpleSubstitutions { subst("CUgraphExecUpdateResult", "hipGraphExecUpdateResult", "type"); subst("CUgraphExecUpdateResult_enum", "hipGraphExecUpdateResult", "type"); subst("CUgraphExec_st", "hipGraphExec", "type"); + subst("CUgraphInstantiate_flags", "hipGraphInstantiateFlags", "type"); + subst("CUgraphInstantiate_flags_enum", "hipGraphInstantiateFlags", "type"); subst("CUgraphNode", "hipGraphNode_t", "type"); subst("CUgraphNodeType", "hipGraphNodeType", "type"); subst("CUgraphNodeType_enum", "hipGraphNodeType", "type"); @@ -3389,12 +3195,52 @@ sub simpleSubstitutions { subst("CUipcMemHandle_v1", "hipIpcMemHandle_t", "type"); subst("CUjit_option", "hipJitOption", "type"); subst("CUjit_option_enum", "hipJitOption", "type"); + subst("CUkernelNodeAttrID", "hipKernelNodeAttrID", "type"); + subst("CUkernelNodeAttrID_enum", "hipKernelNodeAttrID", "type"); + subst("CUkernelNodeAttrValue", "hipKernelNodeAttrValue", "type"); + subst("CUkernelNodeAttrValue_union", "hipKernelNodeAttrValue", "type"); + subst("CUkernelNodeAttrValue_v1", "hipKernelNodeAttrValue", "type"); subst("CUlimit", "hipLimit_t", "type"); subst("CUlimit_enum", "hipLimit_t", "type"); + subst("CUmemAccessDesc", "hipMemAccessDesc", "type"); + subst("CUmemAccessDesc_st", "hipMemAccessDesc", "type"); + subst("CUmemAccessDesc_v1", "hipMemAccessDesc", "type"); + subst("CUmemAccess_flags", "hipMemAccessFlags", "type"); + subst("CUmemAccess_flags_enum", "hipMemAccessFlags", "type"); + subst("CUmemAllocationGranularity_flags", "hipMemAllocationGranularity_flags", "type"); + subst("CUmemAllocationGranularity_flags_enum", "hipMemAllocationGranularity_flags", "type"); + subst("CUmemAllocationHandleType", "hipMemAllocationHandleType", "type"); + subst("CUmemAllocationHandleType_enum", "hipMemAllocationHandleType", "type"); + subst("CUmemAllocationProp", "hipMemAllocationProp", "type"); + subst("CUmemAllocationProp_st", "hipMemAllocationProp", "type"); + subst("CUmemAllocationProp_v1", "hipMemAllocationProp", "type"); + subst("CUmemAllocationType", "hipMemAllocationType", "type"); + subst("CUmemAllocationType_enum", "hipMemAllocationType", "type"); + subst("CUmemGenericAllocationHandle", "hipMemGenericAllocationHandle_t", "type"); + subst("CUmemGenericAllocationHandle_v1", "hipMemGenericAllocationHandle_t", "type"); + subst("CUmemHandleType", "hipMemHandleType", "type"); + subst("CUmemHandleType_enum", "hipMemHandleType", "type"); + subst("CUmemLocation", "hipMemLocation", "type"); + subst("CUmemLocationType", "hipMemLocationType", "type"); + subst("CUmemLocationType_enum", "hipMemLocationType", "type"); + subst("CUmemLocation_st", "hipMemLocation", "type"); + subst("CUmemLocation_v1", "hipMemLocation", "type"); + subst("CUmemOperationType", "hipMemOperationType", "type"); + subst("CUmemOperationType_enum", "hipMemOperationType", "type"); + subst("CUmemPoolHandle_st", "ihipMemPoolHandle_t", "type"); + subst("CUmemPoolProps", "hipMemPoolProps", "type"); + subst("CUmemPoolProps_st", "hipMemPoolProps", "type"); + subst("CUmemPoolProps_v1", "hipMemPoolProps", "type"); + subst("CUmemPoolPtrExportData", "hipMemPoolPtrExportData", "type"); + subst("CUmemPoolPtrExportData_st", "hipMemPoolPtrExportData", "type"); + subst("CUmemPoolPtrExportData_v1", "hipMemPoolPtrExportData", "type"); + subst("CUmemPool_attribute", "hipMemPoolAttr", "type"); + subst("CUmemPool_attribute_enum", "hipMemPoolAttr", "type"); subst("CUmem_advise", "hipMemoryAdvise", "type"); subst("CUmem_advise_enum", "hipMemoryAdvise", "type"); subst("CUmem_range_attribute", "hipMemRangeAttribute", "type"); subst("CUmem_range_attribute_enum", "hipMemRangeAttribute", "type"); + subst("CUmemoryPool", "hipMemPool_t", "type"); subst("CUmemorytype", "hipMemoryType", "type"); subst("CUmemorytype_enum", "hipMemoryType", "type"); subst("CUmipmappedArray", "hipMipmappedArray_t", "type"); @@ -3426,6 +3272,8 @@ sub simpleSubstitutions { subst("CUtexObject_v1", "hipTextureObject_t", "type"); subst("CUtexref", "hipTexRef", "type"); subst("CUtexref_st", "textureReference", "type"); + subst("CUuuid", "hipUUID", "type"); + subst("CUuuid_st", "hipUUID_t", "type"); subst("GLenum", "GLenum", "type"); subst("GLuint", "GLuint", "type"); subst("bsric02Info_t", "bsric02Info_t", "type"); @@ -3453,6 +3301,8 @@ sub simpleSubstitutions { subst("cublasSideMode_t", "hipblasSideMode_t", "type"); subst("cublasStatus", "hipblasStatus_t", "type"); subst("cublasStatus_t", "hipblasStatus_t", "type"); + subst("cudaAccessPolicyWindow", "hipAccessPolicyWindow", "type"); + subst("cudaAccessProperty", "hipAccessProperty", "type"); subst("cudaArray", "hipArray", "type"); subst("cudaArray_const_t", "hipArray_const_t", "type"); subst("cudaArray_t", "hipArray_t", "type"); @@ -3487,6 +3337,7 @@ sub simpleSubstitutions { subst("cudaGLDeviceList", "hipGLDeviceList", "type"); subst("cudaGraphExecUpdateResult", "hipGraphExecUpdateResult", "type"); subst("cudaGraphExec_t", "hipGraphExec_t", "type"); + subst("cudaGraphInstantiateFlags", "hipGraphInstantiateFlags", "type"); subst("cudaGraphNodeType", "hipGraphNodeType", "type"); subst("cudaGraphNode_t", "hipGraphNode_t", "type"); subst("cudaGraph_t", "hipGraph_t", "type"); @@ -3499,9 +3350,21 @@ sub simpleSubstitutions { subst("cudaIpcEventHandle_t", "hipIpcEventHandle_t", "type"); subst("cudaIpcMemHandle_st", "hipIpcMemHandle_st", "type"); subst("cudaIpcMemHandle_t", "hipIpcMemHandle_t", "type"); + subst("cudaKernelNodeAttrID", "hipKernelNodeAttrID", "type"); + subst("cudaKernelNodeAttrValue", "hipKernelNodeAttrValue", "type"); subst("cudaKernelNodeParams", "hipKernelNodeParams", "type"); subst("cudaLaunchParams", "hipLaunchParams", "type"); subst("cudaLimit", "hipLimit_t", "type"); + subst("cudaMemAccessDesc", "hipMemAccessDesc", "type"); + subst("cudaMemAccessFlags", "hipMemAccessFlags", "type"); + subst("cudaMemAllocationHandleType", "hipMemAllocationHandleType", "type"); + subst("cudaMemAllocationType", "hipMemAllocationType", "type"); + subst("cudaMemLocation", "hipMemLocation", "type"); + subst("cudaMemLocationType", "hipMemLocationType", "type"); + subst("cudaMemPoolAttr", "hipMemPoolAttr", "type"); + subst("cudaMemPoolProps", "hipMemPoolProps", "type"); + subst("cudaMemPoolPtrExportData", "hipMemPoolPtrExportData", "type"); + subst("cudaMemPool_t", "hipMemPool_t", "type"); subst("cudaMemRangeAttribute", "hipMemRangeAttribute", "type"); subst("cudaMemcpy3DParms", "hipMemcpy3DParms", "type"); subst("cudaMemcpyKind", "hipMemcpyKind", "type"); @@ -3531,6 +3394,7 @@ sub simpleSubstitutions { subst("cudaTextureFilterMode", "hipTextureFilterMode", "type"); subst("cudaTextureObject_t", "hipTextureObject_t", "type"); subst("cudaTextureReadMode", "hipTextureReadMode", "type"); + subst("cudaUUID_t", "hipUUID", "type"); subst("cudnnActivationDescriptor_t", "hipdnnActivationDescriptor_t", "type"); subst("cudnnActivationMode_t", "hipdnnActivationMode_t", "type"); subst("cudnnBatchNormMode_t", "hipdnnBatchNormMode_t", "type"); @@ -3746,6 +3610,7 @@ sub simpleSubstitutions { subst("CUDA_ERROR_UNKNOWN", "hipErrorUnknown", "numeric_literal"); subst("CUDA_ERROR_UNMAP_FAILED", "hipErrorUnmapFailed", "numeric_literal"); subst("CUDA_ERROR_UNSUPPORTED_LIMIT", "hipErrorUnsupportedLimit", "numeric_literal"); + subst("CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH", "hipGraphInstantiateFlagAutoFreeOnLaunch", "numeric_literal"); subst("CUDA_R_16BF", "HIPBLAS_R_16B", "numeric_literal"); subst("CUDA_R_16F", "HIPBLAS_R_16F", "numeric_literal"); subst("CUDA_R_32F", "HIPBLAS_R_32F", "numeric_literal"); @@ -4007,6 +3872,9 @@ sub simpleSubstitutions { subst("CUSPARSE_STATUS_NOT_SUPPORTED", "HIPSPARSE_STATUS_NOT_SUPPORTED", "numeric_literal"); subst("CUSPARSE_STATUS_SUCCESS", "HIPSPARSE_STATUS_SUCCESS", "numeric_literal"); subst("CUSPARSE_STATUS_ZERO_PIVOT", "HIPSPARSE_STATUS_ZERO_PIVOT", "numeric_literal"); + subst("CU_ACCESS_PROPERTY_NORMAL", "hipAccessPropertyNormal", "numeric_literal"); + subst("CU_ACCESS_PROPERTY_PERSISTING", "hipAccessPropertyPersisting", "numeric_literal"); + subst("CU_ACCESS_PROPERTY_STREAMING", "hipAccessPropertyStreaming", "numeric_literal"); subst("CU_AD_FORMAT_FLOAT", "HIP_AD_FORMAT_FLOAT", "numeric_literal"); subst("CU_AD_FORMAT_HALF", "HIP_AD_FORMAT_HALF", "numeric_literal"); subst("CU_AD_FORMAT_SIGNED_INT16", "HIP_AD_FORMAT_SIGNED_INT16", "numeric_literal"); @@ -4015,6 +3883,8 @@ sub simpleSubstitutions { subst("CU_AD_FORMAT_UNSIGNED_INT16", "HIP_AD_FORMAT_UNSIGNED_INT16", "numeric_literal"); subst("CU_AD_FORMAT_UNSIGNED_INT32", "HIP_AD_FORMAT_UNSIGNED_INT32", "numeric_literal"); subst("CU_AD_FORMAT_UNSIGNED_INT8", "HIP_AD_FORMAT_UNSIGNED_INT8", "numeric_literal"); + subst("CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL", "hipArraySparseSubresourceTypeMiptail", "numeric_literal"); + subst("CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL", "hipArraySparseSubresourceTypeSparseLevel", "numeric_literal"); subst("CU_COMPUTEMODE_DEFAULT", "hipComputeModeDefault", "numeric_literal"); subst("CU_COMPUTEMODE_EXCLUSIVE", "hipComputeModeExclusive", "numeric_literal"); subst("CU_COMPUTEMODE_EXCLUSIVE_PROCESS", "hipComputeModeExclusiveProcess", "numeric_literal"); @@ -4103,6 +3973,7 @@ sub simpleSubstitutions { subst("CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK", "hipDeviceAttributeMaxThreadsPerBlock", "numeric_literal"); subst("CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR", "hipDeviceAttributeMaxThreadsPerMultiProcessor", "numeric_literal"); subst("CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE", "hipDeviceAttributeMemoryClockRate", "numeric_literal"); + subst("CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED", "hipDeviceAttributeMemoryPoolsSupported", "numeric_literal"); subst("CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT", "hipDeviceAttributeMultiprocessorCount", "numeric_literal"); subst("CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD", "hipDeviceAttributeIsMultiGpuBoard", "numeric_literal"); subst("CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID", "hipDeviceAttributeMultiGpuBoardGroupId", "numeric_literal"); @@ -4202,21 +4073,48 @@ sub simpleSubstitutions { subst("CU_JIT_TARGET_FROM_CUCONTEXT", "hipJitOptionTargetFromContext", "numeric_literal"); subst("CU_JIT_THREADS_PER_BLOCK", "hipJitOptionThreadsPerBlock", "numeric_literal"); subst("CU_JIT_WALL_TIME", "hipJitOptionWallTime", "numeric_literal"); + subst("CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW", "hipKernelNodeAttributeAccessPolicyWindow", "numeric_literal"); + subst("CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE", "hipKernelNodeAttributeCooperative", "numeric_literal"); subst("CU_LIMIT_MALLOC_HEAP_SIZE", "hipLimitMallocHeapSize", "numeric_literal"); subst("CU_LIMIT_PRINTF_FIFO_SIZE", "hipLimitPrintfFifoSize", "numeric_literal"); subst("CU_MEMORYTYPE_ARRAY", "hipMemoryTypeArray", "numeric_literal"); subst("CU_MEMORYTYPE_DEVICE", "hipMemoryTypeDevice", "numeric_literal"); subst("CU_MEMORYTYPE_HOST", "hipMemoryTypeHost", "numeric_literal"); subst("CU_MEMORYTYPE_UNIFIED", "hipMemoryTypeUnified", "numeric_literal"); + subst("CU_MEMPOOL_ATTR_RELEASE_THRESHOLD", "hipMemPoolAttrReleaseThreshold", "numeric_literal"); + subst("CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT", "hipMemPoolAttrReservedMemCurrent", "numeric_literal"); + subst("CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH", "hipMemPoolAttrReservedMemHigh", "numeric_literal"); + subst("CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES", "hipMemPoolReuseAllowInternalDependencies", "numeric_literal"); + subst("CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC", "hipMemPoolReuseAllowOpportunistic", "numeric_literal"); + subst("CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES", "hipMemPoolReuseFollowEventDependencies", "numeric_literal"); + subst("CU_MEMPOOL_ATTR_USED_MEM_CURRENT", "hipMemPoolAttrUsedMemCurrent", "numeric_literal"); + subst("CU_MEMPOOL_ATTR_USED_MEM_HIGH", "hipMemPoolAttrUsedMemHigh", "numeric_literal"); + subst("CU_MEM_ACCESS_FLAGS_PROT_NONE", "hipMemAccessFlagsProtNone", "numeric_literal"); + subst("CU_MEM_ACCESS_FLAGS_PROT_READ", "hipMemAccessFlagsProtRead", "numeric_literal"); + subst("CU_MEM_ACCESS_FLAGS_PROT_READWRITE", "hipMemAccessFlagsProtReadWrite", "numeric_literal"); subst("CU_MEM_ADVISE_SET_ACCESSED_BY", "hipMemAdviseSetAccessedBy", "numeric_literal"); subst("CU_MEM_ADVISE_SET_PREFERRED_LOCATION", "hipMemAdviseSetPreferredLocation", "numeric_literal"); subst("CU_MEM_ADVISE_SET_READ_MOSTLY", "hipMemAdviseSetReadMostly", "numeric_literal"); subst("CU_MEM_ADVISE_UNSET_ACCESSED_BY", "hipMemAdviseUnsetAccessedBy", "numeric_literal"); subst("CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION", "hipMemAdviseUnsetPreferredLocation", "numeric_literal"); subst("CU_MEM_ADVISE_UNSET_READ_MOSTLY", "hipMemAdviseUnsetReadMostly", "numeric_literal"); + subst("CU_MEM_ALLOCATION_TYPE_INVALID", "hipMemAllocationTypeInvalid", "numeric_literal"); + subst("CU_MEM_ALLOCATION_TYPE_MAX", "hipMemAllocationTypeMax", "numeric_literal"); + subst("CU_MEM_ALLOCATION_TYPE_PINNED", "hipMemAllocationTypePinned", "numeric_literal"); + subst("CU_MEM_ALLOC_GRANULARITY_MINIMUM", "hipMemAllocationGranularityMinimum", "numeric_literal"); + subst("CU_MEM_ALLOC_GRANULARITY_RECOMMENDED", "hipMemAllocationGranularityRecommended", "numeric_literal"); subst("CU_MEM_ATTACH_GLOBAL", "hipMemAttachGlobal", "numeric_literal"); subst("CU_MEM_ATTACH_HOST", "hipMemAttachHost", "numeric_literal"); subst("CU_MEM_ATTACH_SINGLE", "hipMemAttachSingle", "numeric_literal"); + subst("CU_MEM_HANDLE_TYPE_GENERIC", "hipMemHandleTypeGeneric", "numeric_literal"); + subst("CU_MEM_HANDLE_TYPE_NONE", "hipMemHandleTypeNone", "numeric_literal"); + subst("CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR", "hipMemHandleTypePosixFileDescriptor", "numeric_literal"); + subst("CU_MEM_HANDLE_TYPE_WIN32", "hipMemHandleTypeWin32", "numeric_literal"); + subst("CU_MEM_HANDLE_TYPE_WIN32_KMT", "hipMemHandleTypeWin32Kmt", "numeric_literal"); + subst("CU_MEM_LOCATION_TYPE_DEVICE", "hipMemLocationTypeDevice", "numeric_literal"); + subst("CU_MEM_LOCATION_TYPE_INVALID", "hipMemLocationTypeInvalid", "numeric_literal"); + subst("CU_MEM_OPERATION_TYPE_MAP", "hipMemOperationTypeMap", "numeric_literal"); + subst("CU_MEM_OPERATION_TYPE_UNMAP", "hipMemOperationTypeUnmap", "numeric_literal"); subst("CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY", "hipMemRangeAttributeAccessedBy", "numeric_literal"); subst("CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION", "hipMemRangeAttributeLastPrefetchLocation", "numeric_literal"); subst("CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION", "hipMemRangeAttributePreferredLocation", "numeric_literal"); @@ -4313,6 +4211,9 @@ sub simpleSubstitutions { subst("NVRTC_ERROR_OUT_OF_MEMORY", "HIPRTC_ERROR_OUT_OF_MEMORY", "numeric_literal"); subst("NVRTC_ERROR_PROGRAM_CREATION_FAILURE", "HIPRTC_ERROR_PROGRAM_CREATION_FAILURE", "numeric_literal"); subst("NVRTC_SUCCESS", "HIPRTC_SUCCESS", "numeric_literal"); + subst("cudaAccessPropertyNormal", "hipAccessPropertyNormal", "numeric_literal"); + subst("cudaAccessPropertyPersisting", "hipAccessPropertyPersisting", "numeric_literal"); + subst("cudaAccessPropertyStreaming", "hipAccessPropertyStreaming", "numeric_literal"); subst("cudaAddressModeBorder", "hipAddressModeBorder", "numeric_literal"); subst("cudaAddressModeClamp", "hipAddressModeClamp", "numeric_literal"); subst("cudaAddressModeMirror", "hipAddressModeMirror", "numeric_literal"); @@ -4402,6 +4303,7 @@ sub simpleSubstitutions { subst("cudaDevAttrMaxThreadsPerBlock", "hipDeviceAttributeMaxThreadsPerBlock", "numeric_literal"); subst("cudaDevAttrMaxThreadsPerMultiProcessor", "hipDeviceAttributeMaxThreadsPerMultiProcessor", "numeric_literal"); subst("cudaDevAttrMemoryClockRate", "hipDeviceAttributeMemoryClockRate", "numeric_literal"); + subst("cudaDevAttrMemoryPoolsSupported", "hipDeviceAttributeMemoryPoolsSupported", "numeric_literal"); subst("cudaDevAttrMultiGpuBoardGroupID", "hipDeviceAttributeMultiGpuBoardGroupID", "numeric_literal"); subst("cudaDevAttrMultiProcessorCount", "hipDeviceAttributeMultiprocessorCount", "numeric_literal"); subst("cudaDevAttrPageableMemoryAccess", "hipDeviceAttributePageableMemoryAccess", "numeric_literal"); @@ -4523,6 +4425,7 @@ sub simpleSubstitutions { subst("cudaGraphExecUpdateErrorTopologyChanged", "hipGraphExecUpdateErrorTopologyChanged", "numeric_literal"); subst("cudaGraphExecUpdateErrorUnsupportedFunctionChange", "hipGraphExecUpdateErrorUnsupportedFunctionChange", "numeric_literal"); subst("cudaGraphExecUpdateSuccess", "hipGraphExecUpdateSuccess", "numeric_literal"); + subst("cudaGraphInstantiateFlagAutoFreeOnLaunch", "hipGraphInstantiateFlagAutoFreeOnLaunch", "numeric_literal"); subst("cudaGraphNodeTypeCount", "hipGraphNodeTypeCount", "numeric_literal"); subst("cudaGraphNodeTypeEmpty", "hipGraphNodeTypeEmpty", "numeric_literal"); subst("cudaGraphNodeTypeEventRecord", "hipGraphNodeTypeEventRecord", "numeric_literal"); @@ -4537,14 +4440,36 @@ sub simpleSubstitutions { subst("cudaGraphicsRegisterFlagsSurfaceLoadStore", "hipGraphicsRegisterFlagsSurfaceLoadStore", "numeric_literal"); subst("cudaGraphicsRegisterFlagsTextureGather", "hipGraphicsRegisterFlagsTextureGather", "numeric_literal"); subst("cudaGraphicsRegisterFlagsWriteDiscard", "hipGraphicsRegisterFlagsWriteDiscard", "numeric_literal"); + subst("cudaKernelNodeAttributeAccessPolicyWindow", "hipKernelNodeAttributeAccessPolicyWindow", "numeric_literal"); + subst("cudaKernelNodeAttributeCooperative", "hipKernelNodeAttributeCooperative", "numeric_literal"); subst("cudaLimitMallocHeapSize", "hipLimitMallocHeapSize", "numeric_literal"); subst("cudaLimitPrintfFifoSize", "hipLimitPrintfFifoSize", "numeric_literal"); + subst("cudaMemAccessFlagsProtNone", "hipMemAccessFlagsProtNone", "numeric_literal"); + subst("cudaMemAccessFlagsProtRead", "hipMemAccessFlagsProtRead", "numeric_literal"); + subst("cudaMemAccessFlagsProtReadWrite", "hipMemAccessFlagsProtReadWrite", "numeric_literal"); subst("cudaMemAdviseSetAccessedBy", "hipMemAdviseSetAccessedBy", "numeric_literal"); subst("cudaMemAdviseSetPreferredLocation", "hipMemAdviseSetPreferredLocation", "numeric_literal"); subst("cudaMemAdviseSetReadMostly", "hipMemAdviseSetReadMostly", "numeric_literal"); subst("cudaMemAdviseUnsetAccessedBy", "hipMemAdviseUnsetAccessedBy", "numeric_literal"); subst("cudaMemAdviseUnsetPreferredLocation", "hipMemAdviseUnsetPreferredLocation", "numeric_literal"); subst("cudaMemAdviseUnsetReadMostly", "hipMemAdviseUnsetReadMostly", "numeric_literal"); + subst("cudaMemAllocationTypeInvalid", "hipMemAllocationTypeInvalid", "numeric_literal"); + subst("cudaMemAllocationTypeMax", "hipMemAllocationTypeMax", "numeric_literal"); + subst("cudaMemAllocationTypePinned", "hipMemAllocationTypePinned", "numeric_literal"); + subst("cudaMemHandleTypeNone", "hipMemHandleTypeNone", "numeric_literal"); + subst("cudaMemHandleTypePosixFileDescriptor", "hipMemHandleTypePosixFileDescriptor", "numeric_literal"); + subst("cudaMemHandleTypeWin32", "hipMemHandleTypeWin32", "numeric_literal"); + subst("cudaMemHandleTypeWin32Kmt", "hipMemHandleTypeWin32Kmt", "numeric_literal"); + subst("cudaMemLocationTypeDevice", "hipMemLocationTypeDevice", "numeric_literal"); + subst("cudaMemLocationTypeInvalid", "hipMemLocationTypeInvalid", "numeric_literal"); + subst("cudaMemPoolAttrReleaseThreshold", "hipMemPoolAttrReleaseThreshold", "numeric_literal"); + subst("cudaMemPoolAttrReservedMemCurrent", "hipMemPoolAttrReservedMemCurrent", "numeric_literal"); + subst("cudaMemPoolAttrReservedMemHigh", "hipMemPoolAttrReservedMemHigh", "numeric_literal"); + subst("cudaMemPoolAttrUsedMemCurrent", "hipMemPoolAttrUsedMemCurrent", "numeric_literal"); + subst("cudaMemPoolAttrUsedMemHigh", "hipMemPoolAttrUsedMemHigh", "numeric_literal"); + subst("cudaMemPoolReuseAllowInternalDependencies", "hipMemPoolReuseAllowInternalDependencies", "numeric_literal"); + subst("cudaMemPoolReuseAllowOpportunistic", "hipMemPoolReuseAllowOpportunistic", "numeric_literal"); + subst("cudaMemPoolReuseFollowEventDependencies", "hipMemPoolReuseFollowEventDependencies", "numeric_literal"); subst("cudaMemRangeAttributeAccessedBy", "hipMemRangeAttributeAccessedBy", "numeric_literal"); subst("cudaMemRangeAttributeLastPrefetchLocation", "hipMemRangeAttributeLastPrefetchLocation", "numeric_literal"); subst("cudaMemRangeAttributePreferredLocation", "hipMemRangeAttributePreferredLocation", "numeric_literal"); @@ -6021,13 +5946,6 @@ sub warnUnsupportedFunctions { "cudaWGLGetDevice", "cudaVDPAUSetVDPAUDevice", "cudaVDPAUGetDevice", - "cudaUserObject_t", - "cudaUserObjectRetainFlags", - "cudaUserObjectRetain", - "cudaUserObjectRelease", - "cudaUserObjectNoDestructorSync", - "cudaUserObjectFlags", - "cudaUserObjectCreate", "cudaThreadSetLimit", "cudaThreadGetLimit", "cudaSynchronizationPolicy", @@ -6061,7 +5979,6 @@ sub warnUnsupportedFunctions { "cudaNvSciSyncAttrWait", "cudaNvSciSyncAttrSignal", "cudaMemoryTypeUnregistered", - "cudaMemoryTypeManaged", "cudaMemcpyToArrayAsync", "cudaMemcpyFromArrayAsync", "cudaMemcpyArrayToArray", @@ -6070,7 +5987,6 @@ sub warnUnsupportedFunctions { "cudaMemcpy3DPeer", "cudaMemcpy2DArrayToArray", "cudaMemAllocNodeParams", - "cudaLimitStackSize", "cudaLimitPersistingL2CacheSize", "cudaLimitMaxL2FetchGranularity", "cudaLimitDevRuntimeSyncDepth", @@ -6098,21 +6014,10 @@ sub warnUnsupportedFunctions { "cudaGraphicsCubeFaceNegativeY", "cudaGraphicsCubeFaceNegativeX", "cudaGraphicsCubeFace", - "cudaGraphUserObjectMove", - "cudaGraphUpload", - "cudaGraphRetainUserObject", - "cudaGraphReleaseUserObject", "cudaGraphNodeTypeMemFree", "cudaGraphNodeTypeMemAlloc", - "cudaGraphNodeTypeExtSemaphoreWait", - "cudaGraphNodeTypeExtSemaphoreSignal", "cudaGraphNodeSetEnabled", "cudaGraphMemFreeNodeGetParams", - "cudaGraphMemAttributeType", - "cudaGraphMemAttrUsedMemHigh", - "cudaGraphMemAttrUsedMemCurrent", - "cudaGraphMemAttrReservedMemHigh", - "cudaGraphMemAttrReservedMemCurrent", "cudaGraphMemAllocNodeGetParams", "cudaGraphKernelNodeCopyAttributes", "cudaGraphInstantiateFlagUseNodePriority", @@ -6341,14 +6246,10 @@ sub warnUnsupportedFunctions { "cudaEGLStreamConsumerConnectWithFlags", "cudaEGLStreamConsumerConnect", "cudaEGLStreamConsumerAcquireFrame", - "cudaDeviceSetLimit", - "cudaDeviceSetGraphMemAttribute", "cudaDevicePropDontCare", "cudaDeviceMask", - "cudaDeviceGraphMemTrim", "cudaDeviceGetTexture1DLinearMaxWidth", "cudaDeviceGetNvSciSyncAttributes", - "cudaDeviceGetGraphMemAttribute", "cudaDeviceFlushGPUDirectRDMAWrites", "cudaDevAttrTimelineSemaphoreInteropSupported", "cudaDevAttrSparseCudaArraySupported", @@ -6478,9 +6379,6 @@ sub warnUnsupportedFunctions { "cuWGLGetDevice", "cuVDPAUGetDevice", "cuVDPAUCtxCreate", - "cuUserObjectRetain", - "cuUserObjectRelease", - "cuUserObjectCreate", "cuTexRefGetBorderColor", "cuTexRefDestroy", "cuTexRefCreate", @@ -6557,9 +6455,6 @@ sub warnUnsupportedFunctions { "cuGraphicsD3D9RegisterResource", "cuGraphicsD3D11RegisterResource", "cuGraphicsD3D10RegisterResource", - "cuGraphUpload", - "cuGraphRetainUserObject", - "cuGraphReleaseUserObject", "cuGraphNodeSetEnabled", "cuGraphNodeGetEnabled", "cuGraphMemFreeNodeGetParams", @@ -6585,8 +6480,6 @@ sub warnUnsupportedFunctions { "cuGraphAddExternalSemaphoresSignalNode", "cuGraphAddBatchMemOpNode", "cuGetProcAddress", - "cuGetErrorString", - "cuGetErrorName", "cuGLUnregisterBufferObject", "cuGLUnmapBufferObjectAsync", "cuGLUnmapBufferObject", @@ -6615,13 +6508,10 @@ sub warnUnsupportedFunctions { "cuEGLStreamConsumerConnectWithFlags", "cuEGLStreamConsumerConnect", "cuEGLStreamConsumerAcquireFrame", - "cuDeviceSetGraphMemAttribute", - "cuDeviceGraphMemTrim", "cuDeviceGetTexture1DLinearMaxWidth", "cuDeviceGetProperties", "cuDeviceGetNvSciSyncAttributes", "cuDeviceGetLuid", - "cuDeviceGetGraphMemAttribute", "cuDeviceGetExecAffinitySupport", "cuD3D9UnregisterResource", "cuD3D9UnmapResources", @@ -6658,7 +6548,6 @@ sub warnUnsupportedFunctions { "cuD3D10GetDevice", "cuD3D10CtxCreateOnDevice", "cuD3D10CtxCreate", - "cuCtxSetLimit", "cuCtxResetPersistingL2Cache", "cuCtxGetExecAffinity", "cuCtxDetach", @@ -6688,12 +6577,6 @@ sub warnUnsupportedFunctions { "MAJOR_VERSION", "CubVector", "CubDebugExit", - "CUuserObject_st", - "CUuserObject_flags_enum", - "CUuserObject_flags", - "CUuserObjectRetain_flags_enum", - "CUuserObjectRetain_flags", - "CUuserObject", "CUsynchronizationPolicy_enum", "CUsynchronizationPolicy", "CUsurfref_st", @@ -6739,8 +6622,6 @@ sub warnUnsupportedFunctions { "CUipcMem_flags", "CUgraphicsMapResourceFlags_enum", "CUgraphicsMapResourceFlags", - "CUgraphMem_attribute_enum", - "CUgraphMem_attribute", "CUgraphDebugDot_flags_enum", "CUgraphDebugDot_flags", "CUflushGPUDirectRDMAWritesTarget_enum", @@ -6798,7 +6679,6 @@ sub warnUnsupportedFunctions { "CUctx_flags", "CUarray_cubemap_face_enum", "CUarray_cubemap_face", - "CU_USER_OBJECT_NO_DESTRUCTOR_SYNC", "CU_TRSF_SEAMLESS_CUBEMAP", "CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION", "CU_TARGET_COMPUTE_87", @@ -6864,7 +6744,6 @@ sub warnUnsupportedFunctions { "CU_MEM_CREATE_USAGE_TILE_POOL", "CU_MEM_ACCESS_FLAGS_PROT_MAX", "CU_MEMHOSTREGISTER_READ_ONLY", - "CU_LIMIT_STACK_SIZE", "CU_LIMIT_PERSISTING_L2_CACHE_SIZE", "CU_LIMIT_MAX_L2_FETCH_GRANULARITY", "CU_LIMIT_MAX", @@ -6897,16 +6776,9 @@ sub warnUnsupportedFunctions { "CU_JIT_CACHE_OPTION_NONE", "CU_JIT_CACHE_OPTION_CG", "CU_JIT_CACHE_OPTION_CA", - "CU_GRAPH_USER_OBJECT_MOVE", "CU_GRAPH_NODE_TYPE_MEM_FREE", "CU_GRAPH_NODE_TYPE_MEM_ALLOC", - "CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT", - "CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL", "CU_GRAPH_NODE_TYPE_BATCH_MEM_OP", - "CU_GRAPH_MEM_ATTR_USED_MEM_HIGH", - "CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT", - "CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH", - "CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT", "CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED", "CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE", "CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES", @@ -7029,7 +6901,6 @@ sub warnUnsupportedFunctions { "CU_EGL_COLOR_FORMAT_ARGB", "CU_EGL_COLOR_FORMAT_ABGR", "CU_EGL_COLOR_FORMAT_A", - "CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED", "CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED", "CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED", "CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED", @@ -8065,7 +7936,7 @@ if ($help) { print STDERR "$USAGE\n"; } if ($version) { - print STDERR "HIP version 5.2.0\n"; + print STDERR "HIP version 5.3.0\n"; } while (@ARGV) { $fileName=shift (@ARGV); diff --git a/doc/markdown/CUDA_Driver_API_functions_supported_by_HIP.md b/doc/markdown/CUDA_Driver_API_functions_supported_by_HIP.md index 1ed82e98..a32c2bb0 100644 --- a/doc/markdown/CUDA_Driver_API_functions_supported_by_HIP.md +++ b/doc/markdown/CUDA_Driver_API_functions_supported_by_HIP.md @@ -146,7 +146,7 @@ |`CUDA_EXT_SEM_WAIT_NODE_PARAMS`|11.2| | | | | | | | |`CUDA_EXT_SEM_WAIT_NODE_PARAMS_st`|11.2| | | | | | | | |`CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1`|11.3| | | | | | | | -|`CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH`|11.4| | |`hipGraphInstantiateFlagAutoFreeOnLaunch`|5.2.0| | |5.2.0| +|`CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH`|11.4| | |`hipGraphInstantiateFlagAutoFreeOnLaunch`|5.2.0| | | | |`CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY`|11.7| | | | | | | | |`CUDA_HOST_NODE_PARAMS`|10.0| | |`hipHostNodeParams`|4.3.0| | | | |`CUDA_HOST_NODE_PARAMS_st`|10.0| | |`hipHostNodeParams`|4.3.0| | | | @@ -198,9 +198,9 @@ |`CUGLmap_flags_enum`| | | | | | | | | |`CUGPUDirectRDMAWritesOrdering`|11.3| | | | | | | | |`CUGPUDirectRDMAWritesOrdering_enum`|11.3| | | | | | | | -|`CU_ACCESS_PROPERTY_NORMAL`|11.0| | |`hipAccessPropertyNormal`|5.2.0| | |5.2.0| -|`CU_ACCESS_PROPERTY_PERSISTING`|11.0| | |`hipAccessPropertyPersisting`|5.2.0| | |5.2.0| -|`CU_ACCESS_PROPERTY_STREAMING`|11.0| | |`hipAccessPropertyStreaming`|5.2.0| | |5.2.0| +|`CU_ACCESS_PROPERTY_NORMAL`|11.0| | |`hipAccessPropertyNormal`|5.2.0| | | | +|`CU_ACCESS_PROPERTY_PERSISTING`|11.0| | |`hipAccessPropertyPersisting`|5.2.0| | | | +|`CU_ACCESS_PROPERTY_STREAMING`|11.0| | |`hipAccessPropertyStreaming`|5.2.0| | | | |`CU_AD_FORMAT_BC1_UNORM`|11.5| | | | | | | | |`CU_AD_FORMAT_BC1_UNORM_SRGB`|11.5| | | | | | | | |`CU_AD_FORMAT_BC2_UNORM`|11.5| | | | | | | | @@ -237,8 +237,8 @@ |`CU_AD_FORMAT_UNSIGNED_INT32`| | | |`HIP_AD_FORMAT_UNSIGNED_INT32`|1.7.0| | | | |`CU_AD_FORMAT_UNSIGNED_INT8`| | | |`HIP_AD_FORMAT_UNSIGNED_INT8`|1.7.0| | | | |`CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL`|11.1| | | | | | | | -|`CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL`|11.1| | |`hipArraySparseSubresourceTypeMiptail`|5.2.0| | |5.2.0| -|`CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL`|11.1| | |`hipArraySparseSubresourceTypeSparseLevel`|5.2.0| | |5.2.0| +|`CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL`|11.1| | |`hipArraySparseSubresourceTypeMiptail`|5.2.0| | | | +|`CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL`|11.1| | |`hipArraySparseSubresourceTypeSparseLevel`|5.2.0| | | | |`CU_COMPUTEMODE_DEFAULT`| | | |`hipComputeModeDefault`|1.9.0| | | | |`CU_COMPUTEMODE_EXCLUSIVE`| | |8.0|`hipComputeModeExclusive`|1.9.0| | | | |`CU_COMPUTEMODE_EXCLUSIVE_PROCESS`| | | |`hipComputeModeExclusiveProcess`|2.0.0| | | | @@ -380,7 +380,7 @@ |`CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK`| | | |`hipDeviceAttributeMaxThreadsPerBlock`|1.6.0| | | | |`CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR`| | | |`hipDeviceAttributeMaxThreadsPerMultiProcessor`|1.6.0| | | | |`CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE`| | | |`hipDeviceAttributeMemoryClockRate`|1.6.0| | | | -|`CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED`|11.2| | |`hipDeviceAttributeMemoryPoolsSupported`|5.2.0| | |5.2.0| +|`CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED`|11.2| | |`hipDeviceAttributeMemoryPoolsSupported`|5.2.0| | | | |`CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES`|11.3| | | | | | | | |`CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT`| | | |`hipDeviceAttributeMultiprocessorCount`|1.6.0| | | | |`CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD`| | | |`hipDeviceAttributeIsMultiGpuBoard`|1.6.0| | | | @@ -405,7 +405,7 @@ |`CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY`| | | |`hipDeviceAttributeTotalConstantMemory`|1.6.0| | | | |`CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING`| | | |`hipDeviceAttributeUnifiedAddressing`|4.3.0| | | | |`CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED`|10.2|11.2| | | | | | | -|`CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED`|11.2| | | | | | | | +|`CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED`|11.2| | |`hipDeviceAttributeVirtualMemoryManagementSupported`|5.3.0| | |5.3.0| |`CU_DEVICE_ATTRIBUTE_WARP_SIZE`| | | |`hipDeviceAttributeWarpSize`|1.6.0| | | | |`CU_DEVICE_CPU`|8.0| | |`hipCpuDeviceId`|3.7.0| | | | |`CU_DEVICE_INVALID`|8.0| | |`hipInvalidDeviceId`|3.7.0| | | | @@ -583,16 +583,16 @@ |`CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED`|10.2| | |`hipGraphExecUpdateErrorTopologyChanged`|4.3.0| | | | |`CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE`|11.2| | |`hipGraphExecUpdateErrorUnsupportedFunctionChange`|4.3.0| | | | |`CU_GRAPH_EXEC_UPDATE_SUCCESS`|10.2| | |`hipGraphExecUpdateSuccess`|4.3.0| | | | -|`CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT`|11.4| | | | | | | | -|`CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH`|11.4| | | | | | | | -|`CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT`|11.4| | | | | | | | -|`CU_GRAPH_MEM_ATTR_USED_MEM_HIGH`|11.4| | | | | | | | +|`CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT`|11.4| | |`hipGraphMemAttrReservedMemCurrent`|5.3.0| | |5.3.0| +|`CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH`|11.4| | |`hipGraphMemAttrReservedMemHigh`|5.3.0| | |5.3.0| +|`CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT`|11.4| | |`hipGraphMemAttrUsedMemCurrent`|5.3.0| | |5.3.0| +|`CU_GRAPH_MEM_ATTR_USED_MEM_HIGH`|11.4| | |`hipGraphMemAttrUsedMemHigh`|5.3.0| | |5.3.0| |`CU_GRAPH_NODE_TYPE_BATCH_MEM_OP`|11.7| | | | | | | | |`CU_GRAPH_NODE_TYPE_COUNT`|10.0| |11.0|`hipGraphNodeTypeCount`|4.3.0| | | | |`CU_GRAPH_NODE_TYPE_EMPTY`|10.0| | |`hipGraphNodeTypeEmpty`|4.3.0| | | | |`CU_GRAPH_NODE_TYPE_EVENT_RECORD`|11.1| | |`hipGraphNodeTypeEventRecord`|4.3.0| | | | -|`CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL`|11.2| | | | | | | | -|`CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT`|11.2| | | | | | | | +|`CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL`|11.2| | |`hipGraphNodeTypeExtSemaphoreSignal`|5.3.0| | |5.3.0| +|`CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT`|11.2| | |`hipGraphNodeTypeExtSemaphoreWait`|5.3.0| | |5.3.0| |`CU_GRAPH_NODE_TYPE_GRAPH`|10.0| | |`hipGraphNodeTypeGraph`|4.3.0| | | | |`CU_GRAPH_NODE_TYPE_HOST`|10.0| | |`hipGraphNodeTypeHost`|4.3.0| | | | |`CU_GRAPH_NODE_TYPE_KERNEL`|10.0| | |`hipGraphNodeTypeKernel`|4.3.0| | | | @@ -601,7 +601,7 @@ |`CU_GRAPH_NODE_TYPE_MEM_ALLOC`|11.4| | | | | | | | |`CU_GRAPH_NODE_TYPE_MEM_FREE`|11.4| | | | | | | | |`CU_GRAPH_NODE_TYPE_WAIT_EVENT`|11.1| | |`hipGraphNodeTypeWaitEvent`|4.3.0| | | | -|`CU_GRAPH_USER_OBJECT_MOVE`|11.3| | | | | | | | +|`CU_GRAPH_USER_OBJECT_MOVE`|11.3| | |`hipGraphUserObjectMove`|5.3.0| | |5.3.0| |`CU_IPC_HANDLE_SIZE`| | | |`HIP_IPC_HANDLE_SIZE`|1.6.0| | | | |`CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS`| | | |`hipIpcMemLazyEnablePeerAccess`|1.6.0| | | | |`CU_JIT_CACHE_MODE`| | | |`hipJitOptionCacheMode`|1.6.0| | | | @@ -645,8 +645,8 @@ |`CU_JIT_TARGET_FROM_CUCONTEXT`| | | |`hipJitOptionTargetFromContext`|1.6.0| | | | |`CU_JIT_THREADS_PER_BLOCK`| | | |`hipJitOptionThreadsPerBlock`|1.6.0| | | | |`CU_JIT_WALL_TIME`| | | |`hipJitOptionWallTime`|1.6.0| | | | -|`CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW`|11.0| | |`hipKernelNodeAttributeAccessPolicyWindow`|5.2.0| | |5.2.0| -|`CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE`|11.0| | |`hipKernelNodeAttributeCooperative`|5.2.0| | |5.2.0| +|`CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW`|11.0| | |`hipKernelNodeAttributeAccessPolicyWindow`|5.2.0| | | | +|`CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE`|11.0| | |`hipKernelNodeAttributeCooperative`|5.2.0| | | | |`CU_KERNEL_NODE_ATTRIBUTE_PRIORITY`|11.7| | | | | | | | |`CU_LAUNCH_PARAM_BUFFER_POINTER`| | | |`HIP_LAUNCH_PARAM_BUFFER_POINTER`|1.6.0| | | | |`CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT`|11.7| | | | | | | | @@ -661,7 +661,7 @@ |`CU_LIMIT_MAX_L2_FETCH_GRANULARITY`|10.0| | | | | | | | |`CU_LIMIT_PERSISTING_L2_CACHE_SIZE`|11.0| | | | | | | | |`CU_LIMIT_PRINTF_FIFO_SIZE`| | | |`hipLimitPrintfFifoSize`|4.5.0| | | | -|`CU_LIMIT_STACK_SIZE`| | | | | | | | | +|`CU_LIMIT_STACK_SIZE`| | | |`hipLimitStackSize`|5.3.0| | |5.3.0| |`CU_MEMHOSTALLOC_DEVICEMAP`| | | |`hipHostMallocMapped`|1.6.0| | | | |`CU_MEMHOSTALLOC_PORTABLE`| | | |`hipHostMallocPortable`|1.6.0| | | | |`CU_MEMHOSTALLOC_WRITECOMBINED`| | | |`hipHostMallocWriteCombined`|1.6.0| | | | @@ -673,44 +673,44 @@ |`CU_MEMORYTYPE_DEVICE`| | | |`hipMemoryTypeDevice`|1.6.0| | | | |`CU_MEMORYTYPE_HOST`| | | |`hipMemoryTypeHost`|1.6.0| | | | |`CU_MEMORYTYPE_UNIFIED`| | | |`hipMemoryTypeUnified`|1.6.0| | | | -|`CU_MEMPOOL_ATTR_RELEASE_THRESHOLD`|11.2| | |`hipMemPoolAttrReleaseThreshold`|5.2.0| | |5.2.0| -|`CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT`|11.3| | |`hipMemPoolAttrReservedMemCurrent`|5.2.0| | |5.2.0| -|`CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH`|11.3| | |`hipMemPoolAttrReservedMemHigh`|5.2.0| | |5.2.0| -|`CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES`|11.2| | |`hipMemPoolReuseAllowInternalDependencies`|5.2.0| | |5.2.0| -|`CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC`|11.2| | |`hipMemPoolReuseAllowOpportunistic`|5.2.0| | |5.2.0| -|`CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES`|11.2| | |`hipMemPoolReuseFollowEventDependencies`|5.2.0| | |5.2.0| -|`CU_MEMPOOL_ATTR_USED_MEM_CURRENT`|11.3| | |`hipMemPoolAttrUsedMemCurrent`|5.2.0| | |5.2.0| -|`CU_MEMPOOL_ATTR_USED_MEM_HIGH`|11.3| | |`hipMemPoolAttrUsedMemHigh`|5.2.0| | |5.2.0| +|`CU_MEMPOOL_ATTR_RELEASE_THRESHOLD`|11.2| | |`hipMemPoolAttrReleaseThreshold`|5.2.0| | | | +|`CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT`|11.3| | |`hipMemPoolAttrReservedMemCurrent`|5.2.0| | | | +|`CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH`|11.3| | |`hipMemPoolAttrReservedMemHigh`|5.2.0| | | | +|`CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES`|11.2| | |`hipMemPoolReuseAllowInternalDependencies`|5.2.0| | | | +|`CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC`|11.2| | |`hipMemPoolReuseAllowOpportunistic`|5.2.0| | | | +|`CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES`|11.2| | |`hipMemPoolReuseFollowEventDependencies`|5.2.0| | | | +|`CU_MEMPOOL_ATTR_USED_MEM_CURRENT`|11.3| | |`hipMemPoolAttrUsedMemCurrent`|5.2.0| | | | +|`CU_MEMPOOL_ATTR_USED_MEM_HIGH`|11.3| | |`hipMemPoolAttrUsedMemHigh`|5.2.0| | | | |`CU_MEM_ACCESS_FLAGS_PROT_MAX`|10.2| | | | | | | | -|`CU_MEM_ACCESS_FLAGS_PROT_NONE`|10.2| | |`hipMemAccessFlagsProtNone`|5.2.0| | |5.2.0| -|`CU_MEM_ACCESS_FLAGS_PROT_READ`|10.2| | |`hipMemAccessFlagsProtRead`|5.2.0| | |5.2.0| -|`CU_MEM_ACCESS_FLAGS_PROT_READWRITE`|10.2| | |`hipMemAccessFlagsProtReadWrite`|5.2.0| | |5.2.0| +|`CU_MEM_ACCESS_FLAGS_PROT_NONE`|10.2| | |`hipMemAccessFlagsProtNone`|5.2.0| | | | +|`CU_MEM_ACCESS_FLAGS_PROT_READ`|10.2| | |`hipMemAccessFlagsProtRead`|5.2.0| | | | +|`CU_MEM_ACCESS_FLAGS_PROT_READWRITE`|10.2| | |`hipMemAccessFlagsProtReadWrite`|5.2.0| | | | |`CU_MEM_ADVISE_SET_ACCESSED_BY`|8.0| | |`hipMemAdviseSetAccessedBy`|3.7.0| | | | |`CU_MEM_ADVISE_SET_PREFERRED_LOCATION`|8.0| | |`hipMemAdviseSetPreferredLocation`|3.7.0| | | | |`CU_MEM_ADVISE_SET_READ_MOSTLY`|8.0| | |`hipMemAdviseSetReadMostly`|3.7.0| | | | |`CU_MEM_ADVISE_UNSET_ACCESSED_BY`|8.0| | |`hipMemAdviseUnsetAccessedBy`|3.7.0| | | | |`CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION`|8.0| | |`hipMemAdviseUnsetPreferredLocation`|3.7.0| | | | |`CU_MEM_ADVISE_UNSET_READ_MOSTLY`|8.0| | |`hipMemAdviseUnsetReadMostly`|3.7.0| | | | -|`CU_MEM_ALLOCATION_TYPE_INVALID`|10.2| | |`hipMemAllocationTypeInvalid`|5.2.0| | |5.2.0| -|`CU_MEM_ALLOCATION_TYPE_MAX`|10.2| | |`hipMemAllocationTypeMax`|5.2.0| | |5.2.0| -|`CU_MEM_ALLOCATION_TYPE_PINNED`|10.2| | |`hipMemAllocationTypePinned`|5.2.0| | |5.2.0| -|`CU_MEM_ALLOC_GRANULARITY_MINIMUM`|10.2| | |`hipMemAllocationGranularityMinimum`|5.2.0| | |5.2.0| -|`CU_MEM_ALLOC_GRANULARITY_RECOMMENDED`|10.2| | |`hipMemAllocationGranularityRecommended`|5.2.0| | |5.2.0| +|`CU_MEM_ALLOCATION_TYPE_INVALID`|10.2| | |`hipMemAllocationTypeInvalid`|5.2.0| | | | +|`CU_MEM_ALLOCATION_TYPE_MAX`|10.2| | |`hipMemAllocationTypeMax`|5.2.0| | | | +|`CU_MEM_ALLOCATION_TYPE_PINNED`|10.2| | |`hipMemAllocationTypePinned`|5.2.0| | | | +|`CU_MEM_ALLOC_GRANULARITY_MINIMUM`|10.2| | |`hipMemAllocationGranularityMinimum`|5.2.0| | | | +|`CU_MEM_ALLOC_GRANULARITY_RECOMMENDED`|10.2| | |`hipMemAllocationGranularityRecommended`|5.2.0| | | | |`CU_MEM_ATTACH_GLOBAL`| | | |`hipMemAttachGlobal`|2.5.0| | | | |`CU_MEM_ATTACH_HOST`| | | |`hipMemAttachHost`|2.5.0| | | | |`CU_MEM_ATTACH_SINGLE`| | | |`hipMemAttachSingle`|3.7.0| | | | |`CU_MEM_CREATE_USAGE_TILE_POOL`|11.1| | | | | | | | -|`CU_MEM_HANDLE_TYPE_GENERIC`|11.1| | |`hipMemHandleTypeGeneric`|5.2.0| | |5.2.0| +|`CU_MEM_HANDLE_TYPE_GENERIC`|11.1| | |`hipMemHandleTypeGeneric`|5.2.0| | | | |`CU_MEM_HANDLE_TYPE_MAX`|10.2| | | | | | | | -|`CU_MEM_HANDLE_TYPE_NONE`|11.2| | |`hipMemHandleTypeNone`|5.2.0| | |5.2.0| -|`CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR`|10.2| | |`hipMemHandleTypePosixFileDescriptor`|5.2.0| | |5.2.0| -|`CU_MEM_HANDLE_TYPE_WIN32`|10.2| | |`hipMemHandleTypeWin32`|5.2.0| | |5.2.0| -|`CU_MEM_HANDLE_TYPE_WIN32_KMT`|10.2| | |`hipMemHandleTypeWin32Kmt`|5.2.0| | |5.2.0| -|`CU_MEM_LOCATION_TYPE_DEVICE`|10.2| | |`hipMemLocationTypeDevice`|5.2.0| | |5.2.0| -|`CU_MEM_LOCATION_TYPE_INVALID`|10.2| | |`hipMemLocationTypeInvalid`|5.2.0| | |5.2.0| +|`CU_MEM_HANDLE_TYPE_NONE`|11.2| | |`hipMemHandleTypeNone`|5.2.0| | | | +|`CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR`|10.2| | |`hipMemHandleTypePosixFileDescriptor`|5.2.0| | | | +|`CU_MEM_HANDLE_TYPE_WIN32`|10.2| | |`hipMemHandleTypeWin32`|5.2.0| | | | +|`CU_MEM_HANDLE_TYPE_WIN32_KMT`|10.2| | |`hipMemHandleTypeWin32Kmt`|5.2.0| | | | +|`CU_MEM_LOCATION_TYPE_DEVICE`|10.2| | |`hipMemLocationTypeDevice`|5.2.0| | | | +|`CU_MEM_LOCATION_TYPE_INVALID`|10.2| | |`hipMemLocationTypeInvalid`|5.2.0| | | | |`CU_MEM_LOCATION_TYPE_MAX`|10.2| | | | | | | | -|`CU_MEM_OPERATION_TYPE_MAP`|11.1| | |`hipMemOperationTypeMap`|5.2.0| | |5.2.0| -|`CU_MEM_OPERATION_TYPE_UNMAP`|11.1| | |`hipMemOperationTypeUnmap`|5.2.0| | |5.2.0| +|`CU_MEM_OPERATION_TYPE_MAP`|11.1| | |`hipMemOperationTypeMap`|5.2.0| | | | +|`CU_MEM_OPERATION_TYPE_UNMAP`|11.1| | |`hipMemOperationTypeUnmap`|5.2.0| | | | |`CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY`|8.0| | |`hipMemRangeAttributeAccessedBy`|3.7.0| | | | |`CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION`|8.0| | |`hipMemRangeAttributeLastPrefetchLocation`|3.7.0| | | | |`CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION`|8.0| | |`hipMemRangeAttributePreferredLocation`|3.7.0| | | | @@ -860,19 +860,19 @@ |`CU_TR_ADDRESS_MODE_WRAP`| | | |`HIP_TR_ADDRESS_MODE_WRAP`|3.5.0| | | | |`CU_TR_FILTER_MODE_LINEAR`| | | |`HIP_TR_FILTER_MODE_LINEAR`|3.5.0| | | | |`CU_TR_FILTER_MODE_POINT`| | | |`HIP_TR_FILTER_MODE_POINT`|3.5.0| | | | -|`CU_USER_OBJECT_NO_DESTRUCTOR_SYNC`|11.3| | | | | | | | -|`CUaccessPolicyWindow`|11.0| | |`hipAccessPolicyWindow`|5.2.0| | |5.2.0| -|`CUaccessPolicyWindow_st`|11.0| | |`hipAccessPolicyWindow`|5.2.0| | |5.2.0| -|`CUaccessProperty`|11.0| | |`hipAccessProperty`|5.2.0| | |5.2.0| -|`CUaccessProperty_enum`|11.0| | |`hipAccessProperty`|5.2.0| | |5.2.0| +|`CU_USER_OBJECT_NO_DESTRUCTOR_SYNC`|11.3| | |`hipUserObjectNoDestructorSync`|5.3.0| | |5.3.0| +|`CUaccessPolicyWindow`|11.0| | |`hipAccessPolicyWindow`|5.2.0| | | | +|`CUaccessPolicyWindow_st`|11.0| | |`hipAccessPolicyWindow`|5.2.0| | | | +|`CUaccessProperty`|11.0| | |`hipAccessProperty`|5.2.0| | | | +|`CUaccessProperty_enum`|11.0| | |`hipAccessProperty`|5.2.0| | | | |`CUaddress_mode`| | | |`HIPaddress_mode`|3.5.0| | | | |`CUaddress_mode_enum`| | | |`HIPaddress_mode_enum`|3.5.0| | | | |`CUarray`| | | |`hipArray_t`|1.7.0| | | | |`CUarrayMapInfo`|11.1| | |`hipArrayMapInfo`| | | | | |`CUarrayMapInfo_st`|11.1| | |`hipArrayMapInfo`| | | | | |`CUarrayMapInfo_v1`|11.3| | |`hipArrayMapInfo`| | | | | -|`CUarraySparseSubresourceType`|11.1| | |`hipArraySparseSubresourceType`|5.2.0| | |5.2.0| -|`CUarraySparseSubresourceType_enum`|11.1| | |`hipArraySparseSubresourceType`|5.2.0| | |5.2.0| +|`CUarraySparseSubresourceType`|11.1| | |`hipArraySparseSubresourceType`|5.2.0| | | | +|`CUarraySparseSubresourceType_enum`|11.1| | |`hipArraySparseSubresourceType`|5.2.0| | | | |`CUarray_cubemap_face`| | | | | | | | | |`CUarray_cubemap_face_enum`| | | | | | | | | |`CUarray_format`| | | |`hipArray_Format`|1.7.0| | | | @@ -965,10 +965,10 @@ |`CUgraphExecUpdateResult`|10.2| | |`hipGraphExecUpdateResult`|4.3.0| | | | |`CUgraphExecUpdateResult_enum`|10.2| | |`hipGraphExecUpdateResult`|4.3.0| | | | |`CUgraphExec_st`|10.0| | |`hipGraphExec`|4.3.0| | | | -|`CUgraphInstantiate_flags`|11.4| | |`hipGraphInstantiateFlags`|5.2.0| | |5.2.0| -|`CUgraphInstantiate_flags_enum`|11.4| | |`hipGraphInstantiateFlags`|5.2.0| | |5.2.0| -|`CUgraphMem_attribute`|11.4| | | | | | | | -|`CUgraphMem_attribute_enum`|11.4| | | | | | | | +|`CUgraphInstantiate_flags`|11.4| | |`hipGraphInstantiateFlags`|5.2.0| | | | +|`CUgraphInstantiate_flags_enum`|11.4| | |`hipGraphInstantiateFlags`|5.2.0| | | | +|`CUgraphMem_attribute`|11.4| | |`hipGraphMemAttributeType`|5.3.0| | |5.3.0| +|`CUgraphMem_attribute_enum`|11.4| | |`hipGraphMemAttributeType`|5.3.0| | |5.3.0| |`CUgraphNode`|10.0| | |`hipGraphNode_t`|4.3.0| | | | |`CUgraphNodeType`|10.0| | |`hipGraphNodeType`|4.3.0| | | | |`CUgraphNodeType_enum`|10.0| | |`hipGraphNodeType`|4.3.0| | | | @@ -999,56 +999,56 @@ |`CUjit_option_enum`| | | |`hipJitOption`|1.6.0| | | | |`CUjit_target`| | | | | | | | | |`CUjit_target_enum`| | | | | | | | | -|`CUkernelNodeAttrID`|11.0| | |`hipKernelNodeAttrID`|5.2.0| | |5.2.0| -|`CUkernelNodeAttrID_enum`|11.0| | |`hipKernelNodeAttrID`|5.2.0| | |5.2.0| -|`CUkernelNodeAttrValue`|11.0| | |`hipKernelNodeAttrValue`|5.2.0| | |5.2.0| -|`CUkernelNodeAttrValue_union`|11.0| | |`hipKernelNodeAttrValue`|5.2.0| | |5.2.0| -|`CUkernelNodeAttrValue_v1`|11.3| | |`hipKernelNodeAttrValue`|5.2.0| | |5.2.0| +|`CUkernelNodeAttrID`|11.0| | |`hipKernelNodeAttrID`|5.2.0| | | | +|`CUkernelNodeAttrID_enum`|11.0| | |`hipKernelNodeAttrID`|5.2.0| | | | +|`CUkernelNodeAttrValue`|11.0| | |`hipKernelNodeAttrValue`|5.2.0| | | | +|`CUkernelNodeAttrValue_union`|11.0| | |`hipKernelNodeAttrValue`|5.2.0| | | | +|`CUkernelNodeAttrValue_v1`|11.3| | |`hipKernelNodeAttrValue`|5.2.0| | | | |`CUlimit`| | | |`hipLimit_t`|1.6.0| | | | |`CUlimit_enum`| | | |`hipLimit_t`|1.6.0| | | | -|`CUmemAccessDesc`|10.2| | |`hipMemAccessDesc`|5.2.0| | |5.2.0| -|`CUmemAccessDesc_st`|10.2| | |`hipMemAccessDesc`|5.2.0| | |5.2.0| -|`CUmemAccessDesc_v1`|11.3| | |`hipMemAccessDesc`|5.2.0| | |5.2.0| -|`CUmemAccess_flags`|10.2| | |`hipMemAccessFlags`|5.2.0| | |5.2.0| -|`CUmemAccess_flags_enum`|10.2| | |`hipMemAccessFlags`|5.2.0| | |5.2.0| -|`CUmemAllocationGranularity_flags`|10.2| | |`hipMemAllocationGranularity_flags`|5.2.0| | |5.2.0| -|`CUmemAllocationGranularity_flags_enum`|10.2| | |`hipMemAllocationGranularity_flags`|5.2.0| | |5.2.0| -|`CUmemAllocationHandleType`|10.2| | |`hipMemAllocationHandleType`|5.2.0| | |5.2.0| -|`CUmemAllocationHandleType_enum`|10.2| | |`hipMemAllocationHandleType`|5.2.0| | |5.2.0| -|`CUmemAllocationProp`|10.2| | |`hipMemAllocationProp`|5.2.0| | |5.2.0| -|`CUmemAllocationProp_st`|10.2| | |`hipMemAllocationProp`|5.2.0| | |5.2.0| -|`CUmemAllocationProp_v1`|11.3| | |`hipMemAllocationProp`|5.2.0| | |5.2.0| -|`CUmemAllocationType`|10.2| | |`hipMemAllocationType`|5.2.0| | |5.2.0| -|`CUmemAllocationType_enum`|10.2| | |`hipMemAllocationType`|5.2.0| | |5.2.0| +|`CUmemAccessDesc`|10.2| | |`hipMemAccessDesc`|5.2.0| | | | +|`CUmemAccessDesc_st`|10.2| | |`hipMemAccessDesc`|5.2.0| | | | +|`CUmemAccessDesc_v1`|11.3| | |`hipMemAccessDesc`|5.2.0| | | | +|`CUmemAccess_flags`|10.2| | |`hipMemAccessFlags`|5.2.0| | | | +|`CUmemAccess_flags_enum`|10.2| | |`hipMemAccessFlags`|5.2.0| | | | +|`CUmemAllocationGranularity_flags`|10.2| | |`hipMemAllocationGranularity_flags`|5.2.0| | | | +|`CUmemAllocationGranularity_flags_enum`|10.2| | |`hipMemAllocationGranularity_flags`|5.2.0| | | | +|`CUmemAllocationHandleType`|10.2| | |`hipMemAllocationHandleType`|5.2.0| | | | +|`CUmemAllocationHandleType_enum`|10.2| | |`hipMemAllocationHandleType`|5.2.0| | | | +|`CUmemAllocationProp`|10.2| | |`hipMemAllocationProp`|5.2.0| | | | +|`CUmemAllocationProp_st`|10.2| | |`hipMemAllocationProp`|5.2.0| | | | +|`CUmemAllocationProp_v1`|11.3| | |`hipMemAllocationProp`|5.2.0| | | | +|`CUmemAllocationType`|10.2| | |`hipMemAllocationType`|5.2.0| | | | +|`CUmemAllocationType_enum`|10.2| | |`hipMemAllocationType`|5.2.0| | | | |`CUmemAttach_flags`| | | | | | | | | |`CUmemAttach_flags_enum`| | | | | | | | | -|`CUmemGenericAllocationHandle`|10.2| | |`hipMemGenericAllocationHandle_t`|5.2.0| | |5.2.0| -|`CUmemGenericAllocationHandle_v1`|11.3| | |`hipMemGenericAllocationHandle_t`|5.2.0| | |5.2.0| -|`CUmemHandleType`|11.1| | |`hipMemHandleType`|5.2.0| | |5.2.0| -|`CUmemHandleType_enum`|11.1| | |`hipMemHandleType`|5.2.0| | |5.2.0| -|`CUmemLocation`|10.2| | |`hipMemLocation`|5.2.0| | |5.2.0| -|`CUmemLocationType`|10.2| | |`hipMemLocationType`|5.2.0| | |5.2.0| -|`CUmemLocationType_enum`|10.2| | |`hipMemLocationType`|5.2.0| | |5.2.0| -|`CUmemLocation_st`|10.2| | |`hipMemLocation`|5.2.0| | |5.2.0| -|`CUmemLocation_v1`|11.3| | |`hipMemLocation`|5.2.0| | |5.2.0| -|`CUmemOperationType`|11.1| | |`hipMemOperationType`|5.2.0| | |5.2.0| -|`CUmemOperationType_enum`|11.1| | |`hipMemOperationType`|5.2.0| | |5.2.0| -|`CUmemPoolHandle_st`|11.2| | |`ihipMemPoolHandle_t`|5.2.0| | |5.2.0| -|`CUmemPoolProps`|11.2| | |`hipMemPoolProps`|5.2.0| | |5.2.0| -|`CUmemPoolProps_st`|11.2| | |`hipMemPoolProps`|5.2.0| | |5.2.0| -|`CUmemPoolProps_v1`|11.3| | |`hipMemPoolProps`|5.2.0| | |5.2.0| -|`CUmemPoolPtrExportData`|11.2| | |`hipMemPoolPtrExportData`|5.2.0| | |5.2.0| -|`CUmemPoolPtrExportData_st`|11.2| | |`hipMemPoolPtrExportData`|5.2.0| | |5.2.0| -|`CUmemPoolPtrExportData_v1`|11.3| | |`hipMemPoolPtrExportData`|5.2.0| | |5.2.0| -|`CUmemPool_attribute`|11.2| | |`hipMemPoolAttr`|5.2.0| | |5.2.0| -|`CUmemPool_attribute_enum`|11.2| | |`hipMemPoolAttr`|5.2.0| | |5.2.0| +|`CUmemGenericAllocationHandle`|10.2| | |`hipMemGenericAllocationHandle_t`|5.2.0| | | | +|`CUmemGenericAllocationHandle_v1`|11.3| | |`hipMemGenericAllocationHandle_t`|5.2.0| | | | +|`CUmemHandleType`|11.1| | |`hipMemHandleType`|5.2.0| | | | +|`CUmemHandleType_enum`|11.1| | |`hipMemHandleType`|5.2.0| | | | +|`CUmemLocation`|10.2| | |`hipMemLocation`|5.2.0| | | | +|`CUmemLocationType`|10.2| | |`hipMemLocationType`|5.2.0| | | | +|`CUmemLocationType_enum`|10.2| | |`hipMemLocationType`|5.2.0| | | | +|`CUmemLocation_st`|10.2| | |`hipMemLocation`|5.2.0| | | | +|`CUmemLocation_v1`|11.3| | |`hipMemLocation`|5.2.0| | | | +|`CUmemOperationType`|11.1| | |`hipMemOperationType`|5.2.0| | | | +|`CUmemOperationType_enum`|11.1| | |`hipMemOperationType`|5.2.0| | | | +|`CUmemPoolHandle_st`|11.2| | |`ihipMemPoolHandle_t`|5.2.0| | | | +|`CUmemPoolProps`|11.2| | |`hipMemPoolProps`|5.2.0| | | | +|`CUmemPoolProps_st`|11.2| | |`hipMemPoolProps`|5.2.0| | | | +|`CUmemPoolProps_v1`|11.3| | |`hipMemPoolProps`|5.2.0| | | | +|`CUmemPoolPtrExportData`|11.2| | |`hipMemPoolPtrExportData`|5.2.0| | | | +|`CUmemPoolPtrExportData_st`|11.2| | |`hipMemPoolPtrExportData`|5.2.0| | | | +|`CUmemPoolPtrExportData_v1`|11.3| | |`hipMemPoolPtrExportData`|5.2.0| | | | +|`CUmemPool_attribute`|11.2| | |`hipMemPoolAttr`|5.2.0| | | | +|`CUmemPool_attribute_enum`|11.2| | |`hipMemPoolAttr`|5.2.0| | | | |`CUmemRangeHandleType`|11.7| | | | | | | | |`CUmemRangeHandleType_enum`|11.7| | | | | | | | |`CUmem_advise`|8.0| | |`hipMemoryAdvise`|3.7.0| | | | |`CUmem_advise_enum`|8.0| | |`hipMemoryAdvise`|3.7.0| | | | |`CUmem_range_attribute`|8.0| | |`hipMemRangeAttribute`|3.7.0| | | | |`CUmem_range_attribute_enum`|8.0| | |`hipMemRangeAttribute`|3.7.0| | | | -|`CUmemoryPool`|11.2| | |`hipMemPool_t`|5.2.0| | |5.2.0| +|`CUmemoryPool`|11.2| | |`hipMemPool_t`|5.2.0| | | | |`CUmemorytype`| | | |`hipMemoryType`|1.6.0| | | | |`CUmemorytype_enum`| | | |`hipMemoryType`|1.6.0| | | | |`CUmipmappedArray`| | | |`hipMipmappedArray_t`|1.7.0| | | | @@ -1109,14 +1109,14 @@ |`CUtexObject_v1`|11.3| | |`hipTextureObject_t`|1.7.0| | | | |`CUtexref`| | | |`hipTexRef`|3.10.0| | | | |`CUtexref_st`| | | |`textureReference`|1.6.0| | | | -|`CUuserObject`|11.3| | | | | | | | -|`CUuserObjectRetain_flags`|11.3| | | | | | | | -|`CUuserObjectRetain_flags_enum`|11.3| | | | | | | | -|`CUuserObject_flags`|11.3| | | | | | | | -|`CUuserObject_flags_enum`|11.3| | | | | | | | -|`CUuserObject_st`|11.3| | | | | | | | -|`CUuuid`| | | |`hipUUID`|5.2.0| | |5.2.0| -|`CUuuid_st`| | | |`hipUUID_t`|5.2.0| | |5.2.0| +|`CUuserObject`|11.3| | |`hipUserObject_t`|5.3.0| | |5.3.0| +|`CUuserObjectRetain_flags`|11.3| | |`hipUserObjectRetainFlags`|5.3.0| | |5.3.0| +|`CUuserObjectRetain_flags_enum`|11.3| | |`hipUserObjectRetainFlags`|5.3.0| | |5.3.0| +|`CUuserObject_flags`|11.3| | |`hipUserObjectFlags`|5.3.0| | |5.3.0| +|`CUuserObject_flags_enum`|11.3| | |`hipUserObjectFlags`|5.3.0| | |5.3.0| +|`CUuserObject_st`|11.3| | |`hipUserObject`|5.3.0| | |5.3.0| +|`CUuuid`| | | |`hipUUID`|5.2.0| | | | +|`CUuuid_st`| | | |`hipUUID_t`|5.2.0| | | | |`GLenum`| | | |`GLenum`|5.1.0| | | | |`GLuint`| | | |`GLuint`|5.1.0| | | | |`__CUDACC__`| | | |`__HIPCC__`|1.6.0| | | | @@ -1127,8 +1127,8 @@ |**CUDA**|**A**|**D**|**R**|**HIP**|**A**|**D**|**R**|**E**| |:--|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:| -|`cuGetErrorName`| | | | | | | | | -|`cuGetErrorString`| | | | | | | | | +|`cuGetErrorName`| | | |`hipDrvGetErrorName`|5.3.0| | |5.3.0| +|`cuGetErrorString`| | | |`hipDrvGetErrorString`|5.3.0| | |5.3.0| ## **3. Initialization** @@ -1149,16 +1149,16 @@ |`cuDeviceGet`| | | |`hipDeviceGet`|1.6.0| | | | |`cuDeviceGetAttribute`| | | |`hipDeviceGetAttribute`|1.6.0| | | | |`cuDeviceGetCount`| | | |`hipGetDeviceCount`|1.6.0| | | | -|`cuDeviceGetDefaultMemPool`|11.2| | |`hipDeviceGetDefaultMemPool`|5.2.0| | |5.2.0| +|`cuDeviceGetDefaultMemPool`|11.2| | |`hipDeviceGetDefaultMemPool`|5.2.0| | | | |`cuDeviceGetExecAffinitySupport`|11.4| | | | | | | | |`cuDeviceGetLuid`|10.0| | | | | | | | -|`cuDeviceGetMemPool`|11.2| | |`hipDeviceGetMemPool`|5.2.0| | |5.2.0| +|`cuDeviceGetMemPool`|11.2| | |`hipDeviceGetMemPool`|5.2.0| | | | |`cuDeviceGetName`| | | |`hipDeviceGetName`|1.6.0| | | | |`cuDeviceGetNvSciSyncAttributes`|10.2| | | | | | | | |`cuDeviceGetTexture1DLinearMaxWidth`|11.1| | | | | | | | -|`cuDeviceGetUuid`|9.2| | |`hipDeviceGetUuid`|5.2.0| | |5.2.0| -|`cuDeviceGetUuid_v2`|11.4| | |`hipDeviceGetUuid`|5.2.0| | |5.2.0| -|`cuDeviceSetMemPool`|11.2| | |`hipDeviceSetMemPool`|5.2.0| | |5.2.0| +|`cuDeviceGetUuid`|9.2| | |`hipDeviceGetUuid`|5.2.0| | | | +|`cuDeviceGetUuid_v2`|11.4| | |`hipDeviceGetUuid`|5.2.0| | | | +|`cuDeviceSetMemPool`|11.2| | |`hipDeviceSetMemPool`|5.2.0| | | | |`cuDeviceTotalMem`| | | |`hipDeviceTotalMem`|1.6.0| | | | |`cuDeviceTotalMem_v2`| | | |`hipDeviceTotalMem`|1.6.0| | | | @@ -1207,7 +1207,7 @@ |`cuCtxResetPersistingL2Cache`|11.0| | | | | | | | |`cuCtxSetCacheConfig`| | | |`hipCtxSetCacheConfig`|1.9.0|1.9.0| | | |`cuCtxSetCurrent`| | | |`hipCtxSetCurrent`|1.6.0|1.9.0| | | -|`cuCtxSetLimit`| | | | | | | | | +|`cuCtxSetLimit`| | | |`hipDeviceSetLimit`|5.3.0| | |5.3.0| |`cuCtxSetSharedMemConfig`| | | |`hipCtxSetSharedMemConfig`|1.9.0|1.9.0| | | |`cuCtxSynchronize`| | | |`hipCtxSynchronize`|1.9.0|1.9.0| | | @@ -1356,39 +1356,39 @@ |**CUDA**|**A**|**D**|**R**|**HIP**|**A**|**D**|**R**|**E**| |:--|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:| -|`cuMemAddressFree`|10.2| | |`hipMemAddressFree`|5.2.0| | |5.2.0| -|`cuMemAddressReserve`|10.2| | |`hipMemAddressReserve`|5.2.0| | |5.2.0| -|`cuMemCreate`|10.2| | |`hipMemCreate`|5.2.0| | |5.2.0| -|`cuMemExportToShareableHandle`|10.2| | |`hipMemExportToShareableHandle`|5.2.0| | |5.2.0| -|`cuMemGetAccess`|10.2| | |`hipMemGetAccess`|5.2.0| | |5.2.0| -|`cuMemGetAllocationGranularity`|10.2| | |`hipMemGetAllocationGranularity`|5.2.0| | |5.2.0| -|`cuMemGetAllocationPropertiesFromHandle`|10.2| | |`hipMemGetAllocationPropertiesFromHandle`|5.2.0| | |5.2.0| -|`cuMemImportFromShareableHandle`|10.2| | |`hipMemImportFromShareableHandle`|5.2.0| | |5.2.0| -|`cuMemMap`|10.2| | |`hipMemMap`|5.2.0| | |5.2.0| -|`cuMemMapArrayAsync`|11.1| | |`hipMemMapArrayAsync`|5.2.0| | |5.2.0| -|`cuMemRelease`|10.2| | |`hipMemRelease`|5.2.0| | |5.2.0| -|`cuMemRetainAllocationHandle`|11.0| | |`hipMemRetainAllocationHandle`|5.2.0| | |5.2.0| -|`cuMemSetAccess`|10.2| | |`hipMemSetAccess`|5.2.0| | |5.2.0| -|`cuMemUnmap`|10.2| | |`hipMemUnmap`|5.2.0| | |5.2.0| +|`cuMemAddressFree`|10.2| | |`hipMemAddressFree`|5.2.0| | | | +|`cuMemAddressReserve`|10.2| | |`hipMemAddressReserve`|5.2.0| | | | +|`cuMemCreate`|10.2| | |`hipMemCreate`|5.2.0| | | | +|`cuMemExportToShareableHandle`|10.2| | |`hipMemExportToShareableHandle`|5.2.0| | | | +|`cuMemGetAccess`|10.2| | |`hipMemGetAccess`|5.2.0| | | | +|`cuMemGetAllocationGranularity`|10.2| | |`hipMemGetAllocationGranularity`|5.2.0| | | | +|`cuMemGetAllocationPropertiesFromHandle`|10.2| | |`hipMemGetAllocationPropertiesFromHandle`|5.2.0| | | | +|`cuMemImportFromShareableHandle`|10.2| | |`hipMemImportFromShareableHandle`|5.2.0| | | | +|`cuMemMap`|10.2| | |`hipMemMap`|5.2.0| | | | +|`cuMemMapArrayAsync`|11.1| | |`hipMemMapArrayAsync`|5.2.0| | | | +|`cuMemRelease`|10.2| | |`hipMemRelease`|5.2.0| | | | +|`cuMemRetainAllocationHandle`|11.0| | |`hipMemRetainAllocationHandle`|5.2.0| | | | +|`cuMemSetAccess`|10.2| | |`hipMemSetAccess`|5.2.0| | | | +|`cuMemUnmap`|10.2| | |`hipMemUnmap`|5.2.0| | | | ## **13. Stream Ordered Memory Allocator** |**CUDA**|**A**|**D**|**R**|**HIP**|**A**|**D**|**R**|**E**| |:--|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:| -|`cuMemAllocAsync`|11.2| | |`hipMallocAsync`|5.2.0| | |5.2.0| -|`cuMemAllocFromPoolAsync`|11.2| | |`hipMallocFromPoolAsync`|5.2.0| | |5.2.0| -|`cuMemFreeAsync`|11.2| | |`hipFreeAsync`|5.2.0| | |5.2.0| -|`cuMemPoolCreate`|11.2| | |`hipMemPoolCreate`|5.2.0| | |5.2.0| -|`cuMemPoolDestroy`|11.2| | |`hipMemPoolDestroy`|5.2.0| | |5.2.0| -|`cuMemPoolExportPointer`|11.2| | |`hipMemPoolExportPointer`|5.2.0| | |5.2.0| -|`cuMemPoolExportToShareableHandle`|11.2| | |`hipMemPoolExportToShareableHandle`|5.2.0| | |5.2.0| -|`cuMemPoolGetAccess`|11.2| | |`hipMemPoolGetAccess`|5.2.0| | |5.2.0| -|`cuMemPoolGetAttribute`|11.2| | |`hipMemPoolGetAttribute`|5.2.0| | |5.2.0| -|`cuMemPoolImportFromShareableHandle`|11.2| | |`hipMemPoolImportFromShareableHandle`|5.2.0| | |5.2.0| -|`cuMemPoolImportPointer`|11.2| | |`hipMemPoolImportPointer`|5.2.0| | |5.2.0| -|`cuMemPoolSetAccess`|11.2| | |`hipMemPoolSetAccess`|5.2.0| | |5.2.0| -|`cuMemPoolSetAttribute`|11.2| | |`hipMemPoolSetAttribute`|5.2.0| | |5.2.0| -|`cuMemPoolTrimTo`|11.2| | |`hipMemPoolTrimTo`|5.2.0| | |5.2.0| +|`cuMemAllocAsync`|11.2| | |`hipMallocAsync`|5.2.0| | | | +|`cuMemAllocFromPoolAsync`|11.2| | |`hipMallocFromPoolAsync`|5.2.0| | | | +|`cuMemFreeAsync`|11.2| | |`hipFreeAsync`|5.2.0| | | | +|`cuMemPoolCreate`|11.2| | |`hipMemPoolCreate`|5.2.0| | | | +|`cuMemPoolDestroy`|11.2| | |`hipMemPoolDestroy`|5.2.0| | | | +|`cuMemPoolExportPointer`|11.2| | |`hipMemPoolExportPointer`|5.2.0| | | | +|`cuMemPoolExportToShareableHandle`|11.2| | |`hipMemPoolExportToShareableHandle`|5.2.0| | | | +|`cuMemPoolGetAccess`|11.2| | |`hipMemPoolGetAccess`|5.2.0| | | | +|`cuMemPoolGetAttribute`|11.2| | |`hipMemPoolGetAttribute`|5.2.0| | | | +|`cuMemPoolImportFromShareableHandle`|11.2| | |`hipMemPoolImportFromShareableHandle`|5.2.0| | | | +|`cuMemPoolImportPointer`|11.2| | |`hipMemPoolImportPointer`|5.2.0| | | | +|`cuMemPoolSetAccess`|11.2| | |`hipMemPoolSetAccess`|5.2.0| | | | +|`cuMemPoolSetAttribute`|11.2| | |`hipMemPoolSetAttribute`|5.2.0| | | | +|`cuMemPoolTrimTo`|11.2| | |`hipMemPoolTrimTo`|5.2.0| | | | ## **14. Unified Addressing** @@ -1429,7 +1429,7 @@ |`cuStreamSynchronize`| | | |`hipStreamSynchronize`|1.6.0| | | | |`cuStreamUpdateCaptureDependencies`|11.3| | |`hipStreamUpdateCaptureDependencies`|5.0.0| | | | |`cuStreamWaitEvent`| | | |`hipStreamWaitEvent`|1.6.0| | | | -|`cuThreadExchangeStreamCaptureMode`|10.1| | |`hipThreadExchangeStreamCaptureMode`|5.2.0| | |5.2.0| +|`cuThreadExchangeStreamCaptureMode`|10.1| | |`hipThreadExchangeStreamCaptureMode`|5.2.0| | | | ## **16. Event Management** @@ -1483,7 +1483,7 @@ |`cuFuncSetSharedMemConfig`| | | | | | | | | |`cuLaunchCooperativeKernel`|9.0| | | | | | | | |`cuLaunchCooperativeKernelMultiDevice`|9.0|11.3| | | | | | | -|`cuLaunchHostFunc`|10.0| | |`hipLaunchHostFunc`|5.2.0| | |5.2.0| +|`cuLaunchHostFunc`|10.0| | |`hipLaunchHostFunc`|5.2.0| | | | |`cuLaunchKernel`| | | |`hipModuleLaunchKernel`|1.6.0| | | | ## **20. Execution Control [DEPRECATED]** @@ -1505,9 +1505,9 @@ |**CUDA**|**A**|**D**|**R**|**HIP**|**A**|**D**|**R**|**E**| |:--|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:| -|`cuDeviceGetGraphMemAttribute`|11.4| | | | | | | | -|`cuDeviceGraphMemTrim`|11.4| | | | | | | | -|`cuDeviceSetGraphMemAttribute`|11.4| | | | | | | | +|`cuDeviceGetGraphMemAttribute`|11.4| | |`hipDeviceGetGraphMemAttribute`|5.3.0| | |5.3.0| +|`cuDeviceGraphMemTrim`|11.4| | |`hipDeviceGraphMemTrim`|5.3.0| | |5.3.0| +|`cuDeviceSetGraphMemAttribute`|11.4| | |`hipDeviceSetGraphMemAttribute`|5.3.0| | |5.3.0| |`cuGraphAddBatchMemOpNode`|11.7| | | | | | | | |`cuGraphAddChildGraphNode`|10.0| | |`hipGraphAddChildGraphNode`|5.0.0| | | | |`cuGraphAddDependencies`|10.0| | |`hipGraphAddDependencies`|4.5.0| | | | @@ -1559,9 +1559,9 @@ |`cuGraphInstantiateWithFlags`|11.4| | |`hipGraphInstantiateWithFlags`|5.0.0| | | | |`cuGraphInstantiate_v2`|11.0| | |`hipGraphInstantiate`|4.3.0| | | | |`cuGraphKernelNodeCopyAttributes`|11.0| | | | | | | | -|`cuGraphKernelNodeGetAttribute`|11.0| | |`hipGraphKernelNodeGetAttribute`|5.2.0| | |5.2.0| +|`cuGraphKernelNodeGetAttribute`|11.0| | |`hipGraphKernelNodeGetAttribute`|5.2.0| | | | |`cuGraphKernelNodeGetParams`|10.0| | |`hipGraphKernelNodeGetParams`|4.5.0| | | | -|`cuGraphKernelNodeSetAttribute`|11.0| | |`hipGraphKernelNodeSetAttribute`|5.2.0| | |5.2.0| +|`cuGraphKernelNodeSetAttribute`|11.0| | |`hipGraphKernelNodeSetAttribute`|5.2.0| | | | |`cuGraphKernelNodeSetParams`|10.0| | |`hipGraphKernelNodeSetParams`|4.5.0| | | | |`cuGraphLaunch`|10.0| | |`hipGraphLaunch`|4.3.0| | | | |`cuGraphMemAllocNodeGetParams`|11.4| | | | | | | | @@ -1576,13 +1576,13 @@ |`cuGraphNodeGetEnabled`|11.6| | | | | | | | |`cuGraphNodeGetType`|10.0| | |`hipGraphNodeGetType`|5.0.0| | | | |`cuGraphNodeSetEnabled`|11.6| | | | | | | | -|`cuGraphReleaseUserObject`|11.3| | | | | | | | +|`cuGraphReleaseUserObject`|11.3| | |`hipGraphReleaseUserObject`|5.3.0| | |5.3.0| |`cuGraphRemoveDependencies`|10.0| | |`hipGraphRemoveDependencies`|5.0.0| | | | -|`cuGraphRetainUserObject`|11.3| | | | | | | | -|`cuGraphUpload`|11.1| | | | | | | | -|`cuUserObjectCreate`|11.3| | | | | | | | -|`cuUserObjectRelease`|11.3| | | | | | | | -|`cuUserObjectRetain`|11.3| | | | | | | | +|`cuGraphRetainUserObject`|11.3| | |`hipGraphRetainUserObject`|5.3.0| | |5.3.0| +|`cuGraphUpload`|11.1| | |`hipGraphUpload`|5.3.0| | |5.3.0| +|`cuUserObjectCreate`|11.3| | |`hipUserObjectCreate`|5.3.0| | |5.3.0| +|`cuUserObjectRelease`|11.3| | |`hipUserObjectRelease`|5.3.0| | |5.3.0| +|`cuUserObjectRetain`|11.3| | |`hipUserObjectRetain`|5.3.0| | |5.3.0| ## **22. Occupancy** @@ -1617,18 +1617,18 @@ |`cuTexRefSetAddress2D`| |11.0| |`hipTexRefSetAddress2D`|1.7.0|4.3.0| | | |`cuTexRefSetAddress2D_v2`| | | |`hipTexRefSetAddress2D`|1.7.0|4.3.0| | | |`cuTexRefSetAddress2D_v3`| | | |`hipTexRefSetAddress2D`|1.7.0|4.3.0| | | -|`cuTexRefSetAddressMode`| |11.0| |`hipTexRefSetAddressMode`|1.9.0| | | | +|`cuTexRefSetAddressMode`| |11.0| |`hipTexRefSetAddressMode`|1.9.0|5.3.0| | | |`cuTexRefSetAddress_v2`| |11.0| |`hipTexRefSetAddress`|1.7.0|4.3.0| | | -|`cuTexRefSetArray`| |11.0| |`hipTexRefSetArray`|1.9.0| | | | +|`cuTexRefSetArray`| |11.0| |`hipTexRefSetArray`|1.9.0|5.3.0| | | |`cuTexRefSetBorderColor`|8.0|11.0| |`hipTexRefSetBorderColor`|3.5.0|4.3.0| | | -|`cuTexRefSetFilterMode`| |11.0| |`hipTexRefSetFilterMode`|1.9.0| | | | -|`cuTexRefSetFlags`| |11.0| |`hipTexRefSetFlags`|1.9.0| | | | -|`cuTexRefSetFormat`| |11.0| |`hipTexRefSetFormat`|1.9.0| | | | +|`cuTexRefSetFilterMode`| |11.0| |`hipTexRefSetFilterMode`|1.9.0|5.3.0| | | +|`cuTexRefSetFlags`| |11.0| |`hipTexRefSetFlags`|1.9.0|5.3.0| | | +|`cuTexRefSetFormat`| |11.0| |`hipTexRefSetFormat`|1.9.0|5.3.0| | | |`cuTexRefSetMaxAnisotropy`| |11.0| |`hipTexRefSetMaxAnisotropy`|3.5.0|4.3.0| | | -|`cuTexRefSetMipmapFilterMode`| |11.0| |`hipTexRefSetMipmapFilterMode`|3.5.0| | | | -|`cuTexRefSetMipmapLevelBias`| |11.0| |`hipTexRefSetMipmapLevelBias`|3.5.0| | | | -|`cuTexRefSetMipmapLevelClamp`| |11.0| |`hipTexRefSetMipmapLevelClamp`|3.5.0| | | | -|`cuTexRefSetMipmappedArray`| |11.0| |`hipTexRefSetMipmappedArray`|3.5.0| | | | +|`cuTexRefSetMipmapFilterMode`| |11.0| |`hipTexRefSetMipmapFilterMode`|3.5.0|5.3.0| | | +|`cuTexRefSetMipmapLevelBias`| |11.0| |`hipTexRefSetMipmapLevelBias`|3.5.0|5.3.0| | | +|`cuTexRefSetMipmapLevelClamp`| |11.0| |`hipTexRefSetMipmapLevelClamp`|3.5.0|5.3.0| | | +|`cuTexRefSetMipmappedArray`| |11.0| |`hipTexRefSetMipmappedArray`|3.5.0|5.3.0| | | ## **24. Surface Reference Management [DEPRECATED]** diff --git a/doc/markdown/CUDA_RTC_API_supported_by_HIP.md b/doc/markdown/CUDA_RTC_API_supported_by_HIP.md index 17a7ef18..e1f0bf5d 100644 --- a/doc/markdown/CUDA_RTC_API_supported_by_HIP.md +++ b/doc/markdown/CUDA_RTC_API_supported_by_HIP.md @@ -1,4 +1,4 @@ -# CUDA_RTC_API_supported_by_HIP API supported by HIP +# CUDA RTC API supported by HIP ## **1. RTC Data types** diff --git a/doc/markdown/CUDA_Runtime_API_functions_supported_by_HIP.md b/doc/markdown/CUDA_Runtime_API_functions_supported_by_HIP.md index 4878393c..a8314136 100644 --- a/doc/markdown/CUDA_Runtime_API_functions_supported_by_HIP.md +++ b/doc/markdown/CUDA_Runtime_API_functions_supported_by_HIP.md @@ -9,9 +9,9 @@ |`cudaDeviceGetAttribute`| | | |`hipDeviceGetAttribute`|1.6.0| | | | |`cudaDeviceGetByPCIBusId`| | | |`hipDeviceGetByPCIBusId`|1.6.0| | | | |`cudaDeviceGetCacheConfig`| | | |`hipDeviceGetCacheConfig`|1.6.0| | | | -|`cudaDeviceGetDefaultMemPool`|11.2| | |`hipDeviceGetDefaultMemPool`|5.2.0| | |5.2.0| +|`cudaDeviceGetDefaultMemPool`|11.2| | |`hipDeviceGetDefaultMemPool`|5.2.0| | | | |`cudaDeviceGetLimit`| | | |`hipDeviceGetLimit`|1.6.0| | | | -|`cudaDeviceGetMemPool`|11.2| | |`hipDeviceGetMemPool`|5.2.0| | |5.2.0| +|`cudaDeviceGetMemPool`|11.2| | |`hipDeviceGetMemPool`|5.2.0| | | | |`cudaDeviceGetNvSciSyncAttributes`|10.2| | | | | | | | |`cudaDeviceGetP2PAttribute`|8.0| | |`hipDeviceGetP2PAttribute`|3.8.0| | | | |`cudaDeviceGetPCIBusId`| | | |`hipDeviceGetPCIBusId`|1.6.0| | | | @@ -20,8 +20,8 @@ |`cudaDeviceGetTexture1DLinearMaxWidth`|11.1| | | | | | | | |`cudaDeviceReset`| | | |`hipDeviceReset`|1.6.0| | | | |`cudaDeviceSetCacheConfig`| | | |`hipDeviceSetCacheConfig`|1.6.0| | | | -|`cudaDeviceSetLimit`| | | | | | | | | -|`cudaDeviceSetMemPool`|11.2| | |`hipDeviceSetMemPool`|5.2.0| | |5.2.0| +|`cudaDeviceSetLimit`| | | |`hipDeviceSetLimit`|5.3.0| | |5.3.0| +|`cudaDeviceSetMemPool`|11.2| | |`hipDeviceSetMemPool`|5.2.0| | | | |`cudaDeviceSetSharedMemConfig`| | | |`hipDeviceSetSharedMemConfig`|1.6.0| | | | |`cudaDeviceSynchronize`| | | |`hipDeviceSynchronize`|1.6.0| | | | |`cudaGetDevice`| | | |`hipGetDevice`|1.6.0| | | | @@ -80,7 +80,7 @@ |`cudaStreamSetAttribute`|11.0| | | | | | | | |`cudaStreamSynchronize`| | | |`hipStreamSynchronize`|1.6.0| | | | |`cudaStreamWaitEvent`| | | |`hipStreamWaitEvent`|1.6.0| | | | -|`cudaThreadExchangeStreamCaptureMode`|10.1| | |`hipThreadExchangeStreamCaptureMode`|5.2.0| | |5.2.0| +|`cudaThreadExchangeStreamCaptureMode`|10.1| | |`hipThreadExchangeStreamCaptureMode`|5.2.0| | | | ## **5. Event Management** @@ -120,7 +120,7 @@ |`cudaGetParameterBufferV2`| | | | | | | | | |`cudaLaunchCooperativeKernel`|9.0| | |`hipLaunchCooperativeKernel`|2.6.0| | | | |`cudaLaunchCooperativeKernelMultiDevice`|9.0|11.3| |`hipLaunchCooperativeKernelMultiDevice`|2.6.0| | | | -|`cudaLaunchHostFunc`|10.0| | |`hipLaunchHostFunc`|5.2.0| | |5.2.0| +|`cudaLaunchHostFunc`|10.0| | |`hipLaunchHostFunc`|5.2.0| | | | |`cudaLaunchKernel`| | | |`hipLaunchKernel`|1.6.0| | | | |`cudaSetDoubleForDevice`| |10.0| | | | | | | |`cudaSetDoubleForHost`| |10.0| | | | | | | @@ -213,20 +213,20 @@ |**CUDA**|**A**|**D**|**R**|**HIP**|**A**|**D**|**R**|**E**| |:--|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:| -|`cudaFreeAsync`|11.2| | |`hipFreeAsync`|5.2.0| | |5.2.0| -|`cudaMallocAsync`|11.2| | |`hipMallocAsync`|5.2.0| | |5.2.0| -|`cudaMallocFromPoolAsync`|11.2| | |`hipMallocFromPoolAsync`|5.2.0| | |5.2.0| -|`cudaMemPoolCreate`|11.2| | |`hipMemPoolCreate`|5.2.0| | |5.2.0| -|`cudaMemPoolDestroy`|11.2| | |`hipMemPoolDestroy`|5.2.0| | |5.2.0| -|`cudaMemPoolExportPointer`|11.2| | |`hipMemPoolExportPointer`|5.2.0| | |5.2.0| -|`cudaMemPoolExportToShareableHandle`|11.2| | |`hipMemPoolExportToShareableHandle`|5.2.0| | |5.2.0| -|`cudaMemPoolGetAccess`|11.2| | |`hipMemPoolGetAccess`|5.2.0| | |5.2.0| -|`cudaMemPoolGetAttribute`|11.2| | |`hipMemPoolGetAttribute`|5.2.0| | |5.2.0| -|`cudaMemPoolImportFromShareableHandle`|11.2| | |`hipMemPoolImportFromShareableHandle`|5.2.0| | |5.2.0| -|`cudaMemPoolImportPointer`|11.2| | |`hipMemPoolImportPointer`|5.2.0| | |5.2.0| -|`cudaMemPoolSetAccess`|11.2| | |`hipMemPoolSetAccess`|5.2.0| | |5.2.0| -|`cudaMemPoolSetAttribute`|11.2| | |`hipMemPoolSetAttribute`|5.2.0| | |5.2.0| -|`cudaMemPoolTrimTo`|11.2| | |`hipMemPoolTrimTo`|5.2.0| | |5.2.0| +|`cudaFreeAsync`|11.2| | |`hipFreeAsync`|5.2.0| | | | +|`cudaMallocAsync`|11.2| | |`hipMallocAsync`|5.2.0| | | | +|`cudaMallocFromPoolAsync`|11.2| | |`hipMallocFromPoolAsync`|5.2.0| | | | +|`cudaMemPoolCreate`|11.2| | |`hipMemPoolCreate`|5.2.0| | | | +|`cudaMemPoolDestroy`|11.2| | |`hipMemPoolDestroy`|5.2.0| | | | +|`cudaMemPoolExportPointer`|11.2| | |`hipMemPoolExportPointer`|5.2.0| | | | +|`cudaMemPoolExportToShareableHandle`|11.2| | |`hipMemPoolExportToShareableHandle`|5.2.0| | | | +|`cudaMemPoolGetAccess`|11.2| | |`hipMemPoolGetAccess`|5.2.0| | | | +|`cudaMemPoolGetAttribute`|11.2| | |`hipMemPoolGetAttribute`|5.2.0| | | | +|`cudaMemPoolImportFromShareableHandle`|11.2| | |`hipMemPoolImportFromShareableHandle`|5.2.0| | | | +|`cudaMemPoolImportPointer`|11.2| | |`hipMemPoolImportPointer`|5.2.0| | | | +|`cudaMemPoolSetAccess`|11.2| | |`hipMemPoolSetAccess`|5.2.0| | | | +|`cudaMemPoolSetAttribute`|11.2| | |`hipMemPoolSetAttribute`|5.2.0| | | | +|`cudaMemPoolTrimTo`|11.2| | |`hipMemPoolTrimTo`|5.2.0| | | | ## **12. Unified Addressing** @@ -378,7 +378,7 @@ |`cudaCreateChannelDesc`| | | |`hipCreateChannelDesc`|1.6.0| | | | |`cudaGetChannelDesc`| | | |`hipGetChannelDesc`|1.7.0| | | | |`cudaGetTextureAlignmentOffset`| |11.0| |`hipGetTextureAlignmentOffset`|1.9.0|3.8.0| | | -|`cudaGetTextureReference`| |11.0| |`hipGetTextureReference`|1.7.0| | | | +|`cudaGetTextureReference`| |11.0| |`hipGetTextureReference`|1.7.0|5.3.0| | | |`cudaUnbindTexture`| |11.0| |`hipUnbindTexture`|1.6.0|3.8.0| | | ## **26. Surface Reference Management [DEPRECATED]** @@ -417,9 +417,9 @@ |**CUDA**|**A**|**D**|**R**|**HIP**|**A**|**D**|**R**|**E**| |:--|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:| -|`cudaDeviceGetGraphMemAttribute`|11.4| | | | | | | | -|`cudaDeviceGraphMemTrim`|11.4| | | | | | | | -|`cudaDeviceSetGraphMemAttribute`|11.4| | | | | | | | +|`cudaDeviceGetGraphMemAttribute`|11.4| | |`hipDeviceGetGraphMemAttribute`|5.3.0| | |5.3.0| +|`cudaDeviceGraphMemTrim`|11.4| | |`hipDeviceGraphMemTrim`|5.3.0| | |5.3.0| +|`cudaDeviceSetGraphMemAttribute`|11.4| | |`hipDeviceSetGraphMemAttribute`|5.3.0| | |5.3.0| |`cudaGraphAddChildGraphNode`|10.0| | |`hipGraphAddChildGraphNode`|5.0.0| | | | |`cudaGraphAddDependencies`|10.0| | |`hipGraphAddDependencies`|4.5.0| | | | |`cudaGraphAddEmptyNode`|10.0| | |`hipGraphAddEmptyNode`|4.5.0| | | | @@ -472,9 +472,9 @@ |`cudaGraphInstantiate`|10.0| | |`hipGraphInstantiate`|4.3.0| | | | |`cudaGraphInstantiateWithFlags`|11.4| | |`hipGraphInstantiateWithFlags`|5.0.0| | | | |`cudaGraphKernelNodeCopyAttributes`|11.0| | | | | | | | -|`cudaGraphKernelNodeGetAttribute`|11.0| | |`hipGraphKernelNodeGetAttribute`|5.2.0| | |5.2.0| +|`cudaGraphKernelNodeGetAttribute`|11.0| | |`hipGraphKernelNodeGetAttribute`|5.2.0| | | | |`cudaGraphKernelNodeGetParams`|11.0| | |`hipGraphKernelNodeGetParams`|4.5.0| | | | -|`cudaGraphKernelNodeSetAttribute`|11.0| | |`hipGraphKernelNodeSetAttribute`|5.2.0| | |5.2.0| +|`cudaGraphKernelNodeSetAttribute`|11.0| | |`hipGraphKernelNodeSetAttribute`|5.2.0| | | | |`cudaGraphKernelNodeSetParams`|11.0| | |`hipGraphKernelNodeSetParams`|4.5.0| | | | |`cudaGraphLaunch`|11.0| | |`hipGraphLaunch`|4.3.0| | | | |`cudaGraphMemAllocNodeGetParams`|11.4| | | | | | | | @@ -491,13 +491,13 @@ |`cudaGraphNodeGetDependentNodes`|11.0| | |`hipGraphNodeGetDependentNodes`|5.0.0| | | | |`cudaGraphNodeGetType`|11.0| | |`hipGraphNodeGetType`|5.0.0| | | | |`cudaGraphNodeSetEnabled`|11.6| | | | | | | | -|`cudaGraphReleaseUserObject`|11.3| | | | | | | | +|`cudaGraphReleaseUserObject`|11.3| | |`hipGraphReleaseUserObject`|5.3.0| | |5.3.0| |`cudaGraphRemoveDependencies`|11.0| | |`hipGraphRemoveDependencies`|5.0.0| | | | -|`cudaGraphRetainUserObject`|11.3| | | | | | | | -|`cudaGraphUpload`|11.1| | | | | | | | -|`cudaUserObjectCreate`|11.3| | | | | | | | -|`cudaUserObjectRelease`|11.3| | | | | | | | -|`cudaUserObjectRetain`|11.3| | | | | | | | +|`cudaGraphRetainUserObject`|11.3| | |`hipGraphRetainUserObject`|5.3.0| | |5.3.0| +|`cudaGraphUpload`|11.1| | |`hipGraphUpload`|5.3.0| | |5.3.0| +|`cudaUserObjectCreate`|11.3| | |`hipUserObjectCreate`|5.3.0| | |5.3.0| +|`cudaUserObjectRelease`|11.3| | |`hipUserObjectRelease`|5.3.0| | |5.3.0| +|`cudaUserObjectRetain`|11.3| | |`hipUserObjectRetain`|5.3.0| | |5.3.0| ## **31. Driver Entry Point Access** @@ -542,15 +542,15 @@ Unsupported |`CUgraphNode_st`|10.0| | |`hipGraphNode`|4.3.0| | | | |`CUgraph_st`|10.0| | |`ihipGraph`|4.3.0| | | | |`CUstream_st`| | | |`ihipStream_t`|1.5.0| | | | -|`CUuuid_st`| | | |`hipUUID_t`|5.2.0| | |5.2.0| +|`CUuuid_st`| | | |`hipUUID_t`|5.2.0| | | | |`MAJOR_VERSION`|8.0| | | | | | | | |`MINOR_VERSION`|8.0| | | | | | | | |`PATCH_LEVEL`|8.0| | | | | | | | -|`cudaAccessPolicyWindow`|11.0| | |`hipAccessPolicyWindow`|5.2.0| | |5.2.0| -|`cudaAccessProperty`|11.0| | |`hipAccessProperty`|5.2.0| | |5.2.0| -|`cudaAccessPropertyNormal`|11.0| | |`hipAccessPropertyNormal`|5.2.0| | |5.2.0| -|`cudaAccessPropertyPersisting`|11.0| | |`hipAccessPropertyPersisting`|5.2.0| | |5.2.0| -|`cudaAccessPropertyStreaming`|11.0| | |`hipAccessPropertyStreaming`|5.2.0| | |5.2.0| +|`cudaAccessPolicyWindow`|11.0| | |`hipAccessPolicyWindow`|5.2.0| | | | +|`cudaAccessProperty`|11.0| | |`hipAccessProperty`|5.2.0| | | | +|`cudaAccessPropertyNormal`|11.0| | |`hipAccessPropertyNormal`|5.2.0| | | | +|`cudaAccessPropertyPersisting`|11.0| | |`hipAccessPropertyPersisting`|5.2.0| | | | +|`cudaAccessPropertyStreaming`|11.0| | |`hipAccessPropertyStreaming`|5.2.0| | | | |`cudaAddressModeBorder`| | | |`hipAddressModeBorder`|1.7.0| | | | |`cudaAddressModeClamp`| | | |`hipAddressModeClamp`|1.7.0| | | | |`cudaAddressModeMirror`| | | |`hipAddressModeMirror`|1.7.0| | | | @@ -736,7 +736,7 @@ Unsupported |`cudaDevAttrMaxTimelineSemaphoreInteropSupported`|11.2|11.5| | | | | | | |`cudaDevAttrMemoryClockRate`| | | |`hipDeviceAttributeMemoryClockRate`|1.6.0| | | | |`cudaDevAttrMemoryPoolSupportedHandleTypes`|11.3| | | | | | | | -|`cudaDevAttrMemoryPoolsSupported`|11.2| | |`hipDeviceAttributeMemoryPoolsSupported`|5.2.0| | |5.2.0| +|`cudaDevAttrMemoryPoolsSupported`|11.2| | |`hipDeviceAttributeMemoryPoolsSupported`|5.2.0| | | | |`cudaDevAttrMultiGpuBoardGroupID`| | | |`hipDeviceAttributeMultiGpuBoardGroupID`|5.0.0| | | | |`cudaDevAttrMultiProcessorCount`| | | |`hipDeviceAttributeMultiprocessorCount`|1.6.0| | | | |`cudaDevAttrPageableMemoryAccess`|8.0| | |`hipDeviceAttributePageableMemoryAccess`|3.10.0| | | | @@ -1089,20 +1089,20 @@ Unsupported |`cudaGraphExecUpdateResult`|10.2| | |`hipGraphExecUpdateResult`|4.3.0| | | | |`cudaGraphExecUpdateSuccess`|10.2| | |`hipGraphExecUpdateSuccess`|4.3.0| | | | |`cudaGraphExec_t`|10.0| | |`hipGraphExec_t`|4.3.0| | | | -|`cudaGraphInstantiateFlagAutoFreeOnLaunch`|11.4| | |`hipGraphInstantiateFlagAutoFreeOnLaunch`|5.2.0| | |5.2.0| +|`cudaGraphInstantiateFlagAutoFreeOnLaunch`|11.4| | |`hipGraphInstantiateFlagAutoFreeOnLaunch`|5.2.0| | | | |`cudaGraphInstantiateFlagUseNodePriority`|11.7| | | | | | | | -|`cudaGraphInstantiateFlags`|11.4| | |`hipGraphInstantiateFlags`|5.2.0| | |5.2.0| -|`cudaGraphMemAttrReservedMemCurrent`|11.4| | | | | | | | -|`cudaGraphMemAttrReservedMemHigh`|11.4| | | | | | | | -|`cudaGraphMemAttrUsedMemCurrent`|11.4| | | | | | | | -|`cudaGraphMemAttrUsedMemHigh`|11.4| | | | | | | | -|`cudaGraphMemAttributeType`|11.4| | | | | | | | +|`cudaGraphInstantiateFlags`|11.4| | |`hipGraphInstantiateFlags`|5.2.0| | | | +|`cudaGraphMemAttrReservedMemCurrent`|11.4| | |`hipGraphMemAttrReservedMemCurrent`|5.3.0| | |5.3.0| +|`cudaGraphMemAttrReservedMemHigh`|11.4| | |`hipGraphMemAttrReservedMemHigh`|5.3.0| | |5.3.0| +|`cudaGraphMemAttrUsedMemCurrent`|11.4| | |`hipGraphMemAttrUsedMemCurrent`|5.3.0| | |5.3.0| +|`cudaGraphMemAttrUsedMemHigh`|11.4| | |`hipGraphMemAttrUsedMemHigh`|5.3.0| | |5.3.0| +|`cudaGraphMemAttributeType`|11.4| | |`hipGraphMemAttributeType`|5.3.0| | |5.3.0| |`cudaGraphNodeType`|10.0| | |`hipGraphNodeType`|4.3.0| | | | |`cudaGraphNodeTypeCount`|10.0| | |`hipGraphNodeTypeCount`|4.3.0| | | | |`cudaGraphNodeTypeEmpty`|10.0| | |`hipGraphNodeTypeEmpty`|4.3.0| | | | |`cudaGraphNodeTypeEventRecord`|11.1| | |`hipGraphNodeTypeEventRecord`|4.3.0| | | | -|`cudaGraphNodeTypeExtSemaphoreSignal`|11.4| | | | | | | | -|`cudaGraphNodeTypeExtSemaphoreWait`|11.4| | | | | | | | +|`cudaGraphNodeTypeExtSemaphoreSignal`|11.4| | |`hipGraphNodeTypeExtSemaphoreSignal`|5.3.0| | |5.3.0| +|`cudaGraphNodeTypeExtSemaphoreWait`|11.4| | |`hipGraphNodeTypeExtSemaphoreWait`|5.3.0| | |5.3.0| |`cudaGraphNodeTypeGraph`|10.0| | |`hipGraphNodeTypeGraph`|4.3.0| | | | |`cudaGraphNodeTypeHost`|10.0| | |`hipGraphNodeTypeHost`|4.3.0| | | | |`cudaGraphNodeTypeKernel`|10.0| | |`hipGraphNodeTypeKernel`|4.3.0| | | | @@ -1112,7 +1112,7 @@ Unsupported |`cudaGraphNodeTypeMemset`|10.0| | |`hipGraphNodeTypeMemset`|4.3.0| | | | |`cudaGraphNodeTypeWaitEvent`|11.1| | |`hipGraphNodeTypeWaitEvent`|4.3.0| | | | |`cudaGraphNode_t`|10.0| | |`hipGraphNode_t`|4.3.0| | | | -|`cudaGraphUserObjectMove`|11.3| | | | | | | | +|`cudaGraphUserObjectMove`|11.3| | |`hipGraphUserObjectMove`|5.3.0| | |5.3.0| |`cudaGraph_t`|10.0| | |`hipGraph_t`|4.3.0| | | | |`cudaGraphicsCubeFace`| | | | | | | | | |`cudaGraphicsCubeFaceNegativeX`| | | | | | | | | @@ -1150,10 +1150,10 @@ Unsupported |`cudaIpcMemHandle_st`| | | |`hipIpcMemHandle_st`|1.6.0| | | | |`cudaIpcMemHandle_t`| | | |`hipIpcMemHandle_t`|1.6.0| | | | |`cudaIpcMemLazyEnablePeerAccess`| | | |`hipIpcMemLazyEnablePeerAccess`|1.6.0| | | | -|`cudaKernelNodeAttrID`|11.0| | |`hipKernelNodeAttrID`|5.2.0| | |5.2.0| -|`cudaKernelNodeAttrValue`|11.0| | |`hipKernelNodeAttrValue`|5.2.0| | |5.2.0| -|`cudaKernelNodeAttributeAccessPolicyWindow`|11.0| | |`hipKernelNodeAttributeAccessPolicyWindow`|5.2.0| | |5.2.0| -|`cudaKernelNodeAttributeCooperative`|11.0| | |`hipKernelNodeAttributeCooperative`|5.2.0| | |5.2.0| +|`cudaKernelNodeAttrID`|11.0| | |`hipKernelNodeAttrID`|5.2.0| | | | +|`cudaKernelNodeAttrValue`|11.0| | |`hipKernelNodeAttrValue`|5.2.0| | | | +|`cudaKernelNodeAttributeAccessPolicyWindow`|11.0| | |`hipKernelNodeAttributeAccessPolicyWindow`|5.2.0| | | | +|`cudaKernelNodeAttributeCooperative`|11.0| | |`hipKernelNodeAttributeCooperative`|5.2.0| | | | |`cudaKernelNodeAttributePriority`|11.7| | | | | | | | |`cudaKernelNodeParams`|10.0| | |`hipKernelNodeParams`|4.3.0| | | | |`cudaKeyValuePair`| | | | | | | | | @@ -1165,12 +1165,12 @@ Unsupported |`cudaLimitMaxL2FetchGranularity`|10.0| | | | | | | | |`cudaLimitPersistingL2CacheSize`|11.0| | | | | | | | |`cudaLimitPrintfFifoSize`| | | |`hipLimitPrintfFifoSize`|4.5.0| | | | -|`cudaLimitStackSize`| | | | | | | | | -|`cudaMemAccessDesc`|11.2| | |`hipMemAccessDesc`|5.2.0| | |5.2.0| -|`cudaMemAccessFlags`|11.2| | |`hipMemAccessFlags`|5.2.0| | |5.2.0| -|`cudaMemAccessFlagsProtNone`|11.2| | |`hipMemAccessFlagsProtNone`|5.2.0| | |5.2.0| -|`cudaMemAccessFlagsProtRead`|11.2| | |`hipMemAccessFlagsProtRead`|5.2.0| | |5.2.0| -|`cudaMemAccessFlagsProtReadWrite`|11.2| | |`hipMemAccessFlagsProtReadWrite`|5.2.0| | |5.2.0| +|`cudaLimitStackSize`| | | |`hipLimitStackSize`|5.3.0| | |5.3.0| +|`cudaMemAccessDesc`|11.2| | |`hipMemAccessDesc`|5.2.0| | | | +|`cudaMemAccessFlags`|11.2| | |`hipMemAccessFlags`|5.2.0| | | | +|`cudaMemAccessFlagsProtNone`|11.2| | |`hipMemAccessFlagsProtNone`|5.2.0| | | | +|`cudaMemAccessFlagsProtRead`|11.2| | |`hipMemAccessFlagsProtRead`|5.2.0| | | | +|`cudaMemAccessFlagsProtReadWrite`|11.2| | |`hipMemAccessFlagsProtReadWrite`|5.2.0| | | | |`cudaMemAdviseSetAccessedBy`|8.0| | |`hipMemAdviseSetAccessedBy`|3.7.0| | | | |`cudaMemAdviseSetPreferredLocation`|8.0| | |`hipMemAdviseSetPreferredLocation`|3.7.0| | | | |`cudaMemAdviseSetReadMostly`|8.0| | |`hipMemAdviseSetReadMostly`|3.7.0| | | | @@ -1178,34 +1178,34 @@ Unsupported |`cudaMemAdviseUnsetPreferredLocation`|8.0| | |`hipMemAdviseUnsetPreferredLocation`|3.7.0| | | | |`cudaMemAdviseUnsetReadMostly`|8.0| | |`hipMemAdviseUnsetReadMostly`|3.7.0| | | | |`cudaMemAllocNodeParams`|11.4| | | | | | | | -|`cudaMemAllocationHandleType`|11.2| | |`hipMemAllocationHandleType`|5.2.0| | |5.2.0| -|`cudaMemAllocationType`|11.2| | |`hipMemAllocationType`|5.2.0| | |5.2.0| -|`cudaMemAllocationTypeInvalid`|11.2| | |`hipMemAllocationTypeInvalid`|5.2.0| | |5.2.0| -|`cudaMemAllocationTypeMax`|11.2| | |`hipMemAllocationTypeMax`|5.2.0| | |5.2.0| -|`cudaMemAllocationTypePinned`|11.2| | |`hipMemAllocationTypePinned`|5.2.0| | |5.2.0| +|`cudaMemAllocationHandleType`|11.2| | |`hipMemAllocationHandleType`|5.2.0| | | | +|`cudaMemAllocationType`|11.2| | |`hipMemAllocationType`|5.2.0| | | | +|`cudaMemAllocationTypeInvalid`|11.2| | |`hipMemAllocationTypeInvalid`|5.2.0| | | | +|`cudaMemAllocationTypeMax`|11.2| | |`hipMemAllocationTypeMax`|5.2.0| | | | +|`cudaMemAllocationTypePinned`|11.2| | |`hipMemAllocationTypePinned`|5.2.0| | | | |`cudaMemAttachGlobal`| | | |`hipMemAttachGlobal`|2.5.0| | | | |`cudaMemAttachHost`| | | |`hipMemAttachHost`|2.5.0| | | | |`cudaMemAttachSingle`| | | |`hipMemAttachSingle`|3.7.0| | | | -|`cudaMemHandleTypeNone`|11.2| | |`hipMemHandleTypeNone`|5.2.0| | |5.2.0| -|`cudaMemHandleTypePosixFileDescriptor`|11.2| | |`hipMemHandleTypePosixFileDescriptor`|5.2.0| | |5.2.0| -|`cudaMemHandleTypeWin32`|11.2| | |`hipMemHandleTypeWin32`|5.2.0| | |5.2.0| -|`cudaMemHandleTypeWin32Kmt`|11.2| | |`hipMemHandleTypeWin32Kmt`|5.2.0| | |5.2.0| -|`cudaMemLocation`|11.2| | |`hipMemLocation`|5.2.0| | |5.2.0| -|`cudaMemLocationType`|11.2| | |`hipMemLocationType`|5.2.0| | |5.2.0| -|`cudaMemLocationTypeDevice`|11.2| | |`hipMemLocationTypeDevice`|5.2.0| | |5.2.0| -|`cudaMemLocationTypeInvalid`|11.2| | |`hipMemLocationTypeInvalid`|5.2.0| | |5.2.0| -|`cudaMemPoolAttr`|11.2| | |`hipMemPoolAttr`|5.2.0| | |5.2.0| -|`cudaMemPoolAttrReleaseThreshold`|11.2| | |`hipMemPoolAttrReleaseThreshold`|5.2.0| | |5.2.0| -|`cudaMemPoolAttrReservedMemCurrent`|11.3| | |`hipMemPoolAttrReservedMemCurrent`|5.2.0| | |5.2.0| -|`cudaMemPoolAttrReservedMemHigh`|11.3| | |`hipMemPoolAttrReservedMemHigh`|5.2.0| | |5.2.0| -|`cudaMemPoolAttrUsedMemCurrent`|11.3| | |`hipMemPoolAttrUsedMemCurrent`|5.2.0| | |5.2.0| -|`cudaMemPoolAttrUsedMemHigh`|11.3| | |`hipMemPoolAttrUsedMemHigh`|5.2.0| | |5.2.0| -|`cudaMemPoolProps`|11.2| | |`hipMemPoolProps`|5.2.0| | |5.2.0| -|`cudaMemPoolPtrExportData`|11.2| | |`hipMemPoolPtrExportData`|5.2.0| | |5.2.0| -|`cudaMemPoolReuseAllowInternalDependencies`|11.2| | |`hipMemPoolReuseAllowInternalDependencies`|5.2.0| | |5.2.0| -|`cudaMemPoolReuseAllowOpportunistic`|11.2| | |`hipMemPoolReuseAllowOpportunistic`|5.2.0| | |5.2.0| -|`cudaMemPoolReuseFollowEventDependencies`|11.2| | |`hipMemPoolReuseFollowEventDependencies`|5.2.0| | |5.2.0| -|`cudaMemPool_t`|11.2| | |`hipMemPool_t`|5.2.0| | |5.2.0| +|`cudaMemHandleTypeNone`|11.2| | |`hipMemHandleTypeNone`|5.2.0| | | | +|`cudaMemHandleTypePosixFileDescriptor`|11.2| | |`hipMemHandleTypePosixFileDescriptor`|5.2.0| | | | +|`cudaMemHandleTypeWin32`|11.2| | |`hipMemHandleTypeWin32`|5.2.0| | | | +|`cudaMemHandleTypeWin32Kmt`|11.2| | |`hipMemHandleTypeWin32Kmt`|5.2.0| | | | +|`cudaMemLocation`|11.2| | |`hipMemLocation`|5.2.0| | | | +|`cudaMemLocationType`|11.2| | |`hipMemLocationType`|5.2.0| | | | +|`cudaMemLocationTypeDevice`|11.2| | |`hipMemLocationTypeDevice`|5.2.0| | | | +|`cudaMemLocationTypeInvalid`|11.2| | |`hipMemLocationTypeInvalid`|5.2.0| | | | +|`cudaMemPoolAttr`|11.2| | |`hipMemPoolAttr`|5.2.0| | | | +|`cudaMemPoolAttrReleaseThreshold`|11.2| | |`hipMemPoolAttrReleaseThreshold`|5.2.0| | | | +|`cudaMemPoolAttrReservedMemCurrent`|11.3| | |`hipMemPoolAttrReservedMemCurrent`|5.2.0| | | | +|`cudaMemPoolAttrReservedMemHigh`|11.3| | |`hipMemPoolAttrReservedMemHigh`|5.2.0| | | | +|`cudaMemPoolAttrUsedMemCurrent`|11.3| | |`hipMemPoolAttrUsedMemCurrent`|5.2.0| | | | +|`cudaMemPoolAttrUsedMemHigh`|11.3| | |`hipMemPoolAttrUsedMemHigh`|5.2.0| | | | +|`cudaMemPoolProps`|11.2| | |`hipMemPoolProps`|5.2.0| | | | +|`cudaMemPoolPtrExportData`|11.2| | |`hipMemPoolPtrExportData`|5.2.0| | | | +|`cudaMemPoolReuseAllowInternalDependencies`|11.2| | |`hipMemPoolReuseAllowInternalDependencies`|5.2.0| | | | +|`cudaMemPoolReuseAllowOpportunistic`|11.2| | |`hipMemPoolReuseAllowOpportunistic`|5.2.0| | | | +|`cudaMemPoolReuseFollowEventDependencies`|11.2| | |`hipMemPoolReuseFollowEventDependencies`|5.2.0| | | | +|`cudaMemPool_t`|11.2| | |`hipMemPool_t`|5.2.0| | | | |`cudaMemRangeAttribute`|8.0| | |`hipMemRangeAttribute`|3.7.0| | | | |`cudaMemRangeAttributeAccessedBy`|8.0| | |`hipMemRangeAttributeAccessedBy`|3.7.0| | | | |`cudaMemRangeAttributeLastPrefetchLocation`|8.0| | |`hipMemRangeAttributeLastPrefetchLocation`|3.7.0| | | | @@ -1223,7 +1223,7 @@ Unsupported |`cudaMemoryType`| | | |`hipMemoryType`|1.6.0| | | | |`cudaMemoryTypeDevice`| | | |`hipMemoryTypeDevice`|1.6.0| | | | |`cudaMemoryTypeHost`| | | |`hipMemoryTypeHost`|1.6.0| | | | -|`cudaMemoryTypeManaged`|10.0| | | | | | | | +|`cudaMemoryTypeManaged`|10.0| | |`hipMemoryTypeManaged`|5.3.0| | |5.3.0| |`cudaMemoryTypeUnregistered`| | | | | | | | | |`cudaMemsetParams`|10.0| | |`hipMemsetParams`|4.3.0| | | | |`cudaMipmappedArray`| | | |`hipMipmappedArray`|1.7.0| | | | @@ -1333,11 +1333,11 @@ Unsupported |`cudaTextureType3D`| | | |`hipTextureType3D`|1.7.0| | | | |`cudaTextureTypeCubemap`| | | |`hipTextureTypeCubemap`|1.7.0| | | | |`cudaTextureTypeCubemapLayered`| | | |`hipTextureTypeCubemapLayered`|1.7.0| | | | -|`cudaUUID_t`| | | |`hipUUID`|5.2.0| | |5.2.0| -|`cudaUserObjectFlags`|11.3| | | | | | | | -|`cudaUserObjectNoDestructorSync`|11.3| | | | | | | | -|`cudaUserObjectRetainFlags`|11.3| | | | | | | | -|`cudaUserObject_t`|11.3| | | | | | | | +|`cudaUUID_t`| | | |`hipUUID`|5.2.0| | | | +|`cudaUserObjectFlags`|11.3| | |`hipUserObjectFlags`|5.3.0| | |5.3.0| +|`cudaUserObjectNoDestructorSync`|11.3| | |`hipUserObjectNoDestructorSync`|5.3.0| | |5.3.0| +|`cudaUserObjectRetainFlags`|11.3| | |`hipUserObjectRetainFlags`|5.3.0| | |5.3.0| +|`cudaUserObject_t`|11.3| | |`hipUserObject_t`|5.3.0| | |5.3.0| |`libraryPropertyType`|8.0| | | | | | | | |`libraryPropertyType_t`|8.0| | | | | | | | |`surfaceReference`| | | |`surfaceReference`|1.9.0| | | | diff --git a/src/CUDA2HIP_Driver_API_functions.cpp b/src/CUDA2HIP_Driver_API_functions.cpp index 81016ddc..222c7266 100644 --- a/src/CUDA2HIP_Driver_API_functions.cpp +++ b/src/CUDA2HIP_Driver_API_functions.cpp @@ -27,10 +27,10 @@ const std::map CUDA_DRIVER_FUNCTION_MAP { // 2. Error Handling // no analogue // NOTE: cudaGetErrorName and cuGetErrorName have different signatures - {"cuGetErrorName", {"hipGetErrorName_", "", CONV_ERROR, API_DRIVER, 2, HIP_UNSUPPORTED}}, + {"cuGetErrorName", {"hipDrvGetErrorName", "", CONV_ERROR, API_DRIVER, 2, HIP_EXPERIMENTAL}}, // no analogue // NOTE: cudaGetErrorString and cuGetErrorString have different signatures - {"cuGetErrorString", {"hipGetErrorString_", "", CONV_ERROR, API_DRIVER, 2, HIP_UNSUPPORTED}}, + {"cuGetErrorString", {"hipDrvGetErrorString", "", CONV_ERROR, API_DRIVER, 2, HIP_EXPERIMENTAL}}, // 3. Initialization // no analogue @@ -55,20 +55,20 @@ const std::map CUDA_DRIVER_FUNCTION_MAP { // cudaDeviceGetNvSciSyncAttributes {"cuDeviceGetNvSciSyncAttributes", {"hipDeviceGetNvSciSyncAttributes", "", CONV_DEVICE, API_DRIVER, 5, HIP_UNSUPPORTED}}, // no analogue - {"cuDeviceGetUuid", {"hipDeviceGetUuid", "", CONV_DEVICE, API_DRIVER, 5, HIP_EXPERIMENTAL}}, + {"cuDeviceGetUuid", {"hipDeviceGetUuid", "", CONV_DEVICE, API_DRIVER, 5}}, // no analogue - {"cuDeviceGetUuid_v2", {"hipDeviceGetUuid", "", CONV_DEVICE, API_DRIVER, 5, HIP_EXPERIMENTAL}}, + {"cuDeviceGetUuid_v2", {"hipDeviceGetUuid", "", CONV_DEVICE, API_DRIVER, 5}}, // no analogue {"cuDeviceTotalMem", {"hipDeviceTotalMem", "", CONV_DEVICE, API_DRIVER, 5}}, {"cuDeviceTotalMem_v2", {"hipDeviceTotalMem", "", CONV_DEVICE, API_DRIVER, 5}}, // cudaDeviceGetTexture1DLinearMaxWidth {"cuDeviceGetTexture1DLinearMaxWidth", {"hipDeviceGetTexture1DLinearMaxWidth", "", CONV_DEVICE, API_DRIVER, 5, HIP_UNSUPPORTED}}, // cudaDeviceSetMemPool - {"cuDeviceSetMemPool", {"hipDeviceSetMemPool", "", CONV_DEVICE, API_DRIVER, 5, HIP_EXPERIMENTAL}}, + {"cuDeviceSetMemPool", {"hipDeviceSetMemPool", "", CONV_DEVICE, API_DRIVER, 5}}, // cudaDeviceGetMemPool - {"cuDeviceGetMemPool", {"hipDeviceGetMemPool", "", CONV_DEVICE, API_DRIVER, 5, HIP_EXPERIMENTAL}}, + {"cuDeviceGetMemPool", {"hipDeviceGetMemPool", "", CONV_DEVICE, API_DRIVER, 5}}, // cudaDeviceGetDefaultMemPool - {"cuDeviceGetDefaultMemPool", {"hipDeviceGetDefaultMemPool", "", CONV_DEVICE, API_DRIVER, 5, HIP_EXPERIMENTAL}}, + {"cuDeviceGetDefaultMemPool", {"hipDeviceGetDefaultMemPool", "", CONV_DEVICE, API_DRIVER, 5}}, // {"cuDeviceGetExecAffinitySupport", {"hipDeviceGetExecAffinitySupport", "", CONV_DEVICE, API_DRIVER, 5, HIP_UNSUPPORTED}}, @@ -119,7 +119,7 @@ const std::map CUDA_DRIVER_FUNCTION_MAP { {"cuCtxResetPersistingL2Cache", {"hipCtxResetPersistingL2Cache", "", CONV_CONTEXT, API_DRIVER, 8, HIP_UNSUPPORTED}}, {"cuCtxSetCurrent", {"hipCtxSetCurrent", "", CONV_CONTEXT, API_DRIVER, 8, HIP_DEPRECATED}}, // cudaDeviceSetLimit - {"cuCtxSetLimit", {"hipDeviceSetLimit", "", CONV_CONTEXT, API_DRIVER, 8, HIP_UNSUPPORTED}}, + {"cuCtxSetLimit", {"hipDeviceSetLimit", "", CONV_CONTEXT, API_DRIVER, 8, HIP_EXPERIMENTAL}}, // cudaDeviceSetSharedMemConfig // TODO: rename to hipDeviceSetSharedMemConfig {"cuCtxSetSharedMemConfig", {"hipCtxSetSharedMemConfig", "", CONV_CONTEXT, API_DRIVER, 8, HIP_DEPRECATED}}, @@ -345,50 +345,50 @@ const std::map CUDA_DRIVER_FUNCTION_MAP { // 12. Virtual Memory Management // no analogue - {"cuMemAddressFree", {"hipMemAddressFree", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12, HIP_EXPERIMENTAL}}, - {"cuMemAddressReserve", {"hipMemAddressReserve", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12, HIP_EXPERIMENTAL}}, - {"cuMemCreate", {"hipMemCreate", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12, HIP_EXPERIMENTAL}}, - {"cuMemExportToShareableHandle", {"hipMemExportToShareableHandle", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12, HIP_EXPERIMENTAL}}, - {"cuMemGetAccess", {"hipMemGetAccess", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12, HIP_EXPERIMENTAL}}, - {"cuMemGetAllocationGranularity", {"hipMemGetAllocationGranularity", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12, HIP_EXPERIMENTAL}}, - {"cuMemGetAllocationPropertiesFromHandle", {"hipMemGetAllocationPropertiesFromHandle", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12, HIP_EXPERIMENTAL}}, - {"cuMemImportFromShareableHandle", {"hipMemImportFromShareableHandle", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12, HIP_EXPERIMENTAL}}, - {"cuMemMap", {"hipMemMap", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12, HIP_EXPERIMENTAL}}, - {"cuMemRelease", {"hipMemRelease", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12, HIP_EXPERIMENTAL}}, - {"cuMemRetainAllocationHandle", {"hipMemRetainAllocationHandle", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12, HIP_EXPERIMENTAL}}, - {"cuMemSetAccess", {"hipMemSetAccess", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12, HIP_EXPERIMENTAL}}, - {"cuMemUnmap", {"hipMemUnmap", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12, HIP_EXPERIMENTAL}}, - {"cuMemMapArrayAsync", {"hipMemMapArrayAsync", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12, HIP_EXPERIMENTAL}}, + {"cuMemAddressFree", {"hipMemAddressFree", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12}}, + {"cuMemAddressReserve", {"hipMemAddressReserve", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12}}, + {"cuMemCreate", {"hipMemCreate", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12}}, + {"cuMemExportToShareableHandle", {"hipMemExportToShareableHandle", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12}}, + {"cuMemGetAccess", {"hipMemGetAccess", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12}}, + {"cuMemGetAllocationGranularity", {"hipMemGetAllocationGranularity", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12}}, + {"cuMemGetAllocationPropertiesFromHandle", {"hipMemGetAllocationPropertiesFromHandle", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12}}, + {"cuMemImportFromShareableHandle", {"hipMemImportFromShareableHandle", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12}}, + {"cuMemMap", {"hipMemMap", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12}}, + {"cuMemRelease", {"hipMemRelease", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12}}, + {"cuMemRetainAllocationHandle", {"hipMemRetainAllocationHandle", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12}}, + {"cuMemSetAccess", {"hipMemSetAccess", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12}}, + {"cuMemUnmap", {"hipMemUnmap", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12}}, + {"cuMemMapArrayAsync", {"hipMemMapArrayAsync", "", CONV_VIRTUAL_MEMORY, API_DRIVER, 12}}, // 13. Stream Ordered Memory Allocator // cudaFreeAsync - {"cuMemFreeAsync", {"hipFreeAsync", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13, HIP_EXPERIMENTAL}}, + {"cuMemFreeAsync", {"hipFreeAsync", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13}}, // cudaMallocAsync - {"cuMemAllocAsync", {"hipMallocAsync", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13, HIP_EXPERIMENTAL}}, + {"cuMemAllocAsync", {"hipMallocAsync", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13}}, // cudaMemPoolTrimTo - {"cuMemPoolTrimTo", {"hipMemPoolTrimTo", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13, HIP_EXPERIMENTAL}}, + {"cuMemPoolTrimTo", {"hipMemPoolTrimTo", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13}}, // cudaMemPoolSetAttribute - {"cuMemPoolSetAttribute", {"hipMemPoolSetAttribute", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13, HIP_EXPERIMENTAL}}, + {"cuMemPoolSetAttribute", {"hipMemPoolSetAttribute", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13}}, // cudaMemPoolGetAttribute - {"cuMemPoolGetAttribute", {"hipMemPoolGetAttribute", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13, HIP_EXPERIMENTAL}}, + {"cuMemPoolGetAttribute", {"hipMemPoolGetAttribute", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13}}, // cudaMemPoolSetAccess - {"cuMemPoolSetAccess", {"hipMemPoolSetAccess", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13, HIP_EXPERIMENTAL}}, + {"cuMemPoolSetAccess", {"hipMemPoolSetAccess", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13}}, // cudaMemPoolGetAccess - {"cuMemPoolGetAccess", {"hipMemPoolGetAccess", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13, HIP_EXPERIMENTAL}}, + {"cuMemPoolGetAccess", {"hipMemPoolGetAccess", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13}}, // cudaMemPoolCreate - {"cuMemPoolCreate", {"hipMemPoolCreate", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13, HIP_EXPERIMENTAL}}, + {"cuMemPoolCreate", {"hipMemPoolCreate", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13}}, // cudaMemPoolDestroy - {"cuMemPoolDestroy", {"hipMemPoolDestroy", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13, HIP_EXPERIMENTAL}}, + {"cuMemPoolDestroy", {"hipMemPoolDestroy", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13}}, // cudaMallocFromPoolAsync - {"cuMemAllocFromPoolAsync", {"hipMallocFromPoolAsync", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13, HIP_EXPERIMENTAL}}, + {"cuMemAllocFromPoolAsync", {"hipMallocFromPoolAsync", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13}}, // cudaMemPoolExportToShareableHandle - {"cuMemPoolExportToShareableHandle", {"hipMemPoolExportToShareableHandle", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13, HIP_EXPERIMENTAL}}, + {"cuMemPoolExportToShareableHandle", {"hipMemPoolExportToShareableHandle", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13}}, // cudaMemPoolImportFromShareableHandle - {"cuMemPoolImportFromShareableHandle", {"hipMemPoolImportFromShareableHandle", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13, HIP_EXPERIMENTAL}}, + {"cuMemPoolImportFromShareableHandle", {"hipMemPoolImportFromShareableHandle", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13}}, // cudaMemPoolExportPointer - {"cuMemPoolExportPointer", {"hipMemPoolExportPointer", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13, HIP_EXPERIMENTAL}}, + {"cuMemPoolExportPointer", {"hipMemPoolExportPointer", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13}}, // cudaMemPoolImportPointer - {"cuMemPoolImportPointer", {"hipMemPoolImportPointer", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13, HIP_EXPERIMENTAL}}, + {"cuMemPoolImportPointer", {"hipMemPoolImportPointer", "", CONV_STREAM_ORDERED_MEMORY, API_DRIVER, 13}}, // 14. Unified Addressing // cudaMemAdvise @@ -451,7 +451,7 @@ const std::map CUDA_DRIVER_FUNCTION_MAP { // cudaStreamWaitEvent {"cuStreamWaitEvent", {"hipStreamWaitEvent", "", CONV_STREAM, API_DRIVER, 15}}, // cudaThreadExchangeStreamCaptureMode - {"cuThreadExchangeStreamCaptureMode", {"hipThreadExchangeStreamCaptureMode", "", CONV_STREAM, API_DRIVER, 15, HIP_EXPERIMENTAL}}, + {"cuThreadExchangeStreamCaptureMode", {"hipThreadExchangeStreamCaptureMode", "", CONV_STREAM, API_DRIVER, 15}}, // 16. Event Management // cudaEventCreateWithFlags @@ -539,7 +539,7 @@ const std::map CUDA_DRIVER_FUNCTION_MAP { // NOTE: Not equal to cudaLaunchCooperativeKernelMultiDevice due to different signatures {"cuLaunchCooperativeKernelMultiDevice", {"hipLaunchCooperativeKernelMultiDevice_", "", CONV_EXECUTION, API_DRIVER, 19, HIP_UNSUPPORTED | CUDA_DEPRECATED}}, // cudaLaunchHostFunc - {"cuLaunchHostFunc", {"hipLaunchHostFunc", "", CONV_EXECUTION, API_DRIVER, 19, HIP_EXPERIMENTAL}}, + {"cuLaunchHostFunc", {"hipLaunchHostFunc", "", CONV_EXECUTION, API_DRIVER, 19}}, // no analogue // NOTE: Not equal to cudaLaunchKernel due to different signatures {"cuLaunchKernel", {"hipModuleLaunchKernel", "", CONV_EXECUTION, API_DRIVER, 19}}, @@ -618,13 +618,13 @@ const std::map CUDA_DRIVER_FUNCTION_MAP { // cudaGraphKernelNodeCopyAttributes {"cuGraphKernelNodeCopyAttributes", {"hipGraphKernelNodeCopyAttributes", "", CONV_GRAPH, API_DRIVER, 21, HIP_UNSUPPORTED}}, // cudaGraphKernelNodeGetAttribute - {"cuGraphKernelNodeGetAttribute", {"hipGraphKernelNodeGetAttribute", "", CONV_GRAPH, API_DRIVER, 21, HIP_EXPERIMENTAL}}, + {"cuGraphKernelNodeGetAttribute", {"hipGraphKernelNodeGetAttribute", "", CONV_GRAPH, API_DRIVER, 21}}, // cudaGraphExecKernelNodeSetParams {"cuGraphExecKernelNodeSetParams", {"hipGraphExecKernelNodeSetParams", "", CONV_GRAPH, API_DRIVER, 21}}, // cudaGraphKernelNodeGetParams {"cuGraphKernelNodeGetParams", {"hipGraphKernelNodeGetParams", "", CONV_GRAPH, API_DRIVER, 21}}, // cudaGraphKernelNodeSetAttribute - {"cuGraphKernelNodeSetAttribute", {"hipGraphKernelNodeSetAttribute", "", CONV_GRAPH, API_DRIVER, 21, HIP_EXPERIMENTAL}}, + {"cuGraphKernelNodeSetAttribute", {"hipGraphKernelNodeSetAttribute", "", CONV_GRAPH, API_DRIVER, 21}}, // cudaGraphKernelNodeSetParams {"cuGraphKernelNodeSetParams", {"hipGraphKernelNodeSetParams", "", CONV_GRAPH, API_DRIVER, 21}}, // cudaGraphLaunch @@ -684,7 +684,7 @@ const std::map CUDA_DRIVER_FUNCTION_MAP { // cudaGraphExecEventWaitNodeSetEvent {"cuGraphExecEventWaitNodeSetEvent", {"hipGraphExecEventWaitNodeSetEvent", "", CONV_GRAPH, API_DRIVER, 21}}, // cudaGraphUpload - {"cuGraphUpload", {"hipGraphUpload", "", CONV_GRAPH, API_DRIVER, 21, HIP_UNSUPPORTED}}, + {"cuGraphUpload", {"hipGraphUpload", "", CONV_GRAPH, API_DRIVER, 21, HIP_EXPERIMENTAL}}, // cudaGraphAddExternalSemaphoresSignalNode {"cuGraphAddExternalSemaphoresSignalNode", {"hipGraphAddExternalSemaphoresSignalNode", "", CONV_GRAPH, API_DRIVER, 21, HIP_UNSUPPORTED}}, // cudaGraphExternalSemaphoresSignalNodeGetParams @@ -702,15 +702,15 @@ const std::map CUDA_DRIVER_FUNCTION_MAP { // cudaGraphExecExternalSemaphoresWaitNodeSetParams {"cuGraphExecExternalSemaphoresWaitNodeSetParams", {"hipGraphExecExternalSemaphoresWaitNodeSetParams", "", CONV_GRAPH, API_DRIVER, 21, HIP_UNSUPPORTED}}, // cudaUserObjectCreate - {"cuUserObjectCreate", {"hipUserObjectCreate", "", CONV_GRAPH, API_DRIVER, 21, HIP_UNSUPPORTED}}, + {"cuUserObjectCreate", {"hipUserObjectCreate", "", CONV_GRAPH, API_DRIVER, 21, HIP_EXPERIMENTAL}}, // cudaUserObjectRetain - {"cuUserObjectRetain", {"hipUserObjectRetain", "", CONV_GRAPH, API_DRIVER, 21, HIP_UNSUPPORTED}}, + {"cuUserObjectRetain", {"hipUserObjectRetain", "", CONV_GRAPH, API_DRIVER, 21, HIP_EXPERIMENTAL}}, // cudaUserObjectRelease - {"cuUserObjectRelease", {"hipUserObjectRelease", "", CONV_GRAPH, API_DRIVER, 21, HIP_UNSUPPORTED}}, + {"cuUserObjectRelease", {"hipUserObjectRelease", "", CONV_GRAPH, API_DRIVER, 21, HIP_EXPERIMENTAL}}, // cudaGraphRetainUserObject - {"cuGraphRetainUserObject", {"hipGraphRetainUserObject", "", CONV_GRAPH, API_DRIVER, 21, HIP_UNSUPPORTED}}, + {"cuGraphRetainUserObject", {"hipGraphRetainUserObject", "", CONV_GRAPH, API_DRIVER, 21, HIP_EXPERIMENTAL}}, // cudaGraphReleaseUserObject - {"cuGraphReleaseUserObject", {"hipGraphReleaseUserObject", "", CONV_GRAPH, API_DRIVER, 21, HIP_UNSUPPORTED}}, + {"cuGraphReleaseUserObject", {"hipGraphReleaseUserObject", "", CONV_GRAPH, API_DRIVER, 21, HIP_EXPERIMENTAL}}, // cudaGraphAddMemAllocNode {"cuGraphAddMemAllocNode", {"hipGraphAddMemAllocNode", "", CONV_GRAPH, API_DRIVER, 21, HIP_UNSUPPORTED}}, // cudaGraphMemAllocNodeGetParams @@ -720,11 +720,11 @@ const std::map CUDA_DRIVER_FUNCTION_MAP { // cudaGraphMemFreeNodeGetParams {"cuGraphMemFreeNodeGetParams", {"hipGraphMemFreeNodeGetParams", "", CONV_GRAPH, API_DRIVER, 21, HIP_UNSUPPORTED}}, // cudaDeviceGraphMemTrim - {"cuDeviceGraphMemTrim", {"hipDeviceGraphMemTrim", "", CONV_GRAPH, API_DRIVER, 21, HIP_UNSUPPORTED}}, + {"cuDeviceGraphMemTrim", {"hipDeviceGraphMemTrim", "", CONV_GRAPH, API_DRIVER, 21, HIP_EXPERIMENTAL}}, // cudaDeviceGetGraphMemAttribute - {"cuDeviceGetGraphMemAttribute", {"hipDeviceGetGraphMemAttribute", "", CONV_GRAPH, API_DRIVER, 21, HIP_UNSUPPORTED}}, + {"cuDeviceGetGraphMemAttribute", {"hipDeviceGetGraphMemAttribute", "", CONV_GRAPH, API_DRIVER, 21, HIP_EXPERIMENTAL}}, // cudaDeviceSetGraphMemAttribute - {"cuDeviceSetGraphMemAttribute", {"hipDeviceSetGraphMemAttribute", "", CONV_GRAPH, API_DRIVER, 21, HIP_UNSUPPORTED}}, + {"cuDeviceSetGraphMemAttribute", {"hipDeviceSetGraphMemAttribute", "", CONV_GRAPH, API_DRIVER, 21, HIP_EXPERIMENTAL}}, // cudaGraphInstantiateWithFlags {"cuGraphInstantiateWithFlags", {"hipGraphInstantiateWithFlags", "", CONV_GRAPH, API_DRIVER, 21}}, // @@ -769,17 +769,17 @@ const std::map CUDA_DRIVER_FUNCTION_MAP { {"cuTexRefSetAddress2D", {"hipTexRefSetAddress2D", "", CONV_TEXTURE, API_DRIVER, 23, DEPRECATED}}, {"cuTexRefSetAddress2D_v2", {"hipTexRefSetAddress2D", "", CONV_TEXTURE, API_DRIVER, 23, HIP_DEPRECATED}}, {"cuTexRefSetAddress2D_v3", {"hipTexRefSetAddress2D", "", CONV_TEXTURE, API_DRIVER, 23, HIP_DEPRECATED}}, - {"cuTexRefSetAddressMode", {"hipTexRefSetAddressMode", "", CONV_TEXTURE, API_DRIVER, 23, CUDA_DEPRECATED}}, - {"cuTexRefSetArray", {"hipTexRefSetArray", "", CONV_TEXTURE, API_DRIVER, 23, CUDA_DEPRECATED}}, + {"cuTexRefSetAddressMode", {"hipTexRefSetAddressMode", "", CONV_TEXTURE, API_DRIVER, 23, DEPRECATED}}, + {"cuTexRefSetArray", {"hipTexRefSetArray", "", CONV_TEXTURE, API_DRIVER, 23, DEPRECATED}}, {"cuTexRefSetBorderColor", {"hipTexRefSetBorderColor", "", CONV_TEXTURE, API_DRIVER, 23, DEPRECATED}}, - {"cuTexRefSetFilterMode", {"hipTexRefSetFilterMode", "", CONV_TEXTURE, API_DRIVER, 23, CUDA_DEPRECATED}}, - {"cuTexRefSetFlags", {"hipTexRefSetFlags", "", CONV_TEXTURE, API_DRIVER, 23, CUDA_DEPRECATED}}, - {"cuTexRefSetFormat", {"hipTexRefSetFormat", "", CONV_TEXTURE, API_DRIVER, 23, CUDA_DEPRECATED}}, + {"cuTexRefSetFilterMode", {"hipTexRefSetFilterMode", "", CONV_TEXTURE, API_DRIVER, 23, DEPRECATED}}, + {"cuTexRefSetFlags", {"hipTexRefSetFlags", "", CONV_TEXTURE, API_DRIVER, 23, DEPRECATED}}, + {"cuTexRefSetFormat", {"hipTexRefSetFormat", "", CONV_TEXTURE, API_DRIVER, 23, DEPRECATED}}, {"cuTexRefSetMaxAnisotropy", {"hipTexRefSetMaxAnisotropy", "", CONV_TEXTURE, API_DRIVER, 23, DEPRECATED}}, - {"cuTexRefSetMipmapFilterMode", {"hipTexRefSetMipmapFilterMode", "", CONV_TEXTURE, API_DRIVER, 23, CUDA_DEPRECATED}}, - {"cuTexRefSetMipmapLevelBias", {"hipTexRefSetMipmapLevelBias", "", CONV_TEXTURE, API_DRIVER, 23, CUDA_DEPRECATED}}, - {"cuTexRefSetMipmapLevelClamp", {"hipTexRefSetMipmapLevelClamp", "", CONV_TEXTURE, API_DRIVER, 23, CUDA_DEPRECATED}}, - {"cuTexRefSetMipmappedArray", {"hipTexRefSetMipmappedArray", "", CONV_TEXTURE, API_DRIVER, 23, CUDA_DEPRECATED}}, + {"cuTexRefSetMipmapFilterMode", {"hipTexRefSetMipmapFilterMode", "", CONV_TEXTURE, API_DRIVER, 23, DEPRECATED}}, + {"cuTexRefSetMipmapLevelBias", {"hipTexRefSetMipmapLevelBias", "", CONV_TEXTURE, API_DRIVER, 23, DEPRECATED}}, + {"cuTexRefSetMipmapLevelClamp", {"hipTexRefSetMipmapLevelClamp", "", CONV_TEXTURE, API_DRIVER, 23, DEPRECATED}}, + {"cuTexRefSetMipmappedArray", {"hipTexRefSetMipmappedArray", "", CONV_TEXTURE, API_DRIVER, 23, DEPRECATED}}, {"cuTexRefCreate", {"hipTexRefCreate", "", CONV_TEXTURE, API_DRIVER, 23, HIP_UNSUPPORTED | CUDA_DEPRECATED}}, {"cuTexRefDestroy", {"hipTexRefDestroy", "", CONV_TEXTURE, API_DRIVER, 23, HIP_UNSUPPORTED | CUDA_DEPRECATED}}, @@ -1363,17 +1363,17 @@ const std::map HIP_DRIVER_FUNCTION_VER_MAP { {"hipTexRefGetMipMappedArray", {HIP_3050, HIP_4030, HIP_0 }}, {"hipTexRefSetAddress", {HIP_1070, HIP_4030, HIP_0 }}, {"hipTexRefSetAddress2D", {HIP_1070, HIP_4030, HIP_0 }}, - {"hipTexRefSetAddressMode", {HIP_1090, HIP_0, HIP_0 }}, - {"hipTexRefSetArray", {HIP_1090, HIP_0, HIP_0 }}, + {"hipTexRefSetAddressMode", {HIP_1090, HIP_5030, HIP_0 }}, + {"hipTexRefSetArray", {HIP_1090, HIP_5030, HIP_0 }}, {"hipTexRefSetBorderColor", {HIP_3050, HIP_4030, HIP_0 }}, - {"hipTexRefSetFilterMode", {HIP_1090, HIP_0, HIP_0 }}, - {"hipTexRefSetFlags", {HIP_1090, HIP_0, HIP_0 }}, - {"hipTexRefSetFormat", {HIP_1090, HIP_0, HIP_0 }}, + {"hipTexRefSetFilterMode", {HIP_1090, HIP_5030, HIP_0 }}, + {"hipTexRefSetFlags", {HIP_1090, HIP_5030, HIP_0 }}, + {"hipTexRefSetFormat", {HIP_1090, HIP_5030, HIP_0 }}, {"hipTexRefSetMaxAnisotropy", {HIP_3050, HIP_4030, HIP_0 }}, - {"hipTexRefSetMipmapFilterMode", {HIP_3050, HIP_0, HIP_0 }}, - {"hipTexRefSetMipmapLevelBias", {HIP_3050, HIP_0, HIP_0 }}, - {"hipTexRefSetMipmapLevelClamp", {HIP_3050, HIP_0, HIP_0 }}, - {"hipTexRefSetMipmappedArray", {HIP_3050, HIP_0, HIP_0 }}, + {"hipTexRefSetMipmapFilterMode", {HIP_3050, HIP_5030, HIP_0 }}, + {"hipTexRefSetMipmapLevelBias", {HIP_3050, HIP_5030, HIP_0 }}, + {"hipTexRefSetMipmapLevelClamp", {HIP_3050, HIP_5030, HIP_0 }}, + {"hipTexRefSetMipmappedArray", {HIP_3050, HIP_5030, HIP_0 }}, {"hipTexObjectCreate", {HIP_3050, HIP_0, HIP_0 }}, {"hipTexObjectDestroy", {HIP_3050, HIP_0, HIP_0 }}, {"hipTexObjectGetResourceDesc", {HIP_3050, HIP_0, HIP_0 }}, @@ -1395,21 +1395,23 @@ const std::map HIP_DRIVER_FUNCTION_VER_MAP { {"hipStreamUpdateCaptureDependencies", {HIP_5000, HIP_0, HIP_0 }}, {"hipGraphicsGLRegisterImage", {HIP_5010, HIP_0, HIP_0 }}, {"hipGraphicsSubResourceGetMappedArray", {HIP_5010, HIP_0, HIP_0 }}, - {"hipDeviceGetUuid", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemAddressFree", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemAddressReserve", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemCreate", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemExportToShareableHandle", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemGetAccess", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemGetAllocationGranularity", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemGetAllocationPropertiesFromHandle", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemImportFromShareableHandle", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemMap", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemMapArrayAsync", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemRelease", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemRetainAllocationHandle", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemSetAccess", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemUnmap", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, + {"hipDeviceGetUuid", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemAddressFree", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemAddressReserve", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemCreate", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemExportToShareableHandle", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemGetAccess", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemGetAllocationGranularity", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemGetAllocationPropertiesFromHandle", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemImportFromShareableHandle", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemMap", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemMapArrayAsync", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemRelease", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemRetainAllocationHandle", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemSetAccess", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemUnmap", {HIP_5020, HIP_0, HIP_0 }}, + {"hipDrvGetErrorName", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipDrvGetErrorString", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, }; const std::map CUDA_DRIVER_API_SECTION_MAP { diff --git a/src/CUDA2HIP_Driver_API_types.cpp b/src/CUDA2HIP_Driver_API_types.cpp index 4545db62..370980ef 100644 --- a/src/CUDA2HIP_Driver_API_types.cpp +++ b/src/CUDA2HIP_Driver_API_types.cpp @@ -223,27 +223,27 @@ const std::map CUDA_DRIVER_TYPE_NAME_MAP { {"CUtexref", {"hipTexRef", "", CONV_TYPE, API_DRIVER, 1}}, // CUuuid_st - {"CUuuid_st", {"hipUUID_t", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUuuid", {"hipUUID", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUuuid_st", {"hipUUID_t", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUuuid", {"hipUUID", "", CONV_TYPE, API_DRIVER, 1}}, // cudaMemLocation - {"CUmemLocation_st", {"hipMemLocation", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemLocation", {"hipMemLocation", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemLocation_v1", {"hipMemLocation", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUmemLocation_st", {"hipMemLocation", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemLocation", {"hipMemLocation", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemLocation_v1", {"hipMemLocation", "", CONV_TYPE, API_DRIVER, 1}}, // no analogue - {"CUmemAllocationProp_st", {"hipMemAllocationProp", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemAllocationProp", {"hipMemAllocationProp", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemAllocationProp_v1", {"hipMemAllocationProp", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUmemAllocationProp_st", {"hipMemAllocationProp", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemAllocationProp", {"hipMemAllocationProp", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemAllocationProp_v1", {"hipMemAllocationProp", "", CONV_TYPE, API_DRIVER, 1}}, // cudaMemAccessDesc - {"CUmemAccessDesc_st", {"hipMemAccessDesc", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemAccessDesc", {"hipMemAccessDesc", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemAccessDesc_v1", {"hipMemAccessDesc", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUmemAccessDesc_st", {"hipMemAccessDesc", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemAccessDesc", {"hipMemAccessDesc", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemAccessDesc_v1", {"hipMemAccessDesc", "", CONV_TYPE, API_DRIVER, 1}}, // cudaAccessPolicyWindow - {"CUaccessPolicyWindow_st", {"hipAccessPolicyWindow", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUaccessPolicyWindow", {"hipAccessPolicyWindow", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUaccessPolicyWindow_st", {"hipAccessPolicyWindow", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUaccessPolicyWindow", {"hipAccessPolicyWindow", "", CONV_TYPE, API_DRIVER, 1}}, // cudaArraySparseProperties {"CUDA_ARRAY_SPARSE_PROPERTIES_st", {"hipArraySparseProperties", "", CONV_TYPE, API_DRIVER, 1, HIP_UNSUPPORTED}}, @@ -251,14 +251,14 @@ const std::map CUDA_DRIVER_TYPE_NAME_MAP { {"CUDA_ARRAY_SPARSE_PROPERTIES_v1", {"hipArraySparseProperties", "", CONV_TYPE, API_DRIVER, 1, HIP_UNSUPPORTED}}, // no analogue - {"CUarrayMapInfo_st", {"hipArrayMapInfo", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUarrayMapInfo", {"hipArrayMapInfo", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUarrayMapInfo_v1", {"hipArrayMapInfo", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUarrayMapInfo_st", {"hipArrayMapInfo", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUarrayMapInfo", {"hipArrayMapInfo", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUarrayMapInfo_v1", {"hipArrayMapInfo", "", CONV_TYPE, API_DRIVER, 1}}, // - {"CUmemPoolHandle_st", {"ihipMemPoolHandle_t", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUmemPoolHandle_st", {"ihipMemPoolHandle_t", "", CONV_TYPE, API_DRIVER, 1}}, // cudaMemPool_t - {"CUmemoryPool", {"hipMemPool_t", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUmemoryPool", {"hipMemPool_t", "", CONV_TYPE, API_DRIVER, 1}}, // cudaExternalSemaphoreSignalNodeParams {"CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st", {"hipExternalSemaphoreSignalNodeParams", "", CONV_TYPE, API_DRIVER, 1, HIP_UNSUPPORTED}}, @@ -271,19 +271,19 @@ const std::map CUDA_DRIVER_TYPE_NAME_MAP { {"CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1", {"hipExternalSemaphoreWaitNodeParams", "", CONV_TYPE, API_DRIVER, 1, HIP_UNSUPPORTED}}, // cudaMemPoolProps - {"CUmemPoolProps_st", {"hipMemPoolProps", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemPoolProps", {"hipMemPoolProps", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemPoolProps_v1", {"hipMemPoolProps", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUmemPoolProps_st", {"hipMemPoolProps", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemPoolProps", {"hipMemPoolProps", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemPoolProps_v1", {"hipMemPoolProps", "", CONV_TYPE, API_DRIVER, 1}}, // cudaMemPoolPtrExportData - {"CUmemPoolPtrExportData_st", {"hipMemPoolPtrExportData", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemPoolPtrExportData", {"hipMemPoolPtrExportData", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemPoolPtrExportData_v1", {"hipMemPoolPtrExportData", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUmemPoolPtrExportData_st", {"hipMemPoolPtrExportData", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemPoolPtrExportData", {"hipMemPoolPtrExportData", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemPoolPtrExportData_v1", {"hipMemPoolPtrExportData", "", CONV_TYPE, API_DRIVER, 1}}, // - {"CUuserObject_st", {"hipUserObject", "", CONV_TYPE, API_DRIVER, 1, HIP_UNSUPPORTED}}, + {"CUuserObject_st", {"hipUserObject", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // cudaUserObject_t - {"CUuserObject", {"hipUserObject_t", "", CONV_TYPE, API_DRIVER, 1, HIP_UNSUPPORTED}}, + {"CUuserObject", {"hipUserObject_t", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // {"CUexecAffinitySmCount_st", {"hipExecAffinitySmCount", "", CONV_TYPE, API_DRIVER, 1, HIP_UNSUPPORTED}}, @@ -319,9 +319,9 @@ const std::map CUDA_DRIVER_TYPE_NAME_MAP { {"CUstreamBatchMemOpParams_union", {"hipStreamBatchMemOpParams", "", CONV_TYPE, API_DRIVER, 1, HIP_UNSUPPORTED}}, // cudaKernelNodeAttrValue - {"CUkernelNodeAttrValue", {"hipKernelNodeAttrValue", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUkernelNodeAttrValue_v1", {"hipKernelNodeAttrValue", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUkernelNodeAttrValue_union", {"hipKernelNodeAttrValue", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUkernelNodeAttrValue", {"hipKernelNodeAttrValue", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUkernelNodeAttrValue_v1", {"hipKernelNodeAttrValue", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUkernelNodeAttrValue_union", {"hipKernelNodeAttrValue", "", CONV_TYPE, API_DRIVER, 1}}, // cudaStreamAttrValue {"CUstreamAttrValue", {"hipStreamAttrValue", "", CONV_TYPE, API_DRIVER, 1, HIP_UNSUPPORTED}}, @@ -691,9 +691,9 @@ const std::map CUDA_DRIVER_TYPE_NAME_MAP { // cudaDevAttrDirectManagedMemAccessFromHost {"CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST", {"hipDeviceAttributeDirectManagedMemAccessFromHost", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 101 // no analogue - {"CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED", {"hipDeviceAttributeVirtualMemoryManagementSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED | CUDA_DEPRECATED}}, // 102 + {"CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED", {"hipDeviceAttributeVirtualAddressManagementSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED | CUDA_DEPRECATED}}, // 102 // no analogue - {"CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED", {"hipDeviceAttributeVirtualMemoryManagementSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // 102 + {"CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED", {"hipDeviceAttributeVirtualMemoryManagementSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 102 // no analogue {"CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED", {"hipDeviceAttributeHandleTypePosixFileDescriptorSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // 103 // no analogue @@ -720,7 +720,7 @@ const std::map CUDA_DRIVER_TYPE_NAME_MAP { // cudaDevAttrMaxTimelineSemaphoreInteropSupported {"CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED", {"hipDeviceAttributeMaxTimelineSemaphoreInteropSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // 114 // cudaDevAttrMemoryPoolsSupported - {"CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED", {"hipDeviceAttributeMemoryPoolsSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 115 + {"CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED", {"hipDeviceAttributeMemoryPoolsSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 115 // cudaDevAttrGPUDirectRDMASupported {"CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED", {"hipDeviceAttributeGpuDirectRdmaSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // 116 // cudaDevAttrGPUDirectRDMAFlushWritesOptions @@ -1084,9 +1084,9 @@ const std::map CUDA_DRIVER_TYPE_NAME_MAP { // cudaGraphNodeTypeEventRecord = 0x07 {"CU_GRAPH_NODE_TYPE_EVENT_RECORD", {"hipGraphNodeTypeEventRecord", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 7 // cudaGraphNodeTypeExtSemaphoreSignal - {"CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL", {"hipGraphNodeTypeExtSemasSignal", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // 8 + {"CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL", {"hipGraphNodeTypeExtSemaphoreSignal", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 8 // cudaGraphNodeTypeExtSemaphoreWait - {"CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT", {"hipGraphNodeTypeExtSemasWait", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // 9 + {"CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT", {"hipGraphNodeTypeExtSemaphoreWait", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 9 // cudaGraphNodeTypeMemAlloc {"CU_GRAPH_NODE_TYPE_MEM_ALLOC", {"hipGraphNodeTypeMemAlloc", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // 10 // cudaGraphNodeTypeMemFree @@ -1231,7 +1231,7 @@ const std::map CUDA_DRIVER_TYPE_NAME_MAP { {"CUlimit_enum", {"hipLimit_t", "", CONV_TYPE, API_DRIVER, 1}}, // CUlimit enum values // cudaLimitStackSize - {"CU_LIMIT_STACK_SIZE", {"hipLimitStackSize", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // 0x00 + {"CU_LIMIT_STACK_SIZE", {"hipLimitStackSize", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 0x00 // cudaLimitPrintfFifoSize {"CU_LIMIT_PRINTF_FIFO_SIZE", {"hipLimitPrintfFifoSize", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 0x01 // cudaLimitMallocHeapSize @@ -1785,72 +1785,72 @@ const std::map CUDA_DRIVER_TYPE_NAME_MAP { {"CU_D3D11_DEVICE_LIST_NEXT_FRAME", {"HIP_D3D11_DEVICE_LIST_NEXT_FRAME", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // 0x03 // cudaMemAllocationHandleType - {"CUmemAllocationHandleType", {"hipMemAllocationHandleType", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemAllocationHandleType_enum", {"hipMemAllocationHandleType", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUmemAllocationHandleType", {"hipMemAllocationHandleType", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemAllocationHandleType_enum", {"hipMemAllocationHandleType", "", CONV_TYPE, API_DRIVER, 1}}, // CUmemAllocationHandleType enum values // cudaMemHandleTypeNone - {"CU_MEM_HANDLE_TYPE_NONE", {"hipMemHandleTypeNone", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 0x0 + {"CU_MEM_HANDLE_TYPE_NONE", {"hipMemHandleTypeNone", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 0x0 // cudaMemHandleTypePosixFileDescriptor - {"CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR", {"hipMemHandleTypePosixFileDescriptor", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 0x1 + {"CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR", {"hipMemHandleTypePosixFileDescriptor", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 0x1 // cudaMemHandleTypeWin32 - {"CU_MEM_HANDLE_TYPE_WIN32", {"hipMemHandleTypeWin32", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 0x2 + {"CU_MEM_HANDLE_TYPE_WIN32", {"hipMemHandleTypeWin32", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 0x2 // cudaMemHandleTypeWin32Kmt - {"CU_MEM_HANDLE_TYPE_WIN32_KMT", {"hipMemHandleTypeWin32Kmt", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 0x4 + {"CU_MEM_HANDLE_TYPE_WIN32_KMT", {"hipMemHandleTypeWin32Kmt", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 0x4 // no analogue {"CU_MEM_HANDLE_TYPE_MAX", {"hipMemHandleTypeMax", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // 0x7FFFFFFF // cudaMemAccessFlags - {"CUmemAccess_flags", {"hipMemAccessFlags", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemAccess_flags_enum", {"hipMemAccessFlags", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUmemAccess_flags", {"hipMemAccessFlags", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemAccess_flags_enum", {"hipMemAccessFlags", "", CONV_TYPE, API_DRIVER, 1}}, // CUmemAccess_flags enum values // cudaMemAccessFlagsProtNone - {"CU_MEM_ACCESS_FLAGS_PROT_NONE", {"hipMemAccessFlagsProtNone", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 0x0 + {"CU_MEM_ACCESS_FLAGS_PROT_NONE", {"hipMemAccessFlagsProtNone", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 0x0 // cudaMemAccessFlagsProtRead - {"CU_MEM_ACCESS_FLAGS_PROT_READ", {"hipMemAccessFlagsProtRead", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 0x1 + {"CU_MEM_ACCESS_FLAGS_PROT_READ", {"hipMemAccessFlagsProtRead", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 0x1 // cudaMemAccessFlagsProtReadWrite - {"CU_MEM_ACCESS_FLAGS_PROT_READWRITE", {"hipMemAccessFlagsProtReadWrite", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 0x3 + {"CU_MEM_ACCESS_FLAGS_PROT_READWRITE", {"hipMemAccessFlagsProtReadWrite", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 0x3 // no analogue {"CU_MEM_ACCESS_FLAGS_PROT_MAX", {"hipMemAccessFlagsProtMax", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // 0x7FFFFFFF // cudaMemLocationType - {"CUmemLocationType", {"hipMemLocationType", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemLocationType_enum", {"hipMemLocationType", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUmemLocationType", {"hipMemLocationType", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemLocationType_enum", {"hipMemLocationType", "", CONV_TYPE, API_DRIVER, 1}}, // CUmemLocationType enum values // cudaMemLocationTypeInvalid - {"CU_MEM_LOCATION_TYPE_INVALID", {"hipMemLocationTypeInvalid", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 0x0 + {"CU_MEM_LOCATION_TYPE_INVALID", {"hipMemLocationTypeInvalid", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 0x0 // cudaMemLocationTypeDevice - {"CU_MEM_LOCATION_TYPE_DEVICE", {"hipMemLocationTypeDevice", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 0x1 + {"CU_MEM_LOCATION_TYPE_DEVICE", {"hipMemLocationTypeDevice", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 0x1 // no analogue {"CU_MEM_LOCATION_TYPE_MAX", {"hipMemLocationTypeMax", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // 0x7FFFFFFF // cudaMemAllocationType - {"CUmemAllocationType", {"hipMemAllocationType", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemAllocationType_enum", {"hipMemAllocationType", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUmemAllocationType", {"hipMemAllocationType", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemAllocationType_enum", {"hipMemAllocationType", "", CONV_TYPE, API_DRIVER, 1}}, // CUmemAllocationType enum values // cudaMemAllocationTypeInvalid - {"CU_MEM_ALLOCATION_TYPE_INVALID", {"hipMemAllocationTypeInvalid", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 0x0 + {"CU_MEM_ALLOCATION_TYPE_INVALID", {"hipMemAllocationTypeInvalid", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 0x0 // cudaMemAllocationTypePinned - {"CU_MEM_ALLOCATION_TYPE_PINNED", {"hipMemAllocationTypePinned", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 0x1 + {"CU_MEM_ALLOCATION_TYPE_PINNED", {"hipMemAllocationTypePinned", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 0x1 // cudaMemAllocationTypeMax - {"CU_MEM_ALLOCATION_TYPE_MAX", {"hipMemAllocationTypeMax", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 0x7FFFFFFF + {"CU_MEM_ALLOCATION_TYPE_MAX", {"hipMemAllocationTypeMax", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 0x7FFFFFFF // no analogue - {"CUmemAllocationGranularity_flags", {"hipMemAllocationGranularity_flags", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemAllocationGranularity_flags_enum", {"hipMemAllocationGranularity_flags", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUmemAllocationGranularity_flags", {"hipMemAllocationGranularity_flags", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemAllocationGranularity_flags_enum", {"hipMemAllocationGranularity_flags", "", CONV_TYPE, API_DRIVER, 1}}, // CUmemAllocationGranularity_flags enum values - {"CU_MEM_ALLOC_GRANULARITY_MINIMUM", {"hipMemAllocationGranularityMinimum", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 0x0 - {"CU_MEM_ALLOC_GRANULARITY_RECOMMENDED", {"hipMemAllocationGranularityRecommended", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 0x1 + {"CU_MEM_ALLOC_GRANULARITY_MINIMUM", {"hipMemAllocationGranularityMinimum", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 0x0 + {"CU_MEM_ALLOC_GRANULARITY_RECOMMENDED", {"hipMemAllocationGranularityRecommended", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 0x1 // cudaAccessProperty - {"CUaccessProperty", {"hipAccessProperty", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUaccessProperty_enum", {"hipAccessProperty", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUaccessProperty", {"hipAccessProperty", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUaccessProperty_enum", {"hipAccessProperty", "", CONV_TYPE, API_DRIVER, 1}}, // CUaccessProperty_enum enum values // cudaAccessPropertyNormal - {"CU_ACCESS_PROPERTY_NORMAL", {"hipAccessPropertyNormal", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 0 + {"CU_ACCESS_PROPERTY_NORMAL", {"hipAccessPropertyNormal", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 0 // cudaAccessPropertyStreaming - {"CU_ACCESS_PROPERTY_STREAMING", {"hipAccessPropertyStreaming", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 1 + {"CU_ACCESS_PROPERTY_STREAMING", {"hipAccessPropertyStreaming", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 1 // cudaAccessPropertyPersisting - {"CU_ACCESS_PROPERTY_PERSISTING", {"hipAccessPropertyPersisting", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 2 + {"CU_ACCESS_PROPERTY_PERSISTING", {"hipAccessPropertyPersisting", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 2 // cudaSynchronizationPolicy {"CUsynchronizationPolicy", {"hipSynchronizationPolicy", "", CONV_TYPE, API_DRIVER, 1, HIP_UNSUPPORTED}}, @@ -1866,13 +1866,13 @@ const std::map CUDA_DRIVER_TYPE_NAME_MAP { {"CU_SYNC_POLICY_BLOCKING_SYNC", {"hipSyncPolicyBlockingSync", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // 4 // cudaKernelNodeAttrID - {"CUkernelNodeAttrID", {"hipKernelNodeAttrID", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUkernelNodeAttrID_enum", {"hipKernelNodeAttrID", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUkernelNodeAttrID", {"hipKernelNodeAttrID", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUkernelNodeAttrID_enum", {"hipKernelNodeAttrID", "", CONV_TYPE, API_DRIVER, 1}}, // CUkernelNodeAttrID_enum enum values // cudaKernelNodeAttributeAccessPolicyWindow - {"CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW", {"hipKernelNodeAttributeAccessPolicyWindow", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 1 + {"CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW", {"hipKernelNodeAttributeAccessPolicyWindow", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 1 // cudaKernelNodeAttributeCooperative - {"CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE", {"hipKernelNodeAttributeCooperative", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 2 + {"CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE", {"hipKernelNodeAttributeCooperative", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 2 // cudaKernelNodeAttributePriority {"CU_KERNEL_NODE_ATTRIBUTE_PRIORITY", {"hipKernelNodeAttributePriority", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // 8 @@ -1912,45 +1912,45 @@ const std::map CUDA_DRIVER_TYPE_NAME_MAP { {"CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE", {"HIP_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // 0x3 // no analogue - {"CUarraySparseSubresourceType", {"hipArraySparseSubresourceType", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUarraySparseSubresourceType_enum", {"hipArraySparseSubresourceType", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUarraySparseSubresourceType", {"hipArraySparseSubresourceType", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUarraySparseSubresourceType_enum", {"hipArraySparseSubresourceType", "", CONV_TYPE, API_DRIVER, 1}}, // CUarraySparseSubresourceType enum values - {"CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL", {"hipArraySparseSubresourceTypeSparseLevel", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 0 - {"CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL", {"hipArraySparseSubresourceTypeMiptail", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 1 + {"CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL", {"hipArraySparseSubresourceTypeSparseLevel", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 0 + {"CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL", {"hipArraySparseSubresourceTypeMiptail", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 1 // no analogue - {"CUmemOperationType", {"hipMemOperationType", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemOperationType_enum", {"hipMemOperationType", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUmemOperationType", {"hipMemOperationType", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemOperationType_enum", {"hipMemOperationType", "", CONV_TYPE, API_DRIVER, 1}}, // CUmemOperationType enum values - {"CU_MEM_OPERATION_TYPE_MAP", {"hipMemOperationTypeMap", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 1 - {"CU_MEM_OPERATION_TYPE_UNMAP", {"hipMemOperationTypeUnmap", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 2 + {"CU_MEM_OPERATION_TYPE_MAP", {"hipMemOperationTypeMap", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 1 + {"CU_MEM_OPERATION_TYPE_UNMAP", {"hipMemOperationTypeUnmap", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 2 // no analogue - {"CUmemHandleType", {"hipMemHandleType", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemHandleType_enum", {"hipMemHandleType", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUmemHandleType", {"hipMemHandleType", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemHandleType_enum", {"hipMemHandleType", "", CONV_TYPE, API_DRIVER, 1}}, // CUmemHandleType enum values - {"CU_MEM_HANDLE_TYPE_GENERIC", {"hipMemHandleTypeGeneric", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 0 + {"CU_MEM_HANDLE_TYPE_GENERIC", {"hipMemHandleTypeGeneric", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 0 // cudaMemPoolAttr - {"CUmemPool_attribute", {"hipMemPoolAttr", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemPool_attribute_enum", {"hipMemPoolAttr", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUmemPool_attribute", {"hipMemPoolAttr", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemPool_attribute_enum", {"hipMemPoolAttr", "", CONV_TYPE, API_DRIVER, 1}}, // CUmemPool_attribute enum values // cudaMemPoolReuseFollowEventDependencies - {"CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES", {"hipMemPoolReuseFollowEventDependencies", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 1 + {"CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES", {"hipMemPoolReuseFollowEventDependencies", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // 1 // cudaMemPoolReuseAllowOpportunistic - {"CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC", {"hipMemPoolReuseAllowOpportunistic", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC", {"hipMemPoolReuseAllowOpportunistic", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // cudaMemPoolReuseAllowInternalDependencies - {"CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES", {"hipMemPoolReuseAllowInternalDependencies", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES", {"hipMemPoolReuseAllowInternalDependencies", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // cudaMemPoolAttrReleaseThreshold - {"CU_MEMPOOL_ATTR_RELEASE_THRESHOLD", {"hipMemPoolAttrReleaseThreshold", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CU_MEMPOOL_ATTR_RELEASE_THRESHOLD", {"hipMemPoolAttrReleaseThreshold", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // cudaMemPoolAttrReservedMemCurrent - {"CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT", {"hipMemPoolAttrReservedMemCurrent", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT", {"hipMemPoolAttrReservedMemCurrent", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // cudaMemPoolAttrReservedMemHigh - {"CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH", {"hipMemPoolAttrReservedMemHigh", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH", {"hipMemPoolAttrReservedMemHigh", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // cudaMemPoolAttrUsedMemCurrent - {"CU_MEMPOOL_ATTR_USED_MEM_CURRENT", {"hipMemPoolAttrUsedMemCurrent", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CU_MEMPOOL_ATTR_USED_MEM_CURRENT", {"hipMemPoolAttrUsedMemCurrent", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // cudaMemPoolAttrUsedMemHigh - {"CU_MEMPOOL_ATTR_USED_MEM_HIGH", {"hipMemPoolAttrUsedMemHigh", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CU_MEMPOOL_ATTR_USED_MEM_HIGH", {"hipMemPoolAttrUsedMemHigh", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // cudaStreamUpdateCaptureDependenciesFlags {"CUstreamUpdateCaptureDependencies_flags", {"hipStreamUpdateCaptureDependenciesFlags", "", CONV_TYPE, API_DRIVER, 1}}, @@ -2042,18 +2042,18 @@ const std::map CUDA_DRIVER_TYPE_NAME_MAP { {"CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS", {"hipGraphDebugDotFlagsBatchMemOpNodeParams", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // 1<<13 // cudaUserObjectFlags - {"CUuserObject_flags", {"hipUserObjectFlags", "", CONV_TYPE, API_DRIVER, 1, HIP_UNSUPPORTED}}, - {"CUuserObject_flags_enum", {"hipUserObjectFlags", "", CONV_TYPE, API_DRIVER, 1, HIP_UNSUPPORTED}}, + {"CUuserObject_flags", {"hipUserObjectFlags", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUuserObject_flags_enum", {"hipUserObjectFlags", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // CUuserObject_flags enum values // cudaUserObjectNoDestructorSync - {"CU_USER_OBJECT_NO_DESTRUCTOR_SYNC", {"hipUserObjectNoDestructorSync", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // 1 + {"CU_USER_OBJECT_NO_DESTRUCTOR_SYNC", {"hipUserObjectNoDestructorSync", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 1 // cudaUserObjectRetainFlags - {"CUuserObjectRetain_flags", {"hipUserObjectRetainFlags", "", CONV_TYPE, API_DRIVER, 1, HIP_UNSUPPORTED}}, - {"CUuserObjectRetain_flags_enum", {"hipUserObjectRetainFlags", "", CONV_TYPE, API_DRIVER, 1, HIP_UNSUPPORTED}}, + {"CUuserObjectRetain_flags", {"hipUserObjectRetainFlags", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUuserObjectRetain_flags_enum", {"hipUserObjectRetainFlags", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // CUuserObjectRetain_flags enum values // cudaGraphUserObjectMove - {"CU_GRAPH_USER_OBJECT_MOVE", {"hipGraphUserObjectMove", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // 1 + {"CU_GRAPH_USER_OBJECT_MOVE", {"hipGraphUserObjectMove", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // 1 // no analogue {"CUexecAffinityType", {"hipExecAffinityType", "", CONV_TYPE, API_DRIVER, 1, HIP_UNSUPPORTED}}, @@ -2063,24 +2063,24 @@ const std::map CUDA_DRIVER_TYPE_NAME_MAP { {"CU_EXEC_AFFINITY_TYPE_MAX", {"hipExecAffinityTypeMax", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, // // cudaGraphMemAttributeType - {"CUgraphMem_attribute", {"hipGraphMemAttribute", "", CONV_TYPE, API_DRIVER, 1, HIP_UNSUPPORTED}}, - {"CUgraphMem_attribute_enum", {"hipGraphMemAttribute", "", CONV_TYPE, API_DRIVER, 1, HIP_UNSUPPORTED}}, + {"CUgraphMem_attribute", {"hipGraphMemAttributeType", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUgraphMem_attribute_enum", {"hipGraphMemAttributeType", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // CUgraphMem_attribute enum values // cudaGraphMemAttrUsedMemCurrent - {"CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT", {"hipGraphMemAttrUsedMemCurrent", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, + {"CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT", {"hipGraphMemAttrUsedMemCurrent", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // cudaGraphMemAttrUsedMemHigh - {"CU_GRAPH_MEM_ATTR_USED_MEM_HIGH", {"hipGraphMemAttrUsedMemHigh", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, + {"CU_GRAPH_MEM_ATTR_USED_MEM_HIGH", {"hipGraphMemAttrUsedMemHigh", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // cudaGraphMemAttrReservedMemCurrent - {"CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT", {"hipGraphMemAttrReservedMemCurrent", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, + {"CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT", {"hipGraphMemAttrReservedMemCurrent", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // cudaGraphMemAttrReservedMemHigh - {"CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH", {"hipGraphMemAttrReservedMemHigh", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, + {"CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH", {"hipGraphMemAttrReservedMemHigh", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, // cudaGraphInstantiateFlags - {"CUgraphInstantiate_flags", {"hipGraphInstantiateFlags", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUgraphInstantiate_flags_enum", {"hipGraphInstantiateFlags", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUgraphInstantiate_flags", {"hipGraphInstantiateFlags", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUgraphInstantiate_flags_enum", {"hipGraphInstantiateFlags", "", CONV_TYPE, API_DRIVER, 1}}, // CUgraphInstantiate_flags enum values // cudaGraphInstantiateFlagAutoFreeOnLaunch - {"CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH", {"hipGraphInstantiateFlagAutoFreeOnLaunch", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH", {"hipGraphInstantiateFlagAutoFreeOnLaunch", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1}}, // cudaGraphInstantiateFlagUseNodePriority {"CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY", {"hipGraphInstantiateFlagUseNodePriority", "", CONV_NUMERIC_LITERAL, API_DRIVER, 1, HIP_UNSUPPORTED}}, @@ -2132,8 +2132,8 @@ const std::map CUDA_DRIVER_TYPE_NAME_MAP { {"CUtexObject_v1", {"hipTextureObject_t", "", CONV_TYPE, API_DRIVER, 1}}, // no analogue - {"CUmemGenericAllocationHandle", {"hipMemGenericAllocationHandle_t", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, - {"CUmemGenericAllocationHandle_v1", {"hipMemGenericAllocationHandle_t", "", CONV_TYPE, API_DRIVER, 1, HIP_EXPERIMENTAL}}, + {"CUmemGenericAllocationHandle", {"hipMemGenericAllocationHandle_t", "", CONV_TYPE, API_DRIVER, 1}}, + {"CUmemGenericAllocationHandle_v1", {"hipMemGenericAllocationHandle_t", "", CONV_TYPE, API_DRIVER, 1}}, // GLuint {"GLuint", {"GLuint", "", CONV_TYPE, API_DRIVER, 1}}, @@ -3270,18 +3270,21 @@ const std::map HIP_DRIVER_TYPE_NAME_VER_MAP { {"hipStreamSetCaptureDependencies", {HIP_5000, HIP_0, HIP_0 }}, {"GLuint", {HIP_5010, HIP_0, HIP_0 }}, {"GLenum", {HIP_5010, HIP_0, HIP_0 }}, - {"ihipMemPoolHandle_t", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemAllocationProp", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemGenericAllocationHandle_t", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemAllocationGranularity_flags", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemAllocationGranularityMinimum", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemAllocationGranularityRecommended", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemHandleType", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemHandleTypeGeneric", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemOperationType", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemOperationTypeMap", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemOperationTypeUnmap", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipArraySparseSubresourceType", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipArraySparseSubresourceTypeSparseLevel", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipArraySparseSubresourceTypeMiptail", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, + {"ihipMemPoolHandle_t", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemAllocationProp", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemGenericAllocationHandle_t", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemAllocationGranularity_flags", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemAllocationGranularityMinimum", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemAllocationGranularityRecommended", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemHandleType", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemHandleTypeGeneric", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemOperationType", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemOperationTypeMap", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemOperationTypeUnmap", {HIP_5020, HIP_0, HIP_0 }}, + {"hipArraySparseSubresourceType", {HIP_5020, HIP_0, HIP_0 }}, + {"hipArraySparseSubresourceTypeSparseLevel", {HIP_5020, HIP_0, HIP_0 }}, + {"hipArraySparseSubresourceTypeMiptail", {HIP_5020, HIP_0, HIP_0 }}, + {"hipDeviceAttributeVirtualMemoryManagementSupported", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipUserObject", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipUserObject_t", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, }; diff --git a/src/CUDA2HIP_Perl.cpp b/src/CUDA2HIP_Perl.cpp index a1d6e0a9..b04a25d2 100644 --- a/src/CUDA2HIP_Perl.cpp +++ b/src/CUDA2HIP_Perl.cpp @@ -345,7 +345,7 @@ namespace perl { void generateExperimentalSubstitutions(unique_ptr &streamPtr) { *streamPtr.get() << endl << sub << sExperimentalSubstitutions << " {" << endl; for (int i = 0; i < NUM_CONV_TYPES; ++i) { - if (i == CONV_INCLUDE_CUDA_MAIN_H || i == CONV_INCLUDE) { + if (i == CONV_INCLUDE_CUDA_MAIN_H || i == CONV_INCLUDE_CUDA_MAIN_V2_H || i == CONV_INCLUDE) { for (auto &ma : CUDA_INCLUDE_MAP) { if (!Statistics::isHipExperimental(ma.second)) continue; if (i == ma.second.type) { @@ -373,7 +373,7 @@ namespace perl { bool bTranslateToRoc = TranslateToRoc; TranslateToRoc = true; for (int i = 0; i < NUM_CONV_TYPES; ++i) { - if (i == CONV_INCLUDE_CUDA_MAIN_H) { + if (i == CONV_INCLUDE_CUDA_MAIN_H || i == CONV_INCLUDE_CUDA_MAIN_V2_H) { for (auto &ma : CUDA_INCLUDE_MAP) { if (i == ma.second.type) { string sCUDA = ma.first.str(); @@ -400,7 +400,7 @@ namespace perl { void generateSimpleSubstitutions(unique_ptr &streamPtr) { *streamPtr.get() << endl << sub << sSimpleSubstitutions << " {" << endl; for (int i = 0; i < NUM_CONV_TYPES; ++i) { - if (i == CONV_INCLUDE_CUDA_MAIN_H || i == CONV_INCLUDE) { + if (i == CONV_INCLUDE_CUDA_MAIN_H || i == CONV_INCLUDE_CUDA_MAIN_V2_H || i == CONV_INCLUDE) { for (auto &ma : CUDA_INCLUDE_MAP) { if (Statistics::isUnsupported(ma.second) || Statistics::isHipExperimental(ma.second)) continue; if (i == ma.second.type) { diff --git a/src/CUDA2HIP_Runtime_API_functions.cpp b/src/CUDA2HIP_Runtime_API_functions.cpp index 85f60896..4ead60ca 100644 --- a/src/CUDA2HIP_Runtime_API_functions.cpp +++ b/src/CUDA2HIP_Runtime_API_functions.cpp @@ -52,7 +52,7 @@ const std::map CUDA_RUNTIME_FUNCTION_MAP { // no analogue {"cudaDeviceSetCacheConfig", {"hipDeviceSetCacheConfig", "", CONV_DEVICE, API_RUNTIME, 1}}, // cuCtxSetLimit - {"cudaDeviceSetLimit", {"hipDeviceSetLimit", "", CONV_DEVICE, API_RUNTIME, 1, HIP_UNSUPPORTED}}, + {"cudaDeviceSetLimit", {"hipDeviceSetLimit", "", CONV_DEVICE, API_RUNTIME, 1, HIP_EXPERIMENTAL}}, // cuCtxSetSharedMemConfig {"cudaDeviceSetSharedMemConfig", {"hipDeviceSetSharedMemConfig", "", CONV_DEVICE, API_RUNTIME, 1}}, // cuCtxSynchronize @@ -86,11 +86,11 @@ const std::map CUDA_RUNTIME_FUNCTION_MAP { // cuDeviceGetTexture1DLinearMaxWidth {"cudaDeviceGetTexture1DLinearMaxWidth", {"hipDeviceGetTexture1DLinearMaxWidth", "", CONV_DEVICE, API_RUNTIME, 1, HIP_UNSUPPORTED}}, // cuDeviceGetDefaultMemPool - {"cudaDeviceGetDefaultMemPool", {"hipDeviceGetDefaultMemPool", "", CONV_DEVICE, API_RUNTIME, 1, HIP_EXPERIMENTAL}}, + {"cudaDeviceGetDefaultMemPool", {"hipDeviceGetDefaultMemPool", "", CONV_DEVICE, API_RUNTIME, 1}}, // cuDeviceSetMemPool - {"cudaDeviceSetMemPool", {"hipDeviceSetMemPool", "", CONV_DEVICE, API_RUNTIME, 1, HIP_EXPERIMENTAL}}, + {"cudaDeviceSetMemPool", {"hipDeviceSetMemPool", "", CONV_DEVICE, API_RUNTIME, 1}}, // cuDeviceGetMemPool - {"cudaDeviceGetMemPool", {"hipDeviceGetMemPool", "", CONV_DEVICE, API_RUNTIME, 1, HIP_EXPERIMENTAL}}, + {"cudaDeviceGetMemPool", {"hipDeviceGetMemPool", "", CONV_DEVICE, API_RUNTIME, 1}}, // 2. Thread Management [DEPRECATED] // no analogue @@ -159,7 +159,7 @@ const std::map CUDA_RUNTIME_FUNCTION_MAP { // cuStreamWaitEvent {"cudaStreamWaitEvent", {"hipStreamWaitEvent", "", CONV_STREAM, API_RUNTIME, 4}}, // cuThreadExchangeStreamCaptureMode - {"cudaThreadExchangeStreamCaptureMode", {"hipThreadExchangeStreamCaptureMode", "", CONV_STREAM, API_RUNTIME, 4, HIP_EXPERIMENTAL}}, + {"cudaThreadExchangeStreamCaptureMode", {"hipThreadExchangeStreamCaptureMode", "", CONV_STREAM, API_RUNTIME, 4}}, // 5. Event Management // no analogue @@ -221,7 +221,7 @@ const std::map CUDA_RUNTIME_FUNCTION_MAP { // NOTE: Not equal to cuLaunchCooperativeKernelMultiDevice due to different signatures {"cudaLaunchCooperativeKernelMultiDevice", {"hipLaunchCooperativeKernelMultiDevice", "", CONV_EXECUTION, API_RUNTIME, 7, CUDA_DEPRECATED}}, // cuLaunchHostFunc - {"cudaLaunchHostFunc", {"hipLaunchHostFunc", "", CONV_EXECUTION, API_RUNTIME, 7, HIP_EXPERIMENTAL}}, + {"cudaLaunchHostFunc", {"hipLaunchHostFunc", "", CONV_EXECUTION, API_RUNTIME, 7}}, // no analogue // NOTE: Not equal to cuLaunchKernel due to different signatures {"cudaLaunchKernel", {"hipLaunchKernel", "", CONV_EXECUTION, API_RUNTIME, 7}}, @@ -392,33 +392,33 @@ const std::map CUDA_RUNTIME_FUNCTION_MAP { // 11. Stream Ordered Memory Allocator // cuMemAllocAsync - {"cudaMallocAsync", {"hipMallocAsync", "", CONV_MEMORY, API_RUNTIME, 11, HIP_EXPERIMENTAL}}, + {"cudaMallocAsync", {"hipMallocAsync", "", CONV_MEMORY, API_RUNTIME, 11}}, // cuMemFreeAsync - {"cudaFreeAsync", {"hipFreeAsync", "", CONV_MEMORY, API_RUNTIME, 11, HIP_EXPERIMENTAL}}, + {"cudaFreeAsync", {"hipFreeAsync", "", CONV_MEMORY, API_RUNTIME, 11}}, // cuMemAllocFromPoolAsync - {"cudaMallocFromPoolAsync", {"hipMallocFromPoolAsync", "", CONV_MEMORY, API_RUNTIME, 11, HIP_EXPERIMENTAL}}, + {"cudaMallocFromPoolAsync", {"hipMallocFromPoolAsync", "", CONV_MEMORY, API_RUNTIME, 11}}, // cuMemPoolTrimTo - {"cudaMemPoolTrimTo", {"hipMemPoolTrimTo", "", CONV_MEMORY, API_RUNTIME, 11, HIP_EXPERIMENTAL}}, + {"cudaMemPoolTrimTo", {"hipMemPoolTrimTo", "", CONV_MEMORY, API_RUNTIME, 11}}, // cuMemPoolSetAttribute - {"cudaMemPoolSetAttribute", {"hipMemPoolSetAttribute", "", CONV_MEMORY, API_RUNTIME, 11, HIP_EXPERIMENTAL}}, + {"cudaMemPoolSetAttribute", {"hipMemPoolSetAttribute", "", CONV_MEMORY, API_RUNTIME, 11}}, // cuMemPoolGetAttribute - {"cudaMemPoolGetAttribute", {"hipMemPoolGetAttribute", "", CONV_MEMORY, API_RUNTIME, 11, HIP_EXPERIMENTAL}}, + {"cudaMemPoolGetAttribute", {"hipMemPoolGetAttribute", "", CONV_MEMORY, API_RUNTIME, 11}}, // cuMemPoolSetAccess - {"cudaMemPoolSetAccess", {"hipMemPoolSetAccess", "", CONV_MEMORY, API_RUNTIME, 11, HIP_EXPERIMENTAL}}, + {"cudaMemPoolSetAccess", {"hipMemPoolSetAccess", "", CONV_MEMORY, API_RUNTIME, 11}}, // cuMemPoolGetAccess - {"cudaMemPoolGetAccess", {"hipMemPoolGetAccess", "", CONV_MEMORY, API_RUNTIME, 11, HIP_EXPERIMENTAL}}, + {"cudaMemPoolGetAccess", {"hipMemPoolGetAccess", "", CONV_MEMORY, API_RUNTIME, 11}}, // cuMemPoolCreate - {"cudaMemPoolCreate", {"hipMemPoolCreate", "", CONV_MEMORY, API_RUNTIME, 11, HIP_EXPERIMENTAL}}, + {"cudaMemPoolCreate", {"hipMemPoolCreate", "", CONV_MEMORY, API_RUNTIME, 11}}, // cuMemPoolDestroy - {"cudaMemPoolDestroy", {"hipMemPoolDestroy", "", CONV_MEMORY, API_RUNTIME, 11, HIP_EXPERIMENTAL}}, + {"cudaMemPoolDestroy", {"hipMemPoolDestroy", "", CONV_MEMORY, API_RUNTIME, 11}}, // cuMemPoolExportToShareableHandle - {"cudaMemPoolExportToShareableHandle", {"hipMemPoolExportToShareableHandle", "", CONV_MEMORY, API_RUNTIME, 11, HIP_EXPERIMENTAL}}, + {"cudaMemPoolExportToShareableHandle", {"hipMemPoolExportToShareableHandle", "", CONV_MEMORY, API_RUNTIME, 11}}, // cuMemPoolImportFromShareableHandle - {"cudaMemPoolImportFromShareableHandle", {"hipMemPoolImportFromShareableHandle", "", CONV_MEMORY, API_RUNTIME, 11, HIP_EXPERIMENTAL}}, + {"cudaMemPoolImportFromShareableHandle", {"hipMemPoolImportFromShareableHandle", "", CONV_MEMORY, API_RUNTIME, 11}}, // cuMemPoolExportPointer - {"cudaMemPoolExportPointer", {"hipMemPoolExportPointer", "", CONV_MEMORY, API_RUNTIME, 11, HIP_EXPERIMENTAL}}, + {"cudaMemPoolExportPointer", {"hipMemPoolExportPointer", "", CONV_MEMORY, API_RUNTIME, 11}}, // cuMemPoolImportPointer - {"cudaMemPoolImportPointer", {"hipMemPoolImportPointer", "", CONV_MEMORY, API_RUNTIME, 11, HIP_EXPERIMENTAL}}, + {"cudaMemPoolImportPointer", {"hipMemPoolImportPointer", "", CONV_MEMORY, API_RUNTIME, 11}}, // 12. Unified Addressing // no analogue @@ -618,7 +618,7 @@ const std::map CUDA_RUNTIME_FUNCTION_MAP { {"cudaGetTextureAlignmentOffset", {"hipGetTextureAlignmentOffset", "", CONV_TEXTURE, API_RUNTIME, 25, DEPRECATED}}, // TODO: double check cuModuleGetTexRef // NOTE: Unsupported yet on NVCC path - {"cudaGetTextureReference", {"hipGetTextureReference", "", CONV_TEXTURE, API_RUNTIME, 25, CUDA_DEPRECATED}}, + {"cudaGetTextureReference", {"hipGetTextureReference", "", CONV_TEXTURE, API_RUNTIME, 25, DEPRECATED}}, // no analogue {"cudaUnbindTexture", {"hipUnbindTexture", "", CONV_TEXTURE, API_RUNTIME, 25, DEPRECATED}}, @@ -709,9 +709,9 @@ const std::map CUDA_RUNTIME_FUNCTION_MAP { // cuGraphKernelNodeCopyAttributes {"cudaGraphKernelNodeCopyAttributes", {"hipGraphKernelNodeCopyAttributes", "", CONV_GRAPH, API_RUNTIME, 30, HIP_UNSUPPORTED}}, // cuGraphKernelNodeGetAttribute - {"cudaGraphKernelNodeGetAttribute", {"hipGraphKernelNodeGetAttribute", "", CONV_GRAPH, API_RUNTIME, 30, HIP_EXPERIMENTAL}}, + {"cudaGraphKernelNodeGetAttribute", {"hipGraphKernelNodeGetAttribute", "", CONV_GRAPH, API_RUNTIME, 30}}, // cuGraphKernelNodeSetAttribute - {"cudaGraphKernelNodeSetAttribute", {"hipGraphKernelNodeSetAttribute", "", CONV_GRAPH, API_RUNTIME, 30, HIP_EXPERIMENTAL}}, + {"cudaGraphKernelNodeSetAttribute", {"hipGraphKernelNodeSetAttribute", "", CONV_GRAPH, API_RUNTIME, 30}}, // cuGraphExecKernelNodeSetParams {"cudaGraphExecKernelNodeSetParams", {"hipGraphExecKernelNodeSetParams", "", CONV_GRAPH, API_RUNTIME, 30}}, // no analogue @@ -789,7 +789,7 @@ const std::map CUDA_RUNTIME_FUNCTION_MAP { // cuGraphExecEventWaitNodeSetEvent {"cudaGraphExecEventWaitNodeSetEvent", {"hipGraphExecEventWaitNodeSetEvent", "", CONV_GRAPH, API_RUNTIME, 30}}, // cuGraphUpload - {"cudaGraphUpload", {"hipGraphUpload", "", CONV_GRAPH, API_RUNTIME, 30, HIP_UNSUPPORTED}}, + {"cudaGraphUpload", {"hipGraphUpload", "", CONV_GRAPH, API_RUNTIME, 30, HIP_EXPERIMENTAL}}, // cuGraphAddExternalSemaphoresSignalNode {"cudaGraphAddExternalSemaphoresSignalNode", {"hipGraphAddExternalSemaphoresSignalNode", "", CONV_GRAPH, API_RUNTIME, 30, HIP_UNSUPPORTED}}, // cuGraphExternalSemaphoresSignalNodeGetParams @@ -807,15 +807,15 @@ const std::map CUDA_RUNTIME_FUNCTION_MAP { // cuGraphExecExternalSemaphoresWaitNodeSetParams {"cudaGraphExecExternalSemaphoresWaitNodeSetParams", {"hipGraphExecExternalSemaphoresWaitNodeSetParams", "", CONV_GRAPH, API_RUNTIME, 30, HIP_UNSUPPORTED}}, // cuUserObjectCreate - {"cudaUserObjectCreate", {"hipUserObjectCreate", "", CONV_GRAPH, API_RUNTIME, 30, HIP_UNSUPPORTED}}, + {"cudaUserObjectCreate", {"hipUserObjectCreate", "", CONV_GRAPH, API_RUNTIME, 30, HIP_EXPERIMENTAL}}, // cuUserObjectRetain - {"cudaUserObjectRetain", {"hipUserObjectRetain", "", CONV_GRAPH, API_RUNTIME, 30, HIP_UNSUPPORTED}}, + {"cudaUserObjectRetain", {"hipUserObjectRetain", "", CONV_GRAPH, API_RUNTIME, 30, HIP_EXPERIMENTAL}}, // cuUserObjectRelease - {"cudaUserObjectRelease", {"hipUserObjectRelease", "", CONV_GRAPH, API_RUNTIME, 30, HIP_UNSUPPORTED}}, + {"cudaUserObjectRelease", {"hipUserObjectRelease", "", CONV_GRAPH, API_RUNTIME, 30, HIP_EXPERIMENTAL}}, // cuGraphRetainUserObject - {"cudaGraphRetainUserObject", {"hipGraphRetainUserObject", "", CONV_GRAPH, API_RUNTIME, 30, HIP_UNSUPPORTED}}, + {"cudaGraphRetainUserObject", {"hipGraphRetainUserObject", "", CONV_GRAPH, API_RUNTIME, 30, HIP_EXPERIMENTAL}}, // cuGraphReleaseUserObject - {"cudaGraphReleaseUserObject", {"hipGraphReleaseUserObject", "", CONV_GRAPH, API_RUNTIME, 30, HIP_UNSUPPORTED}}, + {"cudaGraphReleaseUserObject", {"hipGraphReleaseUserObject", "", CONV_GRAPH, API_RUNTIME, 30, HIP_EXPERIMENTAL}}, // cuGraphAddMemAllocNode {"cudaGraphAddMemAllocNode", {"hipGraphAddMemAllocNode", "", CONV_GRAPH, API_RUNTIME, 30, HIP_UNSUPPORTED}}, // cuGraphMemAllocNodeGetParams @@ -825,11 +825,11 @@ const std::map CUDA_RUNTIME_FUNCTION_MAP { // cuGraphMemFreeNodeGetParams {"cudaGraphMemFreeNodeGetParams", {"hipGraphMemFreeNodeGetParams", "", CONV_GRAPH, API_RUNTIME, 30, HIP_UNSUPPORTED}}, // cuDeviceGraphMemTrim - {"cudaDeviceGraphMemTrim", {"hipDeviceGraphMemTrim", "", CONV_GRAPH, API_RUNTIME, 30, HIP_UNSUPPORTED}}, + {"cudaDeviceGraphMemTrim", {"hipDeviceGraphMemTrim", "", CONV_GRAPH, API_RUNTIME, 30, HIP_EXPERIMENTAL}}, // cuDeviceGetGraphMemAttribute - {"cudaDeviceGetGraphMemAttribute", {"hipDeviceGetGraphMemAttribute", "", CONV_GRAPH, API_RUNTIME, 30, HIP_UNSUPPORTED}}, + {"cudaDeviceGetGraphMemAttribute", {"hipDeviceGetGraphMemAttribute", "", CONV_GRAPH, API_RUNTIME, 30, HIP_EXPERIMENTAL}}, // cuDeviceSetGraphMemAttribute - {"cudaDeviceSetGraphMemAttribute", {"hipDeviceSetGraphMemAttribute", "", CONV_GRAPH, API_RUNTIME, 30, HIP_UNSUPPORTED}}, + {"cudaDeviceSetGraphMemAttribute", {"hipDeviceSetGraphMemAttribute", "", CONV_GRAPH, API_RUNTIME, 30, HIP_EXPERIMENTAL}}, // cuGraphInstantiateWithFlags {"cudaGraphInstantiateWithFlags", {"hipGraphInstantiateWithFlags", "", CONV_GRAPH, API_RUNTIME, 30}}, // cuGraphNodeSetEnabled @@ -1196,7 +1196,7 @@ const std::map HIP_RUNTIME_FUNCTION_VER_MAP { {"hipCreateChannelDesc", {HIP_1060, HIP_0, HIP_0 }}, {"hipGetChannelDesc", {HIP_1070, HIP_0, HIP_0 }}, {"hipGetTextureAlignmentOffset", {HIP_1090, HIP_3080, HIP_0 }}, - {"hipGetTextureReference", {HIP_1070, HIP_0, HIP_0 }}, + {"hipGetTextureReference", {HIP_1070, HIP_5030, HIP_0 }}, {"hipUnbindTexture", {HIP_1060, HIP_3080, HIP_0 }}, {"hipCreateTextureObject", {HIP_1070, HIP_0, HIP_0 }}, {"hipDestroyTextureObject", {HIP_1070, HIP_0, HIP_0 }}, @@ -1283,27 +1283,37 @@ const std::map HIP_RUNTIME_FUNCTION_VER_MAP { {"hipGraphEventWaitNodeSetEvent", {HIP_5000, HIP_0, HIP_0 }}, {"hipGraphExecEventWaitNodeSetEvent", {HIP_5000, HIP_0, HIP_0 }}, {"hipGraphClone", {HIP_5000, HIP_0, HIP_0 }}, - {"hipDeviceGetDefaultMemPool", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipDeviceSetMemPool", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipDeviceGetMemPool", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMallocAsync", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipFreeAsync", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolTrimTo", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolSetAttribute", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolGetAttribute", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolSetAccess", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolGetAccess", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolCreate", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolDestroy", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMallocFromPoolAsync", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolExportToShareableHandle", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolImportFromShareableHandle", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolExportPointer", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolImportPointer", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipLaunchHostFunc", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipThreadExchangeStreamCaptureMode", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipGraphKernelNodeSetAttribute", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipGraphKernelNodeGetAttribute", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, + {"hipDeviceGetDefaultMemPool", {HIP_5020, HIP_0, HIP_0 }}, + {"hipDeviceSetMemPool", {HIP_5020, HIP_0, HIP_0 }}, + {"hipDeviceGetMemPool", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMallocAsync", {HIP_5020, HIP_0, HIP_0 }}, + {"hipFreeAsync", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolTrimTo", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolSetAttribute", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolGetAttribute", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolSetAccess", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolGetAccess", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolCreate", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolDestroy", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMallocFromPoolAsync", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolExportToShareableHandle", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolImportFromShareableHandle", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolExportPointer", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolImportPointer", {HIP_5020, HIP_0, HIP_0 }}, + {"hipLaunchHostFunc", {HIP_5020, HIP_0, HIP_0 }}, + {"hipThreadExchangeStreamCaptureMode", {HIP_5020, HIP_0, HIP_0 }}, + {"hipGraphKernelNodeSetAttribute", {HIP_5020, HIP_0, HIP_0 }}, + {"hipGraphKernelNodeGetAttribute", {HIP_5020, HIP_0, HIP_0 }}, + {"hipDeviceSetLimit", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipGraphUpload", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipDeviceGetGraphMemAttribute", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipDeviceSetGraphMemAttribute", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipDeviceGraphMemTrim", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipUserObjectCreate", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipUserObjectRelease", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipUserObjectRetain", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipGraphRetainUserObject", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipGraphReleaseUserObject", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, }; const std::map CUDA_RUNTIME_API_SECTION_MAP { diff --git a/src/CUDA2HIP_Runtime_API_types.cpp b/src/CUDA2HIP_Runtime_API_types.cpp index 4deb86b8..9cc43d89 100644 --- a/src/CUDA2HIP_Runtime_API_types.cpp +++ b/src/CUDA2HIP_Runtime_API_types.cpp @@ -117,7 +117,7 @@ const std::map CUDA_RUNTIME_TYPE_NAME_MAP { {"cudaTextureDesc", {"hipTextureDesc", "", CONV_TYPE, API_RUNTIME, 36}}, // NOTE: the same struct and its name - {"CUuuid_st", {"hipUUID_t", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, + {"CUuuid_st", {"hipUUID_t", "", CONV_TYPE, API_RUNTIME, 36}}, // NOTE: possibly CUsurfref is analogue {"surfaceReference", {"surfaceReference", "", CONV_TYPE, API_RUNTIME, 36}}, @@ -188,22 +188,22 @@ const std::map CUDA_RUNTIME_TYPE_NAME_MAP { {"cudaFunction_t", {"hipFunction_t", "", CONV_TYPE, API_RUNTIME}}, // CUaccessPolicyWindow_st - {"cudaAccessPolicyWindow", {"hipAccessPolicyWindow", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, + {"cudaAccessPolicyWindow", {"hipAccessPolicyWindow", "", CONV_TYPE, API_RUNTIME, 36}}, // CUDA_ARRAY_SPARSE_PROPERTIES_st {"cudaArraySparseProperties", {"hipArraySparseProperties", "", CONV_TYPE, API_RUNTIME, 36, HIP_UNSUPPORTED}}, // CUmemLocation_st - {"cudaMemLocation", {"hipMemLocation", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, + {"cudaMemLocation", {"hipMemLocation", "", CONV_TYPE, API_RUNTIME, 36}}, // CUmemAccessDesc_st - {"cudaMemAccessDesc", {"hipMemAccessDesc", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, + {"cudaMemAccessDesc", {"hipMemAccessDesc", "", CONV_TYPE, API_RUNTIME, 36}}, // CUmemPoolProps_st - {"cudaMemPoolProps", {"hipMemPoolProps", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, + {"cudaMemPoolProps", {"hipMemPoolProps", "", CONV_TYPE, API_RUNTIME, 36}}, // CUmemPoolPtrExportData_st - {"cudaMemPoolPtrExportData", {"hipMemPoolPtrExportData", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, + {"cudaMemPoolPtrExportData", {"hipMemPoolPtrExportData", "", CONV_TYPE, API_RUNTIME, 36}}, // CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st {"cudaExternalSemaphoreSignalNodeParams", {"hipExternalSemaphoreSignalNodeParams", "", CONV_TYPE, API_RUNTIME, 36, HIP_UNSUPPORTED}}, @@ -223,7 +223,7 @@ const std::map CUDA_RUNTIME_TYPE_NAME_MAP { {"cudaStreamAttrValue", {"hipStreamAttrValue", "", CONV_TYPE, API_RUNTIME, 36, HIP_UNSUPPORTED}}, // CUkernelNodeAttrValue - {"cudaKernelNodeAttrValue", {"hipKernelNodeAttrValue", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, + {"cudaKernelNodeAttrValue", {"hipKernelNodeAttrValue", "", CONV_TYPE, API_RUNTIME, 36}}, // 3. Enums @@ -537,7 +537,7 @@ const std::map CUDA_RUNTIME_TYPE_NAME_MAP { // CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED {"cudaDevAttrTimelineSemaphoreInteropSupported", {"hipDevAttrTimelineSemaphoreInteropSupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, // 114 // CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED - {"cudaDevAttrMemoryPoolsSupported", {"hipDeviceAttributeMemoryPoolsSupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 115 + {"cudaDevAttrMemoryPoolsSupported", {"hipDeviceAttributeMemoryPoolsSupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 115 // CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED {"cudaDevAttrGPUDirectRDMASupported", {"hipDeviceAttributeGPUDirectRDMASupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, // 116 // CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS @@ -1119,9 +1119,9 @@ const std::map CUDA_RUNTIME_TYPE_NAME_MAP { // CU_GRAPH_NODE_TYPE_EVENT_RECORD = 7 {"cudaGraphNodeTypeEventRecord", {"hipGraphNodeTypeEventRecord", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 0x07 // CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL = 8 - {"cudaGraphNodeTypeExtSemaphoreSignal", {"hipGraphNodeTypeExtSemasSignal", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, // 0x08 + {"cudaGraphNodeTypeExtSemaphoreSignal", {"hipGraphNodeTypeExtSemaphoreSignal", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0x08 // CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT = 9 - {"cudaGraphNodeTypeExtSemaphoreWait", {"hipGraphNodeTypeExtSemasWait", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, // 0x09 + {"cudaGraphNodeTypeExtSemaphoreWait", {"hipGraphNodeTypeExtSemaphoreWait", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0x09 // CU_GRAPH_NODE_TYPE_MEM_ALLOC = 10 {"cudaGraphNodeTypeMemAlloc", {"hipGraphNodeTypeMemAlloc", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, // 0x0a // CU_GRAPH_NODE_TYPE_MEM_FREE = 11 @@ -1155,7 +1155,7 @@ const std::map CUDA_RUNTIME_TYPE_NAME_MAP { {"cudaLimit", {"hipLimit_t", "", CONV_TYPE, API_RUNTIME, 36}}, // cudaLimit enum values // CU_LIMIT_STACK_SIZE - {"cudaLimitStackSize", {"hipLimitStackSize", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, // 0x00 + {"cudaLimitStackSize", {"hipLimitStackSize", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0x00 // CU_LIMIT_PRINTF_FIFO_SIZE {"cudaLimitPrintfFifoSize", {"hipLimitPrintfFifoSize", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 0x01 // CU_LIMIT_MALLOC_HEAP_SIZE @@ -1201,7 +1201,7 @@ const std::map CUDA_RUNTIME_TYPE_NAME_MAP { {"cudaMemoryTypeUnregistered", {"hipMemoryTypeUnregistered", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, // 0 {"cudaMemoryTypeHost", {"hipMemoryTypeHost", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 1 {"cudaMemoryTypeDevice", {"hipMemoryTypeDevice", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 2 - {"cudaMemoryTypeManaged", {"hipMemoryTypeManaged", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, // 3 + {"cudaMemoryTypeManaged", {"hipMemoryTypeManaged", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 3 // CUmem_range_attribute {"cudaMemRangeAttribute", {"hipMemRangeAttribute", "", CONV_TYPE, API_RUNTIME, 36}}, @@ -1484,13 +1484,13 @@ const std::map CUDA_RUNTIME_TYPE_NAME_MAP { {"PATCH_LEVEL", {"hipLibraryPatchVersion", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, // CUaccessProperty - {"cudaAccessProperty", {"hipAccessProperty", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, + {"cudaAccessProperty", {"hipAccessProperty", "", CONV_TYPE, API_RUNTIME, 36}}, // CU_ACCESS_PROPERTY_NORMAL - {"cudaAccessPropertyNormal", {"hipAccessPropertyNormal", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0 + {"cudaAccessPropertyNormal", {"hipAccessPropertyNormal", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 0 // CU_ACCESS_PROPERTY_STREAMING - {"cudaAccessPropertyStreaming", {"hipAccessPropertyStreaming", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 1 + {"cudaAccessPropertyStreaming", {"hipAccessPropertyStreaming", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 1 // CU_ACCESS_PROPERTY_PERSISTING - {"cudaAccessPropertyPersisting", {"hipAccessPropertyPersisting", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 2 + {"cudaAccessPropertyPersisting", {"hipAccessPropertyPersisting", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 2 // CUsynchronizationPolicy {"cudaSynchronizationPolicy", {"hipSynchronizationPolicy", "", CONV_TYPE, API_RUNTIME, 36, HIP_UNSUPPORTED}}, @@ -1511,73 +1511,73 @@ const std::map CUDA_RUNTIME_TYPE_NAME_MAP { {"cudaStreamAttributeSynchronizationPolicy", {"hipStreamAttributeSynchronizationPolicy", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, // 3 // CUkernelNodeAttrID - {"cudaKernelNodeAttrID", {"hipKernelNodeAttrID", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, + {"cudaKernelNodeAttrID", {"hipKernelNodeAttrID", "", CONV_TYPE, API_RUNTIME, 36}}, // CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW - {"cudaKernelNodeAttributeAccessPolicyWindow", {"hipKernelNodeAttributeAccessPolicyWindow", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 1 + {"cudaKernelNodeAttributeAccessPolicyWindow", {"hipKernelNodeAttributeAccessPolicyWindow", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 1 // CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE - {"cudaKernelNodeAttributeCooperative", {"hipKernelNodeAttributeCooperative", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 2 + {"cudaKernelNodeAttributeCooperative", {"hipKernelNodeAttributeCooperative", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 2 // CU_KERNEL_NODE_ATTRIBUTE_PRIORITY {"cudaKernelNodeAttributePriority", {"hipKernelNodeAttributePriority", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, // 8 // CUmemPool_attribute - {"cudaMemPoolAttr", {"hipMemPoolAttr", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, + {"cudaMemPoolAttr", {"hipMemPoolAttr", "", CONV_TYPE, API_RUNTIME, 36}}, // cudaMemPoolAttr enum values // CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES - {"cudaMemPoolReuseFollowEventDependencies", {"hipMemPoolReuseFollowEventDependencies", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0x1 + {"cudaMemPoolReuseFollowEventDependencies", {"hipMemPoolReuseFollowEventDependencies", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 0x1 // CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC - {"cudaMemPoolReuseAllowOpportunistic", {"hipMemPoolReuseAllowOpportunistic", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0x2 + {"cudaMemPoolReuseAllowOpportunistic", {"hipMemPoolReuseAllowOpportunistic", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 0x2 // CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES - {"cudaMemPoolReuseAllowInternalDependencies", {"hipMemPoolReuseAllowInternalDependencies", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0x3 + {"cudaMemPoolReuseAllowInternalDependencies", {"hipMemPoolReuseAllowInternalDependencies", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 0x3 // CU_MEMPOOL_ATTR_RELEASE_THRESHOLD - {"cudaMemPoolAttrReleaseThreshold", {"hipMemPoolAttrReleaseThreshold", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0x4 + {"cudaMemPoolAttrReleaseThreshold", {"hipMemPoolAttrReleaseThreshold", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 0x4 // CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT - {"cudaMemPoolAttrReservedMemCurrent", {"hipMemPoolAttrReservedMemCurrent", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0x5 + {"cudaMemPoolAttrReservedMemCurrent", {"hipMemPoolAttrReservedMemCurrent", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 0x5 // CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH - {"cudaMemPoolAttrReservedMemHigh", {"hipMemPoolAttrReservedMemHigh", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0x6 + {"cudaMemPoolAttrReservedMemHigh", {"hipMemPoolAttrReservedMemHigh", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 0x6 // CU_MEMPOOL_ATTR_USED_MEM_CURRENT - {"cudaMemPoolAttrUsedMemCurrent", {"hipMemPoolAttrUsedMemCurrent", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0x7 + {"cudaMemPoolAttrUsedMemCurrent", {"hipMemPoolAttrUsedMemCurrent", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 0x7 // CU_MEMPOOL_ATTR_USED_MEM_HIGH - {"cudaMemPoolAttrUsedMemHigh", {"hipMemPoolAttrUsedMemHigh", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0x8 + {"cudaMemPoolAttrUsedMemHigh", {"hipMemPoolAttrUsedMemHigh", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 0x8 // CUmemLocationType - {"cudaMemLocationType", {"hipMemLocationType", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, + {"cudaMemLocationType", {"hipMemLocationType", "", CONV_TYPE, API_RUNTIME, 36}}, // cudaMemLocationType enum values // CU_MEM_LOCATION_TYPE_INVALID - {"cudaMemLocationTypeInvalid", {"hipMemLocationTypeInvalid", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0 + {"cudaMemLocationTypeInvalid", {"hipMemLocationTypeInvalid", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 0 // CU_MEM_LOCATION_TYPE_DEVICE - {"cudaMemLocationTypeDevice", {"hipMemLocationTypeDevice", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 1 + {"cudaMemLocationTypeDevice", {"hipMemLocationTypeDevice", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 1 // CUmemAllocationType - {"cudaMemAllocationType", {"hipMemAllocationType", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, + {"cudaMemAllocationType", {"hipMemAllocationType", "", CONV_TYPE, API_RUNTIME, 36}}, // CUmemAllocationType enum values // CU_MEM_ALLOCATION_TYPE_INVALID - {"cudaMemAllocationTypeInvalid", {"hipMemAllocationTypeInvalid", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0x0 + {"cudaMemAllocationTypeInvalid", {"hipMemAllocationTypeInvalid", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 0x0 // CU_MEM_ALLOCATION_TYPE_PINNED - {"cudaMemAllocationTypePinned", {"hipMemAllocationTypePinned", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0x1 + {"cudaMemAllocationTypePinned", {"hipMemAllocationTypePinned", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 0x1 // CU_MEM_ALLOCATION_TYPE_MAX - {"cudaMemAllocationTypeMax", {"hipMemAllocationTypeMax", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0x7FFFFFFF + {"cudaMemAllocationTypeMax", {"hipMemAllocationTypeMax", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 0x7FFFFFFF // CUmemAccess_flags - {"cudaMemAccessFlags", {"hipMemAccessFlags", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, + {"cudaMemAccessFlags", {"hipMemAccessFlags", "", CONV_TYPE, API_RUNTIME, 36}}, // cudaMemAccessFlags enum values // CU_MEM_ACCESS_FLAGS_PROT_NONE - {"cudaMemAccessFlagsProtNone", {"hipMemAccessFlagsProtNone", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0 + {"cudaMemAccessFlagsProtNone", {"hipMemAccessFlagsProtNone", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 0 // CU_MEM_ACCESS_FLAGS_PROT_READ - {"cudaMemAccessFlagsProtRead", {"hipMemAccessFlagsProtRead", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 1 + {"cudaMemAccessFlagsProtRead", {"hipMemAccessFlagsProtRead", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 1 // CU_MEM_ACCESS_FLAGS_PROT_READWRITE - {"cudaMemAccessFlagsProtReadWrite", {"hipMemAccessFlagsProtReadWrite", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 3 + {"cudaMemAccessFlagsProtReadWrite", {"hipMemAccessFlagsProtReadWrite", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 3 // CUmemAllocationHandleType - {"cudaMemAllocationHandleType", {"hipMemAllocationHandleType", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, + {"cudaMemAllocationHandleType", {"hipMemAllocationHandleType", "", CONV_TYPE, API_RUNTIME, 36}}, // cudaMemAllocationHandleType enum values // CU_MEM_HANDLE_TYPE_NONE - {"cudaMemHandleTypeNone", {"hipMemHandleTypeNone", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0 + {"cudaMemHandleTypeNone", {"hipMemHandleTypeNone", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 0 // CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR - {"cudaMemHandleTypePosixFileDescriptor", {"hipMemHandleTypePosixFileDescriptor", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 1 + {"cudaMemHandleTypePosixFileDescriptor", {"hipMemHandleTypePosixFileDescriptor", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 1 // CU_MEM_HANDLE_TYPE_WIN32 - {"cudaMemHandleTypeWin32", {"hipMemHandleTypeWin32", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 2 + {"cudaMemHandleTypeWin32", {"hipMemHandleTypeWin32", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 2 // CU_MEM_HANDLE_TYPE_WIN32_KMT - {"cudaMemHandleTypeWin32Kmt", {"hipMemHandleTypeWin32Kmt", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 4 + {"cudaMemHandleTypeWin32Kmt", {"hipMemHandleTypeWin32Kmt", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 4 // CUstreamUpdateCaptureDependencies_flags {"cudaStreamUpdateCaptureDependenciesFlags", {"hipStreamUpdateCaptureDependenciesFlags", "", CONV_TYPE, API_RUNTIME, 36}}, @@ -1588,16 +1588,16 @@ const std::map CUDA_RUNTIME_TYPE_NAME_MAP { {"cudaStreamSetCaptureDependencies", {"hipStreamSetCaptureDependencies", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // 0x1 // CUuserObject_flags - {"cudaUserObjectFlags", {"hipUserObjectFlags", "", CONV_TYPE, API_RUNTIME, 36, HIP_UNSUPPORTED}}, + {"cudaUserObjectFlags", {"hipUserObjectFlags", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // cudaUserObjectFlags enum values // CU_USER_OBJECT_NO_DESTRUCTOR_SYNC - {"cudaUserObjectNoDestructorSync", {"hipUserObjectNoDestructorSync", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, // 0x1 + {"cudaUserObjectNoDestructorSync", {"hipUserObjectNoDestructorSync", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0x1 // CUuserObjectRetain_flags - {"cudaUserObjectRetainFlags", {"hipUserObjectRetainFlags", "", CONV_TYPE, API_RUNTIME, 36, HIP_UNSUPPORTED}}, + {"cudaUserObjectRetainFlags", {"hipUserObjectRetainFlags", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // cudaUserObjectRetainFlags enum values // CU_GRAPH_USER_OBJECT_MOVE - {"cudaGraphUserObjectMove", {"hipGraphUserObjectMove", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, // 0x1 + {"cudaGraphUserObjectMove", {"hipGraphUserObjectMove", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 0x1 // CUflushGPUDirectRDMAWritesOptions {"cudaFlushGPUDirectRDMAWritesOptions", {"hipFlushGPUDirectRDMAWritesOptions", "", CONV_TYPE, API_RUNTIME, 36, HIP_UNSUPPORTED}}, @@ -1666,22 +1666,22 @@ const std::map CUDA_RUNTIME_TYPE_NAME_MAP { {"cudaGraphDebugDotFlagsHandles", {"hipGraphDebugDotFlagsHandles", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, // 1<<10 // CUgraphMem_attribute - {"cudaGraphMemAttributeType", {"hipGraphMemAttribute", "", CONV_TYPE, API_RUNTIME, 36, HIP_UNSUPPORTED}}, + {"cudaGraphMemAttributeType", {"hipGraphMemAttributeType", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // cudaGraphMemAttributeType enum values // CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT - {"cudaGraphMemAttrUsedMemCurrent", {"hipGraphMemAttrUsedMemCurrent", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, + {"cudaGraphMemAttrUsedMemCurrent", {"hipGraphMemAttrUsedMemCurrent", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // CU_GRAPH_MEM_ATTR_USED_MEM_HIGH - {"cudaGraphMemAttrUsedMemHigh", {"hipGraphMemAttrUsedMemHigh", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, + {"cudaGraphMemAttrUsedMemHigh", {"hipGraphMemAttrUsedMemHigh", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT - {"cudaGraphMemAttrReservedMemCurrent", {"hipGraphMemAttrReservedMemCurrent", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, + {"cudaGraphMemAttrReservedMemCurrent", {"hipGraphMemAttrReservedMemCurrent", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH - {"cudaGraphMemAttrReservedMemHigh", {"hipGraphMemAttrReservedMemHigh", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, + {"cudaGraphMemAttrReservedMemHigh", {"hipGraphMemAttrReservedMemHigh", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // CUgraphInstantiate_flags - {"cudaGraphInstantiateFlags", {"hipGraphInstantiateFlags", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, + {"cudaGraphInstantiateFlags", {"hipGraphInstantiateFlags", "", CONV_TYPE, API_RUNTIME, 36}}, // cudaGraphInstantiateFlags enum values // CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH - {"cudaGraphInstantiateFlagAutoFreeOnLaunch", {"hipGraphInstantiateFlagAutoFreeOnLaunch", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, + {"cudaGraphInstantiateFlagAutoFreeOnLaunch", {"hipGraphInstantiateFlagAutoFreeOnLaunch", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36}}, // CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY {"cudaGraphInstantiateFlagUseNodePriority", {"hipGraphInstantiateFlagUseNodePriority", "", CONV_NUMERIC_LITERAL, API_RUNTIME, 36, HIP_UNSUPPORTED}}, @@ -1700,13 +1700,13 @@ const std::map CUDA_RUNTIME_TYPE_NAME_MAP { {"cudaTextureObject_t", {"hipTextureObject_t", "", CONV_TYPE, API_RUNTIME, 36}}, // CUuuid - {"cudaUUID_t", {"hipUUID", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, + {"cudaUUID_t", {"hipUUID", "", CONV_TYPE, API_RUNTIME, 36}}, // CUmemoryPool - {"cudaMemPool_t", {"hipMemPool_t", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, + {"cudaMemPool_t", {"hipMemPool_t", "", CONV_TYPE, API_RUNTIME, 36}}, // CUuserObject - {"cudaUserObject_t", {"hipUserObject_t", "", CONV_TYPE, API_RUNTIME, 36, HIP_UNSUPPORTED}}, + {"cudaUserObject_t", {"hipUserObject_t", "", CONV_TYPE, API_RUNTIME, 36, HIP_EXPERIMENTAL}}, // 5. Defines @@ -2433,48 +2433,61 @@ const std::map HIP_RUNTIME_TYPE_NAME_VER_MAP { {"hipErrorIllegalState", {HIP_5000, HIP_0, HIP_0 }}, {"hipErrorGraphExecUpdateFailure", {HIP_5000, HIP_0, HIP_0 }}, {"hipDeviceAttributeMultiGpuBoardGroupID", {HIP_5000, HIP_0, HIP_0 }}, - {"hipUUID", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipUUID_t", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipKernelNodeAttrID", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipKernelNodeAttributeAccessPolicyWindow", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipKernelNodeAttributeCooperative", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipAccessProperty", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipAccessPropertyNormal", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipAccessPropertyStreaming", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipAccessPropertyPersisting", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipAccessPolicyWindow", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipKernelNodeAttrValue", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipDeviceAttributeMemoryPoolsSupported", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPool_t", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolAttr", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolReuseFollowEventDependencies", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolReuseAllowOpportunistic", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolReuseAllowInternalDependencies", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolAttrReleaseThreshold", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolAttrReservedMemCurrent", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolAttrReservedMemHigh", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolAttrUsedMemCurrent", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolAttrUsedMemHigh", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemLocationType", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemLocationTypeInvalid", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemLocationTypeDevice", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemLocation", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemAccessFlags", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemAccessFlagsProtNone", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemAccessFlagsProtRead", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemAccessFlagsProtReadWrite", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemAccessDesc", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemAllocationType", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemAllocationTypeInvalid", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemAllocationTypePinned", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemAllocationTypeMax", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemAllocationHandleType", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemHandleTypeNone", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemHandleTypePosixFileDescriptor", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemHandleTypeWin32", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemHandleTypeWin32Kmt", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolProps", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipMemPoolPtrExportData", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipGraphInstantiateFlags", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, - {"hipGraphInstantiateFlagAutoFreeOnLaunch", {HIP_5020, HIP_0, HIP_0, HIP_LATEST}}, + {"hipUUID", {HIP_5020, HIP_0, HIP_0 }}, + {"hipUUID_t", {HIP_5020, HIP_0, HIP_0 }}, + {"hipKernelNodeAttrID", {HIP_5020, HIP_0, HIP_0 }}, + {"hipKernelNodeAttributeAccessPolicyWindow", {HIP_5020, HIP_0, HIP_0 }}, + {"hipKernelNodeAttributeCooperative", {HIP_5020, HIP_0, HIP_0 }}, + {"hipAccessProperty", {HIP_5020, HIP_0, HIP_0 }}, + {"hipAccessPropertyNormal", {HIP_5020, HIP_0, HIP_0 }}, + {"hipAccessPropertyStreaming", {HIP_5020, HIP_0, HIP_0 }}, + {"hipAccessPropertyPersisting", {HIP_5020, HIP_0, HIP_0 }}, + {"hipAccessPolicyWindow", {HIP_5020, HIP_0, HIP_0 }}, + {"hipKernelNodeAttrValue", {HIP_5020, HIP_0, HIP_0 }}, + {"hipDeviceAttributeMemoryPoolsSupported", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPool_t", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolAttr", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolReuseFollowEventDependencies", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolReuseAllowOpportunistic", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolReuseAllowInternalDependencies", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolAttrReleaseThreshold", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolAttrReservedMemCurrent", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolAttrReservedMemHigh", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolAttrUsedMemCurrent", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolAttrUsedMemHigh", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemLocationType", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemLocationTypeInvalid", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemLocationTypeDevice", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemLocation", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemAccessFlags", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemAccessFlagsProtNone", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemAccessFlagsProtRead", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemAccessFlagsProtReadWrite", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemAccessDesc", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemAllocationType", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemAllocationTypeInvalid", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemAllocationTypePinned", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemAllocationTypeMax", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemAllocationHandleType", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemHandleTypeNone", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemHandleTypePosixFileDescriptor", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemHandleTypeWin32", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemHandleTypeWin32Kmt", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolProps", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemPoolPtrExportData", {HIP_5020, HIP_0, HIP_0 }}, + {"hipGraphInstantiateFlags", {HIP_5020, HIP_0, HIP_0 }}, + {"hipGraphInstantiateFlagAutoFreeOnLaunch", {HIP_5020, HIP_0, HIP_0 }}, + {"hipMemoryTypeManaged", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipLimitStackSize", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipGraphNodeTypeExtSemaphoreSignal", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipGraphNodeTypeExtSemaphoreWait", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipGraphMemAttributeType", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipGraphMemAttrUsedMemCurrent", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipGraphMemAttrUsedMemHigh", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipGraphMemAttrReservedMemCurrent", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipGraphMemAttrReservedMemHigh", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipUserObjectFlags", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipUserObjectNoDestructorSync", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipUserObjectRetainFlags", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, + {"hipGraphUserObjectMove", {HIP_5030, HIP_0, HIP_0, HIP_LATEST}}, }; diff --git a/src/Statistics.cpp b/src/Statistics.cpp index ade47baf..ed6aea21 100644 --- a/src/Statistics.cpp +++ b/src/Statistics.cpp @@ -537,6 +537,7 @@ std::string Statistics::getHipVersion(const hipVersions& ver) { case HIP_5010: return "5.1.0"; case HIP_5011: return "5.1.1"; case HIP_5020: return "5.2.0"; + case HIP_5030: return "5.3.0"; } return ""; } diff --git a/src/Statistics.h b/src/Statistics.h index 66b0c3a4..02b4da7d 100644 --- a/src/Statistics.h +++ b/src/Statistics.h @@ -289,7 +289,8 @@ enum hipVersions { HIP_5010 = 5010, HIP_5011 = 5011, HIP_5020 = 5020, - HIP_LATEST = HIP_5020, + HIP_5030 = 5030, + HIP_LATEST = HIP_5030, }; struct cudaAPIversions { diff --git a/tests/lit.cfg b/tests/lit.cfg index 948dca04..5895cad5 100644 --- a/tests/lit.cfg +++ b/tests/lit.cfg @@ -55,6 +55,9 @@ if config.cuda_version_major < 9: config.excludes.append('cuSPARSE_07.cu') config.excludes.append('benchmark_curand_kernel.cpp') config.excludes.append('reinterpret_cast.cu') + config.excludes.append('cub_01.cu') + config.excludes.append('cub_02.cu') + config.excludes.append('cub_03.cu') if config.cuda_version_major < 10: config.excludes.append('cuSPARSE_08.cu') config.excludes.append('cuSPARSE_09.cu') @@ -76,6 +79,9 @@ if config.cuda_version_major > 10: config.excludes.append('cuSPARSE_02.cu') config.excludes.append('cuSPARSE_12.cu') +if config.cuda_version_major < 11 or (config.cuda_version_major == 11 and config.cuda_version_minor < 1): + config.excludes.append('runtime_functions_11010.cu') + # name: The name of this test suite. config.name = 'hipify' diff --git a/tests/unit_tests/libraries/cuDNN/cudnn_convolution_forward.cu b/tests/unit_tests/libraries/cuDNN/cudnn_convolution_forward.cu index 3e94bd6d..f57f5090 100644 --- a/tests/unit_tests/libraries/cuDNN/cudnn_convolution_forward.cu +++ b/tests/unit_tests/libraries/cuDNN/cudnn_convolution_forward.cu @@ -1,4 +1,4 @@ -// RUN: %run_test hipify "%s" "%t" --skip-excluded-preprocessor-conditional-blocks %hipify_args %clang_args +// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --hip-kernel-execution-syntax --skip-excluded-preprocessor-conditional-blocks %clang_args #include #include diff --git a/tests/unit_tests/synthetic/driver_defines.cu b/tests/unit_tests/synthetic/driver_defines.cu index 08c3309a..d7c51289 100644 --- a/tests/unit_tests/synthetic/driver_defines.cu +++ b/tests/unit_tests/synthetic/driver_defines.cu @@ -10,13 +10,6 @@ int main() { // CHECK: #define __HIPCC__; #define __CUDACC__; -#if CUDA_VERSION > 7050 - // CHECK: int DEVICE_CPU = hipCpuDeviceId; - // CHECK-NEXT: int DEVICE_INVALID = hipInvalidDeviceId; - int DEVICE_CPU = CU_DEVICE_CPU; - int DEVICE_INVALID = CU_DEVICE_INVALID; -#endif - // CHECK: int IPC_HANDLE_SIZE = HIP_IPC_HANDLE_SIZE; int IPC_HANDLE_SIZE = CU_IPC_HANDLE_SIZE; @@ -37,10 +30,6 @@ int main() { int MEMHOSTALLOC_WRITECOMBINED = CU_MEMHOSTALLOC_WRITECOMBINED; int MEMHOSTREGISTER_PORTABLE = CU_MEMHOSTREGISTER_PORTABLE; int MEMHOSTREGISTER_DEVICEMAP = CU_MEMHOSTREGISTER_DEVICEMAP; -#if CUDA_VERSION > 7000 - // CHECK: int MEMHOSTREGISTER_IOMEMORY = hipHostRegisterIoMemory; - int MEMHOSTREGISTER_IOMEMORY = CU_MEMHOSTREGISTER_IOMEMORY; -#endif // CHECK: int TRSA_OVERRIDE_FORMAT = HIP_TRSA_OVERRIDE_FORMAT; // CHECK-NEXT: int TRSF_NORMALIZED_COORDINATES = HIP_TRSF_NORMALIZED_COORDINATES; @@ -60,15 +49,27 @@ int main() { int ARRAY3D_CUBEMAP = CUDA_ARRAY3D_CUBEMAP; int ARRAY3D_TEXTURE_GATHER = CUDA_ARRAY3D_TEXTURE_GATHER; -#if CUDA_VERSION > 8000 + // CHECK: hipStream_t STREAM_PER_THREAD = hipStreamPerThread; + CUstream STREAM_PER_THREAD = CU_STREAM_PER_THREAD; + +#if CUDA_VERSION >= 7050 + // CHECK: int MEMHOSTREGISTER_IOMEMORY = hipHostRegisterIoMemory; + int MEMHOSTREGISTER_IOMEMORY = CU_MEMHOSTREGISTER_IOMEMORY; +#endif + +#if CUDA_VERSION >= 8000 + // CHECK: int DEVICE_CPU = hipCpuDeviceId; + // CHECK-NEXT: int DEVICE_INVALID = hipInvalidDeviceId; + int DEVICE_CPU = CU_DEVICE_CPU; + int DEVICE_INVALID = CU_DEVICE_INVALID; +#endif + +#if CUDA_VERSION >= 9000 // CHECK: int COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = hipCooperativeLaunchMultiDeviceNoPreSync; // CHECK-NEXT: int COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = hipCooperativeLaunchMultiDeviceNoPostSync; int COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC; int COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC; #endif - // CHECK: hipStream_t STREAM_PER_THREAD = hipStreamPerThread; - CUstream STREAM_PER_THREAD = CU_STREAM_PER_THREAD; - return 0; } diff --git a/tests/unit_tests/synthetic/driver_enums.cu b/tests/unit_tests/synthetic/driver_enums.cu index e8d19bc5..b97398c3 100644 --- a/tests/unit_tests/synthetic/driver_enums.cu +++ b/tests/unit_tests/synthetic/driver_enums.cu @@ -238,65 +238,6 @@ int main() { CUdevice_attribute DEVICE_ATTRIBUTE_MANAGED_MEMORY = CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY; CUdevice_attribute DEVICE_ATTRIBUTE_MULTI_GPU_BOARD = CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD; CUdevice_attribute DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID = CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID; -#if CUDA_VERSION > 7050 - // CHECK: hipDeviceAttribute_t DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED = hipDeviceAttributeHostNativeAtomicSupported; - // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO = hipDeviceAttributeSingleToDoublePrecisionPerfRatio; - // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS = hipDeviceAttributePageableMemoryAccess; - // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS = hipDeviceAttributeConcurrentManagedAccess; - // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED = hipDeviceAttributeComputePreemptionSupported; - // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM = hipDeviceAttributeCanUseHostPointerForRegisteredMem; - CUdevice_attribute DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED = CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED; - CUdevice_attribute DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO = CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO; - CUdevice_attribute DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS = CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS; - CUdevice_attribute DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS = CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS; - CUdevice_attribute DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED = CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED; - CUdevice_attribute DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM = CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM; -#endif -#if CUDA_VERSION > 8000 - // CHECK: hipDeviceAttribute_t DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR = hipDeviceAttributeCanUseStreamWaitValue; - // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH = hipDeviceAttributeCooperativeLaunch; - // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH = hipDeviceAttributeCooperativeMultiDeviceLaunch; - // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN = hipDeviceAttributeSharedMemPerBlockOptin; - CUdevice_attribute DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR = CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR; - CUdevice_attribute DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH = CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH; - CUdevice_attribute DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH = CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH; - CUdevice_attribute DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN = CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN; -#endif -#if CUDA_VERSION > 9010 - // CHECK: hipDeviceAttribute_t DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES = hipDeviceAttributePageableMemoryAccessUsesHostPageTables; - // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST = hipDeviceAttributeDirectManagedMemAccessFromHost; - CUdevice_attribute DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES = CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES; - CUdevice_attribute DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST = CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST; -#endif -#if CUDA_VERSION > 10020 - // CHECK: hipDeviceAttribute_t DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR = hipDeviceAttributeMaxBlocksPerMultiprocessor; - CUdevice_attribute DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR = CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR; -#endif -#if CUDA_VERSION >= 11020 - // CHECK: hipDeviceAttribute_t DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED = hipDeviceAttributeMemoryPoolsSupported; - CUdevice_attribute DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED = CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED; -#endif - -#if CUDA_VERSION > 7050 - // CHECK: hipDeviceP2PAttr deviceP2PAttribute; - // CHECK-NEXT: hipDeviceP2PAttr deviceP2PAttribute_enum; - // CHECK-NEXT: hipDeviceP2PAttr DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = hipDevP2PAttrPerformanceRank; - // CHECK-NEXT: hipDeviceP2PAttr DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = hipDevP2PAttrAccessSupported; - // CHECK-NEXT: hipDeviceP2PAttr DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED = hipDevP2PAttrNativeAtomicSupported; - CUdevice_P2PAttribute deviceP2PAttribute; - CUdevice_P2PAttribute_enum deviceP2PAttribute_enum; - CUdevice_P2PAttribute DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK; - CUdevice_P2PAttribute DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED; - CUdevice_P2PAttribute DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED = CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED; -#endif -#if CUDA_VERSION > 9020 - // CHECK: hipDeviceP2PAttr DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = hipDevP2PAttrHipArrayAccessSupported; - CUdevice_P2PAttribute DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED; -#endif -#if CUDA_VERSION == 10010 - // CHECK: hipDeviceP2PAttr DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED = hipDevP2PAttrHipArrayAccessSupported; - CUdevice_P2PAttribute DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED = CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED; -#endif // CHECK: int EVENT_DEFAULT = hipEventDefault; // CHECK-NEXT: int EVENT_BLOCKING_SYNC = hipEventBlockingSync; @@ -307,44 +248,6 @@ int main() { int EVENT_DISABLE_TIMING = CU_EVENT_DISABLE_TIMING; int EVENT_INTERPROCESS = CU_EVENT_INTERPROCESS; -#if CUDA_VERSION > 9020 - // CHECK: hipExternalMemoryHandleType externalMemoryHandleType; - // CHECK-NEXT: hipExternalMemoryHandleType_enum externalMemoryHandleType_enum; - // CHECK-NEXT: hipExternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD = hipExternalMemoryHandleTypeOpaqueFd; - // CHECK-NEXT: hipExternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 = hipExternalMemoryHandleTypeOpaqueWin32; - // CHECK-NEXT: hipExternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT = hipExternalMemoryHandleTypeOpaqueWin32Kmt; - // CHECK-NEXT: hipExternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP = hipExternalMemoryHandleTypeD3D12Heap; - // CHECK-NEXT: hipExternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE = hipExternalMemoryHandleTypeD3D12Resource; - CUexternalMemoryHandleType externalMemoryHandleType; - CUexternalMemoryHandleType_enum externalMemoryHandleType_enum; - CUexternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD = CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD; - CUexternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 = CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32; - CUexternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT = CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT; - CUexternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP = CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP; - CUexternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE = CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE; -#endif -#if CUDA_VERSION > 10010 - // CHECK: hipExternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE = hipExternalMemoryHandleTypeD3D11Resource; - // CHECK: hipExternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT = hipExternalMemoryHandleTypeD3D11ResourceKmt; - CUexternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE = CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE; - CUexternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT = CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT; -#endif - -#if CUDA_VERSION > 9020 - // CHECK: hipExternalSemaphoreHandleType externalSemaphoreHandleType; - // CHECK-NEXT: hipExternalSemaphoreHandleType_enum externalSemaphoreHandleType_enum; - // CHECK-NEXT: hipExternalSemaphoreHandleType EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD = hipExternalSemaphoreHandleTypeOpaqueFd; - // CHECK-NEXT: hipExternalSemaphoreHandleType EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 = hipExternalSemaphoreHandleTypeOpaqueWin32; - // CHECK-NEXT: hipExternalSemaphoreHandleType EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT = hipExternalSemaphoreHandleTypeOpaqueWin32Kmt; - // CHECK-NEXT: hipExternalSemaphoreHandleType EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE = hipExternalSemaphoreHandleTypeD3D12Fence; - CUexternalSemaphoreHandleType externalSemaphoreHandleType; - CUexternalSemaphoreHandleType_enum externalSemaphoreHandleType_enum; - CUexternalSemaphoreHandleType EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD = CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD; - CUexternalSemaphoreHandleType EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 = CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32; - CUexternalSemaphoreHandleType EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT = CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT; - CUexternalSemaphoreHandleType EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE = CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE; -#endif - // CHECK: HIPfilter_mode filter_mode; // CHECK-NEXT: HIPfilter_mode_enum filter_mode_enum; // CHECK-NEXT: HIPfilter_mode TR_FILTER_MODE_POINT = HIP_TR_FILTER_MODE_POINT; @@ -389,12 +292,6 @@ int main() { CUfunction_attribute FUNC_ATTRIBUTE_BINARY_VERSION = CU_FUNC_ATTRIBUTE_BINARY_VERSION; CUfunction_attribute FUNC_ATTRIBUTE_CACHE_MODE_CA = CU_FUNC_ATTRIBUTE_CACHE_MODE_CA; CUfunction_attribute FUNC_ATTRIBUTE_MAX = CU_FUNC_ATTRIBUTE_MAX; -#if CUDA_VERSION > 8000 - // CHECK: hipFunction_attribute FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES; - // CHECK-NEXT: hipFunction_attribute FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT; - CUfunction_attribute FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES; - CUfunction_attribute FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT; -#endif // CHECK: hipGraphicsRegisterFlags graphicsRegisterFlags; // CHECK-NEXT: hipGraphicsRegisterFlags graphicsRegisterFlags_enum; @@ -411,56 +308,6 @@ int main() { CUgraphicsRegisterFlags GRAPHICS_REGISTER_FLAGS_SURFACE_LDST = CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST; CUgraphicsRegisterFlags GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER; -#if CUDA_VERSION > 9020 - // CHECK: hipGraphNodeType graphNodeType; - // CHECK-NEXT: hipGraphNodeType graphNodeType_enum; - // CHECK-NEXT: hipGraphNodeType GRAPH_NODE_TYPE_KERNEL = hipGraphNodeTypeKernel; - // CHECK-NEXT: hipGraphNodeType GRAPH_NODE_TYPE_MEMCPY = hipGraphNodeTypeMemcpy; - // CHECK-NEXT: hipGraphNodeType GRAPH_NODE_TYPE_MEMSET = hipGraphNodeTypeMemset; - // CHECK-NEXT: hipGraphNodeType GRAPH_NODE_TYPE_HOST = hipGraphNodeTypeHost; - // CHECK-NEXT: hipGraphNodeType GRAPH_NODE_TYPE_GRAPH = hipGraphNodeTypeGraph; - // CHECK-NEXT: hipGraphNodeType GRAPH_NODE_TYPE_EMPTY = hipGraphNodeTypeEmpty; - CUgraphNodeType graphNodeType; - CUgraphNodeType_enum graphNodeType_enum; - CUgraphNodeType GRAPH_NODE_TYPE_KERNEL = CU_GRAPH_NODE_TYPE_KERNEL; - CUgraphNodeType GRAPH_NODE_TYPE_MEMCPY = CU_GRAPH_NODE_TYPE_MEMCPY; - CUgraphNodeType GRAPH_NODE_TYPE_MEMSET = CU_GRAPH_NODE_TYPE_MEMSET; - CUgraphNodeType GRAPH_NODE_TYPE_HOST = CU_GRAPH_NODE_TYPE_HOST; - CUgraphNodeType GRAPH_NODE_TYPE_GRAPH = CU_GRAPH_NODE_TYPE_GRAPH; - CUgraphNodeType GRAPH_NODE_TYPE_EMPTY = CU_GRAPH_NODE_TYPE_EMPTY; -#endif -#if CUDA_VERSION > 11000 - // CHECK: hipGraphNodeType GRAPH_NODE_TYPE_WAIT_EVENT = hipGraphNodeTypeWaitEvent; - // CHECK-NEXT: hipGraphNodeType GRAPH_NODE_TYPE_EVENT_RECORD = hipGraphNodeTypeEventRecord; - CUgraphNodeType GRAPH_NODE_TYPE_WAIT_EVENT = CU_GRAPH_NODE_TYPE_WAIT_EVENT; - CUgraphNodeType GRAPH_NODE_TYPE_EVENT_RECORD = CU_GRAPH_NODE_TYPE_EVENT_RECORD; -#endif - -#if CUDA_VERSION > 10010 - // CHECK: hipGraphExecUpdateResult graphExecUpdateResult; - // CHECK-NEXT: hipGraphExecUpdateResult graphExecUpdateResult_enum; - // CHECK-NEXT: hipGraphExecUpdateResult GRAPH_EXEC_UPDATE_SUCCESS = hipGraphExecUpdateSuccess; - // CHECK-NEXT: hipGraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR = hipGraphExecUpdateError; - // CHECK-NEXT: hipGraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED = hipGraphExecUpdateErrorTopologyChanged; - // CHECK-NEXT: hipGraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED = hipGraphExecUpdateErrorNodeTypeChanged; - // CHECK-NEXT: hipGraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED = hipGraphExecUpdateErrorFunctionChanged; - // CHECK-NEXT: hipGraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED = hipGraphExecUpdateErrorParametersChanged; - // CHECK-NEXT: hipGraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED = hipGraphExecUpdateErrorNotSupported; - CUgraphExecUpdateResult graphExecUpdateResult; - CUgraphExecUpdateResult_enum graphExecUpdateResult_enum; - CUgraphExecUpdateResult GRAPH_EXEC_UPDATE_SUCCESS = CU_GRAPH_EXEC_UPDATE_SUCCESS; - CUgraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR = CU_GRAPH_EXEC_UPDATE_ERROR; - CUgraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED = CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED; - CUgraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED = CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED; - CUgraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED = CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED; - CUgraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED = CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED; - CUgraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED = CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED; -#endif -#if CUDA_VERSION > 11010 - // CHECK: hipGraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE = hipGraphExecUpdateErrorUnsupportedFunctionChange; - CUgraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE = CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE; -#endif - // CHECK: int IPC_MEM_LAZY_ENABLE_PEER_ACCESS = hipIpcMemLazyEnablePeerAccess; int IPC_MEM_LAZY_ENABLE_PEER_ACCESS = CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS; @@ -499,43 +346,20 @@ int main() { CUjit_option JIT_GENERATE_LINE_INFO = CU_JIT_GENERATE_LINE_INFO; CUjit_option JIT_CACHE_MODE = CU_JIT_CACHE_MODE; -#if CUDA_VERSION > 7050 - // CHECK: hipJitOption JIT_NEW_SM3X_OPT = hipJitOptionSm3xOpt; - // CHECK-NEXT: hipJitOption JIT_FAST_COMPILE = hipJitOptionFastCompile; - CUjit_option JIT_NEW_SM3X_OPT = CU_JIT_NEW_SM3X_OPT; - CUjit_option JIT_FAST_COMPILE = CU_JIT_FAST_COMPILE; -#endif // CHECK: hipJitOption JIT_NUM_OPTIONS = hipJitOptionNumOptions; CUjit_option JIT_NUM_OPTIONS = CU_JIT_NUM_OPTIONS; // CHECK: hipLimit_t limit; // CHECK-NEXT: hipLimit_t limit_enum; + // CHECK-NEXT: hipLimit_t LIMIT_STACK_SIZE = hipLimitStackSize; // CHECK-NEXT: hipLimit_t LIMIT_PRINTF_FIFO_SIZE = hipLimitPrintfFifoSize; // CHECK-NEXT: hipLimit_t LIMIT_MALLOC_HEAP_SIZE = hipLimitMallocHeapSize; CUlimit limit; CUlimit_enum limit_enum; + CUlimit LIMIT_STACK_SIZE = CU_LIMIT_STACK_SIZE; CUlimit LIMIT_PRINTF_FIFO_SIZE = CU_LIMIT_PRINTF_FIFO_SIZE; CUlimit LIMIT_MALLOC_HEAP_SIZE = CU_LIMIT_MALLOC_HEAP_SIZE; -#if CUDA_VERSION > 7050 - // CHECK: hipMemoryAdvise mem_advise; - // CHECK-NEXT: hipMemoryAdvise mem_advise_enum; - // CHECK-NEXT: hipMemoryAdvise MEM_ADVISE_SET_READ_MOSTLY = hipMemAdviseSetReadMostly; - // CHECK-NEXT: hipMemoryAdvise MEM_ADVISE_UNSET_READ_MOSTLY = hipMemAdviseUnsetReadMostly; - // CHECK-NEXT: hipMemoryAdvise MEM_ADVISE_SET_PREFERRED_LOCATION = hipMemAdviseSetPreferredLocation; - // CHECK-NEXT: hipMemoryAdvise MEM_ADVISE_UNSET_PREFERRED_LOCATION = hipMemAdviseUnsetPreferredLocation; - // CHECK-NEXT: hipMemoryAdvise MEM_ADVISE_SET_ACCESSED_BY = hipMemAdviseSetAccessedBy; - // CHECK-NEXT: hipMemoryAdvise MEM_ADVISE_UNSET_ACCESSED_BY = hipMemAdviseUnsetAccessedBy; - CUmem_advise mem_advise; - CUmem_advise_enum mem_advise_enum; - CUmem_advise MEM_ADVISE_SET_READ_MOSTLY = CU_MEM_ADVISE_SET_READ_MOSTLY; - CUmem_advise MEM_ADVISE_UNSET_READ_MOSTLY = CU_MEM_ADVISE_UNSET_READ_MOSTLY; - CUmem_advise MEM_ADVISE_SET_PREFERRED_LOCATION = CU_MEM_ADVISE_SET_PREFERRED_LOCATION; - CUmem_advise MEM_ADVISE_UNSET_PREFERRED_LOCATION = CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION; - CUmem_advise MEM_ADVISE_SET_ACCESSED_BY = CU_MEM_ADVISE_SET_ACCESSED_BY; - CUmem_advise MEM_ADVISE_UNSET_ACCESSED_BY = CU_MEM_ADVISE_UNSET_ACCESSED_BY; -#endif - // CHECK: int MEM_ATTACH_GLOBAL = hipMemAttachGlobal; // CHECK-NEXT: int MEM_ATTACH_HOST = hipMemAttachHost; // CHECK-NEXT: int MEM_ATTACH_SINGLE = hipMemAttachSingle; @@ -543,21 +367,6 @@ int main() { int MEM_ATTACH_HOST = CU_MEM_ATTACH_HOST; int MEM_ATTACH_SINGLE = CU_MEM_ATTACH_SINGLE; -#if CUDA_VERSION > 7050 - // CHECK: hipMemRangeAttribute mem_range_attribute; - // CHECK-NEXT: hipMemRangeAttribute mem_range_attribute_enum; - // CHECK-NEXT: hipMemRangeAttribute MEM_RANGE_ATTRIBUTE_READ_MOSTLY = hipMemRangeAttributeReadMostly; - // CHECK-NEXT: hipMemRangeAttribute MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION = hipMemRangeAttributePreferredLocation; - // CHECK-NEXT: hipMemRangeAttribute MEM_RANGE_ATTRIBUTE_ACCESSED_BY = hipMemRangeAttributeAccessedBy; - // CHECK-NEXT: hipMemRangeAttribute MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = hipMemRangeAttributeLastPrefetchLocation; - CUmem_range_attribute mem_range_attribute; - CUmem_range_attribute_enum mem_range_attribute_enum; - CUmem_range_attribute MEM_RANGE_ATTRIBUTE_READ_MOSTLY = CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY; - CUmem_range_attribute MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION = CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION; - CUmem_range_attribute MEM_RANGE_ATTRIBUTE_ACCESSED_BY = CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY; - CUmem_range_attribute MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION; -#endif - // CHECK: hipPointer_attribute pointer_attribute; // CHECK: hipPointer_attribute pointer_attribute_enum; // CHECK-NEXT: hipPointer_attribute POINTER_ATTRIBUTE_CONTEXT = HIP_POINTER_ATTRIBUTE_CONTEXT; @@ -568,15 +377,6 @@ int main() { // CHECK-NEXT: hipPointer_attribute POINTER_ATTRIBUTE_SYNC_MEMOPS = HIP_POINTER_ATTRIBUTE_SYNC_MEMOPS; // CHECK-NEXT: hipPointer_attribute POINTER_ATTRIBUTE_BUFFER_ID = HIP_POINTER_ATTRIBUTE_BUFFER_ID; // CHECK-NEXT: hipPointer_attribute POINTER_ATTRIBUTE_IS_MANAGED = HIP_POINTER_ATTRIBUTE_IS_MANAGED; - // CHECK-NEXT: hipPointer_attribute POINTER_ATTRIBUTE_DEVICE_ORDINAL = HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL; - // CHECK-NEXT: hipPointer_attribute POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE = HIP_POINTER_ATTRIBUTE_IS_LEGACY_HIP_IPC_CAPABLE; - // CHECK-NEXT: hipPointer_attribute POINTER_ATTRIBUTE_RANGE_START_ADDR = HIP_POINTER_ATTRIBUTE_RANGE_START_ADDR; - // CHECK-NEXT: hipPointer_attribute POINTER_ATTRIBUTE_RANGE_SIZE = HIP_POINTER_ATTRIBUTE_RANGE_SIZE; - // CHECK-NEXT: hipPointer_attribute POINTER_ATTRIBUTE_MAPPED = HIP_POINTER_ATTRIBUTE_MAPPED; - // CHECK-NEXT: hipPointer_attribute POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = HIP_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES; - // CHECK-NEXT: hipPointer_attribute POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE = HIP_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE; - // CHECK-NEXT: hipPointer_attribute POINTER_ATTRIBUTE_ACCESS_FLAGS = HIP_POINTER_ATTRIBUTE_ACCESS_FLAGS; - // CHECK-NEXT: hipPointer_attribute POINTER_ATTRIBUTE_MEMPOOL_HANDLE = HIP_POINTER_ATTRIBUTE_MEMPOOL_HANDLE; CUpointer_attribute pointer_attribute; CUpointer_attribute_enum pointer_attribute_enum; CUpointer_attribute POINTER_ATTRIBUTE_CONTEXT = CU_POINTER_ATTRIBUTE_CONTEXT; @@ -587,15 +387,6 @@ int main() { CUpointer_attribute POINTER_ATTRIBUTE_SYNC_MEMOPS = CU_POINTER_ATTRIBUTE_SYNC_MEMOPS; CUpointer_attribute POINTER_ATTRIBUTE_BUFFER_ID = CU_POINTER_ATTRIBUTE_BUFFER_ID; CUpointer_attribute POINTER_ATTRIBUTE_IS_MANAGED = CU_POINTER_ATTRIBUTE_IS_MANAGED; - CUpointer_attribute POINTER_ATTRIBUTE_DEVICE_ORDINAL = CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL; - CUpointer_attribute POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE = CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE; - CUpointer_attribute POINTER_ATTRIBUTE_RANGE_START_ADDR = CU_POINTER_ATTRIBUTE_RANGE_START_ADDR; - CUpointer_attribute POINTER_ATTRIBUTE_RANGE_SIZE = CU_POINTER_ATTRIBUTE_RANGE_SIZE; - CUpointer_attribute POINTER_ATTRIBUTE_MAPPED = CU_POINTER_ATTRIBUTE_MAPPED; - CUpointer_attribute POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES; - CUpointer_attribute POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE = CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE; - CUpointer_attribute POINTER_ATTRIBUTE_ACCESS_FLAGS = CU_POINTER_ATTRIBUTE_ACCESS_FLAGS; - CUpointer_attribute POINTER_ATTRIBUTE_MEMPOOL_HANDLE = CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE; // CHECK: int OCCUPANCY_DEFAULT = hipOccupancyDefault; int OCCUPANCY_DEFAULT = CU_OCCUPANCY_DEFAULT; @@ -790,43 +581,10 @@ int main() { CUresult ERROR_HOST_MEMORY_NOT_REGISTERED = CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED; CUresult ERROR_LAUNCH_FAILED = CUDA_ERROR_LAUNCH_FAILED; CUresult ERROR_NOT_SUPPORTED_ = CUDA_ERROR_NOT_SUPPORTED; -#if CUDA_VERSION > 8000 - // CHECK: hipError_t ERROR_COOPERATIVE_LAUNCH_TOO_LARGE = hipErrorCooperativeLaunchTooLarge; - CUresult ERROR_COOPERATIVE_LAUNCH_TOO_LARGE = CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE; -#endif -#if CUDA_VERSION > 9020 - // CHECK: hipError_t ERROR_STREAM_CAPTURE_UNSUPPORTED = hipErrorStreamCaptureUnsupported; - // CHECK-NEXT: hipError_t ERROR_STREAM_CAPTURE_INVALIDATED = hipErrorStreamCaptureInvalidated; - // CHECK-NEXT: hipError_t ERROR_STREAM_CAPTURE_MERGE = hipErrorStreamCaptureMerge; - // CHECK-NEXT: hipError_t ERROR_STREAM_CAPTURE_UNMATCHED = hipErrorStreamCaptureUnmatched; - // CHECK-NEXT: hipError_t ERROR_STREAM_CAPTURE_UNJOINED = hipErrorStreamCaptureUnjoined; - // CHECK-NEXT: hipError_t ERROR_STREAM_CAPTURE_ISOLATION = hipErrorStreamCaptureIsolation; - // CHECK-NEXT: hipError_t ERROR_STREAM_CAPTURE_IMPLICIT = hipErrorStreamCaptureImplicit; - // CHECK-NEXT: hipError_t ERROR_CAPTURED_EVENT = hipErrorCapturedEvent; - // CHECK-NEXT: hipError_t ERROR_ILLEGAL_STATE = hipErrorIllegalState; - CUresult ERROR_STREAM_CAPTURE_UNSUPPORTED = CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED; - CUresult ERROR_STREAM_CAPTURE_INVALIDATED = CUDA_ERROR_STREAM_CAPTURE_INVALIDATED; - CUresult ERROR_STREAM_CAPTURE_MERGE = CUDA_ERROR_STREAM_CAPTURE_MERGE; - CUresult ERROR_STREAM_CAPTURE_UNMATCHED = CUDA_ERROR_STREAM_CAPTURE_UNMATCHED; - CUresult ERROR_STREAM_CAPTURE_UNJOINED = CUDA_ERROR_STREAM_CAPTURE_UNJOINED; - CUresult ERROR_STREAM_CAPTURE_ISOLATION = CUDA_ERROR_STREAM_CAPTURE_ISOLATION; - CUresult ERROR_STREAM_CAPTURE_IMPLICIT = CUDA_ERROR_STREAM_CAPTURE_IMPLICIT; - CUresult ERROR_CAPTURED_EVENT = CUDA_ERROR_CAPTURED_EVENT; - CUresult ERROR_ILLEGAL_STATE = CUDA_ERROR_ILLEGAL_STATE; -#endif + // CHECK: hipError_t ERROR_UNKNOWN = hipErrorUnknown; CUresult ERROR_UNKNOWN = CUDA_ERROR_UNKNOWN; -#if CUDA_VERSION > 10000 - // CHECK: hipError_t ERROR_STREAM_CAPTURE_WRONG_THREAD = hipErrorStreamCaptureWrongThread; - CUresult ERROR_STREAM_CAPTURE_WRONG_THREAD = CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD; -#endif - -#if CUDA_VERSION > 10010 - // CHECK: hipError_t ERROR_GRAPH_EXEC_UPDATE_FAILURE = hipErrorGraphExecUpdateFailure; - CUresult ERROR_GRAPH_EXEC_UPDATE_FAILURE = CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE; -#endif - // CHECK: hipSharedMemConfig sharedconfig; // CHECK-NEXT: hipSharedMemConfig sharedconfig_enum; // CHECK-NEXT: hipSharedMemConfig SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE = hipSharedMemBankSizeDefault; @@ -843,45 +601,6 @@ int main() { int STREAM_DEFAULT = CU_STREAM_DEFAULT; int STREAM_NON_BLOCKING = CU_STREAM_NON_BLOCKING; -#if CUDA_VERSION > 9020 - // CHECK: hipStreamCaptureStatus streamCaptureStatus; - // CHECK-NEXT: hipStreamCaptureStatus streamCaptureStatus_enum; - // CHECK-NEXT: hipStreamCaptureStatus STREAM_CAPTURE_STATUS_NONE = hipStreamCaptureStatusNone; - // CHECK-NEXT: hipStreamCaptureStatus STREAM_CAPTURE_STATUS_ACTIVE = hipStreamCaptureStatusActive; - // CHECK-NEXT: hipStreamCaptureStatus STREAM_CAPTURE_STATUS_INVALIDATED = hipStreamCaptureStatusInvalidated; - CUstreamCaptureStatus streamCaptureStatus; - CUstreamCaptureStatus_enum streamCaptureStatus_enum; - CUstreamCaptureStatus STREAM_CAPTURE_STATUS_NONE = CU_STREAM_CAPTURE_STATUS_NONE; - CUstreamCaptureStatus STREAM_CAPTURE_STATUS_ACTIVE = CU_STREAM_CAPTURE_STATUS_ACTIVE; - CUstreamCaptureStatus STREAM_CAPTURE_STATUS_INVALIDATED = CU_STREAM_CAPTURE_STATUS_INVALIDATED; -#endif - -#if CUDA_VERSION > 10000 - // CHECK: hipStreamCaptureMode streamCaptureMode; - // CHECK-NEXT: hipStreamCaptureMode streamCaptureMode_enum; - // CHECK-NEXT: hipStreamCaptureMode STREAM_CAPTURE_MODE_GLOBAL = hipStreamCaptureModeGlobal; - // CHECK-NEXT: hipStreamCaptureMode STREAM_CAPTURE_MODE_THREAD_LOCAL = hipStreamCaptureModeThreadLocal; - // CHECK-NEXT: hipStreamCaptureMode STREAM_CAPTURE_MODE_RELAXED = hipStreamCaptureModeRelaxed; - CUstreamCaptureMode streamCaptureMode; - CUstreamCaptureMode_enum streamCaptureMode_enum; - CUstreamCaptureMode STREAM_CAPTURE_MODE_GLOBAL = CU_STREAM_CAPTURE_MODE_GLOBAL; - CUstreamCaptureMode STREAM_CAPTURE_MODE_THREAD_LOCAL = CU_STREAM_CAPTURE_MODE_THREAD_LOCAL; - CUstreamCaptureMode STREAM_CAPTURE_MODE_RELAXED = CU_STREAM_CAPTURE_MODE_RELAXED; -#endif - -#if CUDA_VERSION > 7050 - // CHECK: int STREAM_WAIT_VALUE_GEQ = hipStreamWaitValueGte; - // CHECK-NEXT: int STREAM_WAIT_VALUE_EQ = hipStreamWaitValueEq; - // CHECK-NEXT: int STREAM_WAIT_VALUE_AND = hipStreamWaitValueAnd; - int STREAM_WAIT_VALUE_GEQ = CU_STREAM_WAIT_VALUE_GEQ; - int STREAM_WAIT_VALUE_EQ = CU_STREAM_WAIT_VALUE_EQ; - int STREAM_WAIT_VALUE_AND = CU_STREAM_WAIT_VALUE_AND; -#endif -#if CUDA_VERSION > 8000 - // CHECK: int STREAM_WAIT_VALUE_NOR = hipStreamWaitValueNor; - int STREAM_WAIT_VALUE_NOR = CU_STREAM_WAIT_VALUE_NOR; -#endif - // CHECK: hipGLDeviceList GLDeviceList; // CHECK-NEXT: hipGLDeviceList GLDeviceList_enum; // CHECK-NEXT: hipGLDeviceList GL_DEVICE_LIST_ALL = hipGLDeviceListAll; @@ -893,73 +612,240 @@ int main() { CUGLDeviceList GL_DEVICE_LIST_CURRENT_FRAME = CU_GL_DEVICE_LIST_CURRENT_FRAME; CUGLDeviceList GL_DEVICE_LIST_NEXT_FRAME = CU_GL_DEVICE_LIST_NEXT_FRAME; -#if CUDA_VERSION > 11020 - // CHECK: hipStreamUpdateCaptureDependenciesFlags StreamUpdateCaptureDependencies_flags; - // CHECK-NEXT: hipStreamUpdateCaptureDependenciesFlags StreamUpdateCaptureDependencies_flags_enum; - // CHECK-NEXT: hipStreamUpdateCaptureDependenciesFlags STREAM_ADD_CAPTURE_DEPENDENCIES = hipStreamAddCaptureDependencies; - // CHECK-NEXT: hipStreamUpdateCaptureDependenciesFlags STREAM_SET_CAPTURE_DEPENDENCIES = hipStreamSetCaptureDependencies; - CUstreamUpdateCaptureDependencies_flags StreamUpdateCaptureDependencies_flags; - CUstreamUpdateCaptureDependencies_flags_enum StreamUpdateCaptureDependencies_flags_enum; - CUstreamUpdateCaptureDependencies_flags STREAM_ADD_CAPTURE_DEPENDENCIES = CU_STREAM_ADD_CAPTURE_DEPENDENCIES; - CUstreamUpdateCaptureDependencies_flags STREAM_SET_CAPTURE_DEPENDENCIES = CU_STREAM_SET_CAPTURE_DEPENDENCIES; -#endif - - // CHECK: typedef struct hipGraphicsResource *graphicsResource_st; + // CHECK: typedef struct hipGraphicsResource* graphicsResource_st; // CHECK-NEXT: hipGraphicsResource_t graphicsResource; - typedef struct CUgraphicsResource_st *graphicsResource_st; + typedef struct CUgraphicsResource_st* graphicsResource_st; CUgraphicsResource graphicsResource; -#if CUDA_VERSION >= 11000 - // CHECK: hipKernelNodeAttrID kernelNodeAttrID; - // CHECK-NEXT: hipKernelNodeAttrID kernelNodeAttrID_enum; - // CHECK-NEXT: hipKernelNodeAttrID KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = hipKernelNodeAttributeAccessPolicyWindow; - // CHECK-NEXT: hipKernelNodeAttrID KERNEL_NODE_ATTRIBUTE_COOPERATIVE = hipKernelNodeAttributeCooperative; - CUkernelNodeAttrID kernelNodeAttrID; - CUkernelNodeAttrID_enum kernelNodeAttrID_enum; - CUkernelNodeAttrID KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW; - CUkernelNodeAttrID KERNEL_NODE_ATTRIBUTE_COOPERATIVE = CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE; +#if CUDA_VERSION >= 8000 + // CHECK: hipDeviceAttribute_t DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED = hipDeviceAttributeHostNativeAtomicSupported; + // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO = hipDeviceAttributeSingleToDoublePrecisionPerfRatio; + // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS = hipDeviceAttributePageableMemoryAccess; + // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS = hipDeviceAttributeConcurrentManagedAccess; + // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED = hipDeviceAttributeComputePreemptionSupported; + // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM = hipDeviceAttributeCanUseHostPointerForRegisteredMem; + CUdevice_attribute DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED = CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED; + CUdevice_attribute DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO = CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO; + CUdevice_attribute DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS = CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS; + CUdevice_attribute DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS = CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS; + CUdevice_attribute DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED = CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED; + CUdevice_attribute DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM = CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM; - // CHECK: hipAccessProperty accessProperty; - // CHECK-NEXT: hipAccessProperty accessProperty_enum; - // CHECK-NEXT: hipAccessProperty ACCESS_PROPERTY_NORMAL = hipAccessPropertyNormal; - // CHECK-NEXT: hipAccessProperty ACCESS_PROPERTY_STREAMING = hipAccessPropertyStreaming; - // CHECK-NEXT: hipAccessProperty ACCESS_PROPERTY_PERSISTING = hipAccessPropertyPersisting; - CUaccessProperty accessProperty; - CUaccessProperty_enum accessProperty_enum; - CUaccessProperty ACCESS_PROPERTY_NORMAL = CU_ACCESS_PROPERTY_NORMAL; - CUaccessProperty ACCESS_PROPERTY_STREAMING = CU_ACCESS_PROPERTY_STREAMING; - CUaccessProperty ACCESS_PROPERTY_PERSISTING = CU_ACCESS_PROPERTY_PERSISTING; + // CHECK: hipDeviceP2PAttr deviceP2PAttribute; + // CHECK-NEXT: hipDeviceP2PAttr deviceP2PAttribute_enum; + // CHECK-NEXT: hipDeviceP2PAttr DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = hipDevP2PAttrPerformanceRank; + // CHECK-NEXT: hipDeviceP2PAttr DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = hipDevP2PAttrAccessSupported; + // CHECK-NEXT: hipDeviceP2PAttr DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED = hipDevP2PAttrNativeAtomicSupported; + CUdevice_P2PAttribute deviceP2PAttribute; + CUdevice_P2PAttribute_enum deviceP2PAttribute_enum; + CUdevice_P2PAttribute DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK; + CUdevice_P2PAttribute DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED; + CUdevice_P2PAttribute DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED = CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED; + // CHECK: hipJitOption JIT_NEW_SM3X_OPT = hipJitOptionSm3xOpt; + // CHECK-NEXT: hipJitOption JIT_FAST_COMPILE = hipJitOptionFastCompile; + CUjit_option JIT_NEW_SM3X_OPT = CU_JIT_NEW_SM3X_OPT; + CUjit_option JIT_FAST_COMPILE = CU_JIT_FAST_COMPILE; + // CHECK: hipMemoryAdvise mem_advise; + // CHECK-NEXT: hipMemoryAdvise mem_advise_enum; + // CHECK-NEXT: hipMemoryAdvise MEM_ADVISE_SET_READ_MOSTLY = hipMemAdviseSetReadMostly; + // CHECK-NEXT: hipMemoryAdvise MEM_ADVISE_UNSET_READ_MOSTLY = hipMemAdviseUnsetReadMostly; + // CHECK-NEXT: hipMemoryAdvise MEM_ADVISE_SET_PREFERRED_LOCATION = hipMemAdviseSetPreferredLocation; + // CHECK-NEXT: hipMemoryAdvise MEM_ADVISE_UNSET_PREFERRED_LOCATION = hipMemAdviseUnsetPreferredLocation; + // CHECK-NEXT: hipMemoryAdvise MEM_ADVISE_SET_ACCESSED_BY = hipMemAdviseSetAccessedBy; + // CHECK-NEXT: hipMemoryAdvise MEM_ADVISE_UNSET_ACCESSED_BY = hipMemAdviseUnsetAccessedBy; + CUmem_advise mem_advise; + CUmem_advise_enum mem_advise_enum; + CUmem_advise MEM_ADVISE_SET_READ_MOSTLY = CU_MEM_ADVISE_SET_READ_MOSTLY; + CUmem_advise MEM_ADVISE_UNSET_READ_MOSTLY = CU_MEM_ADVISE_UNSET_READ_MOSTLY; + CUmem_advise MEM_ADVISE_SET_PREFERRED_LOCATION = CU_MEM_ADVISE_SET_PREFERRED_LOCATION; + CUmem_advise MEM_ADVISE_UNSET_PREFERRED_LOCATION = CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION; + CUmem_advise MEM_ADVISE_SET_ACCESSED_BY = CU_MEM_ADVISE_SET_ACCESSED_BY; + CUmem_advise MEM_ADVISE_UNSET_ACCESSED_BY = CU_MEM_ADVISE_UNSET_ACCESSED_BY; + + // CHECK: hipMemRangeAttribute mem_range_attribute; + // CHECK-NEXT: hipMemRangeAttribute mem_range_attribute_enum; + // CHECK-NEXT: hipMemRangeAttribute MEM_RANGE_ATTRIBUTE_READ_MOSTLY = hipMemRangeAttributeReadMostly; + // CHECK-NEXT: hipMemRangeAttribute MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION = hipMemRangeAttributePreferredLocation; + // CHECK-NEXT: hipMemRangeAttribute MEM_RANGE_ATTRIBUTE_ACCESSED_BY = hipMemRangeAttributeAccessedBy; + // CHECK-NEXT: hipMemRangeAttribute MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = hipMemRangeAttributeLastPrefetchLocation; + CUmem_range_attribute mem_range_attribute; + CUmem_range_attribute_enum mem_range_attribute_enum; + CUmem_range_attribute MEM_RANGE_ATTRIBUTE_READ_MOSTLY = CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY; + CUmem_range_attribute MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION = CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION; + CUmem_range_attribute MEM_RANGE_ATTRIBUTE_ACCESSED_BY = CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY; + CUmem_range_attribute MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION; + + // CHECK: int STREAM_WAIT_VALUE_GEQ = hipStreamWaitValueGte; + // CHECK-NEXT: int STREAM_WAIT_VALUE_EQ = hipStreamWaitValueEq; + // CHECK-NEXT: int STREAM_WAIT_VALUE_AND = hipStreamWaitValueAnd; + int STREAM_WAIT_VALUE_GEQ = CU_STREAM_WAIT_VALUE_GEQ; + int STREAM_WAIT_VALUE_EQ = CU_STREAM_WAIT_VALUE_EQ; + int STREAM_WAIT_VALUE_AND = CU_STREAM_WAIT_VALUE_AND; #endif -#if CUDA_VERSION >= 11020 - // CHECK: hipMemPoolAttr memPool_attribute; - // CHECK-NEXT: hipMemPoolAttr memPool_attribute_enum; - // CHECK-NEXT: hipMemPoolAttr MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES = hipMemPoolReuseFollowEventDependencies; - // CHECK-NEXT: hipMemPoolAttr MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC = hipMemPoolReuseAllowOpportunistic; - // CHECK-NEXT: hipMemPoolAttr MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES = hipMemPoolReuseAllowInternalDependencies; - // CHECK-NEXT: hipMemPoolAttr MEMPOOL_ATTR_RELEASE_THRESHOLD = hipMemPoolAttrReleaseThreshold; - CUmemPool_attribute memPool_attribute; - CUmemPool_attribute_enum memPool_attribute_enum; - CUmemPool_attribute MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES = CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES; - CUmemPool_attribute MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC = CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC; - CUmemPool_attribute MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES = CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES; - CUmemPool_attribute MEMPOOL_ATTR_RELEASE_THRESHOLD = CU_MEMPOOL_ATTR_RELEASE_THRESHOLD; +#if CUDA_VERSION >= 9000 + // CHECK: hipDeviceAttribute_t DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR = hipDeviceAttributeCanUseStreamWaitValue; + // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH = hipDeviceAttributeCooperativeLaunch; + // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH = hipDeviceAttributeCooperativeMultiDeviceLaunch; + // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN = hipDeviceAttributeSharedMemPerBlockOptin; + CUdevice_attribute DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR = CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR; + CUdevice_attribute DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH = CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH; + CUdevice_attribute DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH = CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH; + CUdevice_attribute DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN = CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN; + + // CHECK: hipFunction_attribute FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES; + // CHECK-NEXT: hipFunction_attribute FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT; + CUfunction_attribute FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES; + CUfunction_attribute FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT; + + // CHECK: hipError_t ERROR_COOPERATIVE_LAUNCH_TOO_LARGE = hipErrorCooperativeLaunchTooLarge; + CUresult ERROR_COOPERATIVE_LAUNCH_TOO_LARGE = CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE; + + // CHECK: int STREAM_WAIT_VALUE_NOR = hipStreamWaitValueNor; + int STREAM_WAIT_VALUE_NOR = CU_STREAM_WAIT_VALUE_NOR; #endif -#if CUDA_VERSION >= 11030 - // CHECK: hipMemPoolAttr MEMPOOL_ATTR_RESERVED_MEM_CURRENT = hipMemPoolAttrReservedMemCurrent; - // CHECK-NEXT: hipMemPoolAttr MEMPOOL_ATTR_RESERVED_MEM_HIGH = hipMemPoolAttrReservedMemHigh; - // CHECK-NEXT: hipMemPoolAttr MEMPOOL_ATTR_USED_MEM_CURRENT = hipMemPoolAttrUsedMemCurrent; - // CHECK-NEXT: hipMemPoolAttr MEMPOOL_ATTR_USED_MEM_HIGH = hipMemPoolAttrUsedMemHigh; - CUmemPool_attribute MEMPOOL_ATTR_RESERVED_MEM_CURRENT = CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT; - CUmemPool_attribute MEMPOOL_ATTR_RESERVED_MEM_HIGH = CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH; - CUmemPool_attribute MEMPOOL_ATTR_USED_MEM_CURRENT = CU_MEMPOOL_ATTR_USED_MEM_CURRENT; - CUmemPool_attribute MEMPOOL_ATTR_USED_MEM_HIGH = CU_MEMPOOL_ATTR_USED_MEM_HIGH; +#if CUDA_VERSION >= 9020 + // CHECK: hipDeviceAttribute_t DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES = hipDeviceAttributePageableMemoryAccessUsesHostPageTables; + // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST = hipDeviceAttributeDirectManagedMemAccessFromHost; + CUdevice_attribute DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES = CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES; + CUdevice_attribute DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST = CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST; + + // CHECK: hipPointer_attribute POINTER_ATTRIBUTE_DEVICE_ORDINAL = HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL; + CUpointer_attribute POINTER_ATTRIBUTE_DEVICE_ORDINAL = CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL; +#endif + +#if CUDA_VERSION >= 10000 + // CHECK: hipDeviceP2PAttr DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = hipDevP2PAttrHipArrayAccessSupported; + CUdevice_P2PAttribute DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED; + + // CHECK: hipExternalMemoryHandleType externalMemoryHandleType; + // CHECK-NEXT: hipExternalMemoryHandleType_enum externalMemoryHandleType_enum; + // CHECK-NEXT: hipExternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD = hipExternalMemoryHandleTypeOpaqueFd; + // CHECK-NEXT: hipExternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 = hipExternalMemoryHandleTypeOpaqueWin32; + // CHECK-NEXT: hipExternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT = hipExternalMemoryHandleTypeOpaqueWin32Kmt; + // CHECK-NEXT: hipExternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP = hipExternalMemoryHandleTypeD3D12Heap; + // CHECK-NEXT: hipExternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE = hipExternalMemoryHandleTypeD3D12Resource; + CUexternalMemoryHandleType externalMemoryHandleType; + CUexternalMemoryHandleType_enum externalMemoryHandleType_enum; + CUexternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD = CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD; + CUexternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 = CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32; + CUexternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT = CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT; + CUexternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP = CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP; + CUexternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE = CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE; + + // CHECK: hipExternalSemaphoreHandleType externalSemaphoreHandleType; + // CHECK-NEXT: hipExternalSemaphoreHandleType_enum externalSemaphoreHandleType_enum; + // CHECK-NEXT: hipExternalSemaphoreHandleType EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD = hipExternalSemaphoreHandleTypeOpaqueFd; + // CHECK-NEXT: hipExternalSemaphoreHandleType EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 = hipExternalSemaphoreHandleTypeOpaqueWin32; + // CHECK-NEXT: hipExternalSemaphoreHandleType EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT = hipExternalSemaphoreHandleTypeOpaqueWin32Kmt; + // CHECK-NEXT: hipExternalSemaphoreHandleType EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE = hipExternalSemaphoreHandleTypeD3D12Fence; + CUexternalSemaphoreHandleType externalSemaphoreHandleType; + CUexternalSemaphoreHandleType_enum externalSemaphoreHandleType_enum; + CUexternalSemaphoreHandleType EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD = CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD; + CUexternalSemaphoreHandleType EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 = CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32; + CUexternalSemaphoreHandleType EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT = CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT; + CUexternalSemaphoreHandleType EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE = CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE; + + // CHECK: hipGraphNodeType graphNodeType; + // CHECK-NEXT: hipGraphNodeType graphNodeType_enum; + // CHECK-NEXT: hipGraphNodeType GRAPH_NODE_TYPE_KERNEL = hipGraphNodeTypeKernel; + // CHECK-NEXT: hipGraphNodeType GRAPH_NODE_TYPE_MEMCPY = hipGraphNodeTypeMemcpy; + // CHECK-NEXT: hipGraphNodeType GRAPH_NODE_TYPE_MEMSET = hipGraphNodeTypeMemset; + // CHECK-NEXT: hipGraphNodeType GRAPH_NODE_TYPE_HOST = hipGraphNodeTypeHost; + // CHECK-NEXT: hipGraphNodeType GRAPH_NODE_TYPE_GRAPH = hipGraphNodeTypeGraph; + // CHECK-NEXT: hipGraphNodeType GRAPH_NODE_TYPE_EMPTY = hipGraphNodeTypeEmpty; + CUgraphNodeType graphNodeType; + CUgraphNodeType_enum graphNodeType_enum; + CUgraphNodeType GRAPH_NODE_TYPE_KERNEL = CU_GRAPH_NODE_TYPE_KERNEL; + CUgraphNodeType GRAPH_NODE_TYPE_MEMCPY = CU_GRAPH_NODE_TYPE_MEMCPY; + CUgraphNodeType GRAPH_NODE_TYPE_MEMSET = CU_GRAPH_NODE_TYPE_MEMSET; + CUgraphNodeType GRAPH_NODE_TYPE_HOST = CU_GRAPH_NODE_TYPE_HOST; + CUgraphNodeType GRAPH_NODE_TYPE_GRAPH = CU_GRAPH_NODE_TYPE_GRAPH; + CUgraphNodeType GRAPH_NODE_TYPE_EMPTY = CU_GRAPH_NODE_TYPE_EMPTY; + + // CHECK: hipError_t ERROR_STREAM_CAPTURE_UNSUPPORTED = hipErrorStreamCaptureUnsupported; + // CHECK-NEXT: hipError_t ERROR_STREAM_CAPTURE_INVALIDATED = hipErrorStreamCaptureInvalidated; + // CHECK-NEXT: hipError_t ERROR_STREAM_CAPTURE_MERGE = hipErrorStreamCaptureMerge; + // CHECK-NEXT: hipError_t ERROR_STREAM_CAPTURE_UNMATCHED = hipErrorStreamCaptureUnmatched; + // CHECK-NEXT: hipError_t ERROR_STREAM_CAPTURE_UNJOINED = hipErrorStreamCaptureUnjoined; + // CHECK-NEXT: hipError_t ERROR_STREAM_CAPTURE_ISOLATION = hipErrorStreamCaptureIsolation; + // CHECK-NEXT: hipError_t ERROR_STREAM_CAPTURE_IMPLICIT = hipErrorStreamCaptureImplicit; + // CHECK-NEXT: hipError_t ERROR_CAPTURED_EVENT = hipErrorCapturedEvent; + // CHECK-NEXT: hipError_t ERROR_ILLEGAL_STATE = hipErrorIllegalState; + CUresult ERROR_STREAM_CAPTURE_UNSUPPORTED = CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED; + CUresult ERROR_STREAM_CAPTURE_INVALIDATED = CUDA_ERROR_STREAM_CAPTURE_INVALIDATED; + CUresult ERROR_STREAM_CAPTURE_MERGE = CUDA_ERROR_STREAM_CAPTURE_MERGE; + CUresult ERROR_STREAM_CAPTURE_UNMATCHED = CUDA_ERROR_STREAM_CAPTURE_UNMATCHED; + CUresult ERROR_STREAM_CAPTURE_UNJOINED = CUDA_ERROR_STREAM_CAPTURE_UNJOINED; + CUresult ERROR_STREAM_CAPTURE_ISOLATION = CUDA_ERROR_STREAM_CAPTURE_ISOLATION; + CUresult ERROR_STREAM_CAPTURE_IMPLICIT = CUDA_ERROR_STREAM_CAPTURE_IMPLICIT; + CUresult ERROR_CAPTURED_EVENT = CUDA_ERROR_CAPTURED_EVENT; + CUresult ERROR_ILLEGAL_STATE = CUDA_ERROR_ILLEGAL_STATE; + + // CHECK: hipStreamCaptureStatus streamCaptureStatus; + // CHECK-NEXT: hipStreamCaptureStatus streamCaptureStatus_enum; + // CHECK-NEXT: hipStreamCaptureStatus STREAM_CAPTURE_STATUS_NONE = hipStreamCaptureStatusNone; + // CHECK-NEXT: hipStreamCaptureStatus STREAM_CAPTURE_STATUS_ACTIVE = hipStreamCaptureStatusActive; + // CHECK-NEXT: hipStreamCaptureStatus STREAM_CAPTURE_STATUS_INVALIDATED = hipStreamCaptureStatusInvalidated; + CUstreamCaptureStatus streamCaptureStatus; + CUstreamCaptureStatus_enum streamCaptureStatus_enum; + CUstreamCaptureStatus STREAM_CAPTURE_STATUS_NONE = CU_STREAM_CAPTURE_STATUS_NONE; + CUstreamCaptureStatus STREAM_CAPTURE_STATUS_ACTIVE = CU_STREAM_CAPTURE_STATUS_ACTIVE; + CUstreamCaptureStatus STREAM_CAPTURE_STATUS_INVALIDATED = CU_STREAM_CAPTURE_STATUS_INVALIDATED; +#endif + +#if CUDA_VERSION == 10010 + // CHECK: hipDeviceP2PAttr DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED = hipDevP2PAttrHipArrayAccessSupported; + CUdevice_P2PAttribute DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED = CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED; +#endif + +#if CUDA_VERSION >= 10010 + // CHECK: hipError_t ERROR_STREAM_CAPTURE_WRONG_THREAD = hipErrorStreamCaptureWrongThread; + CUresult ERROR_STREAM_CAPTURE_WRONG_THREAD = CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD; + + // CHECK: hipStreamCaptureMode streamCaptureMode; + // CHECK-NEXT: hipStreamCaptureMode streamCaptureMode_enum; + // CHECK-NEXT: hipStreamCaptureMode STREAM_CAPTURE_MODE_GLOBAL = hipStreamCaptureModeGlobal; + // CHECK-NEXT: hipStreamCaptureMode STREAM_CAPTURE_MODE_THREAD_LOCAL = hipStreamCaptureModeThreadLocal; + // CHECK-NEXT: hipStreamCaptureMode STREAM_CAPTURE_MODE_RELAXED = hipStreamCaptureModeRelaxed; + CUstreamCaptureMode streamCaptureMode; + CUstreamCaptureMode_enum streamCaptureMode_enum; + CUstreamCaptureMode STREAM_CAPTURE_MODE_GLOBAL = CU_STREAM_CAPTURE_MODE_GLOBAL; + CUstreamCaptureMode STREAM_CAPTURE_MODE_THREAD_LOCAL = CU_STREAM_CAPTURE_MODE_THREAD_LOCAL; + CUstreamCaptureMode STREAM_CAPTURE_MODE_RELAXED = CU_STREAM_CAPTURE_MODE_RELAXED; #endif #if CUDA_VERSION >= 10020 + // CHECK: hipExternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE = hipExternalMemoryHandleTypeD3D11Resource; + // CHECK: hipExternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT = hipExternalMemoryHandleTypeD3D11ResourceKmt; + CUexternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE = CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE; + CUexternalMemoryHandleType EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT = CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT; + + // CHECK: hipGraphExecUpdateResult graphExecUpdateResult; + // CHECK-NEXT: hipGraphExecUpdateResult graphExecUpdateResult_enum; + // CHECK-NEXT: hipGraphExecUpdateResult GRAPH_EXEC_UPDATE_SUCCESS = hipGraphExecUpdateSuccess; + // CHECK-NEXT: hipGraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR = hipGraphExecUpdateError; + // CHECK-NEXT: hipGraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED = hipGraphExecUpdateErrorTopologyChanged; + // CHECK-NEXT: hipGraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED = hipGraphExecUpdateErrorNodeTypeChanged; + // CHECK-NEXT: hipGraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED = hipGraphExecUpdateErrorFunctionChanged; + // CHECK-NEXT: hipGraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED = hipGraphExecUpdateErrorParametersChanged; + // CHECK-NEXT: hipGraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED = hipGraphExecUpdateErrorNotSupported; + CUgraphExecUpdateResult graphExecUpdateResult; + CUgraphExecUpdateResult_enum graphExecUpdateResult_enum; + CUgraphExecUpdateResult GRAPH_EXEC_UPDATE_SUCCESS = CU_GRAPH_EXEC_UPDATE_SUCCESS; + CUgraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR = CU_GRAPH_EXEC_UPDATE_ERROR; + CUgraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED = CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED; + CUgraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED = CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED; + CUgraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED = CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED; + CUgraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED = CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED; + CUgraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED = CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED; + + // CHECK: hipError_t ERROR_GRAPH_EXEC_UPDATE_FAILURE = hipErrorGraphExecUpdateFailure; + CUresult ERROR_GRAPH_EXEC_UPDATE_FAILURE = CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE; + // CHECK: hipMemLocationType memLocationType; // CHECK-NEXT: hipMemLocationType memLocationType_enum; // CHECK-NEXT: hipMemLocationType MEM_LOCATION_TYPE_INVALID = hipMemLocationTypeInvalid; @@ -968,9 +854,18 @@ int main() { CUmemLocationType_enum memLocationType_enum; CUmemLocationType MEM_LOCATION_TYPE_INVALID = CU_MEM_LOCATION_TYPE_INVALID; CUmemLocationType MEM_LOCATION_TYPE_DEVICE = CU_MEM_LOCATION_TYPE_DEVICE; -#endif -#if CUDA_VERSION >= 10020 + // CHECK: hipPointer_attribute POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE = HIP_POINTER_ATTRIBUTE_IS_LEGACY_HIP_IPC_CAPABLE; + // CHECK-NEXT: hipPointer_attribute POINTER_ATTRIBUTE_RANGE_START_ADDR = HIP_POINTER_ATTRIBUTE_RANGE_START_ADDR; + // CHECK-NEXT: hipPointer_attribute POINTER_ATTRIBUTE_RANGE_SIZE = HIP_POINTER_ATTRIBUTE_RANGE_SIZE; + // CHECK-NEXT: hipPointer_attribute POINTER_ATTRIBUTE_MAPPED = HIP_POINTER_ATTRIBUTE_MAPPED; + // CHECK-NEXT: hipPointer_attribute POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = HIP_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES; + CUpointer_attribute POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE = CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE; + CUpointer_attribute POINTER_ATTRIBUTE_RANGE_START_ADDR = CU_POINTER_ATTRIBUTE_RANGE_START_ADDR; + CUpointer_attribute POINTER_ATTRIBUTE_RANGE_SIZE = CU_POINTER_ATTRIBUTE_RANGE_SIZE; + CUpointer_attribute POINTER_ATTRIBUTE_MAPPED = CU_POINTER_ATTRIBUTE_MAPPED; + CUpointer_attribute POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES; + // CHECK: hipMemAccessFlags memAccess_flags; // CHECK-NEXT: hipMemAccessFlags memAccess_flags_enum; // CHECK-NEXT: hipMemAccessFlags MEM_ACCESS_FLAGS_PROT_NONE = hipMemAccessFlagsProtNone; @@ -981,9 +876,7 @@ int main() { CUmemAccess_flags MEM_ACCESS_FLAGS_PROT_NONE = CU_MEM_ACCESS_FLAGS_PROT_NONE; CUmemAccess_flags MEM_ACCESS_FLAGS_PROT_READ = CU_MEM_ACCESS_FLAGS_PROT_READ; CUmemAccess_flags MEM_ACCESS_FLAGS_PROT_READWRITE = CU_MEM_ACCESS_FLAGS_PROT_READWRITE; -#endif -#if CUDA_VERSION >= 10020 // CHECK: hipMemAllocationType memAllocationType; // CHECK-NEXT: hipMemAllocationType memAllocationType_enum; // CHECK-NEXT: hipMemAllocationType MEM_ALLOCATION_TYPE_INVALID = hipMemAllocationTypeInvalid; @@ -994,9 +887,7 @@ int main() { CUmemAllocationType MEM_ALLOCATION_TYPE_INVALID = CU_MEM_ALLOCATION_TYPE_INVALID; CUmemAllocationType MEM_ALLOCATION_TYPE_PINNED = CU_MEM_ALLOCATION_TYPE_PINNED; CUmemAllocationType MEM_ALLOCATION_TYPE_MAX = CU_MEM_ALLOCATION_TYPE_MAX; -#endif -#if CUDA_VERSION >= 10020 // CHECK: hipMemAllocationHandleType memAllocationHandleType; // CHECK-NEXT: hipMemAllocationHandleType memAllocationHandleType_enum; // CHECK-NEXT: hipMemAllocationHandleType MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = hipMemHandleTypePosixFileDescriptor; @@ -1007,23 +898,7 @@ int main() { CUmemAllocationHandleType MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR; CUmemAllocationHandleType MEM_HANDLE_TYPE_WIN32 = CU_MEM_HANDLE_TYPE_WIN32; CUmemAllocationHandleType MEM_HANDLE_TYPE_WIN32_KMT = CU_MEM_HANDLE_TYPE_WIN32_KMT; -#endif - -#if CUDA_VERSION >= 11020 - // CHECK: hipMemAllocationHandleType MEM_HANDLE_TYPE_NONE = hipMemHandleTypeNone; - CUmemAllocationHandleType MEM_HANDLE_TYPE_NONE = CU_MEM_HANDLE_TYPE_NONE; -#endif - -#if CUDA_VERSION >= 11040 - // CHECK: hipGraphInstantiateFlags graphInstantiate_flags; - // CHECK-NEXT: hipGraphInstantiateFlags graphInstantiate_flags_enum; - // CHECK-NEXT: hipGraphInstantiateFlags GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH = hipGraphInstantiateFlagAutoFreeOnLaunch; - CUgraphInstantiate_flags graphInstantiate_flags; - CUgraphInstantiate_flags_enum graphInstantiate_flags_enum; - CUgraphInstantiate_flags GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH = CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH; -#endif -#if CUDA_VERSION >= 10020 // CHECK: hipMemAllocationGranularity_flags memAllocationGranularity_flags; // CHECK-NEXT: hipMemAllocationGranularity_flags memAllocationGranularity_flags_enum; // CHECK-NEXT: hipMemAllocationGranularity_flags MEM_ALLOC_GRANULARITY_MINIMUM = hipMemAllocationGranularityMinimum; @@ -1034,16 +909,50 @@ int main() { CUmemAllocationGranularity_flags MEM_ALLOC_GRANULARITY_RECOMMENDED = CU_MEM_ALLOC_GRANULARITY_RECOMMENDED; #endif +#if CUDA_VERSION >= 11000 + // CHECK: hipDeviceAttribute_t DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR = hipDeviceAttributeMaxBlocksPerMultiprocessor; + CUdevice_attribute DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR = CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR; + + // CHECK: hipKernelNodeAttrID kernelNodeAttrID; + // CHECK-NEXT: hipKernelNodeAttrID kernelNodeAttrID_enum; + // CHECK-NEXT: hipKernelNodeAttrID KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = hipKernelNodeAttributeAccessPolicyWindow; + // CHECK-NEXT: hipKernelNodeAttrID KERNEL_NODE_ATTRIBUTE_COOPERATIVE = hipKernelNodeAttributeCooperative; + CUkernelNodeAttrID kernelNodeAttrID; + CUkernelNodeAttrID_enum kernelNodeAttrID_enum; + CUkernelNodeAttrID KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW; + CUkernelNodeAttrID KERNEL_NODE_ATTRIBUTE_COOPERATIVE = CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE; + + // CHECK: hipAccessProperty accessProperty; + // CHECK-NEXT: hipAccessProperty accessProperty_enum; + // CHECK-NEXT: hipAccessProperty ACCESS_PROPERTY_NORMAL = hipAccessPropertyNormal; + // CHECK-NEXT: hipAccessProperty ACCESS_PROPERTY_STREAMING = hipAccessPropertyStreaming; + // CHECK-NEXT: hipAccessProperty ACCESS_PROPERTY_PERSISTING = hipAccessPropertyPersisting; + CUaccessProperty accessProperty; + CUaccessProperty_enum accessProperty_enum; + CUaccessProperty ACCESS_PROPERTY_NORMAL = CU_ACCESS_PROPERTY_NORMAL; + CUaccessProperty ACCESS_PROPERTY_STREAMING = CU_ACCESS_PROPERTY_STREAMING; + CUaccessProperty ACCESS_PROPERTY_PERSISTING = CU_ACCESS_PROPERTY_PERSISTING; + + // CHECK: hipPointer_attribute POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE = HIP_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE; + CUpointer_attribute POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE = CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE; +#endif + #if CUDA_VERSION >= 11010 + // CHECK: hipGraphNodeType GRAPH_NODE_TYPE_WAIT_EVENT = hipGraphNodeTypeWaitEvent; + // CHECK-NEXT: hipGraphNodeType GRAPH_NODE_TYPE_EVENT_RECORD = hipGraphNodeTypeEventRecord; + CUgraphNodeType GRAPH_NODE_TYPE_WAIT_EVENT = CU_GRAPH_NODE_TYPE_WAIT_EVENT; + CUgraphNodeType GRAPH_NODE_TYPE_EVENT_RECORD = CU_GRAPH_NODE_TYPE_EVENT_RECORD; + // CHECK: hipMemHandleType memHandleType; // CHECK-NEXT: hipMemHandleType memHandleType_enum; // CHECK-NEXT: hipMemHandleType MEM_HANDLE_TYPE_GENERIC = hipMemHandleTypeGeneric; CUmemHandleType memHandleType; CUmemHandleType_enum memHandleType_enum; CUmemHandleType MEM_HANDLE_TYPE_GENERIC = CU_MEM_HANDLE_TYPE_GENERIC; -#endif -#if CUDA_VERSION >= 11010 + // CHECK: hipPointer_attribute POINTER_ATTRIBUTE_ACCESS_FLAGS = HIP_POINTER_ATTRIBUTE_ACCESS_FLAGS; + CUpointer_attribute POINTER_ATTRIBUTE_ACCESS_FLAGS = CU_POINTER_ATTRIBUTE_ACCESS_FLAGS; + // CHECK: hipMemOperationType memOperationType; // CHECK-NEXT: hipMemOperationType memOperationType_enum; // CHECK-NEXT: hipMemOperationType MEM_OPERATION_TYPE_MAP = hipMemOperationTypeMap; @@ -1052,9 +961,7 @@ int main() { CUmemOperationType_enum memOperationType_enum; CUmemOperationType MEM_OPERATION_TYPE_MAP = CU_MEM_OPERATION_TYPE_MAP; CUmemOperationType MEM_OPERATION_TYPE_UNMAP = CU_MEM_OPERATION_TYPE_UNMAP; -#endif -#if CUDA_VERSION >= 11010 // CHECK: hipArraySparseSubresourceType arraySparseSubresourceType; // CHECK-NEXT: hipArraySparseSubresourceType arraySparseSubresourceType_enum; // CHECK-NEXT: hipArraySparseSubresourceType ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL = hipArraySparseSubresourceTypeSparseLevel; @@ -1065,5 +972,95 @@ int main() { CUarraySparseSubresourceType ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL = CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL; #endif +#if CUDA_VERSION >= 11020 + // CHECK: hipDeviceAttribute_t DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED = hipDeviceAttributeMemoryPoolsSupported; + // CHECK-NEXT: hipDeviceAttribute_t DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED = hipDeviceAttributeVirtualMemoryManagementSupported; + CUdevice_attribute DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED = CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED; + CUdevice_attribute DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED = CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED; + + // CHECK: hipGraphNodeType GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL = hipGraphNodeTypeExtSemaphoreSignal; + // CHECK-NEXT: hipGraphNodeType GRAPH_NODE_TYPE_EXT_SEMAS_WAIT = hipGraphNodeTypeExtSemaphoreWait; + CUgraphNodeType GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL = CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL; + CUgraphNodeType GRAPH_NODE_TYPE_EXT_SEMAS_WAIT = CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT; + + // CHECK: hipGraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE = hipGraphExecUpdateErrorUnsupportedFunctionChange; + CUgraphExecUpdateResult GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE = CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE; + + // CHECK: hipMemPoolAttr memPool_attribute; + // CHECK-NEXT: hipMemPoolAttr memPool_attribute_enum; + // CHECK-NEXT: hipMemPoolAttr MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES = hipMemPoolReuseFollowEventDependencies; + // CHECK-NEXT: hipMemPoolAttr MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC = hipMemPoolReuseAllowOpportunistic; + // CHECK-NEXT: hipMemPoolAttr MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES = hipMemPoolReuseAllowInternalDependencies; + // CHECK-NEXT: hipMemPoolAttr MEMPOOL_ATTR_RELEASE_THRESHOLD = hipMemPoolAttrReleaseThreshold; + CUmemPool_attribute memPool_attribute; + CUmemPool_attribute_enum memPool_attribute_enum; + CUmemPool_attribute MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES = CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES; + CUmemPool_attribute MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC = CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC; + CUmemPool_attribute MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES = CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES; + CUmemPool_attribute MEMPOOL_ATTR_RELEASE_THRESHOLD = CU_MEMPOOL_ATTR_RELEASE_THRESHOLD; + + // CHECK: hipMemAllocationHandleType MEM_HANDLE_TYPE_NONE = hipMemHandleTypeNone; + CUmemAllocationHandleType MEM_HANDLE_TYPE_NONE = CU_MEM_HANDLE_TYPE_NONE; +#endif + +#if CUDA_VERSION >= 11030 + // CHECK: hipStreamUpdateCaptureDependenciesFlags StreamUpdateCaptureDependencies_flags; + // CHECK-NEXT: hipStreamUpdateCaptureDependenciesFlags StreamUpdateCaptureDependencies_flags_enum; + // CHECK-NEXT: hipStreamUpdateCaptureDependenciesFlags STREAM_ADD_CAPTURE_DEPENDENCIES = hipStreamAddCaptureDependencies; + // CHECK-NEXT: hipStreamUpdateCaptureDependenciesFlags STREAM_SET_CAPTURE_DEPENDENCIES = hipStreamSetCaptureDependencies; + CUstreamUpdateCaptureDependencies_flags StreamUpdateCaptureDependencies_flags; + CUstreamUpdateCaptureDependencies_flags_enum StreamUpdateCaptureDependencies_flags_enum; + CUstreamUpdateCaptureDependencies_flags STREAM_ADD_CAPTURE_DEPENDENCIES = CU_STREAM_ADD_CAPTURE_DEPENDENCIES; + CUstreamUpdateCaptureDependencies_flags STREAM_SET_CAPTURE_DEPENDENCIES = CU_STREAM_SET_CAPTURE_DEPENDENCIES; + + // CHECK: hipMemPoolAttr MEMPOOL_ATTR_RESERVED_MEM_CURRENT = hipMemPoolAttrReservedMemCurrent; + // CHECK-NEXT: hipMemPoolAttr MEMPOOL_ATTR_RESERVED_MEM_HIGH = hipMemPoolAttrReservedMemHigh; + // CHECK-NEXT: hipMemPoolAttr MEMPOOL_ATTR_USED_MEM_CURRENT = hipMemPoolAttrUsedMemCurrent; + // CHECK-NEXT: hipMemPoolAttr MEMPOOL_ATTR_USED_MEM_HIGH = hipMemPoolAttrUsedMemHigh; + CUmemPool_attribute MEMPOOL_ATTR_RESERVED_MEM_CURRENT = CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT; + CUmemPool_attribute MEMPOOL_ATTR_RESERVED_MEM_HIGH = CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH; + CUmemPool_attribute MEMPOOL_ATTR_USED_MEM_CURRENT = CU_MEMPOOL_ATTR_USED_MEM_CURRENT; + CUmemPool_attribute MEMPOOL_ATTR_USED_MEM_HIGH = CU_MEMPOOL_ATTR_USED_MEM_HIGH; + + // CHECK: hipUserObjectFlags userObject_flags; + // CHECK-NEXT: hipUserObjectFlags userObject_flags_enum; + // CHECK-NEXT: hipUserObjectFlags USER_OBJECT_NO_DESTRUCTOR_SYNC = hipUserObjectNoDestructorSync; + CUuserObject_flags userObject_flags; + CUuserObject_flags_enum userObject_flags_enum; + CUuserObject_flags USER_OBJECT_NO_DESTRUCTOR_SYNC = CU_USER_OBJECT_NO_DESTRUCTOR_SYNC; + + // CHECK: hipUserObjectRetainFlags userObjectRetain_flags; + // CHECK-NEXT: hipUserObjectRetainFlags userObjectRetain_flags_enum; + // CHECK-NEXT: hipUserObjectRetainFlags GRAPH_USER_OBJECT_MOVE = hipGraphUserObjectMove; + CUuserObjectRetain_flags userObjectRetain_flags; + CUuserObjectRetain_flags_enum userObjectRetain_flags_enum; + CUuserObjectRetain_flags GRAPH_USER_OBJECT_MOVE = CU_GRAPH_USER_OBJECT_MOVE; + + // CHECK: hipPointer_attribute POINTER_ATTRIBUTE_MEMPOOL_HANDLE = HIP_POINTER_ATTRIBUTE_MEMPOOL_HANDLE; + CUpointer_attribute POINTER_ATTRIBUTE_MEMPOOL_HANDLE = CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE; +#endif + +#if CUDA_VERSION >= 11040 + // CHECK: hipGraphInstantiateFlags graphInstantiate_flags; + // CHECK-NEXT: hipGraphInstantiateFlags graphInstantiate_flags_enum; + // CHECK-NEXT: hipGraphInstantiateFlags GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH = hipGraphInstantiateFlagAutoFreeOnLaunch; + CUgraphInstantiate_flags graphInstantiate_flags; + CUgraphInstantiate_flags_enum graphInstantiate_flags_enum; + CUgraphInstantiate_flags GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH = CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH; + + // CHECK: hipGraphMemAttributeType graphMem_attribute; + // CHECK-NEXT: hipGraphMemAttributeType graphMem_attribute_enum; + // CHECK-NEXT: hipGraphMemAttributeType GRAPH_MEM_ATTR_USED_MEM_CURRENT = hipGraphMemAttrUsedMemCurrent; + // CHECK-NEXT: hipGraphMemAttributeType GRAPH_MEM_ATTR_USED_MEM_HIGH = hipGraphMemAttrUsedMemHigh; + // CHECK-NEXT: hipGraphMemAttributeType GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT = hipGraphMemAttrReservedMemCurrent; + // CHECK-NEXT: hipGraphMemAttributeType GRAPH_MEM_ATTR_RESERVED_MEM_HIGH = hipGraphMemAttrReservedMemHigh; + CUgraphMem_attribute graphMem_attribute; + CUgraphMem_attribute_enum graphMem_attribute_enum; + CUgraphMem_attribute GRAPH_MEM_ATTR_USED_MEM_CURRENT = CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT; + CUgraphMem_attribute GRAPH_MEM_ATTR_USED_MEM_HIGH = CU_GRAPH_MEM_ATTR_USED_MEM_HIGH; + CUgraphMem_attribute GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT = CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT; + CUgraphMem_attribute GRAPH_MEM_ATTR_RESERVED_MEM_HIGH = CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH; +#endif + return 0; } diff --git a/tests/unit_tests/synthetic/driver_functions.cu b/tests/unit_tests/synthetic/driver_functions.cu index 7c557999..70f4d83b 100644 --- a/tests/unit_tests/synthetic/driver_functions.cu +++ b/tests/unit_tests/synthetic/driver_functions.cu @@ -17,6 +17,7 @@ int main() { unsigned int flags = 0; unsigned int flags_2 = 0; int dim = 0; + int count = 0; int iBlockSize = 0; int iBlockSize_2 = 0; size_t bytes = 0; @@ -95,14 +96,72 @@ int main() { CUgraphicsResource graphicsResource; CUuuid uuid; -#if CUDA_VERSION > 7050 + // CHECK: hipError_t result; + CUresult result; + +#if CUDA_VERSION >= 8000 // CHECK: hipMemRangeAttribute MemoryRangeAttribute; // CHECK-NEXT: hipMemoryAdvise MemoryAdvise; CUmem_range_attribute MemoryRangeAttribute; CUmem_advise MemoryAdvise; + + // CUDA: CUresult CUDAAPI cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device); + // HIP: hipError_t hipMemAdvise(const void* dev_ptr, size_t count, hipMemoryAdvise advice, int device); + // CHECK: result = hipMemAdvise(deviceptr, bytes, MemoryAdvise, device); + result = cuMemAdvise(deviceptr, bytes, MemoryAdvise, device); + + // CUDA: CUresult CUDAAPI cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream); + // HIP: hipError_t hipMemPrefetchAsync(const void* dev_ptr, size_t count, int device, hipStream_t stream __dparm(0)); + // CHECK: result = hipMemPrefetchAsync(deviceptr, bytes, device, stream); + result = cuMemPrefetchAsync(deviceptr, bytes, device, stream); + + // CUDA: CUresult CUDAAPI cuMemRangeGetAttribute(void *data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count); + // HIP: hipError_t hipMemRangeGetAttribute(void* data, size_t data_size, hipMemRangeAttribute attribute, const void* dev_ptr, size_t count); + // CHECK: result = hipMemRangeGetAttribute(image, bytes, MemoryRangeAttribute, deviceptr, bytes); + result = cuMemRangeGetAttribute(image, bytes, MemoryRangeAttribute, deviceptr, bytes); + + // CUDA: CUresult CUDAAPI cuMemRangeGetAttributes(void **data, size_t *dataSizes, CUmem_range_attribute *attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count); + // HIP: hipError_t hipMemRangeGetAttributes(void** data, size_t* data_sizes, hipMemRangeAttribute* attributes, size_t num_attributes, const void* dev_ptr, size_t count); + // CHECK: result = hipMemRangeGetAttributes(&image, &bytes, &MemoryRangeAttribute, bytes, deviceptr, bytes); + result = cuMemRangeGetAttributes(&image, &bytes, &MemoryRangeAttribute, bytes, deviceptr, bytes); + + // CUDA: CUresult CUDAAPI cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags); + // HIP: hipError_t hipStreamWaitValue32(hipStream_t stream, void* ptr, uint32_t value, unsigned int flags, uint32_t mask __dparm(0xFFFFFFFF)); + // CHECK: result = hipStreamWaitValue32(stream, deviceptr, u_value, flags); + result = cuStreamWaitValue32(stream, deviceptr, u_value, flags); + + // CUDA: CUresult CUDAAPI cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags); + // HIP: hipError_t hipStreamWriteValue32(hipStream_t stream, void* ptr, uint32_t value, unsigned int flags, uint32_t mask __dparm(0xFFFFFFFF)); + // CHECK: result = hipStreamWriteValue32(stream, deviceptr, u_value, flags); + result = cuStreamWriteValue32(stream, deviceptr, u_value, flags); + + // CUDA: __CUDA_DEPRECATED CUresult CUDAAPI cuTexRefSetBorderColor(CUtexref hTexRef, float *pBorderColor); + // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipTexRefSetBorderColor(textureReference* texRef, float* pBorderColor); + // CHECK: result = hipTexRefSetBorderColor(texref, &ms); + result = cuTexRefSetBorderColor(texref, &ms); + + // CHECK: hipDeviceP2PAttr deviceP2PAttribute; + CUdevice_P2PAttribute deviceP2PAttribute; + + // CUDA: CUresult CUDAAPI cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice); + // HIP: hipError_t hipDeviceGetP2PAttribute(int* value, hipDeviceP2PAttr attr, int srcDevice, int dstDevice); + // CHECK: result = hipDeviceGetP2PAttribute(value, deviceP2PAttribute, iBlockSize, iBlockSize_2); + result = cuDeviceGetP2PAttribute(value, deviceP2PAttribute, iBlockSize, iBlockSize_2); +#endif + +#if CUDA_VERSION >= 9000 + // CUDA: CUresult CUDAAPI cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags); + // HIP: hipError_t hipStreamWaitValue64(hipStream_t stream, void* ptr, uint64_t value, unsigned int flags, uint64_t mask __dparm(0xFFFFFFFFFFFFFFFF)); + // CHECK: result = hipStreamWaitValue64(stream, deviceptr, u_value, flags); + result = cuStreamWaitValue64(stream, deviceptr, u_value, flags); + + // CUDA: CUresult CUDAAPI cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags); + // HIP: hipError_t hipStreamWriteValue64(hipStream_t stream, void* ptr, uint64_t value, unsigned int flags, uint64_t mask __dparm(0xFFFFFFFFFFFFFFFF)); + // CHECK: result = hipStreamWriteValue64(stream, deviceptr, u_value, flags); + result = cuStreamWriteValue64(stream, deviceptr, u_value, flags); #endif -#if CUDA_VERSION > 9020 +#if CUDA_VERSION >= 10000 // CHECK: hipGraph_t graph, graph2; // CHECK-NEXT: hipGraphNode_t graphNode, graphNode2; // CHECK-NEXT: const hipGraphNode_t *pGraphNode = nullptr; @@ -135,707 +194,584 @@ int main() { CUstreamCaptureStatus streamCaptureStatus; CUgraphNodeType graphNodeType; CUDA_HOST_NODE_PARAMS host_node_params; -#endif -#if CUDA_VERSION > 10000 - // CHECK: hipStreamCaptureMode streamCaptureMode; - CUstreamCaptureMode streamCaptureMode; -#endif + // CUDA: CUresult CUDAAPI cuDeviceGetUuid(CUuuid *uuid, CUdevice dev); + // HIP: hipError_t hipDeviceGetUuid(hipUUID* uuid, hipDevice_t device); + // CHECK: result = hipDeviceGetUuid(&uuid, device); + result = cuDeviceGetUuid(&uuid, device); -#if CUDA_VERSION > 10010 - // CHECK: hipGraphExecUpdateResult graphExecUpdateResult; - CUgraphExecUpdateResult graphExecUpdateResult; -#endif + // CHECK: hipHostFn_t hostFn; + CUhostFn hostFn; -#if CUDA_VERSION >= 10020 - // CHECK: hipMemLocation memLocation_st; - // CHECK-NEXT: hipMemLocation memLocation; - // CHECK-NEXT: hipMemAllocationHandleType memAllocationHandleType; - CUmemLocation_st memLocation_st; - CUmemLocation memLocation; - CUmemAllocationHandleType memAllocationHandleType; -#endif + // CUDA: CUresult CUDAAPI cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void *userData); + // HIP: hipError_t hipLaunchHostFunc(hipStream_t stream, hipHostFn_t fn, void* userData); + // CHECK: result = hipLaunchHostFunc(stream, hostFn, image); + result = cuLaunchHostFunc(stream, hostFn, image); -#if CUDA_VERSION >= 11020 - // CHECK: hipMemPool_t memPool_t; - // CHECK-NEXT: hipMemPoolProps memPoolProps_st; - // CHECK-NEXT: hipMemPoolProps memPoolProps; - CUmemoryPool memPool_t; - CUmemPoolProps_st memPoolProps_st; - CUmemPoolProps memPoolProps; -#endif + // CUDA: CUresult CUDAAPI cuStreamEndCapture(CUstream hStream, CUgraph *phGraph); + // HIP: hipError_t hipStreamEndCapture(hipStream_t stream, hipGraph_t* pGraph); + // CHECK: result = hipStreamEndCapture(stream, &graph); + result = cuStreamEndCapture(stream, &graph); - // CUDA: CUresult CUDAAPI cuInit(unsigned int Flags); - // HIP: hipError_t hipInit(unsigned int flags); - // CHECK: hipError_t result = hipInit(flags); - CUresult result = cuInit(flags); + // CUDA: CUresult CUDAAPI cuDestroyExternalMemory(CUexternalMemory extMem); + // HIP: hipError_t hipDestroyExternalMemory(hipExternalMemory_t extMem); + // CHECK: result = hipDestroyExternalMemory(externalMemory); + result = cuDestroyExternalMemory(externalMemory); - int driverVersion = 0; - // CUDA: CUresult CUDAAPI cuDriverGetVersion(int *driverVersion); - // HIP: hipError_t hipDriverGetVersion(int* driverVersion); - // CHECK: result = hipDriverGetVersion(&driverVersion); - result = cuDriverGetVersion(&driverVersion); + // CUDA: CUresult CUDAAPI cuDestroyExternalSemaphore(CUexternalSemaphore extSem); + // HIP: hipError_t hipDestroyExternalSemaphore(hipExternalSemaphore_t extSem); + // CHECK: result = hipDestroyExternalSemaphore(externalSemaphore); + result = cuDestroyExternalSemaphore(externalSemaphore); - int ordinal = 0; - // CUDA: CUresult CUDAAPI cuDeviceGet(CUdevice *device, int ordinal); - // HIP: hipError_t hipDeviceGet(hipDevice_t* device, int ordinal); - // CHECK: result = hipDeviceGet(&device, ordinal); - result = cuDeviceGet(&device, ordinal); + // CUDA: CUresult CUDAAPI cuExternalMemoryGetMappedBuffer(CUdeviceptr *devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC *bufferDesc); + // HIP: hipError_t hipExternalMemoryGetMappedBuffer(void **devPtr, hipExternalMemory_t extMem, const hipExternalMemoryBufferDesc *bufferDesc); + // CHECK: result = hipExternalMemoryGetMappedBuffer(&deviceptr, externalMemory, &EXTERNAL_MEMORY_BUFFER_DESC); + result = cuExternalMemoryGetMappedBuffer(&deviceptr, externalMemory, &EXTERNAL_MEMORY_BUFFER_DESC); - int pi = 0; - // CHECK: hipDeviceAttribute_t device_attribute = hipDeviceAttributePciBusId; - CUdevice_attribute device_attribute = CU_DEVICE_ATTRIBUTE_PCI_BUS_ID; - // CUDA: CUresult CUDAAPI cuDeviceGetAttribute(int *pi, CUdevice_attribute attrib, CUdevice dev); - // HIP: hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int deviceId); - // CHECK: result = hipDeviceGetAttribute(&pi, device_attribute, device); - result = cuDeviceGetAttribute(&pi, device_attribute, device); + // CUDA: CUresult CUDAAPI cuImportExternalMemory(CUexternalMemory *extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC *memHandleDesc); + // HIP: hipError_t hipImportExternalMemory(hipExternalMemory_t* extMem_out, const hipExternalMemoryHandleDesc* memHandleDesc); + // CHECK: result = hipImportExternalMemory(&externalMemory, &EXTERNAL_MEMORY_HANDLE_DESC); + result = cuImportExternalMemory(&externalMemory, &EXTERNAL_MEMORY_HANDLE_DESC); - int count = 0; - // CUDA: CUresult CUDAAPI cuDeviceGetCount(int *count); - // HIP: hipError_t hipGetDeviceCount(int* count); - // CHECK: result = hipGetDeviceCount(&count); - result = cuDeviceGetCount(&count); + // CUDA: CUresult CUDAAPI cuImportExternalSemaphore(CUexternalSemaphore *extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC *semHandleDesc); + // HIP: hipError_t hipImportExternalSemaphore(hipExternalSemaphore_t* extSem_out, const hipExternalSemaphoreHandleDesc* semHandleDesc); + // CHECK: result = hipImportExternalSemaphore(&externalSemaphore, &EXTERNAL_SEMAPHORE_HANDLE_DESC); + result = cuImportExternalSemaphore(&externalSemaphore, &EXTERNAL_SEMAPHORE_HANDLE_DESC); - // CUDA: CUresult CUDAAPI cuDeviceTotalMem(size_t *bytes, CUdevice dev); - // HIP: hipError_t hipDeviceTotalMem(size_t* bytes, hipDevice_t device); - // CHECK: result = hipDeviceTotalMem(&bytes, device); - // CHECK-NEXT: result = hipDeviceTotalMem(&bytes, device); - result = cuDeviceTotalMem(&bytes, device); - result = cuDeviceTotalMem_v2(&bytes, device); + // CUDA: CUresult CUDAAPI cuSignalExternalSemaphoresAsync(const CUexternalSemaphore *extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS *paramsArray, unsigned int numExtSems, CUstream stream); + // HIP: hipError_t hipSignalExternalSemaphoresAsync(const hipExternalSemaphore_t* extSemArray, const hipExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, hipStream_t stream); + // CHECK: result = hipSignalExternalSemaphoresAsync(&externalSemaphore, &EXTERNAL_SEMAPHORE_SIGNAL_PARAMS, flags, stream); + result = cuSignalExternalSemaphoresAsync(&externalSemaphore, &EXTERNAL_SEMAPHORE_SIGNAL_PARAMS, flags, stream); - int major = 0, minor = 0; - // CUDA: __CUDA_DEPRECATED CUresult CUDAAPI cuDeviceComputeCapability(int *major, int *minor, CUdevice dev); - // HIP: hipError_t hipDeviceComputeCapability(int* major, int* minor, hipDevice_t device); - // CHECK: result = hipDeviceComputeCapability(&major, &minor, device); - result = cuDeviceComputeCapability(&major, &minor, device); + // CUDA: CUresult CUDAAPI cuWaitExternalSemaphoresAsync(const CUexternalSemaphore *extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS *paramsArray, unsigned int numExtSems, CUstream stream); + // HIP: hipError_t hipWaitExternalSemaphoresAsync(const hipExternalSemaphore_t* extSemArray, const hipExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, hipStream_t stream); + // CHECK: result = hipWaitExternalSemaphoresAsync(&externalSemaphore, &EXTERNAL_SEMAPHORE_WAIT_PARAMS, flags, stream); + result = cuWaitExternalSemaphoresAsync(&externalSemaphore, &EXTERNAL_SEMAPHORE_WAIT_PARAMS, flags, stream); - int active = 0; - // CUDA: CUresult CUDAAPI cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int *flags, int *active); - // HIP: hipError_t hipDevicePrimaryCtxGetState(hipDevice_t dev, unsigned int* flags, int* active); - // CHECK: result = hipDevicePrimaryCtxGetState(device, &flags, &active); - result = cuDevicePrimaryCtxGetState(device, &flags, &active); + // CUDA: CUresult CUDAAPI cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode *from, const CUgraphNode *to, size_t numDependencies); + // HIP: hipError_t hipGraphAddDependencies(hipGraph_t graph, const hipGraphNode_t* from, const hipGraphNode_t* to, size_t numDependencies); + // CHECK: result = hipGraphAddDependencies(graph, &graphNode, &graphNode2, bytes); + result = cuGraphAddDependencies(graph, &graphNode, &graphNode2, bytes); - // CUDA: CUresult CUDAAPI cuDevicePrimaryCtxRelease(CUdevice dev); - // HIP: hipError_t hipDevicePrimaryCtxRelease(hipDevice_t dev); - // CHECK: result = hipDevicePrimaryCtxRelease(device); - result = cuDevicePrimaryCtxRelease(device); -#if CUDA_VERSION > 10020 - // CHECK: result = hipDevicePrimaryCtxRelease(device); - result = cuDevicePrimaryCtxRelease_v2(device); -#endif + // CUDA: CUresult CUDAAPI cuGraphAddEmptyNode(CUgraphNode *phGraphNode, CUgraph hGraph, const CUgraphNode *dependencies, size_t numDependencies); + // HIP: hipError_t hipGraphAddEmptyNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, size_t numDependencies); + // CHECK: result = hipGraphAddEmptyNode(&graphNode, graph, &graphNode2, bytes); + result = cuGraphAddEmptyNode(&graphNode, graph, &graphNode2, bytes); - // CUDA: CUresult CUDAAPI cuDevicePrimaryCtxReset(CUdevice dev); - // HIP: hipError_t hipDevicePrimaryCtxReset(hipDevice_t dev); - // CHECK: result = hipDevicePrimaryCtxReset(device); - result = cuDevicePrimaryCtxReset(device); -#if CUDA_VERSION > 10020 - // CHECK: result = hipDevicePrimaryCtxReset(device); - result = cuDevicePrimaryCtxReset_v2(device); -#endif + // CUDA: CUresult CUDAAPI cuGraphAddKernelNode(CUgraphNode *phGraphNode, CUgraph hGraph, const CUgraphNode *dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS *nodeParams); + // HIP: hipError_t hipGraphAddKernelNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, size_t numDependencies, const hipKernelNodeParams* pNodeParams); + // CHECK: result = hipGraphAddKernelNode(&graphNode, graph, &graphNode2, bytes, &KERNEL_NODE_PARAMS); + result = cuGraphAddKernelNode(&graphNode, graph, &graphNode2, bytes, &KERNEL_NODE_PARAMS); - // CUDA: CUresult CUDAAPI cuDevicePrimaryCtxRetain(CUcontext *pctx, CUdevice dev); - // HIP: hipError_t hipDevicePrimaryCtxRetain(hipCtx_t* pctx, hipDevice_t dev); - // CHECK: result = hipDevicePrimaryCtxRetain(&context, device); - result = cuDevicePrimaryCtxRetain(&context, device); + // CUDA: CUresult CUDAAPI cuGraphCreate(CUgraph *phGraph, unsigned int flags); + // HIP: hipError_t hipGraphCreate(hipGraph_t* pGraph, unsigned int flags); + // CHECK: result = hipGraphCreate(&graph, flags); + result = cuGraphCreate(&graph, flags); - // CUDA: CUresult CUDAAPI cuDevicePrimaryCtxSetFlags(CUdevice dev, unsigned int flags); - // HIP: hipError_t hipDevicePrimaryCtxSetFlags(hipDevice_t dev, unsigned int flags); - // CHECK: result = hipDevicePrimaryCtxSetFlags(device, flags); - result = cuDevicePrimaryCtxSetFlags(device, flags); -#if CUDA_VERSION > 10020 - // CHECK: result = hipDevicePrimaryCtxSetFlags(device, flags); - result = cuDevicePrimaryCtxSetFlags_v2(device, flags); -#endif + // CUDA: CUresult CUDAAPI cuGraphDestroy(CUgraph hGraph); + // HIP: hipError_t hipGraphDestroy(hipGraph_t graph); + // CHECK: result = hipGraphDestroy(graph); + result = cuGraphDestroy(graph); - // CUDA: CUresult CUDAAPI cuCtxCreate(CUcontext *pctx, unsigned int flags, CUdevice dev); - // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxCreate(hipCtx_t *ctx, unsigned int flags, hipDevice_t device); - // CHECK: result = hipCtxCreate(&context, flags, device); - // CHECK-NEXT: result = hipCtxCreate(&context, flags, device); - result = cuCtxCreate(&context, flags, device); - result = cuCtxCreate_v2(&context, flags, device); + // CUDA: CUresult CUDAAPI cuGraphExecDestroy(CUgraphExec hGraphExec); + // HIP: hipError_t hipGraphExecDestroy(hipGraphExec_t pGraphExec); + // CHECK: result = hipGraphExecDestroy(graphExec); + result = cuGraphExecDestroy(graphExec); - // CUDA: CUresult CUDAAPI cuCtxDestroy(CUcontext ctx); - // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxDestroy(hipCtx_t ctx); - // CHECK: result = hipCtxDestroy(context); - // CHECK-NEXT: result = hipCtxDestroy(context); - result = cuCtxDestroy(context); - result = cuCtxDestroy_v2(context); + // CUDA: CUresult CUDAAPI cuGraphGetNodes(CUgraph hGraph, CUgraphNode *nodes, size_t *numNodes); + // HIP: hipError_t hipGraphGetNodes(hipGraph_t graph, hipGraphNode_t* nodes, size_t* numNodes); + // CHECK: result = hipGraphGetNodes(graph, &graphNode, &bytes); + result = cuGraphGetNodes(graph, &graphNode, &bytes); - unsigned int version = 0; - // CUDA: CUresult CUDAAPI cuCtxGetApiVersion(CUcontext ctx, unsigned int *version); - // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxGetApiVersion(hipCtx_t ctx, int* apiVersion); - // CHECK: result = hipCtxGetApiVersion(context, &version); - result = cuCtxGetApiVersion(context, &version); + // CUDA: CUresult CUDAAPI cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode *rootNodes, size_t *numRootNodes); + // HIP: hipError_t hipGraphGetRootNodes(hipGraph_t graph, hipGraphNode_t* pRootNodes, size_t* pNumRootNodes); + // CHECK: result = hipGraphGetRootNodes(graph, &graphNode, &bytes); + result = cuGraphGetRootNodes(graph, &graphNode, &bytes); - // CUDA: CUresult CUDAAPI cuCtxGetCacheConfig(CUfunc_cache *pconfig); - // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxGetCacheConfig(hipFuncCache_t* cacheConfig); - // CHECK: result = hipCtxGetCacheConfig(&func_cache); - result = cuCtxGetCacheConfig(&func_cache); + // CUDA: CUresult CUDAAPI cuGraphInstantiate(CUgraphExec *phGraphExec, CUgraph hGraph, CUgraphNode *phErrorNode, char *logBuffer, size_t bufferSize); + // HIP: hipError_t hipGraphInstantiate(hipGraphExec_t* pGraphExec, hipGraph_t graph, hipGraphNode_t* pErrorNode, char* pLogBuffer, size_t bufferSize); + // CHECK: result = hipGraphInstantiate(&graphExec, graph, &graphNode, nullptr, bytes); + result = cuGraphInstantiate(&graphExec, graph, &graphNode, nullptr, bytes); - // CUDA: CUresult CUDAAPI cuCtxGetCurrent(CUcontext *pctx); - // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxGetCurrent(hipCtx_t* ctx); - // CHECK: result = hipCtxGetCurrent(&context); - result = cuCtxGetCurrent(&context); + // CUDA: CUresult CUDAAPI cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS *nodeParams); + // HIP: hipError_t hipGraphKernelNodeGetParams(hipGraphNode_t node, hipKernelNodeParams* pNodeParams); + // CHECK: result = hipGraphKernelNodeGetParams(graphNode, &KERNEL_NODE_PARAMS); + result = cuGraphKernelNodeGetParams(graphNode, &KERNEL_NODE_PARAMS); - // CUDA: CUresult CUDAAPI cuCtxGetDevice(CUdevice *device); - // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxGetDevice(hipDevice_t* device); - // CHECK: result = hipCtxGetDevice(&device); - result = cuCtxGetDevice(&device); + // CUDA: CUresult CUDAAPI cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS *nodeParams); + // HIP: hipError_t hipGraphKernelNodeSetParams(hipGraphNode_t node, const hipKernelNodeParams* pNodeParams); + // CHECK: result = hipGraphKernelNodeSetParams(graphNode, &KERNEL_NODE_PARAMS); + result = cuGraphKernelNodeSetParams(graphNode, &KERNEL_NODE_PARAMS); - // CUDA: CUresult CUDAAPI cuCtxGetFlags(unsigned int *flags); - // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxGetFlags(unsigned int* flags); - // CHECK: result = hipCtxGetFlags(&flags); - result = cuCtxGetFlags(&flags); + // CUDA: CUresult CUDAAPI cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream); + // HIP: hipError_t hipGraphLaunch(hipGraphExec_t graphExec, hipStream_t stream); + // CHECK: result = hipGraphLaunch(graphExec, stream); + result = cuGraphLaunch(graphExec, stream); - size_t pvalue = 0; - // CUDA: CUresult CUDAAPI cuCtxGetLimit(size_t *pvalue, CUlimit limit); - // HIP: hipError_t hipDeviceGetLimit(size_t* pValue, enum hipLimit_t limit); - // CHECK: result = hipDeviceGetLimit(&pvalue, limit); - result = cuCtxGetLimit(&pvalue, limit); + // CUDA: CUresult CUDAAPI cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D *nodeParams); + // HIP: hipError_t hipGraphMemcpyNodeGetParams(hipGraphNode_t node, hipMemcpy3DParms* pNodeParams); + // CHECK: result = hipGraphMemcpyNodeGetParams(graphNode, &MEMCPY3D); + result = cuGraphMemcpyNodeGetParams(graphNode, &MEMCPY3D); - // CUDA: CUresult CUDAAPI cuCtxGetSharedMemConfig(CUsharedconfig *pConfig); - // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxGetSharedMemConfig(hipSharedMemConfig* pConfig); - // CHECK: result = hipCtxGetSharedMemConfig(&pconfig); - result = cuCtxGetSharedMemConfig(&pconfig); + // CUDA: CUresult CUDAAPI cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D *nodeParams); + // HIP: hipError_t hipGraphMemcpyNodeSetParams(hipGraphNode_t node, const hipMemcpy3DParms* pNodeParams); + // CHECK: result = hipGraphMemcpyNodeSetParams(graphNode, &MEMCPY3D); + result = cuGraphMemcpyNodeSetParams(graphNode, &MEMCPY3D); - int leastPriority = 0, greatestPriority = 0; - // CUDA: CUresult CUDAAPI cuCtxGetStreamPriorityRange(int *leastPriority, int *greatestPriority); - // HIP: hipError_t hipDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority); - // CHECK: result = hipDeviceGetStreamPriorityRange(&leastPriority, &greatestPriority); - result = cuCtxGetStreamPriorityRange(&leastPriority, &greatestPriority); + // CUDA: CUresult CUDAAPI cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS *nodeParams); + // HIP: hipError_t hipGraphMemsetNodeGetParams(hipGraphNode_t node, hipMemsetParams* pNodeParams); + // CHECK: result = hipGraphMemsetNodeGetParams(graphNode, &MEMSET_NODE_PARAMS); + result = cuGraphMemsetNodeGetParams(graphNode, &MEMSET_NODE_PARAMS); - // CUDA: CUresult CUDAAPI cuCtxPopCurrent(CUcontext *pctx); - // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxPopCurrent(hipCtx_t* ctx); - // CHECK: result = hipCtxPopCurrent(&context); - // CHECK-NEXT: result = hipCtxPopCurrent(&context); - result = cuCtxPopCurrent(&context); - result = cuCtxPopCurrent_v2(&context); + // CUDA: CUresult CUDAAPI cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS *nodeParams); + // HIP: hipError_t hipGraphMemsetNodeSetParams(hipGraphNode_t node, const hipMemsetParams* pNodeParams); + // CHECK: result = hipGraphMemsetNodeSetParams(graphNode, &MEMSET_NODE_PARAMS); + result = cuGraphMemsetNodeSetParams(graphNode, &MEMSET_NODE_PARAMS); - // CUDA: CUresult CUDAAPI cuCtxPushCurrent(CUcontext ctx); - // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxPushCurrent(hipCtx_t ctx); - // CHECK: result = hipCtxPushCurrent(context); - // CHECK-NEXT: result = hipCtxPushCurrent(context); - result = cuCtxPushCurrent(context); - result = cuCtxPushCurrent_v2(context); + // CUDA: CUresult CUDAAPI cuGraphGetEdges(CUgraph hGraph, CUgraphNode *from, CUgraphNode *to, size_t *numEdges); + // HIP: hipError_t hipGraphGetEdges(hipGraph_t graph, hipGraphNode_t* from, hipGraphNode_t* to, size_t* numEdges); + // CHECK: result = hipGraphGetEdges(graph, &graphNode, &graphNode2, &bytes); + result = cuGraphGetEdges(graph, &graphNode, &graphNode2, &bytes); - // CUDA: CUresult CUDAAPI cuCtxSetCacheConfig(CUfunc_cache config); - // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxSetCacheConfig(hipFuncCache_t cacheConfig); - // CHECK: result = hipCtxSetCacheConfig(func_cache); - result = cuCtxSetCacheConfig(func_cache); + // CUDA: CUresult CUDAAPI cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode *dependencies, size_t *numDependencies); + // HIP: hipError_t hipGraphNodeGetDependencies(hipGraphNode_t node, hipGraphNode_t* pDependencies, size_t* pNumDependencies); + // CHECK: result = hipGraphNodeGetDependencies(graphNode, &graphNode2, &bytes); + result = cuGraphNodeGetDependencies(graphNode, &graphNode2, &bytes); - // CUDA: CUresult CUDAAPI cuCtxSetCurrent(CUcontext ctx); - // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxSetCurrent(hipCtx_t ctx); - // CHECK: result = hipCtxSetCurrent(context); - result = cuCtxSetCurrent(context); + // CUDA: CUresult CUDAAPI cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode *from, const CUgraphNode *to, size_t numDependencies); + // HIP: hipError_t hipGraphRemoveDependencies(hipGraph_t graph, const hipGraphNode_t* from, const hipGraphNode_t* to, size_t numDependencies); + // CHECK: result = hipGraphRemoveDependencies(graph, &graphNode, &graphNode2, bytes); + result = cuGraphRemoveDependencies(graph, &graphNode, &graphNode2, bytes); - // CUDA: CUresult CUDAAPI cuCtxSetSharedMemConfig(CUsharedconfig config); - // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxSetSharedMemConfig(hipSharedMemConfig config); - // CHECK: result = hipCtxSetSharedMemConfig(pconfig); - result = cuCtxSetSharedMemConfig(pconfig); + // CUDA: CUresult CUDAAPI cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode *dependentNodes, size_t *numDependentNodes); + // HIP: hipError_t hipGraphNodeGetDependentNodes(hipGraphNode_t node, hipGraphNode_t* pDependentNodes, size_t* pNumDependentNodes); + // CHECK: result = hipGraphNodeGetDependentNodes(graphNode, &graphNode2, &bytes); + result = cuGraphNodeGetDependentNodes(graphNode, &graphNode2, &bytes); - // CUDA: CUresult CUDAAPI cuCtxSynchronize(void); - // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxSynchronize(void); - // CHECK: result = hipCtxSynchronize(); - result = cuCtxSynchronize(); + // CUDA: CUresult CUDAAPI cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType *type); + // HIP: hipError_t hipGraphNodeGetType(hipGraphNode_t node, hipGraphNodeType* pType); + // CHECK: result = hipGraphNodeGetType(graphNode, &graphNodeType); + result = cuGraphNodeGetType(graphNode, &graphNodeType); - // CUDA: CUresult CUDAAPI cuModuleGetFunction(CUfunction *hfunc, CUmodule hmod, const char *name); - // HIP: hipError_t hipModuleGetFunction(hipFunction_t* function, hipModule_t module, const char* kname); - // CHECK: result = hipModuleGetFunction(&function, module_, name.c_str()); - result = cuModuleGetFunction(&function, module_, name.c_str()); + // CUDA: CUresult CUDAAPI cuGraphDestroyNode(CUgraphNode hNode); + // HIP: hipError_t hipGraphDestroyNode(hipGraphNode_t node); + // CHECK: result = hipGraphDestroyNode(graphNode); + result = cuGraphDestroyNode(graphNode); - // CUDA: CUresult CUDAAPI cuModuleGetGlobal(CUdeviceptr *dptr, size_t *bytes, CUmodule hmod, const char *name); - // HIP: hipError_t hipModuleGetGlobal(hipDeviceptr_t* dptr, size_t* bytes, hipModule_t hmod, const char* name); - // CHECK: result = hipModuleGetGlobal(&deviceptr, &bytes, module_, name.c_str()); - // CHECK-NEXT: result = hipModuleGetGlobal(&deviceptr, &bytes, module_, name.c_str()); - result = cuModuleGetGlobal(&deviceptr, &bytes, module_, name.c_str()); - result = cuModuleGetGlobal_v2(&deviceptr, &bytes, module_, name.c_str()); + // CUDA: CUresult CUDAAPI cuGraphAddHostNode(CUgraphNode *phGraphNode, CUgraph hGraph, const CUgraphNode *dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS *nodeParams); + // HIP: hipError_t hipGraphAddHostNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, size_t numDependencies, const hipHostNodeParams* pNodeParams); + // CHECK: result = hipGraphAddHostNode(&graphNode, graph, &graphNode2, bytes, &host_node_params); + result = cuGraphAddHostNode(&graphNode, graph, &graphNode2, bytes, &host_node_params); - // CUDA: CUresult CUDAAPI cuModuleGetTexRef(CUtexref *pTexRef, CUmodule hmod, const char *name); - // HIP: hipError_t hipModuleGetTexRef(textureReference** texRef, hipModule_t hmod, const char* name); - // CHECK: result = hipModuleGetTexRef(&texref, module_, name.c_str()); - result = cuModuleGetTexRef(&texref, module_, name.c_str()); + // CUDA: CUresult CUDAAPI cuGraphNodeFindInClone(CUgraphNode *phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph); + // HIP: hipError_t hipGraphNodeFindInClone(hipGraphNode_t* pNode, hipGraphNode_t originalNode, hipGraph_t clonedGraph); + // CHECK: result = hipGraphNodeFindInClone(&graphNode2, graphNode, graph); + result = cuGraphNodeFindInClone(&graphNode2, graphNode, graph); - // CUDA: CUresult CUDAAPI cuModuleLoad(CUmodule *module, const char *fname); - // HIP: hipError_t hipModuleLoad(hipModule_t* module, const char* fname); - // CHECK: result = hipModuleLoad(&module_, name.c_str()); - result = cuModuleLoad(&module_, name.c_str()); + // CUDA: CUresult CUDAAPI cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus *captureStatus); + // HIP: hipError_t hipStreamIsCapturing(hipStream_t stream, hipStreamCaptureStatus* pCaptureStatus); + // CHECK: result = hipStreamIsCapturing(stream, &streamCaptureStatus); + result = cuStreamIsCapturing(stream, &streamCaptureStatus); - // CUDA: CUresult CUDAAPI cuModuleLoadData(CUmodule *module, const void *image); - // HIP: hipError_t hipModuleLoadData(hipModule_t* module, const void* image); - // CHECK: result = hipModuleLoadData(&module_, image); - result = cuModuleLoadData(&module_, image); + // CUDA: CUresult CUDAAPI cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS *nodeParams); + // HIP: hipError_t hipGraphHostNodeGetParams(hipGraphNode_t node, hipHostNodeParams* pNodeParams); + // CHECK: result = hipGraphHostNodeGetParams(graphNode, &host_node_params); + result = cuGraphHostNodeGetParams(graphNode, &host_node_params); - unsigned int numOptions = 0; - void* optionValues = nullptr; - // CUDA: CUresult CUDAAPI cuModuleLoadDataEx(CUmodule *module, const void *image, unsigned int numOptions, CUjit_option *options, void **optionValues); - // HIP: hipError_t hipModuleLoadDataEx(hipModule_t* module, const void* image, unsigned int numOptions, hipJitOption* options, void** optionValues); - // CHECK: result = hipModuleLoadDataEx(&module_, image, numOptions, &jit_option, &optionValues); - result = cuModuleLoadDataEx(&module_, image, numOptions, &jit_option, &optionValues); + // CUDA: CUresult CUDAAPI cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS *nodeParams); + // HIP: hipError_t hipGraphHostNodeSetParams(hipGraphNode_t node, const hipHostNodeParams* pNodeParams); + // CHECK: result = hipGraphHostNodeSetParams(graphNode, &host_node_params); + result = cuGraphHostNodeSetParams(graphNode, &host_node_params); - // CUDA: CUresult CUDAAPI cuModuleUnload(CUmodule hmod); - // HIP: hipError_t hipModuleUnload(hipModule_t module); - // CHECK: result = hipModuleUnload(module_); - result = cuModuleUnload(module_); + // CUDA: CUresult CUDAAPI cuGraphAddChildGraphNode(CUgraphNode *phGraphNode, CUgraph hGraph, const CUgraphNode *dependencies, size_t numDependencies, CUgraph childGraph); + // HIP: hipError_t hipGraphAddChildGraphNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, size_t numDependencies, hipGraph_t childGraph); + // CHECK: result = hipGraphAddChildGraphNode(&graphNode, graph, &graphNode2, bytes, graph2); + result = cuGraphAddChildGraphNode(&graphNode, graph, &graphNode2, bytes, graph2); - // CUDA: CUresult CUDAAPI cuArray3DCreate(CUarray *pHandle, const CUDA_ARRAY3D_DESCRIPTOR *pAllocateArray); - // HIP: hipError_t hipArray3DCreate(hipArray** array, const HIP_ARRAY3D_DESCRIPTOR* pAllocateArray); - // CHECK: result = hipArray3DCreate(&array_, &ARRAY3D_DESCRIPTOR); - // CHECK-NEXT: result = hipArray3DCreate(&array_, &ARRAY3D_DESCRIPTOR); - result = cuArray3DCreate(&array_, &ARRAY3D_DESCRIPTOR); - result = cuArray3DCreate_v2(&array_, &ARRAY3D_DESCRIPTOR); + // CUDA: CUresult CUDAAPI cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph *phGraph); + // HIP: hipError_t hipGraphChildGraphNodeGetGraph(hipGraphNode_t node, hipGraph_t* pGraph); + // CHECK: result = hipGraphChildGraphNodeGetGraph(graphNode, &graph); + result = cuGraphChildGraphNodeGetGraph(graphNode, &graph); - // CUDA: CUresult CUDAAPI cuArrayCreate(CUarray *pHandle, const CUDA_ARRAY_DESCRIPTOR *pAllocateArray); - // HIP: hipError_t hipArrayCreate(hipArray** pHandle, const HIP_ARRAY_DESCRIPTOR* pAllocateArray); - // CHECK: result = hipArrayCreate(&array_, &ARRAY_DESCRIPTOR); - // CHECK: result = hipArrayCreate(&array_, &ARRAY_DESCRIPTOR); - result = cuArrayCreate(&array_, &ARRAY_DESCRIPTOR); - result = cuArrayCreate_v2(&array_, &ARRAY_DESCRIPTOR); + // CUDA: CUresult CUDAAPI cuGraphClone(CUgraph *phGraphClone, CUgraph originalGraph); + // HIP: hipError_t hipGraphClone(hipGraph_t* pGraphClone, hipGraph_t originalGraph); + // CHECK: result = hipGraphClone(&graph, graph2); + result = cuGraphClone(&graph, graph2); +#endif - // CUDA: CUresult CUDAAPI cuArrayDestroy(CUarray hArray); - // HIP: hipError_t hipArrayDestroy(hipArray* array); - // CHECK: result = hipArrayDestroy(array_); - result = cuArrayDestroy(array_); +#if CUDA_VERSION >= 10010 + // CHECK: hipStreamCaptureMode streamCaptureMode; + CUstreamCaptureMode streamCaptureMode; - std::string pciBusId; - // CUDA: CUresult CUDAAPI cuDeviceGetByPCIBusId(CUdevice *dev, const char *pciBusId); - // HIP: hipError_t hipDeviceGetByPCIBusId(int* device, const char* pciBusId); - // CHECK: result = hipDeviceGetByPCIBusId(&device, pciBusId.c_str()); - result = cuDeviceGetByPCIBusId(&device, pciBusId.c_str()); + // CUDA: CUresult CUDAAPI cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode *mode); + // HIP: hipError_t hipThreadExchangeStreamCaptureMode(hipStreamCaptureMode* mode); + // CHECK: result = hipThreadExchangeStreamCaptureMode(&streamCaptureMode); + result = cuThreadExchangeStreamCaptureMode(&streamCaptureMode); - int len = 0; - char* pciBusId_ = const_cast(pciBusId.c_str()); - // CUDA: CUresult CUDAAPI cuDeviceGetPCIBusId(char *pciBusId, int len, CUdevice dev); - // HIP: hipError_t hipDeviceGetPCIBusId(char* pciBusId, int len, int device); - // CHECK: result = hipDeviceGetPCIBusId(pciBusId_, len, device); - result = cuDeviceGetPCIBusId(pciBusId_, len, device); + // CUDA: CUresult CUDAAPI cuStreamBeginCapture(CUstream hStream, CUstreamCaptureMode mode); + // HIP: hipError_t hipStreamBeginCapture(hipStream_t stream, hipStreamCaptureMode mode); + // CHECK: result = hipStreamBeginCapture(stream, streamCaptureMode); + // CHECK-NEXT: result = hipStreamBeginCapture(stream, streamCaptureMode); + result = cuStreamBeginCapture(stream, streamCaptureMode); + result = cuStreamBeginCapture_v2(stream, streamCaptureMode); - // CUDA: CUresult CUDAAPI cuIpcCloseMemHandle(CUdeviceptr dptr); - // HIP: hipError_t hipIpcCloseMemHandle(void* devPtr); - // CHECK: result = hipIpcCloseMemHandle(deviceptr); - result = cuIpcCloseMemHandle(deviceptr); + // CUDA: CUresult CUDAAPI cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus *captureStatus_out, cuuint64_t *id_out); + // HIP: hipError_t hipStreamGetCaptureInfo(hipStream_t stream, hipStreamCaptureStatus* pCaptureStatus, unsigned long long* pId); + // CHECK: result = hipStreamGetCaptureInfo(stream, &streamCaptureStatus, &ull); + result = cuStreamGetCaptureInfo(stream, &streamCaptureStatus, &ull); - // CUDA: CUresult CUDAAPI cuIpcGetEventHandle(CUipcEventHandle *pHandle, CUevent event); - // HIP: hipError_t hipIpcGetEventHandle(hipIpcEventHandle_t* handle, hipEvent_t event); - // CHECK: result = hipIpcGetEventHandle(&ipcEventHandle, event_); - result = cuIpcGetEventHandle(&ipcEventHandle, event_); + // CUDA: CUresult CUDAAPI cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS *nodeParams); + // HIP: hipError_t hipGraphExecKernelNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, const hipKernelNodeParams* pNodeParams); + // CHECK: result = hipGraphExecKernelNodeSetParams(graphExec, graphNode, &KERNEL_NODE_PARAMS); + result = cuGraphExecKernelNodeSetParams(graphExec, graphNode, &KERNEL_NODE_PARAMS); +#endif - // CUDA: CUresult CUDAAPI cuIpcGetMemHandle(CUipcMemHandle *pHandle, CUdeviceptr dptr); - // HIP: hipError_t hipIpcGetMemHandle(hipIpcMemHandle_t* handle, void* devPtr); - // CHECK: result = hipIpcGetMemHandle(&ipcMemHandle, deviceptr); - result = cuIpcGetMemHandle(&ipcMemHandle, deviceptr); +#if CUDA_VERSION >= 10020 + // CHECK: hipGraphExecUpdateResult graphExecUpdateResult; + CUgraphExecUpdateResult graphExecUpdateResult; - // CUDA: CUresult CUDAAPI cuIpcOpenEventHandle(CUevent *phEvent, CUipcEventHandle handle); - // HIP: hipError_t hipIpcOpenEventHandle(hipEvent_t* event, hipIpcEventHandle_t handle); - // CHECK: result = hipIpcOpenEventHandle(&event_, ipcEventHandle); - result = cuIpcOpenEventHandle(&event_, ipcEventHandle); + // CHECK: hipMemLocation memLocation_st; + // CHECK-NEXT: hipMemLocation memLocation; + // CHECK-NEXT: hipMemAllocationHandleType memAllocationHandleType; + CUmemLocation_st memLocation_st; + CUmemLocation memLocation; + CUmemAllocationHandleType memAllocationHandleType; - // CUDA: CUresult CUDAAPI cuIpcOpenMemHandle(CUdeviceptr *pdptr, CUipcMemHandle handle, unsigned int Flags); - // HIP: hipError_t hipIpcOpenMemHandle(void** devPtr, hipIpcMemHandle_t handle, unsigned int flags); - // CHECK: result = hipIpcOpenMemHandle(&deviceptr, ipcMemHandle, flags); - result = cuIpcOpenMemHandle(&deviceptr, ipcMemHandle, flags); + // CUDA: CUresult CUDAAPI cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphNode *hErrorNode_out, CUgraphExecUpdateResult *updateResult_out); + // HIP: hipError_t hipGraphExecUpdate(hipGraphExec_t hGraphExec, hipGraph_t hGraph, hipGraphNode_t* hErrorNode_out, hipGraphExecUpdateResult* updateResult_out); + // CHECK: result = hipGraphExecUpdate(graphExec, graph, &graphNode, &graphExecUpdateResult); + result = cuGraphExecUpdate(graphExec, graph, &graphNode, &graphExecUpdateResult); - // CUDA: CUresult CUDAAPI cuMemAlloc(CUdeviceptr *dptr, size_t bytesize); - // HIP: hipError_t hipMalloc(void** ptr, size_t size); - // CHECK: result = hipMalloc(&deviceptr, bytes); - // CHECK-NEXT: result = hipMalloc(&deviceptr, bytes); - result = cuMemAlloc(&deviceptr, bytes); - result = cuMemAlloc_v2(&deviceptr, bytes); + // CUDA: CUresult CUDAAPI cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS *nodeParams); + // HIP: hipError_t hipError_t hipGraphExecHostNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, const hipHostNodeParams* pNodeParams); + // CHECK: result = hipGraphExecHostNodeSetParams(graphExec, graphNode, &host_node_params); + result = cuGraphExecHostNodeSetParams(graphExec, graphNode, &host_node_params); - // CUDA: CUresult CUDAAPI cuMemAllocHost(void **pp, size_t bytesize); - // HIP: DEPRECATED("use hipHostMalloc instead") hipError_t hipMemAllocHost(void** ptr, size_t size); - // CHECK: result = hipMemAllocHost(&image, bytes); - // CHECK-NEXT: result = hipMemAllocHost(&image, bytes); - result = cuMemAllocHost(&image, bytes); - result = cuMemAllocHost_v2(&image, bytes); - - // CUDA: CUresult CUDAAPI cuMemAllocManaged(CUdeviceptr *dptr, size_t bytesize, unsigned int flags); - // HIP: hipError_t hipMallocManaged(void** dev_ptr, size_t size, unsigned int flags __dparm(hipMemAttachGlobal)); - // CHECK: result = hipMallocManaged(&deviceptr, bytes, flags); - result = cuMemAllocManaged(&deviceptr, bytes, flags); - - size_t pitch = 0, width = 0, height = 0; - // CUDA: CUresult CUDAAPI cuMemAllocPitch(CUdeviceptr *dptr, size_t *pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes); - // HIP: hipError_t hipMemAllocPitch(hipDeviceptr_t* dptr, size_t* pitch, size_t widthInBytes, size_t height, unsigned int elementSizeBytes); - // CHECK: result = hipMemAllocPitch(&deviceptr, &pitch, width, height, bytes); - // CHECK-NEXT: result = hipMemAllocPitch(&deviceptr, &pitch, width, height, bytes); - result = cuMemAllocPitch(&deviceptr, &pitch, width, height, bytes); - result = cuMemAllocPitch_v2(&deviceptr, &pitch, width, height, bytes); - - // CUDA: CUresult CUDAAPI cuMemcpy2D(const CUDA_MEMCPY2D *pCopy); - // HIP: hipError_t hipMemcpyParam2D(const hip_Memcpy2D* pCopy); - // CHECK: result = hipMemcpyParam2D(&MEMCPY2D); - // CHECK-NEXT: result = hipMemcpyParam2D(&MEMCPY2D); - result = cuMemcpy2D(&MEMCPY2D); - result = cuMemcpy2D_v2(&MEMCPY2D); - - // CUDA: CUresult CUDAAPI cuMemcpy2DAsync(const CUDA_MEMCPY2D *pCopy, CUstream hStream); - // HIP: hipError_t hipMemcpyParam2DAsync(const hip_Memcpy2D* pCopy, hipStream_t stream __dparm(0)); - // CHECK: result = hipMemcpyParam2DAsync(&MEMCPY2D, stream); - // CHECK-NEXT: result = hipMemcpyParam2DAsync(&MEMCPY2D, stream); - result = cuMemcpy2DAsync(&MEMCPY2D, stream); - result = cuMemcpy2DAsync_v2(&MEMCPY2D, stream); - - // CUDA: CUresult CUDAAPI cuMemcpy2DUnaligned(const CUDA_MEMCPY2D *pCopy); - // HIP: hipError_t hipDrvMemcpy2DUnaligned(const hip_Memcpy2D* pCopy); - // CHECK: result = hipDrvMemcpy2DUnaligned(&MEMCPY2D); - // CHECK-NEXT: result = hipDrvMemcpy2DUnaligned(&MEMCPY2D); - result = cuMemcpy2DUnaligned(&MEMCPY2D); - result = cuMemcpy2DUnaligned_v2(&MEMCPY2D); + // CHECK: hipMemAllocationProp memAllocationProp; + CUmemAllocationProp memAllocationProp; + // CHECK: hipMemGenericAllocationHandle_t memGenericAllocationHandle_t; + CUmemGenericAllocationHandle memGenericAllocationHandle_t; + // CHECK: hipMemAllocationGranularity_flags memAllocationGranularity_flags; + CUmemAllocationGranularity_flags memAllocationGranularity_flags; + // CHECK: hipMemAccessDesc memAccessDesc; + CUmemAccessDesc memAccessDesc; - // CUDA: CUresult CUDAAPI cuMemcpy3D(const CUDA_MEMCPY3D *pCopy); - // HIP: hipError_t hipDrvMemcpy3D(const HIP_MEMCPY3D* pCopy); - // CHECK: result = hipDrvMemcpy3D(&MEMCPY3D); - // CHECK-NEXT: result = hipDrvMemcpy3D(&MEMCPY3D); - result = cuMemcpy3D(&MEMCPY3D); - result = cuMemcpy3D_v2(&MEMCPY3D); + // CUDA: CUresult CUDAAPI cuMemAddressFree(CUdeviceptr ptr, size_t size); + // HIP: hipError_t hipMemAddressFree(void* devPtr, size_t size); + // CHECK: result = hipMemAddressFree(deviceptr, bytes); + result = cuMemAddressFree(deviceptr, bytes); - // CUDA: CUresult CUDAAPI cuMemcpy3DAsync(const CUDA_MEMCPY3D *pCopy, CUstream hStream); - // HIP: hipError_t hipDrvMemcpy3DAsync(const HIP_MEMCPY3D* pCopy, hipStream_t stream); - // CHECK: result = hipDrvMemcpy3DAsync(&MEMCPY3D, stream); - // CHECK-NEXT: result = hipDrvMemcpy3DAsync(&MEMCPY3D, stream); - result = cuMemcpy3DAsync(&MEMCPY3D, stream); - result = cuMemcpy3DAsync_v2(&MEMCPY3D, stream); + // CUDA: CUresult CUDAAPI cuMemAddressReserve(CUdeviceptr *ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags); + // HIP: hipError_t hipMemAddressReserve(void** ptr, size_t size, size_t alignment, void* addr, unsigned long long flags); + // CHECK: result = hipMemAddressReserve(&deviceptr, bytes, bytes_2, deviceptr_2, ull); + result = cuMemAddressReserve(&deviceptr, bytes, bytes_2, deviceptr_2, ull); - void* dsthost = nullptr; - size_t offset = 0; - // CUDA: CUresult CUDAAPI cuMemcpyAtoH(void *dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount); - // HIP: hipError_t hipMemcpyAtoH(void* dst, hipArray* srcArray, size_t srcOffset, size_t count); - // CHECK: result = hipMemcpyAtoH(dsthost, array_, offset, bytes); - // CHECK-NEXT: result = hipMemcpyAtoH(dsthost, array_, offset, bytes); - result = cuMemcpyAtoH(dsthost, array_, offset, bytes); - result = cuMemcpyAtoH_v2(dsthost, array_, offset, bytes); + // CUDA: CUresult CUDAAPI cuMemCreate(CUmemGenericAllocationHandle *handle, size_t size, const CUmemAllocationProp *prop, unsigned long long flags); + // HIP: hipError_t hipMemCreate(hipMemGenericAllocationHandle_t* handle, size_t size, const hipMemAllocationProp* prop, unsigned long long flags); + // CHECK: result = hipMemCreate(&memGenericAllocationHandle_t, bytes, &memAllocationProp, ull); + result = cuMemCreate(&memGenericAllocationHandle_t, bytes, &memAllocationProp, ull); - // CUDA: CUresult CUDAAPI cuMemcpyDtoD(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount); - // HIP: hipError_t hipMemcpyDtoD(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes); - // CHECK: result = hipMemcpyDtoD(deviceptr, deviceptr, bytes); - // CHECK-NEXT: result = hipMemcpyDtoD(deviceptr, deviceptr, bytes); - result = cuMemcpyDtoD(deviceptr, deviceptr, bytes); - result = cuMemcpyDtoD_v2(deviceptr, deviceptr, bytes); + // CUDA: CUresult CUDAAPI cuMemExportToShareableHandle(void *shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags); + // HIP: hipError_t hipMemExportToShareableHandle(void* shareableHandle, hipMemGenericAllocationHandle_t handle, hipMemAllocationHandleType handleType, unsigned long long flags); + // CHECK: result = hipMemExportToShareableHandle(image, memGenericAllocationHandle_t, memAllocationHandleType, ull); + result = cuMemExportToShareableHandle(image, memGenericAllocationHandle_t, memAllocationHandleType, ull); - // CUDA: CUresult CUDAAPI cuMemcpyDtoDAsync(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream); - // HIP: hipError_t hipMemcpyDtoDAsync(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes, hipStream_t stream); - // CHECK: result = hipMemcpyDtoDAsync(deviceptr, deviceptr, bytes, stream); - // CHECK-NEXT: result = hipMemcpyDtoDAsync(deviceptr, deviceptr, bytes, stream); - result = cuMemcpyDtoDAsync(deviceptr, deviceptr, bytes, stream); - result = cuMemcpyDtoDAsync_v2(deviceptr, deviceptr, bytes, stream); + // CUDA: CUresult CUDAAPI cuMemGetAccess(unsigned long long *flags, const CUmemLocation *location, CUdeviceptr ptr); + // HIP: hipError_t hipMemGetAccess(unsigned long long* flags, const hipMemLocation* location, void* ptr); + // CHECK: result = hipMemGetAccess(&ull_2, &memLocation, deviceptr); + result = cuMemGetAccess(&ull_2, &memLocation, deviceptr); - // CUDA: CUresult CUDAAPI cuMemcpyDtoH(void *dstHost, CUdeviceptr srcDevice, size_t ByteCount); - // HIP: hipError_t hipMemcpyDtoH(void* dst, hipDeviceptr_t src, size_t sizeBytes); - // CHECK: result = hipMemcpyDtoH(dsthost, deviceptr, bytes); - // CHECK-NEXT: result = hipMemcpyDtoH(dsthost, deviceptr, bytes); - result = cuMemcpyDtoH(dsthost, deviceptr, bytes); - result = cuMemcpyDtoH_v2(dsthost, deviceptr, bytes); + // CUDA: CUresult CUDAAPI cuMemGetAllocationGranularity(size_t *granularity, const CUmemAllocationProp *prop, CUmemAllocationGranularity_flags option); + // HIP: hipError_t hipMemGetAllocationGranularity(size_t* granularity, const hipMemAllocationProp* prop, hipMemAllocationGranularity_flags option); + // CHECK: result = hipMemGetAllocationGranularity(&bytes, &memAllocationProp, memAllocationGranularity_flags); + result = cuMemGetAllocationGranularity(&bytes, &memAllocationProp, memAllocationGranularity_flags); - // CUDA: CUresult CUDAAPI cuMemcpyDtoHAsync(void *dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream); - // HIP: hipError_t hipMemcpyDtoHAsync(void* dst, hipDeviceptr_t src, size_t sizeBytes, hipStream_t stream); - // CHECK: result = hipMemcpyDtoHAsync(dsthost, deviceptr, bytes, stream); - // CHECK-NEXT: result = hipMemcpyDtoHAsync(dsthost, deviceptr, bytes, stream); - result = cuMemcpyDtoHAsync(dsthost, deviceptr, bytes, stream); - result = cuMemcpyDtoHAsync_v2(dsthost, deviceptr, bytes, stream); + // CUDA: CUresult CUDAAPI cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp *prop, CUmemGenericAllocationHandle handle); + // HIP: hipError_t hipMemGetAllocationPropertiesFromHandle(hipMemAllocationProp* prop, hipMemGenericAllocationHandle_t handle); + // CHECK: result = hipMemGetAllocationPropertiesFromHandle(&memAllocationProp, memGenericAllocationHandle_t); + result = cuMemGetAllocationPropertiesFromHandle(&memAllocationProp, memGenericAllocationHandle_t); - // CUDA: CUresult CUDAAPI cuMemcpyHtoA(CUarray dstArray, size_t dstOffset, const void *srcHost, size_t ByteCount); - // HIP: hipError_t hipMemcpyHtoA(hipArray* dstArray, size_t dstOffset, const void* srcHost, size_t count); - // CHECK: result = hipMemcpyHtoA(array_, offset, dsthost, bytes); - // CHECK-NEXT: result = hipMemcpyHtoA(array_, offset, dsthost, bytes); - result = cuMemcpyHtoA(array_, offset, dsthost, bytes); - result = cuMemcpyHtoA_v2(array_, offset, dsthost, bytes); + // CUDA: CUresult CUDAAPI cuMemImportFromShareableHandle(CUmemGenericAllocationHandle *handle, void *osHandle, CUmemAllocationHandleType shHandleType); + // HIP: hipError_t hipMemImportFromShareableHandle(hipMemGenericAllocationHandle_t* handle, void* osHandle, hipMemAllocationHandleType shHandleType); + // CHECK: result = hipMemImportFromShareableHandle(&memGenericAllocationHandle_t, image, memAllocationHandleType); + result = cuMemImportFromShareableHandle(&memGenericAllocationHandle_t, image, memAllocationHandleType); - // CUDA: CUresult CUDAAPI cuMemcpyHtoD(CUdeviceptr dstDevice, const void *srcHost, size_t ByteCount); - // HIP: hipError_t hipMemcpyHtoD(hipDeviceptr_t dst, void* src, size_t sizeBytes); - // CHECK: result = hipMemcpyHtoD(deviceptr, dsthost, bytes); - // CHECK-NEXT: result = hipMemcpyHtoD(deviceptr, dsthost, bytes); - result = cuMemcpyHtoD(deviceptr, dsthost, bytes); - result = cuMemcpyHtoD_v2(deviceptr, dsthost, bytes); + // CUDA: CUresult CUDAAPI cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags); + // HIP: hipError_t hipMemMap(void* ptr, size_t size, size_t offset, hipMemGenericAllocationHandle_t handle, unsigned long long flags); + // CHECK: result = hipMemMap(deviceptr, bytes, bytes_2, memGenericAllocationHandle_t, ull); + result = cuMemMap(deviceptr, bytes, bytes_2, memGenericAllocationHandle_t, ull); - // CUDA: CUresult CUDAAPI cuMemcpyHtoDAsync(CUdeviceptr dstDevice, const void *srcHost, size_t ByteCount, CUstream hStream); - // HIP: hipError_t hipMemcpyHtoDAsync(hipDeviceptr_t dst, void* src, size_t sizeBytes, hipStream_t stream); - // CHECK: result = hipMemcpyHtoDAsync(deviceptr, dsthost, bytes, stream); - // CHECK-NEXT: result = hipMemcpyHtoDAsync(deviceptr, dsthost, bytes, stream); - result = cuMemcpyHtoDAsync(deviceptr, dsthost, bytes, stream); - result = cuMemcpyHtoDAsync_v2(deviceptr, dsthost, bytes, stream); + // CUDA: CUresult CUDAAPI cuMemRelease(CUmemGenericAllocationHandle handle); + // HIP: hipError_t hipMemRelease(hipMemGenericAllocationHandle_t handle); + // CHECK: result = hipMemRelease(memGenericAllocationHandle_t); + result = cuMemRelease(memGenericAllocationHandle_t); - // CUDA: CUresult CUDAAPI cuMemFree(CUdeviceptr dptr); - // HIP: hipError_t hipFree(void* ptr); - // CHECK: result = hipFree(deviceptr); - // CHECK-NEXT: result = hipFree(deviceptr); - result = cuMemFree(deviceptr); - result = cuMemFree_v2(deviceptr); + // CUDA: CUresult CUDAAPI cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc *desc, size_t count); + // HIP: hipError_t hipMemSetAccess(void* ptr, size_t size, const hipMemAccessDesc* desc, size_t count); + // CHECK: result = hipMemSetAccess(deviceptr, bytes, &memAccessDesc, bytes_2); + result = cuMemSetAccess(deviceptr, bytes, &memAccessDesc, bytes_2); - // CUDA: CUresult CUDAAPI cuMemFreeHost(void *p); - // HIP: hipError_t hipHostFree(void* ptr); - // CHECK: result = hipHostFree(image); - result = cuMemFreeHost(image); + // CUDA: CUresult CUDAAPI cuMemUnmap(CUdeviceptr ptr, size_t size); + // HIP: hipError_t hipMemUnmap(void* ptr, size_t size); + // CHECK: result = hipMemUnmap(deviceptr, bytes); + result = cuMemUnmap(deviceptr, bytes); +#endif - // CUDA: CUresult CUDAAPI cuMemGetAddressRange(CUdeviceptr *pbase, size_t *psize, CUdeviceptr dptr); - // HIP: hipError_t hipMemGetAddressRange(hipDeviceptr_t* pbase, size_t* psize, hipDeviceptr_t dptr); - // CHECK: result = hipMemGetAddressRange(&deviceptr, &bytes, deviceptr_2); - // CHECK-NEXT: result = hipMemGetAddressRange(&deviceptr, &bytes, deviceptr_2); - result = cuMemGetAddressRange(&deviceptr, &bytes, deviceptr_2); - result = cuMemGetAddressRange_v2(&deviceptr, &bytes, deviceptr_2); +#if CUDA_VERSION >= 11000 + // CHECK: result = hipDevicePrimaryCtxRelease(device); + result = cuDevicePrimaryCtxRelease_v2(device); - // CUDA: CUresult CUDAAPI cuMemGetInfo(size_t *free, size_t *total); - // HIP: hipError_t hipMemGetInfo(size_t* free, size_t* total); - // CHECK: result = hipMemGetInfo(&bytes, &bytes_2); - // CHECK-NEXT: result = hipMemGetInfo(&bytes, &bytes_2); - result = cuMemGetInfo(&bytes, &bytes_2); - result = cuMemGetInfo_v2(&bytes, &bytes_2); + // CHECK: result = hipDevicePrimaryCtxReset(device); + result = cuDevicePrimaryCtxReset_v2(device); - // CUDA: CUresult CUDAAPI cuMemHostAlloc(void **pp, size_t bytesize, unsigned int Flags); - // HIP: DEPRECATED("use hipHostMalloc instead") hipError_t hipHostAlloc(void** ptr, size_t size, unsigned int flags); - // CHECK: result = hipHostAlloc(&image, bytes, flags); - result = cuMemHostAlloc(&image, bytes, flags); + // CHECK: result = hipDevicePrimaryCtxSetFlags(device, flags); + result = cuDevicePrimaryCtxSetFlags_v2(device, flags); - // CUDA: CUresult CUDAAPI cuMemHostGetDevicePointer(CUdeviceptr *pdptr, void *p, unsigned int Flags); - // HIP: hipError_t hipHostGetDevicePointer(void** devPtr, void* hstPtr, unsigned int flags); - // CHECK: result = hipHostGetDevicePointer(&deviceptr, image, flags); - // CHECK-NEXT: result = hipHostGetDevicePointer(&deviceptr, image, flags); - result = cuMemHostGetDevicePointer(&deviceptr, image, flags); - result = cuMemHostGetDevicePointer_v2(&deviceptr, image, flags); + // CHECK: hipKernelNodeAttrID kernelNodeAttrID; + CUkernelNodeAttrID kernelNodeAttrID; + // CHECK: hipKernelNodeAttrValue kernelNodeAttrValue; + CUkernelNodeAttrValue kernelNodeAttrValue; - // CUDA: CUresult CUDAAPI cuMemHostGetFlags(unsigned int *pFlags, void *p); - // HIP: hipError_t hipHostGetFlags(&flags, image); - // CHECK: result = hipHostGetFlags(&flags, image); - result = cuMemHostGetFlags(&flags, image); + // CUDA: CUresult CUDAAPI cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value); + // HIP: hipError_t hipGraphKernelNodeSetAttribute(hipGraphNode_t hNode, hipKernelNodeAttrID attr, const hipKernelNodeAttrValue* value); + // CHECK: result = hipGraphKernelNodeSetAttribute(graphNode, kernelNodeAttrID, &kernelNodeAttrValue); + result = cuGraphKernelNodeSetAttribute(graphNode, kernelNodeAttrID, &kernelNodeAttrValue); - // CUDA: CUresult CUDAAPI cuMemHostRegister(void *p, size_t bytesize, unsigned int Flags); - // HIP: hipError_t hipHostRegister(void* hostPtr, size_t sizeBytes, unsigned int flags); - // CHECK: result = hipHostRegister(image, bytes, flags); - // CHECK-NEXT: result = hipHostRegister(image, bytes, flags); - result = cuMemHostRegister(image, bytes, flags); - result = cuMemHostRegister_v2(image, bytes, flags); + // CUDA: CUresult CUDAAPI cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out); + // HIP: hipError_t hipGraphKernelNodeGetAttribute(hipGraphNode_t hNode, hipKernelNodeAttrID attr, hipKernelNodeAttrValue* value); + // CHECK: result = hipGraphKernelNodeGetAttribute(graphNode, kernelNodeAttrID, &kernelNodeAttrValue); + result = cuGraphKernelNodeGetAttribute(graphNode, kernelNodeAttrID, &kernelNodeAttrValue); - // CUDA: CUresult CUDAAPI cuMemHostUnregister(void *p); - // HIP: hipError_t hipHostUnregister(void* hostPtr); - // CHECK: result = hipHostUnregister(image); - result = cuMemHostUnregister(image); + // CUDA: CUresult CUDAAPI cuMemRetainAllocationHandle(CUmemGenericAllocationHandle *handle, void *addr); + // HIP: hipError_t hipMemRetainAllocationHandle(hipMemGenericAllocationHandle_t* handle, void* addr); + // CHECK: result = hipMemRetainAllocationHandle(&memGenericAllocationHandle_t, image); + result = cuMemRetainAllocationHandle(&memGenericAllocationHandle_t, image); - unsigned short us = 0; - // CUDA: CUresult CUDAAPI cuMemsetD16(CUdeviceptr dstDevice, unsigned short us, size_t N); - // HIP: hipError_t hipMemsetD16(hipDeviceptr_t dest, unsigned short value, size_t count); - // CHECK: result = hipMemsetD16(deviceptr, us, bytes); - // CHECK-NEXT: result = hipMemsetD16(deviceptr, us, bytes); - result = cuMemsetD16(deviceptr, us, bytes); - result = cuMemsetD16_v2(deviceptr, us, bytes); + // CHECK: result = hipGraphInstantiate(&graphExec, graph, &graphNode, nullptr, bytes); + result = cuGraphInstantiate_v2(&graphExec, graph, &graphNode, nullptr, bytes); +#endif - // CUDA: CUresult CUDAAPI cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream); - // HIP: hipError_t hipMemsetD16Async(hipDeviceptr_t dest, unsigned short value, size_t count, hipStream_t stream __dparm(0)); - // CHECK: result = hipMemsetD16Async(deviceptr, us, bytes, stream); - result = cuMemsetD16Async(deviceptr, us, bytes, stream); +#if CUDA_VERSION >= 11010 + // CUDA: CUresult CUDAAPI cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph); + // HIP: hipError_t hipGraphExecChildGraphNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, hipGraph_t childGraph); + // CHECK: result = hipGraphExecChildGraphNodeSetParams(graphExec, graphNode, graph); + result = cuGraphExecChildGraphNodeSetParams(graphExec, graphNode, graph); - // CUDA: CUresult CUDAAPI cuMemsetD32(CUdeviceptr dstDevice, unsigned int ui, size_t N) - // HIP: hipError_t hipMemsetD32(hipDeviceptr_t dest, int value, size_t count); - // CHECK: result = hipMemsetD32(deviceptr, flags, bytes); - // CHECK-NEXT: result = hipMemsetD32(deviceptr, flags, bytes); - result = cuMemsetD32(deviceptr, flags, bytes); - result = cuMemsetD32_v2(deviceptr, flags, bytes); + // CUDA: CUresult CUDAAPI cuGraphAddEventRecordNode(CUgraphNode *phGraphNode, CUgraph hGraph, const CUgraphNode *dependencies, size_t numDependencies, CUevent event); + // HIP: hipError_t hipGraphAddEventRecordNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, size_t numDependencies, hipEvent_t event); + // CHECK: result = hipGraphAddEventRecordNode(&graphNode, graph, &graphNode2, bytes, event_); + result = cuGraphAddEventRecordNode(&graphNode, graph, &graphNode2, bytes, event_); - // CUDA: CUresult CUDAAPI cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream); - // HIP: hipError_t hipMemsetD32Async(hipDeviceptr_t dst, int value, size_t count, hipStream_t stream __dparm(0)); - // CHECK: result = hipMemsetD32Async(deviceptr, flags, bytes, stream); - result = cuMemsetD32Async(deviceptr, flags, bytes, stream); + // CUDA: CUresult CUDAAPI cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent *event_out); + // HIP: hipError_t hipGraphEventRecordNodeGetEvent(hipGraphNode_t node, hipEvent_t* event_out); + // CHECK: result = hipGraphEventRecordNodeGetEvent(graphNode, &event_); + result = cuGraphEventRecordNodeGetEvent(graphNode, &event_); - unsigned char uc = 0; - // CUDA: CUresult CUDAAPI cuMemsetD8(CUdeviceptr dstDevice, unsigned char uc, size_t N); - // HIP: hipError_t hipMemsetD8(hipDeviceptr_t dest, unsigned char value, size_t count); - // CHECK: result = hipMemsetD8(deviceptr, uc, bytes); - // CHECK-NEXT: result = hipMemsetD8(deviceptr, uc, bytes); - result = cuMemsetD8(deviceptr, uc, bytes); - result = cuMemsetD8_v2(deviceptr, uc, bytes); + // CUDA: CUresult CUDAAPI cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event); + // HIP: hipError_t hipGraphEventRecordNodeSetEvent(hipGraphNode_t node, hipEvent_t event); + // CHECK: result = hipGraphEventRecordNodeSetEvent(graphNode, event_); + result = cuGraphEventRecordNodeSetEvent(graphNode, event_); - // CUDA: CUresult CUDAAPI cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream); - // HIP: hipError_t hipMemsetD8Async(hipDeviceptr_t dest, unsigned char value, size_t count, hipStream_t stream __dparm(0)); - // CHECK: result = hipMemsetD8Async(deviceptr, uc, bytes, stream); - result = cuMemsetD8Async(deviceptr, uc, bytes, stream); + // CUDA: CUresult CUDAAPI cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event); + // HIP: hipError_t hipGraphExecEventRecordNodeSetEvent(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, hipEvent_t event); + // CHECK: result = hipGraphExecEventRecordNodeSetEvent(graphExec, graphNode, event_); + result = cuGraphExecEventRecordNodeSetEvent(graphExec, graphNode, event_); - // CUDA: CUresult CUDAAPI cuMipmappedArrayCreate(CUmipmappedArray *pHandle, const CUDA_ARRAY3D_DESCRIPTOR *pMipmappedArrayDesc, unsigned int numMipmapLevels); - // HIP: hipError_t hipMipmappedArrayCreate(hipMipmappedArray_t* pHandle, HIP_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels); - // CHECK: result = hipMipmappedArrayCreate(&mipmappedArray, &ARRAY3D_DESCRIPTOR, flags); - result = cuMipmappedArrayCreate(&mipmappedArray, &ARRAY3D_DESCRIPTOR, flags); + // CUDA: CUresult CUDAAPI cuGraphAddEventWaitNode(CUgraphNode *phGraphNode, CUgraph hGraph, const CUgraphNode *dependencies, size_t numDependencies, CUevent event); + // HIP: hipError_t hipGraphAddEventWaitNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, size_t numDependencies, hipEvent_t event); + // CHECK: result = hipGraphAddEventWaitNode(&graphNode, graph, &graphNode2, bytes, event_); + result = cuGraphAddEventWaitNode(&graphNode, graph, &graphNode2, bytes, event_); - // CUDA: CUresult CUDAAPI cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray); - // HIP: hipError_t hipMipmappedArrayDestroy(hipMipmappedArray_t hMipmappedArray); - // CHECK: result = hipMipmappedArrayDestroy(mipmappedArray); - result = cuMipmappedArrayDestroy(mipmappedArray); + // CUDA: CUresult CUDAAPI cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent *event_out); + // HIP: hipError_t hipGraphEventWaitNodeGetEvent(hipGraphNode_t node, hipEvent_t* event_out); + // CHECK: result = hipGraphEventWaitNodeGetEvent(graphNode, &event_); + result = cuGraphEventWaitNodeGetEvent(graphNode, &event_); - // CUDA: CUresult CUDAAPI cuMipmappedArrayGetLevel(CUarray *pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level); - // HIP: hipError_t hipMipmappedArrayGetLevel(hipArray_t* pLevelArray, hipMipmappedArray_t hMipMappedArray, unsigned int level); - // CHECK: result = hipMipmappedArrayGetLevel(&array_, mipmappedArray, flags); - result = cuMipmappedArrayGetLevel(&array_, mipmappedArray, flags); + // CUDA: CUresult CUDAAPI cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event); + // HIP: hipError_t hipGraphEventWaitNodeSetEvent(hipGraphNode_t node, hipEvent_t event); + // CHECK: result = hipGraphEventWaitNodeSetEvent(graphNode, event_); + result = cuGraphEventWaitNodeSetEvent(graphNode, event_); -#if CUDA_VERSION > 7050 - // CUDA: CUresult CUDAAPI cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device); - // HIP: hipError_t hipMemAdvise(const void* dev_ptr, size_t count, hipMemoryAdvise advice, int device); - // CHECK: result = hipMemAdvise(deviceptr, bytes, MemoryAdvise, device); - result = cuMemAdvise(deviceptr, bytes, MemoryAdvise, device); + // CUDA: CUresult CUDAAPI cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event); + // HIP: hipError_t hipGraphExecEventWaitNodeSetEvent(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, hipEvent_t event); + // CHECK: result = hipGraphExecEventWaitNodeSetEvent(graphExec, graphNode, event_); + result = cuGraphExecEventWaitNodeSetEvent(graphExec, graphNode, event_); - // CUDA: CUresult CUDAAPI cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream); - // HIP: hipError_t hipMemPrefetchAsync(const void* dev_ptr, size_t count, int device, hipStream_t stream __dparm(0)); - // CHECK: result = hipMemPrefetchAsync(deviceptr, bytes, device, stream); - result = cuMemPrefetchAsync(deviceptr, bytes, device, stream); + // CHECK: hipArrayMapInfo arrayMapInfo; + CUarrayMapInfo arrayMapInfo; - // CUDA: CUresult CUDAAPI cuMemRangeGetAttribute(void *data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count); - // HIP: hipError_t hipMemRangeGetAttribute(void* data, size_t data_size, hipMemRangeAttribute attribute, const void* dev_ptr, size_t count); - // CHECK: result = hipMemRangeGetAttribute(image, bytes, MemoryRangeAttribute, deviceptr, bytes); - result = cuMemRangeGetAttribute(image, bytes, MemoryRangeAttribute, deviceptr, bytes); + // CUDA: CUresult CUDAAPI cuMemMapArrayAsync(CUarrayMapInfo *mapInfoList, unsigned int count, CUstream hStream); + // HIP: hipError_t hipMemMapArrayAsync(hipArrayMapInfo* mapInfoList, unsigned int count, hipStream_t stream); + // CHECK: result = hipMemMapArrayAsync(&arrayMapInfo, flags, stream); + result = cuMemMapArrayAsync(&arrayMapInfo, flags, stream); - // CUDA: CUresult CUDAAPI cuMemRangeGetAttributes(void **data, size_t *dataSizes, CUmem_range_attribute *attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count); - // HIP: hipError_t hipMemRangeGetAttributes(void** data, size_t* data_sizes, hipMemRangeAttribute* attributes, size_t num_attributes, const void* dev_ptr, size_t count); - // CHECK: result = hipMemRangeGetAttributes(&image, &bytes, &MemoryRangeAttribute, bytes, deviceptr, bytes); - result = cuMemRangeGetAttributes(&image, &bytes, &MemoryRangeAttribute, bytes, deviceptr, bytes); + // CUDA: CUresult CUDAAPI cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream); + // HIP: hipError_t hipGraphUpload(hipGraphExec_t graphExec, hipStream_t stream); + // CHECK: result = hipGraphUpload(graphExec, stream); + result = cuGraphUpload(graphExec, stream); #endif - // CUDA: CUresult CUDAAPI cuPointerGetAttribute(void *data, CUpointer_attribute attribute, CUdeviceptr ptr); - // HIP: hipError_t hipPointerGetAttribute(void* data, hipPointer_attribute attribute, hipDeviceptr_t ptr); - // CHECK: result = hipPointerGetAttribute(image, pointer_attribute, deviceptr); - result = cuPointerGetAttribute(image, pointer_attribute, deviceptr); - - // CUDA: CUresult CUDAAPI cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute *attributes, void **data, CUdeviceptr ptr); - // HIP: hipError_t hipDrvPointerGetAttributes(unsigned int numAttributes, hipPointer_attribute* attributes, void** data, hipDeviceptr_t ptr); - // CHECK: result = hipDrvPointerGetAttributes(flags, &pointer_attribute, &image, deviceptr); - result = cuPointerGetAttributes(flags, &pointer_attribute, &image, deviceptr); - - // CUDA: CUresult CUDAAPI cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void *userData, unsigned int flags); - // HIP: hipError_t hipStreamAddCallback(hipStream_t stream, hipStreamCallback_t callback, void* userData, unsigned int flags); - // CHECK: result = hipStreamAddCallback(stream, streamCallback, image, flags); - result = cuStreamAddCallback(stream, streamCallback, image, flags); - - // CUDA: CUresult CUDAAPI cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags); - // HIP: hipError_t hipStreamAttachMemAsync(hipStream_t stream, void* dev_ptr, size_t length __dparm(0), unsigned int flags __dparm(hipMemAttachSingle)); - // CHECK: result = hipStreamAttachMemAsync(stream, deviceptr, bytes, flags); - result = cuStreamAttachMemAsync(stream, deviceptr, bytes, flags); +#if CUDA_VERSION >= 11020 + // CHECK: hipMemPool_t memPool_t; + // CHECK-NEXT: hipMemPoolProps memPoolProps_st; + // CHECK-NEXT: hipMemPoolProps memPoolProps; + CUmemoryPool memPool_t; + CUmemPoolProps_st memPoolProps_st; + CUmemPoolProps memPoolProps; -#if CUDA_VERSION > 10000 - // CUDA: CUresult CUDAAPI cuStreamBeginCapture(CUstream hStream, CUstreamCaptureMode mode); - // HIP: hipError_t hipStreamBeginCapture(hipStream_t stream, hipStreamCaptureMode mode); - // CHECK: result = hipStreamBeginCapture(stream, streamCaptureMode); - // CHECK-NEXT: result = hipStreamBeginCapture(stream, streamCaptureMode); - result = cuStreamBeginCapture(stream, streamCaptureMode); - result = cuStreamBeginCapture_v2(stream, streamCaptureMode); -#endif + // CUDA: CUresult CUDAAPI cuDeviceGetDefaultMemPool(CUmemoryPool *pool_out, CUdevice dev); + // HIP: hipError_t hipDeviceGetDefaultMemPool(hipMemPool_t* mem_pool, int device); + // CHECK: result = hipDeviceGetDefaultMemPool(&memPool_t, device); + result = cuDeviceGetDefaultMemPool(&memPool_t, device); - // CUDA: CUresult CUDAAPI cuStreamCreate(CUstream *phStream, unsigned int Flags); - // HIP: hipError_t hipStreamCreateWithFlags(hipStream_t* stream, unsigned int flags); - // CHECK: result = hipStreamCreateWithFlags(&stream, flags); - result = cuStreamCreate(&stream, flags); + // CUDA: CUresult CUDAAPI cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool); + // HIP: hipError_t hipDeviceSetMemPool(int device, hipMemPool_t mem_pool); + // CHECK: result = hipDeviceSetMemPool(device, memPool_t); + result = cuDeviceSetMemPool(device, memPool_t); - // CUDA: CUresult CUDAAPI cuStreamCreateWithPriority(CUstream *phStream, unsigned int flags, int priority); - // HIP: hipError_t hipStreamCreateWithPriority(hipStream_t* stream, unsigned int flags, int priority); - // CHECK: result = hipStreamCreateWithPriority(&stream, flags, leastPriority); - result = cuStreamCreateWithPriority(&stream, flags, leastPriority); + // CUDA: CUresult CUDAAPI cuDeviceGetMemPool(CUmemoryPool *pool, CUdevice dev); + // HIP: hipError_t hipDeviceGetMemPool(hipMemPool_t* mem_pool, int device); + // CHECK: result = hipDeviceGetMemPool(&memPool_t, device); + result = cuDeviceGetMemPool(&memPool_t, device); - // CUDA: CUresult CUDAAPI cuStreamDestroy(CUstream hStream); - // HIP: hipError_t hipStreamDestroy(hipStream_t stream); - // CHECK: result = hipStreamDestroy(stream); - // CHECK-NEXT: result = hipStreamDestroy(stream); - result = cuStreamDestroy(stream); - result = cuStreamDestroy_v2(stream); + // CUDA: CUresult CUDAAPI cuMemAllocAsync(CUdeviceptr *dptr, size_t bytesize, CUstream hStream); + // HIP: hipError_t hipMallocAsync(void** dev_ptr, size_t size, hipStream_t stream); + // CHECK: result = hipMallocAsync(&deviceptr, bytes, stream); + result = cuMemAllocAsync(&deviceptr, bytes, stream); -#if CUDA_VERSION > 9020 - // CUDA: CUresult CUDAAPI cuStreamEndCapture(CUstream hStream, CUgraph *phGraph); - // HIP: hipError_t hipStreamEndCapture(hipStream_t stream, hipGraph_t* pGraph); - // CHECK: result = hipStreamEndCapture(stream, &graph); - result = cuStreamEndCapture(stream, &graph); -#endif + // CUDA: CUresult CUDAAPI cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream); + // HIP: hipError_t hipFreeAsync(void* dev_ptr, hipStream_t stream); + // CHECK: result = hipFreeAsync(deviceptr, stream); + result = cuMemFreeAsync(deviceptr, stream); - // CUDA: CUresult CUDAAPI cuStreamGetFlags(CUstream hStream, unsigned int *flags); - // HIP: hipError_t hipStreamGetFlags(hipStream_t stream, unsigned int* flags); - // CHECK: result = hipStreamGetFlags(stream, &flags); - result = cuStreamGetFlags(stream, &flags); + // CUDA: CUresult CUDAAPI cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep); + // HIP: hipError_t hipMemPoolTrimTo(hipMemPool_t mem_pool, size_t min_bytes_to_hold); + // CHECK: result = hipMemPoolTrimTo(memPool_t, bytes); + result = cuMemPoolTrimTo(memPool_t, bytes); - // CUDA: CUresult CUDAAPI cuStreamGetPriority(CUstream hStream, int *priority); - // HIP: hipError_t hipStreamGetPriority(hipStream_t stream, int* priority); - // CHECK: result = hipStreamGetPriority(stream, &leastPriority); - result = cuStreamGetPriority(stream, &leastPriority); + // CHECK: hipMemPoolAttr memPoolAttr; + CUmemPool_attribute memPoolAttr; - // CUDA: CUresult CUDAAPI cuStreamQuery(CUstream hStream); - // HIP: hipError_t hipStreamQuery(hipStream_t stream); - // CHECK: result = hipStreamQuery(stream); - result = cuStreamQuery(stream); + // CUDA: CUresult CUDAAPI cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void *value); + // HIP: hipError_t hipMemPoolSetAttribute(hipMemPool_t mem_pool, hipMemPoolAttr attr, void* value); + // CHECK: result = hipMemPoolSetAttribute(memPool_t, memPoolAttr, image); + result = cuMemPoolSetAttribute(memPool_t, memPoolAttr, image); - // CUDA: CUresult CUDAAPI cuStreamSynchronize(CUstream hStream); - // HIP: hipError_t hipStreamSynchronize(hipStream_t stream); - // CHECK: result = hipStreamSynchronize(stream); - result = cuStreamSynchronize(stream); + // CUDA: CUresult CUDAAPI cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void *value); + // HIP: hipError_t hipMemPoolGetAttribute(hipMemPool_t mem_pool, hipMemPoolAttr attr, void* value); + // CHECK: result = hipMemPoolGetAttribute(memPool_t, memPoolAttr, image); + result = cuMemPoolGetAttribute(memPool_t, memPoolAttr, image); - // CUDA: CUresult CUDAAPI cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags); - // HIP: hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, unsigned int flags); - // CHECK: result = hipStreamWaitEvent(stream, event_, flags); - result = cuStreamWaitEvent(stream, event_, flags); + // CUDA: CUresult CUDAAPI cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc *map, size_t count); + // HIP: hipError_t hipMemPoolSetAccess(hipMemPool_t mem_pool, const hipMemAccessDesc* desc_list, size_t count); + // CHECK: result = hipMemPoolSetAccess(memPool_t, &memAccessDesc, bytes); + result = cuMemPoolSetAccess(memPool_t, &memAccessDesc, bytes); - // CUDA: CUresult CUDAAPI cuEventCreate(CUevent *phEvent, unsigned int Flags); - // HIP: hipError_t hipEventCreateWithFlags(hipEvent_t* event, unsigned flags); - // CHECK: result = hipEventCreateWithFlags(&event_, flags); - result = cuEventCreate(&event_, flags); + // CHECK: hipMemAccessFlags memAccessFlags; + CUmemAccess_flags memAccessFlags; - // CUDA: CUresult CUDAAPI cuEventDestroy(CUevent hEvent); - // HIP: hipError_t hipEventDestroy(hipEvent_t event); - // CHECK: result = hipEventDestroy(event_); - // CHECK-NEXT: result = hipEventDestroy(event_); - result = cuEventDestroy(event_); - result = cuEventDestroy_v2(event_); + // CUDA: CUresult CUDAAPI cuMemPoolGetAccess(CUmemAccess_flags *flags, CUmemoryPool memPool, CUmemLocation *location); + // HIP: hipError_t hipMemPoolGetAccess(hipMemAccessFlags* flags, hipMemPool_t mem_pool, hipMemLocation* location); + // CHECK: result = hipMemPoolGetAccess(&memAccessFlags, memPool_t, &memLocation); + result = cuMemPoolGetAccess(&memAccessFlags, memPool_t, &memLocation); - // CUDA: CUresult CUDAAPI cuEventElapsedTime(float *pMilliseconds, CUevent hStart, CUevent hEnd); - // HIP: hipError_t hipEventElapsedTime(float* ms, hipEvent_t start, hipEvent_t stop); - // CHECK: result = hipEventElapsedTime(&ms, event_start, event_end); - result = cuEventElapsedTime(&ms, event_start, event_end); + // CUDA: CUresult CUDAAPI cuMemPoolCreate(CUmemoryPool *pool, const CUmemPoolProps *poolProps); + // HIP: hipError_t hipMemPoolCreate(hipMemPool_t* mem_pool, const hipMemPoolProps* pool_props); + // CHECK: result = hipMemPoolCreate(&memPool_t, &memPoolProps); + result = cuMemPoolCreate(&memPool_t, &memPoolProps); - // CUDA: CUresult CUDAAPI cuEventRecord(CUevent hEvent, CUstream hStream); - // HIP: hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream); - // CHECK: result = hipEventRecord(event_, stream); - result = cuEventRecord(event_, stream); + // CUDA: CUresult CUDAAPI cuMemPoolDestroy(CUmemoryPool pool); + // HIP: hipError_t hipMemPoolDestroy(hipMemPool_t mem_pool); + // CHECK: result = hipMemPoolDestroy(memPool_t); + result = cuMemPoolDestroy(memPool_t); - // CUDA: CUresult CUDAAPI cuEventSynchronize(CUevent hEvent); - // HIP: hipError_t hipEventSynchronize(hipEvent_t event); - // CHECK: result = hipEventSynchronize(event_); - result = cuEventSynchronize(event_); + // CUDA: CUresult CUDAAPI cuMemPoolExportToShareableHandle(void *handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags); + // HIP: hipError_t hipMemPoolExportToShareableHandle(void* shared_handle, hipMemPool_t mem_pool, hipMemAllocationHandleType handle_type, unsigned int flags); + // CHECK: result = hipMemPoolExportToShareableHandle(image, memPool_t, memAllocationHandleType, ull); + result = cuMemPoolExportToShareableHandle(image, memPool_t, memAllocationHandleType, ull); -#if CUDA_VERSION > 9020 - // CUDA: CUresult CUDAAPI cuDestroyExternalMemory(CUexternalMemory extMem); - // HIP: hipError_t hipDestroyExternalMemory(hipExternalMemory_t extMem); - // CHECK: result = hipDestroyExternalMemory(externalMemory); - result = cuDestroyExternalMemory(externalMemory); + // CUDA: CUresult CUDAAPI cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags); + // HIP: hipError_t hipMemPoolImportFromShareableHandle(hipMemPool_t* mem_pool, void* shared_handle, hipMemAllocationHandleType handle_type, unsigned int flags); + // CHECK: result = hipMemPoolImportFromShareableHandle(&memPool_t, image, memAllocationHandleType, ull); + result = cuMemPoolImportFromShareableHandle(&memPool_t, image, memAllocationHandleType, ull); - // CUDA: CUresult CUDAAPI cuDestroyExternalSemaphore(CUexternalSemaphore extSem); - // HIP: hipError_t hipDestroyExternalSemaphore(hipExternalSemaphore_t extSem); - // CHECK: result = hipDestroyExternalSemaphore(externalSemaphore); - result = cuDestroyExternalSemaphore(externalSemaphore); + // CHECK: hipMemPoolPtrExportData memPoolPtrExportData; + CUmemPoolPtrExportData memPoolPtrExportData; - // CUDA: CUresult CUDAAPI cuExternalMemoryGetMappedBuffer(CUdeviceptr *devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC *bufferDesc); - // HIP: hipError_t hipExternalMemoryGetMappedBuffer(void **devPtr, hipExternalMemory_t extMem, const hipExternalMemoryBufferDesc *bufferDesc); - // CHECK: result = hipExternalMemoryGetMappedBuffer(&deviceptr, externalMemory, &EXTERNAL_MEMORY_BUFFER_DESC); - result = cuExternalMemoryGetMappedBuffer(&deviceptr, externalMemory, &EXTERNAL_MEMORY_BUFFER_DESC); + // CUDA: CUresult CUDAAPI cuMemPoolExportPointer(CUmemPoolPtrExportData *shareData_out, CUdeviceptr ptr); + // HIP: hipError_t hipMemPoolExportPointer(hipMemPoolPtrExportData* export_data, void* dev_ptr); + // CHECK: result = hipMemPoolExportPointer(&memPoolPtrExportData, deviceptr); + result = cuMemPoolExportPointer(&memPoolPtrExportData, deviceptr); - // CUDA: CUresult CUDAAPI cuImportExternalMemory(CUexternalMemory *extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC *memHandleDesc); - // HIP: hipError_t hipImportExternalMemory(hipExternalMemory_t* extMem_out, const hipExternalMemoryHandleDesc* memHandleDesc); - // CHECK: result = hipImportExternalMemory(&externalMemory, &EXTERNAL_MEMORY_HANDLE_DESC); - result = cuImportExternalMemory(&externalMemory, &EXTERNAL_MEMORY_HANDLE_DESC); + // CUDA: CUresult CUDAAPI cuMemPoolImportPointer(CUdeviceptr *ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData *shareData); + // HIP: hipError_t hipMemPoolImportPointer(void** dev_ptr, hipMemPool_t mem_pool, hipMemPoolPtrExportData* export_data); + // CHECK: result = hipMemPoolImportPointer(&deviceptr, memPool_t, &memPoolPtrExportData); + result = cuMemPoolImportPointer(&deviceptr, memPool_t, &memPoolPtrExportData); +#endif - // CUDA: CUresult CUDAAPI cuImportExternalSemaphore(CUexternalSemaphore *extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC *semHandleDesc); - // HIP: hipError_t hipImportExternalSemaphore(hipExternalSemaphore_t* extSem_out, const hipExternalSemaphoreHandleDesc* semHandleDesc); - // CHECK: result = hipImportExternalSemaphore(&externalSemaphore, &EXTERNAL_SEMAPHORE_HANDLE_DESC); - result = cuImportExternalSemaphore(&externalSemaphore, &EXTERNAL_SEMAPHORE_HANDLE_DESC); +#if CUDA_VERSION >= 11030 + // CUDA: CUresult CUDAAPI cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus *captureStatus_out, cuuint64_t *id_out, CUgraph *graph_out, const CUgraphNode **dependencies_out, size_t *numDependencies_out); + // HIP: hipError_t hipStreamGetCaptureInfo_v2(hipStream_t stream, hipStreamCaptureStatus* captureStatus_out, unsigned long long* id_out __dparm(0), hipGraph_t* graph_out __dparm(0), const hipGraphNode_t** dependencies_out __dparm(0), size_t* numDependencies_out __dparm(0)); + // CHECK: result = hipStreamGetCaptureInfo_v2(stream, &streamCaptureStatus, &ull, &graph, &pGraphNode, &bytes); + result = cuStreamGetCaptureInfo_v2(stream, &streamCaptureStatus, &ull, &graph, &pGraphNode, &bytes); - // CUDA: CUresult CUDAAPI cuSignalExternalSemaphoresAsync(const CUexternalSemaphore *extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS *paramsArray, unsigned int numExtSems, CUstream stream); - // HIP: hipError_t hipSignalExternalSemaphoresAsync(const hipExternalSemaphore_t* extSemArray, const hipExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, hipStream_t stream); - // CHECK: result = hipSignalExternalSemaphoresAsync(&externalSemaphore, &EXTERNAL_SEMAPHORE_SIGNAL_PARAMS, flags, stream); - result = cuSignalExternalSemaphoresAsync(&externalSemaphore, &EXTERNAL_SEMAPHORE_SIGNAL_PARAMS, flags, stream); + // CUDA: CUresult CUDAAPI cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode *dependencies, size_t numDependencies, unsigned int flags); + // HIP: hipError_t hipStreamUpdateCaptureDependencies(hipStream_t stream, hipGraphNode_t* dependencies, size_t numDependencies, unsigned int flags __dparm(0)); + // CHECK: result = hipStreamUpdateCaptureDependencies(stream, &graphNode, bytes, flags); + result = cuStreamUpdateCaptureDependencies(stream, &graphNode, bytes, flags); - // CUDA: CUresult CUDAAPI cuWaitExternalSemaphoresAsync(const CUexternalSemaphore *extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS *paramsArray, unsigned int numExtSems, CUstream stream); - // HIP: hipError_t hipWaitExternalSemaphoresAsync(const hipExternalSemaphore_t* extSemArray, const hipExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, hipStream_t stream); - // CHECK: result = hipWaitExternalSemaphoresAsync(&externalSemaphore, &EXTERNAL_SEMAPHORE_WAIT_PARAMS, flags, stream); - result = cuWaitExternalSemaphoresAsync(&externalSemaphore, &EXTERNAL_SEMAPHORE_WAIT_PARAMS, flags, stream); + // CHECK: hipUserObject_t userObject; + CUuserObject userObject; + + // CUDA: CUresult CUDAAPI cuUserObjectCreate(CUuserObject *object_out, void *ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags); + // HIP: hipError_t hipUserObjectCreate(hipUserObject_t* object_out, void* ptr, hipHostFn_t destroy, unsigned int initialRefcount, unsigned int flags); + // CHECK: result = hipUserObjectCreate(&userObject, image, hostFn, count, flags); + result = cuUserObjectCreate(&userObject, image, hostFn, count, flags); + + // CUDA: CUresult CUDAAPI cuUserObjectRelease(CUuserObject object, unsigned int count); + // HIP: hipError_t hipUserObjectRelease(hipUserObject_t object, unsigned int count); + // CHECK: result = hipUserObjectRelease(userObject, count); + result = cuUserObjectRelease(userObject, count); + + // CUDA: CUresult CUDAAPI cuUserObjectRetain(CUuserObject object, unsigned int count); + // HIP: hipError_t hipUserObjectRetain(hipUserObject_t object, unsigned int count); + // CHECK: result = hipUserObjectRetain(userObject, count); + result = cuUserObjectRetain(userObject, count); + + // CUDA: CUresult CUDAAPI cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags); + // HIP: hipError_t hipGraphRetainUserObject(hipGraph_t graph, hipUserObject_t object, unsigned int count, unsigned int flags); + // CHECK: result = hipGraphRetainUserObject(graph, userObject, count, flags); + result = cuGraphRetainUserObject(graph, userObject, count, flags); + + // CUDA: CUresult CUDAAPI cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count); + // HIP: hipError_t hipGraphReleaseUserObject(hipGraph_t graph, hipUserObject_t object, unsigned int count); + // CHECK: result = hipGraphReleaseUserObject(graph, userObject, count); + result = cuGraphReleaseUserObject(graph, userObject, count); #endif -#if CUDA_VERSION > 7050 - // CUDA: CUresult CUDAAPI cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags); - // HIP: hipError_t hipStreamWaitValue32(hipStream_t stream, void* ptr, uint32_t value, unsigned int flags, uint32_t mask __dparm(0xFFFFFFFF)); - // CHECK: result = hipStreamWaitValue32(stream, deviceptr, u_value, flags); - result = cuStreamWaitValue32(stream, deviceptr, u_value, flags); +#if CUDA_VERSION >= 11040 + // CUDA: CUresult CUDAAPI cuGraphInstantiateWithFlags(CUgraphExec *phGraphExec, CUgraph hGraph, unsigned long long flags); + // HIP: hipError_t hipGraphInstantiateWithFlags(hipGraphExec_t* pGraphExec, hipGraph_t graph, unsigned long long flags); + // CHECK: result = hipGraphInstantiateWithFlags(&graphExec, graph, ull); + result = cuGraphInstantiateWithFlags(&graphExec, graph, ull); - // CUDA: CUresult CUDAAPI cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags); - // HIP: hipError_t hipStreamWriteValue32(hipStream_t stream, void* ptr, uint32_t value, unsigned int flags, uint32_t mask __dparm(0xFFFFFFFF)); - // CHECK: result = hipStreamWriteValue32(stream, deviceptr, u_value, flags); - result = cuStreamWriteValue32(stream, deviceptr, u_value, flags); + // CHECK: hipGraphMemAttributeType graphMem_attribute; + CUgraphMem_attribute graphMem_attribute; + + // CUDA: CUresult CUDAAPI cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value); + // HIP: hipError_t hipDeviceGetGraphMemAttribute(int device, hipGraphMemAttributeType attr, void* value); + // CHECK: result = hipDeviceGetGraphMemAttribute(device, graphMem_attribute, image); + result = cuDeviceGetGraphMemAttribute(device, graphMem_attribute, image); + + // CUDA: CUresult CUDAAPI cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value); + // HIP: hipError_t hipDeviceSetGraphMemAttribute(int device, hipGraphMemAttributeType attr, void* value); + // CHECK: result = hipDeviceSetGraphMemAttribute(device, graphMem_attribute, image); + result = cuDeviceSetGraphMemAttribute(device, graphMem_attribute, image); + + // CUDA: CUresult CUDAAPI cuDeviceGraphMemTrim(CUdevice device); + // HIP: hipError_t hipDeviceGraphMemTrim(int device); + // CHECK: result = hipDeviceGraphMemTrim(device); + result = cuDeviceGraphMemTrim(device); #endif #if CUDA_VERSION >= 11070 @@ -860,517 +796,615 @@ int main() { result = cuStreamWriteValue64_v2(stream, deviceptr, u_value, flags); #endif -#if CUDA_VERSION > 8000 - // CUDA: CUresult CUDAAPI cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags); - // HIP: hipError_t hipStreamWaitValue64(hipStream_t stream, void* ptr, uint64_t value, unsigned int flags, uint64_t mask __dparm(0xFFFFFFFFFFFFFFFF)); - // CHECK: result = hipStreamWaitValue64(stream, deviceptr, u_value, flags); - result = cuStreamWaitValue64(stream, deviceptr, u_value, flags); + // CUDA: CUresult CUDAAPI cuInit(unsigned int Flags); + // HIP: hipError_t hipInit(unsigned int flags); + // CHECK: result = hipInit(flags); + result = cuInit(flags); - // CUDA: CUresult CUDAAPI cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags); - // HIP: hipError_t hipStreamWriteValue64(hipStream_t stream, void* ptr, uint64_t value, unsigned int flags, uint64_t mask __dparm(0xFFFFFFFFFFFFFFFF)); - // CHECK: result = hipStreamWriteValue64(stream, deviceptr, u_value, flags); - result = cuStreamWriteValue64(stream, deviceptr, u_value, flags); -#endif + int driverVersion = 0; + // CUDA: CUresult CUDAAPI cuDriverGetVersion(int *driverVersion); + // HIP: hipError_t hipDriverGetVersion(int* driverVersion); + // CHECK: result = hipDriverGetVersion(&driverVersion); + result = cuDriverGetVersion(&driverVersion); - // CUDA: CUresult CUDAAPI cuFuncGetAttribute(int *pi, CUfunction_attribute attrib, CUfunction hfunc); - // HIP: hipError_t hipFuncGetAttribute(int* value, hipFunction_attribute attrib, hipFunction_t hfunc); - // CHECK: result = hipFuncGetAttribute(value, function_attribute, function); - result = cuFuncGetAttribute(value, function_attribute, function); + int ordinal = 0; + // CUDA: CUresult CUDAAPI cuDeviceGet(CUdevice *device, int ordinal); + // HIP: hipError_t hipDeviceGet(hipDevice_t* device, int ordinal); + // CHECK: result = hipDeviceGet(&device, ordinal); + result = cuDeviceGet(&device, ordinal); - unsigned int gridDimX = 0, gridDimY = 0, gridDimZ = 0, blockDimX = 0, blockDimY = 0, blockDimZ = 0, sharedMemBytes = 0; - void* kernelParams = nullptr, *extra = nullptr; - // CUDA: CUresult CUDAAPI cuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void **kernelParams, void **extra); - // HIP: hipError_t hipModuleLaunchKernel(hipFunction_t f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hipStream_t stream, void** kernelParams, void** extra); - // CHECK: result = hipModuleLaunchKernel(function, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, stream, &kernelParams, &extra); - result = cuLaunchKernel(function, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, stream, &kernelParams, &extra); + int pi = 0; + // CHECK: hipDeviceAttribute_t device_attribute = hipDeviceAttributePciBusId; + CUdevice_attribute device_attribute = CU_DEVICE_ATTRIBUTE_PCI_BUS_ID; + // CUDA: CUresult CUDAAPI cuDeviceGetAttribute(int *pi, CUdevice_attribute attrib, CUdevice dev); + // HIP: hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int deviceId); + // CHECK: result = hipDeviceGetAttribute(&pi, device_attribute, device); + result = cuDeviceGetAttribute(&pi, device_attribute, device); -#if CUDA_VERSION > 9020 - // CUDA: CUresult CUDAAPI cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode *from, const CUgraphNode *to, size_t numDependencies); - // HIP: hipError_t hipGraphAddDependencies(hipGraph_t graph, const hipGraphNode_t* from, const hipGraphNode_t* to, size_t numDependencies); - // CHECK: result = hipGraphAddDependencies(graph, &graphNode, &graphNode2, bytes); - result = cuGraphAddDependencies(graph, &graphNode, &graphNode2, bytes); + // CUDA: CUresult CUDAAPI cuDeviceGetCount(int *count); + // HIP: hipError_t hipGetDeviceCount(int* count); + // CHECK: result = hipGetDeviceCount(&count); + result = cuDeviceGetCount(&count); - // CUDA: CUresult CUDAAPI cuGraphAddEmptyNode(CUgraphNode *phGraphNode, CUgraph hGraph, const CUgraphNode *dependencies, size_t numDependencies); - // HIP: hipError_t hipGraphAddEmptyNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, size_t numDependencies); - // CHECK: result = hipGraphAddEmptyNode(&graphNode, graph, &graphNode2, bytes); - result = cuGraphAddEmptyNode(&graphNode, graph, &graphNode2, bytes); + // CUDA: CUresult CUDAAPI cuDeviceTotalMem(size_t *bytes, CUdevice dev); + // HIP: hipError_t hipDeviceTotalMem(size_t* bytes, hipDevice_t device); + // CHECK: result = hipDeviceTotalMem(&bytes, device); + // CHECK-NEXT: result = hipDeviceTotalMem(&bytes, device); + result = cuDeviceTotalMem(&bytes, device); + result = cuDeviceTotalMem_v2(&bytes, device); - // CUDA: CUresult CUDAAPI cuGraphAddKernelNode(CUgraphNode *phGraphNode, CUgraph hGraph, const CUgraphNode *dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS *nodeParams); - // HIP: hipError_t hipGraphAddKernelNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, size_t numDependencies, const hipKernelNodeParams* pNodeParams); - // CHECK: result = hipGraphAddKernelNode(&graphNode, graph, &graphNode2, bytes, &KERNEL_NODE_PARAMS); - result = cuGraphAddKernelNode(&graphNode, graph, &graphNode2, bytes, &KERNEL_NODE_PARAMS); + int major = 0, minor = 0; + // CUDA: __CUDA_DEPRECATED CUresult CUDAAPI cuDeviceComputeCapability(int *major, int *minor, CUdevice dev); + // HIP: hipError_t hipDeviceComputeCapability(int* major, int* minor, hipDevice_t device); + // CHECK: result = hipDeviceComputeCapability(&major, &minor, device); + result = cuDeviceComputeCapability(&major, &minor, device); - // CUDA: CUresult CUDAAPI cuGraphCreate(CUgraph *phGraph, unsigned int flags); - // HIP: hipError_t hipGraphCreate(hipGraph_t* pGraph, unsigned int flags); - // CHECK: result = hipGraphCreate(&graph, flags); - result = cuGraphCreate(&graph, flags); + int active = 0; + // CUDA: CUresult CUDAAPI cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int *flags, int *active); + // HIP: hipError_t hipDevicePrimaryCtxGetState(hipDevice_t dev, unsigned int* flags, int* active); + // CHECK: result = hipDevicePrimaryCtxGetState(device, &flags, &active); + result = cuDevicePrimaryCtxGetState(device, &flags, &active); - // CUDA: CUresult CUDAAPI cuGraphDestroy(CUgraph hGraph); - // HIP: hipError_t hipGraphDestroy(hipGraph_t graph); - // CHECK: result = hipGraphDestroy(graph); - result = cuGraphDestroy(graph); + // CUDA: CUresult CUDAAPI cuDevicePrimaryCtxRelease(CUdevice dev); + // HIP: hipError_t hipDevicePrimaryCtxRelease(hipDevice_t dev); + // CHECK: result = hipDevicePrimaryCtxRelease(device); + result = cuDevicePrimaryCtxRelease(device); - // CUDA: CUresult CUDAAPI cuGraphExecDestroy(CUgraphExec hGraphExec); - // HIP: hipError_t hipGraphExecDestroy(hipGraphExec_t pGraphExec); - // CHECK: result = hipGraphExecDestroy(graphExec); - result = cuGraphExecDestroy(graphExec); + // CUDA: CUresult CUDAAPI cuDevicePrimaryCtxReset(CUdevice dev); + // HIP: hipError_t hipDevicePrimaryCtxReset(hipDevice_t dev); + // CHECK: result = hipDevicePrimaryCtxReset(device); + result = cuDevicePrimaryCtxReset(device); - // CUDA: CUresult CUDAAPI cuGraphGetNodes(CUgraph hGraph, CUgraphNode *nodes, size_t *numNodes); - // HIP: hipError_t hipGraphGetNodes(hipGraph_t graph, hipGraphNode_t* nodes, size_t* numNodes); - // CHECK: result = hipGraphGetNodes(graph, &graphNode, &bytes); - result = cuGraphGetNodes(graph, &graphNode, &bytes); + // CUDA: CUresult CUDAAPI cuDevicePrimaryCtxRetain(CUcontext *pctx, CUdevice dev); + // HIP: hipError_t hipDevicePrimaryCtxRetain(hipCtx_t* pctx, hipDevice_t dev); + // CHECK: result = hipDevicePrimaryCtxRetain(&context, device); + result = cuDevicePrimaryCtxRetain(&context, device); - // CUDA: CUresult CUDAAPI cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode *rootNodes, size_t *numRootNodes); - // HIP: hipError_t hipGraphGetRootNodes(hipGraph_t graph, hipGraphNode_t* pRootNodes, size_t* pNumRootNodes); - // CHECK: result = hipGraphGetRootNodes(graph, &graphNode, &bytes); - result = cuGraphGetRootNodes(graph, &graphNode, &bytes); + // CUDA: CUresult CUDAAPI cuDevicePrimaryCtxSetFlags(CUdevice dev, unsigned int flags); + // HIP: hipError_t hipDevicePrimaryCtxSetFlags(hipDevice_t dev, unsigned int flags); + // CHECK: result = hipDevicePrimaryCtxSetFlags(device, flags); + result = cuDevicePrimaryCtxSetFlags(device, flags); - // CUDA: CUresult CUDAAPI cuGraphInstantiate(CUgraphExec *phGraphExec, CUgraph hGraph, CUgraphNode *phErrorNode, char *logBuffer, size_t bufferSize); - // HIP: hipError_t hipGraphInstantiate(hipGraphExec_t* pGraphExec, hipGraph_t graph, hipGraphNode_t* pErrorNode, char* pLogBuffer, size_t bufferSize); - // CHECK: result = hipGraphInstantiate(&graphExec, graph, &graphNode, nullptr, bytes); - // CHECK-NEXT: result = hipGraphInstantiate(&graphExec, graph, &graphNode, nullptr, bytes); - result = cuGraphInstantiate(&graphExec, graph, &graphNode, nullptr, bytes); - result = cuGraphInstantiate_v2(&graphExec, graph, &graphNode, nullptr, bytes); + // CUDA: CUresult CUDAAPI cuCtxCreate(CUcontext *pctx, unsigned int flags, CUdevice dev); + // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxCreate(hipCtx_t *ctx, unsigned int flags, hipDevice_t device); + // CHECK: result = hipCtxCreate(&context, flags, device); + // CHECK-NEXT: result = hipCtxCreate(&context, flags, device); + result = cuCtxCreate(&context, flags, device); + result = cuCtxCreate_v2(&context, flags, device); - // CUDA: CUresult CUDAAPI cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS *nodeParams); - // HIP: hipError_t hipGraphKernelNodeGetParams(hipGraphNode_t node, hipKernelNodeParams* pNodeParams); - // CHECK: result = hipGraphKernelNodeGetParams(graphNode, &KERNEL_NODE_PARAMS); - result = cuGraphKernelNodeGetParams(graphNode, &KERNEL_NODE_PARAMS); + // CUDA: CUresult CUDAAPI cuCtxDestroy(CUcontext ctx); + // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxDestroy(hipCtx_t ctx); + // CHECK: result = hipCtxDestroy(context); + // CHECK-NEXT: result = hipCtxDestroy(context); + result = cuCtxDestroy(context); + result = cuCtxDestroy_v2(context); - // CUDA: CUresult CUDAAPI cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS *nodeParams); - // HIP: hipError_t hipGraphKernelNodeSetParams(hipGraphNode_t node, const hipKernelNodeParams* pNodeParams); - // CHECK: result = hipGraphKernelNodeSetParams(graphNode, &KERNEL_NODE_PARAMS); - result = cuGraphKernelNodeSetParams(graphNode, &KERNEL_NODE_PARAMS); + unsigned int version = 0; + // CUDA: CUresult CUDAAPI cuCtxGetApiVersion(CUcontext ctx, unsigned int *version); + // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxGetApiVersion(hipCtx_t ctx, int* apiVersion); + // CHECK: result = hipCtxGetApiVersion(context, &version); + result = cuCtxGetApiVersion(context, &version); + + // CUDA: CUresult CUDAAPI cuCtxGetCacheConfig(CUfunc_cache *pconfig); + // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxGetCacheConfig(hipFuncCache_t* cacheConfig); + // CHECK: result = hipCtxGetCacheConfig(&func_cache); + result = cuCtxGetCacheConfig(&func_cache); + + // CUDA: CUresult CUDAAPI cuCtxGetCurrent(CUcontext *pctx); + // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxGetCurrent(hipCtx_t* ctx); + // CHECK: result = hipCtxGetCurrent(&context); + result = cuCtxGetCurrent(&context); + + // CUDA: CUresult CUDAAPI cuCtxGetDevice(CUdevice *device); + // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxGetDevice(hipDevice_t* device); + // CHECK: result = hipCtxGetDevice(&device); + result = cuCtxGetDevice(&device); + + // CUDA: CUresult CUDAAPI cuCtxGetFlags(unsigned int *flags); + // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxGetFlags(unsigned int* flags); + // CHECK: result = hipCtxGetFlags(&flags); + result = cuCtxGetFlags(&flags); + + size_t pvalue = 0; + // CUDA: CUresult CUDAAPI cuCtxGetLimit(size_t *pvalue, CUlimit limit); + // HIP: hipError_t hipDeviceGetLimit(size_t* pValue, enum hipLimit_t limit); + // CHECK: result = hipDeviceGetLimit(&pvalue, limit); + result = cuCtxGetLimit(&pvalue, limit); + + // CUDA: CUresult CUDAAPI cuCtxGetSharedMemConfig(CUsharedconfig *pConfig); + // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxGetSharedMemConfig(hipSharedMemConfig* pConfig); + // CHECK: result = hipCtxGetSharedMemConfig(&pconfig); + result = cuCtxGetSharedMemConfig(&pconfig); - // CUDA: CUresult CUDAAPI cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream); - // HIP: hipError_t hipGraphLaunch(hipGraphExec_t graphExec, hipStream_t stream); - // CHECK: result = hipGraphLaunch(graphExec, stream); - result = cuGraphLaunch(graphExec, stream); + int leastPriority = 0, greatestPriority = 0; + // CUDA: CUresult CUDAAPI cuCtxGetStreamPriorityRange(int *leastPriority, int *greatestPriority); + // HIP: hipError_t hipDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority); + // CHECK: result = hipDeviceGetStreamPriorityRange(&leastPriority, &greatestPriority); + result = cuCtxGetStreamPriorityRange(&leastPriority, &greatestPriority); - // CUDA: CUresult CUDAAPI cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D *nodeParams); - // HIP: hipError_t hipGraphMemcpyNodeGetParams(hipGraphNode_t node, hipMemcpy3DParms* pNodeParams); - // CHECK: result = hipGraphMemcpyNodeGetParams(graphNode, &MEMCPY3D); - result = cuGraphMemcpyNodeGetParams(graphNode, &MEMCPY3D); + // CUDA: CUresult CUDAAPI cuCtxPopCurrent(CUcontext *pctx); + // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxPopCurrent(hipCtx_t* ctx); + // CHECK: result = hipCtxPopCurrent(&context); + // CHECK-NEXT: result = hipCtxPopCurrent(&context); + result = cuCtxPopCurrent(&context); + result = cuCtxPopCurrent_v2(&context); - // CUDA: CUresult CUDAAPI cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D *nodeParams); - // HIP: hipError_t hipGraphMemcpyNodeSetParams(hipGraphNode_t node, const hipMemcpy3DParms* pNodeParams); - // CHECK: result = hipGraphMemcpyNodeSetParams(graphNode, &MEMCPY3D); - result = cuGraphMemcpyNodeSetParams(graphNode, &MEMCPY3D); + // CUDA: CUresult CUDAAPI cuCtxPushCurrent(CUcontext ctx); + // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxPushCurrent(hipCtx_t ctx); + // CHECK: result = hipCtxPushCurrent(context); + // CHECK-NEXT: result = hipCtxPushCurrent(context); + result = cuCtxPushCurrent(context); + result = cuCtxPushCurrent_v2(context); - // CUDA: CUresult CUDAAPI cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS *nodeParams); - // HIP: hipError_t hipGraphMemsetNodeGetParams(hipGraphNode_t node, hipMemsetParams* pNodeParams); - // CHECK: result = hipGraphMemsetNodeGetParams(graphNode, &MEMSET_NODE_PARAMS); - result = cuGraphMemsetNodeGetParams(graphNode, &MEMSET_NODE_PARAMS); + // CUDA: CUresult CUDAAPI cuCtxSetCacheConfig(CUfunc_cache config); + // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxSetCacheConfig(hipFuncCache_t cacheConfig); + // CHECK: result = hipCtxSetCacheConfig(func_cache); + result = cuCtxSetCacheConfig(func_cache); - // CUDA: CUresult CUDAAPI cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS *nodeParams); - // HIP: hipError_t hipGraphMemsetNodeSetParams(hipGraphNode_t node, const hipMemsetParams* pNodeParams); - // CHECK: result = hipGraphMemsetNodeSetParams(graphNode, &MEMSET_NODE_PARAMS); - result = cuGraphMemsetNodeSetParams(graphNode, &MEMSET_NODE_PARAMS); + // CUDA: CUresult CUDAAPI cuCtxSetCurrent(CUcontext ctx); + // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxSetCurrent(hipCtx_t ctx); + // CHECK: result = hipCtxSetCurrent(context); + result = cuCtxSetCurrent(context); - // CUDA: CUresult CUDAAPI cuGraphGetEdges(CUgraph hGraph, CUgraphNode *from, CUgraphNode *to, size_t *numEdges); - // HIP: hipError_t hipGraphGetEdges(hipGraph_t graph, hipGraphNode_t* from, hipGraphNode_t* to, size_t* numEdges); - // CHECK: result = hipGraphGetEdges(graph, &graphNode, &graphNode2, &bytes); - result = cuGraphGetEdges(graph, &graphNode, &graphNode2, &bytes); + // CUDA: CUresult CUDAAPI cuCtxSetSharedMemConfig(CUsharedconfig config); + // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxSetSharedMemConfig(hipSharedMemConfig config); + // CHECK: result = hipCtxSetSharedMemConfig(pconfig); + result = cuCtxSetSharedMemConfig(pconfig); - // CUDA: CUresult CUDAAPI cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode *dependencies, size_t *numDependencies); - // HIP: hipError_t hipGraphNodeGetDependencies(hipGraphNode_t node, hipGraphNode_t* pDependencies, size_t* pNumDependencies); - // CHECK: result = hipGraphNodeGetDependencies(graphNode, &graphNode2, &bytes); - result = cuGraphNodeGetDependencies(graphNode, &graphNode2, &bytes); + // CUDA: CUresult CUDAAPI cuCtxSynchronize(void); + // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipCtxSynchronize(void); + // CHECK: result = hipCtxSynchronize(); + result = cuCtxSynchronize(); - // CUDA: CUresult CUDAAPI cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode *from, const CUgraphNode *to, size_t numDependencies); - // HIP: hipError_t hipGraphRemoveDependencies(hipGraph_t graph, const hipGraphNode_t* from, const hipGraphNode_t* to, size_t numDependencies); - // CHECK: result = hipGraphRemoveDependencies(graph, &graphNode, &graphNode2, bytes); - result = cuGraphRemoveDependencies(graph, &graphNode, &graphNode2, bytes); + // CUDA: CUresult CUDAAPI cuModuleGetFunction(CUfunction *hfunc, CUmodule hmod, const char *name); + // HIP: hipError_t hipModuleGetFunction(hipFunction_t* function, hipModule_t module, const char* kname); + // CHECK: result = hipModuleGetFunction(&function, module_, name.c_str()); + result = cuModuleGetFunction(&function, module_, name.c_str()); - // CUDA: CUresult CUDAAPI cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode *dependentNodes, size_t *numDependentNodes); - // HIP: hipError_t hipGraphNodeGetDependentNodes(hipGraphNode_t node, hipGraphNode_t* pDependentNodes, size_t* pNumDependentNodes); - // CHECK: result = hipGraphNodeGetDependentNodes(graphNode, &graphNode2, &bytes); - result = cuGraphNodeGetDependentNodes(graphNode, &graphNode2, &bytes); + // CUDA: CUresult CUDAAPI cuModuleGetGlobal(CUdeviceptr *dptr, size_t *bytes, CUmodule hmod, const char *name); + // HIP: hipError_t hipModuleGetGlobal(hipDeviceptr_t* dptr, size_t* bytes, hipModule_t hmod, const char* name); + // CHECK: result = hipModuleGetGlobal(&deviceptr, &bytes, module_, name.c_str()); + // CHECK-NEXT: result = hipModuleGetGlobal(&deviceptr, &bytes, module_, name.c_str()); + result = cuModuleGetGlobal(&deviceptr, &bytes, module_, name.c_str()); + result = cuModuleGetGlobal_v2(&deviceptr, &bytes, module_, name.c_str()); - // CUDA: CUresult CUDAAPI cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType *type); - // HIP: hipError_t hipGraphNodeGetType(hipGraphNode_t node, hipGraphNodeType* pType); - // CHECK: result = hipGraphNodeGetType(graphNode, &graphNodeType); - result = cuGraphNodeGetType(graphNode, &graphNodeType); + // CUDA: CUresult CUDAAPI cuModuleGetTexRef(CUtexref *pTexRef, CUmodule hmod, const char *name); + // HIP: hipError_t hipModuleGetTexRef(textureReference** texRef, hipModule_t hmod, const char* name); + // CHECK: result = hipModuleGetTexRef(&texref, module_, name.c_str()); + result = cuModuleGetTexRef(&texref, module_, name.c_str()); - // CUDA: CUresult CUDAAPI cuGraphDestroyNode(CUgraphNode hNode); - // HIP: hipError_t hipGraphDestroyNode(hipGraphNode_t node); - // CHECK: result = hipGraphDestroyNode(graphNode); - result = cuGraphDestroyNode(graphNode); + // CUDA: CUresult CUDAAPI cuModuleLoad(CUmodule *module, const char *fname); + // HIP: hipError_t hipModuleLoad(hipModule_t* module, const char* fname); + // CHECK: result = hipModuleLoad(&module_, name.c_str()); + result = cuModuleLoad(&module_, name.c_str()); - // CUDA: CUresult CUDAAPI cuGraphAddHostNode(CUgraphNode *phGraphNode, CUgraph hGraph, const CUgraphNode *dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS *nodeParams); - // HIP: hipError_t hipGraphAddHostNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, size_t numDependencies, const hipHostNodeParams* pNodeParams); - // CHECK: result = hipGraphAddHostNode(&graphNode, graph, &graphNode2, bytes, &host_node_params); - result = cuGraphAddHostNode(&graphNode, graph, &graphNode2, bytes, &host_node_params); + // CUDA: CUresult CUDAAPI cuModuleLoadData(CUmodule *module, const void *image); + // HIP: hipError_t hipModuleLoadData(hipModule_t* module, const void* image); + // CHECK: result = hipModuleLoadData(&module_, image); + result = cuModuleLoadData(&module_, image); - // CUDA: CUresult CUDAAPI cuGraphNodeFindInClone(CUgraphNode *phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph); - // HIP: hipError_t hipGraphNodeFindInClone(hipGraphNode_t* pNode, hipGraphNode_t originalNode, hipGraph_t clonedGraph); - // CHECK: result = hipGraphNodeFindInClone(&graphNode2, graphNode, graph); - result = cuGraphNodeFindInClone(&graphNode2, graphNode, graph); + unsigned int numOptions = 0; + void* optionValues = nullptr; + // CUDA: CUresult CUDAAPI cuModuleLoadDataEx(CUmodule *module, const void *image, unsigned int numOptions, CUjit_option *options, void **optionValues); + // HIP: hipError_t hipModuleLoadDataEx(hipModule_t* module, const void* image, unsigned int numOptions, hipJitOption* options, void** optionValues); + // CHECK: result = hipModuleLoadDataEx(&module_, image, numOptions, &jit_option, &optionValues); + result = cuModuleLoadDataEx(&module_, image, numOptions, &jit_option, &optionValues); - // CUDA: CUresult CUDAAPI cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus *captureStatus); - // HIP: hipError_t hipStreamIsCapturing(hipStream_t stream, hipStreamCaptureStatus* pCaptureStatus); - // CHECK: result = hipStreamIsCapturing(stream, &streamCaptureStatus); - result = cuStreamIsCapturing(stream, &streamCaptureStatus); + // CUDA: CUresult CUDAAPI cuModuleUnload(CUmodule hmod); + // HIP: hipError_t hipModuleUnload(hipModule_t module); + // CHECK: result = hipModuleUnload(module_); + result = cuModuleUnload(module_); - // CUDA: CUresult CUDAAPI cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS *nodeParams); - // HIP: hipError_t hipGraphHostNodeGetParams(hipGraphNode_t node, hipHostNodeParams* pNodeParams); - // CHECK: result = hipGraphHostNodeGetParams(graphNode, &host_node_params); - result = cuGraphHostNodeGetParams(graphNode, &host_node_params); + // CUDA: CUresult CUDAAPI cuArray3DCreate(CUarray *pHandle, const CUDA_ARRAY3D_DESCRIPTOR *pAllocateArray); + // HIP: hipError_t hipArray3DCreate(hipArray** array, const HIP_ARRAY3D_DESCRIPTOR* pAllocateArray); + // CHECK: result = hipArray3DCreate(&array_, &ARRAY3D_DESCRIPTOR); + // CHECK-NEXT: result = hipArray3DCreate(&array_, &ARRAY3D_DESCRIPTOR); + result = cuArray3DCreate(&array_, &ARRAY3D_DESCRIPTOR); + result = cuArray3DCreate_v2(&array_, &ARRAY3D_DESCRIPTOR); - // CUDA: CUresult CUDAAPI cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS *nodeParams); - // HIP: hipError_t hipGraphHostNodeSetParams(hipGraphNode_t node, const hipHostNodeParams* pNodeParams); - // CHECK: result = hipGraphHostNodeSetParams(graphNode, &host_node_params); - result = cuGraphHostNodeSetParams(graphNode, &host_node_params); + // CUDA: CUresult CUDAAPI cuArrayCreate(CUarray *pHandle, const CUDA_ARRAY_DESCRIPTOR *pAllocateArray); + // HIP: hipError_t hipArrayCreate(hipArray** pHandle, const HIP_ARRAY_DESCRIPTOR* pAllocateArray); + // CHECK: result = hipArrayCreate(&array_, &ARRAY_DESCRIPTOR); + // CHECK: result = hipArrayCreate(&array_, &ARRAY_DESCRIPTOR); + result = cuArrayCreate(&array_, &ARRAY_DESCRIPTOR); + result = cuArrayCreate_v2(&array_, &ARRAY_DESCRIPTOR); - // CUDA: CUresult CUDAAPI cuGraphAddChildGraphNode(CUgraphNode *phGraphNode, CUgraph hGraph, const CUgraphNode *dependencies, size_t numDependencies, CUgraph childGraph); - // HIP: hipError_t hipGraphAddChildGraphNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, size_t numDependencies, hipGraph_t childGraph); - // CHECK: result = hipGraphAddChildGraphNode(&graphNode, graph, &graphNode2, bytes, graph2); - result = cuGraphAddChildGraphNode(&graphNode, graph, &graphNode2, bytes, graph2); + // CUDA: CUresult CUDAAPI cuArrayDestroy(CUarray hArray); + // HIP: hipError_t hipArrayDestroy(hipArray* array); + // CHECK: result = hipArrayDestroy(array_); + result = cuArrayDestroy(array_); - // CUDA: CUresult CUDAAPI cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph *phGraph); - // HIP: hipError_t hipGraphChildGraphNodeGetGraph(hipGraphNode_t node, hipGraph_t* pGraph); - // CHECK: result = hipGraphChildGraphNodeGetGraph(graphNode, &graph); - result = cuGraphChildGraphNodeGetGraph(graphNode, &graph); + std::string pciBusId; + // CUDA: CUresult CUDAAPI cuDeviceGetByPCIBusId(CUdevice *dev, const char *pciBusId); + // HIP: hipError_t hipDeviceGetByPCIBusId(int* device, const char* pciBusId); + // CHECK: result = hipDeviceGetByPCIBusId(&device, pciBusId.c_str()); + result = cuDeviceGetByPCIBusId(&device, pciBusId.c_str()); - // CUDA: CUresult CUDAAPI cuGraphClone(CUgraph *phGraphClone, CUgraph originalGraph); - // HIP: hipError_t hipGraphClone(hipGraph_t* pGraphClone, hipGraph_t originalGraph); - // CHECK: result = hipGraphClone(&graph, graph2); - result = cuGraphClone(&graph, graph2); -#endif + int len = 0; + char* pciBusId_ = const_cast(pciBusId.c_str()); + // CUDA: CUresult CUDAAPI cuDeviceGetPCIBusId(char *pciBusId, int len, CUdevice dev); + // HIP: hipError_t hipDeviceGetPCIBusId(char* pciBusId, int len, int device); + // CHECK: result = hipDeviceGetPCIBusId(pciBusId_, len, device); + result = cuDeviceGetPCIBusId(pciBusId_, len, device); -#if CUDA_VERSION > 10000 - // CUDA: CUresult CUDAAPI cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus *captureStatus_out, cuuint64_t *id_out); - // HIP: hipError_t hipStreamGetCaptureInfo(hipStream_t stream, hipStreamCaptureStatus* pCaptureStatus, unsigned long long* pId); - // CHECK: result = hipStreamGetCaptureInfo(stream, &streamCaptureStatus, &ull); - result = cuStreamGetCaptureInfo(stream, &streamCaptureStatus, &ull); + // CUDA: CUresult CUDAAPI cuIpcCloseMemHandle(CUdeviceptr dptr); + // HIP: hipError_t hipIpcCloseMemHandle(void* devPtr); + // CHECK: result = hipIpcCloseMemHandle(deviceptr); + result = cuIpcCloseMemHandle(deviceptr); - // CUDA: CUresult CUDAAPI cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS *nodeParams); - // HIP: hipError_t hipGraphExecKernelNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, const hipKernelNodeParams* pNodeParams); - // CHECK: result = hipGraphExecKernelNodeSetParams(graphExec, graphNode, &KERNEL_NODE_PARAMS); - result = cuGraphExecKernelNodeSetParams(graphExec, graphNode, &KERNEL_NODE_PARAMS); -#endif + // CUDA: CUresult CUDAAPI cuIpcGetEventHandle(CUipcEventHandle *pHandle, CUevent event); + // HIP: hipError_t hipIpcGetEventHandle(hipIpcEventHandle_t* handle, hipEvent_t event); + // CHECK: result = hipIpcGetEventHandle(&ipcEventHandle, event_); + result = cuIpcGetEventHandle(&ipcEventHandle, event_); -#if CUDA_VERSION > 10010 - // CUDA: CUresult CUDAAPI cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphNode *hErrorNode_out, CUgraphExecUpdateResult *updateResult_out); - // HIP: hipError_t hipGraphExecUpdate(hipGraphExec_t hGraphExec, hipGraph_t hGraph, hipGraphNode_t* hErrorNode_out, hipGraphExecUpdateResult* updateResult_out); - // CHECK: result = hipGraphExecUpdate(graphExec, graph, &graphNode, &graphExecUpdateResult); - result = cuGraphExecUpdate(graphExec, graph, &graphNode, &graphExecUpdateResult); + // CUDA: CUresult CUDAAPI cuIpcGetMemHandle(CUipcMemHandle *pHandle, CUdeviceptr dptr); + // HIP: hipError_t hipIpcGetMemHandle(hipIpcMemHandle_t* handle, void* devPtr); + // CHECK: result = hipIpcGetMemHandle(&ipcMemHandle, deviceptr); + result = cuIpcGetMemHandle(&ipcMemHandle, deviceptr); - // CUDA: CUresult CUDAAPI cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS *nodeParams); - // HIP: hipError_t hipError_t hipGraphExecHostNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, const hipHostNodeParams* pNodeParams); - // CHECK: result = hipGraphExecHostNodeSetParams(graphExec, graphNode, &host_node_params); - result = cuGraphExecHostNodeSetParams(graphExec, graphNode, &host_node_params); -#endif + // CUDA: CUresult CUDAAPI cuIpcOpenEventHandle(CUevent *phEvent, CUipcEventHandle handle); + // HIP: hipError_t hipIpcOpenEventHandle(hipEvent_t* event, hipIpcEventHandle_t handle); + // CHECK: result = hipIpcOpenEventHandle(&event_, ipcEventHandle); + result = cuIpcOpenEventHandle(&event_, ipcEventHandle); -#if CUDA_VERSION > 11000 - // CUDA: CUresult CUDAAPI cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph); - // HIP: hipError_t hipGraphExecChildGraphNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, hipGraph_t childGraph); - // CHECK: result = hipGraphExecChildGraphNodeSetParams(graphExec, graphNode, graph); - result = cuGraphExecChildGraphNodeSetParams(graphExec, graphNode, graph); + // CUDA: CUresult CUDAAPI cuIpcOpenMemHandle(CUdeviceptr *pdptr, CUipcMemHandle handle, unsigned int Flags); + // HIP: hipError_t hipIpcOpenMemHandle(void** devPtr, hipIpcMemHandle_t handle, unsigned int flags); + // CHECK: result = hipIpcOpenMemHandle(&deviceptr, ipcMemHandle, flags); + result = cuIpcOpenMemHandle(&deviceptr, ipcMemHandle, flags); - // CUDA: CUresult CUDAAPI cuGraphAddEventRecordNode(CUgraphNode *phGraphNode, CUgraph hGraph, const CUgraphNode *dependencies, size_t numDependencies, CUevent event); - // HIP: hipError_t hipGraphAddEventRecordNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, size_t numDependencies, hipEvent_t event); - // CHECK: result = hipGraphAddEventRecordNode(&graphNode, graph, &graphNode2, bytes, event_); - result = cuGraphAddEventRecordNode(&graphNode, graph, &graphNode2, bytes, event_); + // CUDA: CUresult CUDAAPI cuMemAlloc(CUdeviceptr *dptr, size_t bytesize); + // HIP: hipError_t hipMalloc(void** ptr, size_t size); + // CHECK: result = hipMalloc(&deviceptr, bytes); + // CHECK-NEXT: result = hipMalloc(&deviceptr, bytes); + result = cuMemAlloc(&deviceptr, bytes); + result = cuMemAlloc_v2(&deviceptr, bytes); - // CUDA: CUresult CUDAAPI cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent *event_out); - // HIP: hipError_t hipGraphEventRecordNodeGetEvent(hipGraphNode_t node, hipEvent_t* event_out); - // CHECK: result = hipGraphEventRecordNodeGetEvent(graphNode, &event_); - result = cuGraphEventRecordNodeGetEvent(graphNode, &event_); + // CUDA: CUresult CUDAAPI cuMemAllocHost(void **pp, size_t bytesize); + // HIP: DEPRECATED("use hipHostMalloc instead") hipError_t hipMemAllocHost(void** ptr, size_t size); + // CHECK: result = hipMemAllocHost(&image, bytes); + // CHECK-NEXT: result = hipMemAllocHost(&image, bytes); + result = cuMemAllocHost(&image, bytes); + result = cuMemAllocHost_v2(&image, bytes); - // CUDA: CUresult CUDAAPI cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event); - // HIP: hipError_t hipGraphEventRecordNodeSetEvent(hipGraphNode_t node, hipEvent_t event); - // CHECK: result = hipGraphEventRecordNodeSetEvent(graphNode, event_); - result = cuGraphEventRecordNodeSetEvent(graphNode, event_); + // CUDA: CUresult CUDAAPI cuMemAllocManaged(CUdeviceptr *dptr, size_t bytesize, unsigned int flags); + // HIP: hipError_t hipMallocManaged(void** dev_ptr, size_t size, unsigned int flags __dparm(hipMemAttachGlobal)); + // CHECK: result = hipMallocManaged(&deviceptr, bytes, flags); + result = cuMemAllocManaged(&deviceptr, bytes, flags); - // CUDA: CUresult CUDAAPI cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event); - // HIP: hipError_t hipGraphExecEventRecordNodeSetEvent(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, hipEvent_t event); - // CHECK: result = hipGraphExecEventRecordNodeSetEvent(graphExec, graphNode, event_); - result = cuGraphExecEventRecordNodeSetEvent(graphExec, graphNode, event_); + size_t pitch = 0, width = 0, height = 0; + // CUDA: CUresult CUDAAPI cuMemAllocPitch(CUdeviceptr *dptr, size_t *pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes); + // HIP: hipError_t hipMemAllocPitch(hipDeviceptr_t* dptr, size_t* pitch, size_t widthInBytes, size_t height, unsigned int elementSizeBytes); + // CHECK: result = hipMemAllocPitch(&deviceptr, &pitch, width, height, bytes); + // CHECK-NEXT: result = hipMemAllocPitch(&deviceptr, &pitch, width, height, bytes); + result = cuMemAllocPitch(&deviceptr, &pitch, width, height, bytes); + result = cuMemAllocPitch_v2(&deviceptr, &pitch, width, height, bytes); - // CUDA: CUresult CUDAAPI cuGraphAddEventWaitNode(CUgraphNode *phGraphNode, CUgraph hGraph, const CUgraphNode *dependencies, size_t numDependencies, CUevent event); - // HIP: hipError_t hipGraphAddEventWaitNode(hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, size_t numDependencies, hipEvent_t event); - // CHECK: result = hipGraphAddEventWaitNode(&graphNode, graph, &graphNode2, bytes, event_); - result = cuGraphAddEventWaitNode(&graphNode, graph, &graphNode2, bytes, event_); + // CUDA: CUresult CUDAAPI cuMemcpy2D(const CUDA_MEMCPY2D *pCopy); + // HIP: hipError_t hipMemcpyParam2D(const hip_Memcpy2D* pCopy); + // CHECK: result = hipMemcpyParam2D(&MEMCPY2D); + // CHECK-NEXT: result = hipMemcpyParam2D(&MEMCPY2D); + result = cuMemcpy2D(&MEMCPY2D); + result = cuMemcpy2D_v2(&MEMCPY2D); - // CUDA: CUresult CUDAAPI cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent *event_out); - // HIP: hipError_t hipGraphEventWaitNodeGetEvent(hipGraphNode_t node, hipEvent_t* event_out); - // CHECK: result = hipGraphEventWaitNodeGetEvent(graphNode, &event_); - result = cuGraphEventWaitNodeGetEvent(graphNode, &event_); + // CUDA: CUresult CUDAAPI cuMemcpy2DAsync(const CUDA_MEMCPY2D *pCopy, CUstream hStream); + // HIP: hipError_t hipMemcpyParam2DAsync(const hip_Memcpy2D* pCopy, hipStream_t stream __dparm(0)); + // CHECK: result = hipMemcpyParam2DAsync(&MEMCPY2D, stream); + // CHECK-NEXT: result = hipMemcpyParam2DAsync(&MEMCPY2D, stream); + result = cuMemcpy2DAsync(&MEMCPY2D, stream); + result = cuMemcpy2DAsync_v2(&MEMCPY2D, stream); - // CUDA: CUresult CUDAAPI cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event); - // HIP: hipError_t hipGraphEventWaitNodeSetEvent(hipGraphNode_t node, hipEvent_t event); - // CHECK: result = hipGraphEventWaitNodeSetEvent(graphNode, event_); - result = cuGraphEventWaitNodeSetEvent(graphNode, event_); + // CUDA: CUresult CUDAAPI cuMemcpy2DUnaligned(const CUDA_MEMCPY2D *pCopy); + // HIP: hipError_t hipDrvMemcpy2DUnaligned(const hip_Memcpy2D* pCopy); + // CHECK: result = hipDrvMemcpy2DUnaligned(&MEMCPY2D); + // CHECK-NEXT: result = hipDrvMemcpy2DUnaligned(&MEMCPY2D); + result = cuMemcpy2DUnaligned(&MEMCPY2D); + result = cuMemcpy2DUnaligned_v2(&MEMCPY2D); - // CUDA: CUresult CUDAAPI cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event); - // HIP: hipError_t hipGraphExecEventWaitNodeSetEvent(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, hipEvent_t event); - // CHECK: result = hipGraphExecEventWaitNodeSetEvent(graphExec, graphNode, event_); - result = cuGraphExecEventWaitNodeSetEvent(graphExec, graphNode, event_); -#endif + // CUDA: CUresult CUDAAPI cuMemcpy3D(const CUDA_MEMCPY3D *pCopy); + // HIP: hipError_t hipDrvMemcpy3D(const HIP_MEMCPY3D* pCopy); + // CHECK: result = hipDrvMemcpy3D(&MEMCPY3D); + // CHECK-NEXT: result = hipDrvMemcpy3D(&MEMCPY3D); + result = cuMemcpy3D(&MEMCPY3D); + result = cuMemcpy3D_v2(&MEMCPY3D); -#if CUDA_VERSION > 11020 - // CUDA: CUresult CUDAAPI cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus *captureStatus_out, cuuint64_t *id_out, CUgraph *graph_out, const CUgraphNode **dependencies_out, size_t *numDependencies_out); - // HIP: hipError_t hipStreamGetCaptureInfo_v2(hipStream_t stream, hipStreamCaptureStatus* captureStatus_out, unsigned long long* id_out __dparm(0), hipGraph_t* graph_out __dparm(0), const hipGraphNode_t** dependencies_out __dparm(0), size_t* numDependencies_out __dparm(0)); - // CHECK: result = hipStreamGetCaptureInfo_v2(stream, &streamCaptureStatus, &ull, &graph, &pGraphNode, &bytes); - result = cuStreamGetCaptureInfo_v2(stream, &streamCaptureStatus, &ull, &graph, &pGraphNode, &bytes); + // CUDA: CUresult CUDAAPI cuMemcpy3DAsync(const CUDA_MEMCPY3D *pCopy, CUstream hStream); + // HIP: hipError_t hipDrvMemcpy3DAsync(const HIP_MEMCPY3D* pCopy, hipStream_t stream); + // CHECK: result = hipDrvMemcpy3DAsync(&MEMCPY3D, stream); + // CHECK-NEXT: result = hipDrvMemcpy3DAsync(&MEMCPY3D, stream); + result = cuMemcpy3DAsync(&MEMCPY3D, stream); + result = cuMemcpy3DAsync_v2(&MEMCPY3D, stream); - // CUDA: CUresult CUDAAPI cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode *dependencies, size_t numDependencies, unsigned int flags); - // HIP: hipError_t hipStreamUpdateCaptureDependencies(hipStream_t stream, hipGraphNode_t* dependencies, size_t numDependencies, unsigned int flags __dparm(0)); - // CHECK: result = hipStreamUpdateCaptureDependencies(stream, &graphNode, bytes, flags); - result = cuStreamUpdateCaptureDependencies(stream, &graphNode, bytes, flags); -#endif + void* dsthost = nullptr; + size_t offset = 0; + // CUDA: CUresult CUDAAPI cuMemcpyAtoH(void *dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount); + // HIP: hipError_t hipMemcpyAtoH(void* dst, hipArray* srcArray, size_t srcOffset, size_t count); + // CHECK: result = hipMemcpyAtoH(dsthost, array_, offset, bytes); + // CHECK-NEXT: result = hipMemcpyAtoH(dsthost, array_, offset, bytes); + result = cuMemcpyAtoH(dsthost, array_, offset, bytes); + result = cuMemcpyAtoH_v2(dsthost, array_, offset, bytes); -#if CUDA_VERSION > 11030 - // CUDA: CUresult CUDAAPI cuGraphInstantiateWithFlags(CUgraphExec *phGraphExec, CUgraph hGraph, unsigned long long flags); - // HIP: hipError_t hipGraphInstantiateWithFlags(hipGraphExec_t* pGraphExec, hipGraph_t graph, unsigned long long flags); - // CHECK: result = hipGraphInstantiateWithFlags(&graphExec, graph, ull); - result = cuGraphInstantiateWithFlags(&graphExec, graph, ull); -#endif + // CUDA: CUresult CUDAAPI cuMemcpyDtoD(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount); + // HIP: hipError_t hipMemcpyDtoD(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes); + // CHECK: result = hipMemcpyDtoD(deviceptr, deviceptr, bytes); + // CHECK-NEXT: result = hipMemcpyDtoD(deviceptr, deviceptr, bytes); + result = cuMemcpyDtoD(deviceptr, deviceptr, bytes); + result = cuMemcpyDtoD_v2(deviceptr, deviceptr, bytes); - // CUDA: CUresult CUDAAPI cuOccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize); - // HIP: hipError_t hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk); - // CHECK: result = hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(value, function, iBlockSize, bytes); - result = cuOccupancyMaxActiveBlocksPerMultiprocessor(value, function, iBlockSize, bytes); + // CUDA: CUresult CUDAAPI cuMemcpyDtoDAsync(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream); + // HIP: hipError_t hipMemcpyDtoDAsync(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes, hipStream_t stream); + // CHECK: result = hipMemcpyDtoDAsync(deviceptr, deviceptr, bytes, stream); + // CHECK-NEXT: result = hipMemcpyDtoDAsync(deviceptr, deviceptr, bytes, stream); + result = cuMemcpyDtoDAsync(deviceptr, deviceptr, bytes, stream); + result = cuMemcpyDtoDAsync_v2(deviceptr, deviceptr, bytes, stream); - // CUDA: CUresult CUDAAPI cuOccupancyMaxPotentialBlockSize(int *minGridSize, int *blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit); - // HIP: hipError_t hipModuleOccupancyMaxPotentialBlockSize(int* gridSize, int* blockSize, hipFunction_t f, size_t dynSharedMemPerBlk, int blockSizeLimit); - // CHECK: result = hipModuleOccupancyMaxPotentialBlockSize(value, value_2, function, bytes, iBlockSize); - result = cuOccupancyMaxPotentialBlockSize(value, value_2, function, occupancyB2DSize, bytes, iBlockSize); + // CUDA: CUresult CUDAAPI cuMemcpyDtoH(void *dstHost, CUdeviceptr srcDevice, size_t ByteCount); + // HIP: hipError_t hipMemcpyDtoH(void* dst, hipDeviceptr_t src, size_t sizeBytes); + // CHECK: result = hipMemcpyDtoH(dsthost, deviceptr, bytes); + // CHECK-NEXT: result = hipMemcpyDtoH(dsthost, deviceptr, bytes); + result = cuMemcpyDtoH(dsthost, deviceptr, bytes); + result = cuMemcpyDtoH_v2(dsthost, deviceptr, bytes); - // CUDA: CUresult CUDAAPI cuOccupancyMaxPotentialBlockSizeWithFlags(int *minGridSize, int *blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags); - // HIP: hipError_t hipModuleOccupancyMaxPotentialBlockSizeWithFlags(int* gridSize, int* blockSize, hipFunction_t f, size_t dynSharedMemPerBlk, int blockSizeLimit, unsigned int flags); - // CHECK: result = hipModuleOccupancyMaxPotentialBlockSizeWithFlags(value, value_2, function, bytes, iBlockSize, iBlockSize_2); - result = cuOccupancyMaxPotentialBlockSizeWithFlags(value, value_2, function, occupancyB2DSize, bytes, iBlockSize, iBlockSize_2); + // CUDA: CUresult CUDAAPI cuMemcpyDtoHAsync(void *dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream); + // HIP: hipError_t hipMemcpyDtoHAsync(void* dst, hipDeviceptr_t src, size_t sizeBytes, hipStream_t stream); + // CHECK: result = hipMemcpyDtoHAsync(dsthost, deviceptr, bytes, stream); + // CHECK-NEXT: result = hipMemcpyDtoHAsync(dsthost, deviceptr, bytes, stream); + result = cuMemcpyDtoHAsync(dsthost, deviceptr, bytes, stream); + result = cuMemcpyDtoHAsync_v2(dsthost, deviceptr, bytes, stream); - // CUDA: CUresult CUDAAPI cuGraphicsGLRegisterImage(CUgraphicsResource *pCudaResource, GLuint image, GLenum target, unsigned int Flags); - // HIP: hipError_t hipGraphicsGLRegisterImage(hipGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags); - // CHECK: result = hipGraphicsGLRegisterImage(&graphicsResource, gl_uint, gl_enum, flags); - result = cuGraphicsGLRegisterImage(&graphicsResource, gl_uint, gl_enum, flags); + // CUDA: CUresult CUDAAPI cuMemcpyHtoA(CUarray dstArray, size_t dstOffset, const void *srcHost, size_t ByteCount); + // HIP: hipError_t hipMemcpyHtoA(hipArray* dstArray, size_t dstOffset, const void* srcHost, size_t count); + // CHECK: result = hipMemcpyHtoA(array_, offset, dsthost, bytes); + // CHECK-NEXT: result = hipMemcpyHtoA(array_, offset, dsthost, bytes); + result = cuMemcpyHtoA(array_, offset, dsthost, bytes); + result = cuMemcpyHtoA_v2(array_, offset, dsthost, bytes); - // CUDA: CUresult CUDAAPI cuGraphicsSubResourceGetMappedArray(CUarray *pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel); - // HIP: hipError_t hipGraphicsSubResourceGetMappedArray(hipArray_t* array, hipGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel); - // CHECK: result = hipGraphicsSubResourceGetMappedArray(&array_, graphicsResource, flags, flags_2); - result = cuGraphicsSubResourceGetMappedArray(&array_, graphicsResource, flags, flags_2); + // CUDA: CUresult CUDAAPI cuMemcpyHtoD(CUdeviceptr dstDevice, const void *srcHost, size_t ByteCount); + // HIP: hipError_t hipMemcpyHtoD(hipDeviceptr_t dst, void* src, size_t sizeBytes); + // CHECK: result = hipMemcpyHtoD(deviceptr, dsthost, bytes); + // CHECK-NEXT: result = hipMemcpyHtoD(deviceptr, dsthost, bytes); + result = cuMemcpyHtoD(deviceptr, dsthost, bytes); + result = cuMemcpyHtoD_v2(deviceptr, dsthost, bytes); -#if CUDA_VERSION >= 9020 - // CUDA: CUresult CUDAAPI cuDeviceGetUuid(CUuuid *uuid, CUdevice dev); - // HIP: hipError_t hipDeviceGetUuid(hipUUID* uuid, hipDevice_t device); - // CHECK: result = hipDeviceGetUuid(&uuid, device); - result = cuDeviceGetUuid(&uuid, device); -#endif + // CUDA: CUresult CUDAAPI cuMemcpyHtoDAsync(CUdeviceptr dstDevice, const void *srcHost, size_t ByteCount, CUstream hStream); + // HIP: hipError_t hipMemcpyHtoDAsync(hipDeviceptr_t dst, void* src, size_t sizeBytes, hipStream_t stream); + // CHECK: result = hipMemcpyHtoDAsync(deviceptr, dsthost, bytes, stream); + // CHECK-NEXT: result = hipMemcpyHtoDAsync(deviceptr, dsthost, bytes, stream); + result = cuMemcpyHtoDAsync(deviceptr, dsthost, bytes, stream); + result = cuMemcpyHtoDAsync_v2(deviceptr, dsthost, bytes, stream); -#if CUDA_VERSION >= 10000 - // CHECK: hipHostFn_t hostFn; - CUhostFn hostFn; + // CUDA: CUresult CUDAAPI cuMemFree(CUdeviceptr dptr); + // HIP: hipError_t hipFree(void* ptr); + // CHECK: result = hipFree(deviceptr); + // CHECK-NEXT: result = hipFree(deviceptr); + result = cuMemFree(deviceptr); + result = cuMemFree_v2(deviceptr); - // CUDA: CUresult CUDAAPI cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void *userData); - // HIP: hipError_t hipLaunchHostFunc(hipStream_t stream, hipHostFn_t fn, void* userData); - // CHECK: result = hipLaunchHostFunc(stream, hostFn, image); - result = cuLaunchHostFunc(stream, hostFn, image); -#endif + // CUDA: CUresult CUDAAPI cuMemFreeHost(void *p); + // HIP: hipError_t hipHostFree(void* ptr); + // CHECK: result = hipHostFree(image); + result = cuMemFreeHost(image); -#if CUDA_VERSION >= 10010 - // CUDA: CUresult CUDAAPI cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode *mode); - // HIP: hipError_t hipThreadExchangeStreamCaptureMode(hipStreamCaptureMode* mode); - // CHECK: result = hipThreadExchangeStreamCaptureMode(&streamCaptureMode); - result = cuThreadExchangeStreamCaptureMode(&streamCaptureMode); -#endif + // CUDA: CUresult CUDAAPI cuMemGetAddressRange(CUdeviceptr *pbase, size_t *psize, CUdeviceptr dptr); + // HIP: hipError_t hipMemGetAddressRange(hipDeviceptr_t* pbase, size_t* psize, hipDeviceptr_t dptr); + // CHECK: result = hipMemGetAddressRange(&deviceptr, &bytes, deviceptr_2); + // CHECK-NEXT: result = hipMemGetAddressRange(&deviceptr, &bytes, deviceptr_2); + result = cuMemGetAddressRange(&deviceptr, &bytes, deviceptr_2); + result = cuMemGetAddressRange_v2(&deviceptr, &bytes, deviceptr_2); -#if CUDA_VERSION >= 10020 + // CUDA: CUresult CUDAAPI cuMemGetInfo(size_t *free, size_t *total); + // HIP: hipError_t hipMemGetInfo(size_t* free, size_t* total); + // CHECK: result = hipMemGetInfo(&bytes, &bytes_2); + // CHECK-NEXT: result = hipMemGetInfo(&bytes, &bytes_2); + result = cuMemGetInfo(&bytes, &bytes_2); + result = cuMemGetInfo_v2(&bytes, &bytes_2); - // CHECK: hipMemAllocationProp memAllocationProp; - CUmemAllocationProp memAllocationProp; - // CHECK: hipMemGenericAllocationHandle_t memGenericAllocationHandle_t; - CUmemGenericAllocationHandle memGenericAllocationHandle_t; - // CHECK: hipMemAllocationGranularity_flags memAllocationGranularity_flags; - CUmemAllocationGranularity_flags memAllocationGranularity_flags; - // CHECK: hipMemAccessDesc memAccessDesc; - CUmemAccessDesc memAccessDesc; + // CUDA: CUresult CUDAAPI cuMemHostAlloc(void **pp, size_t bytesize, unsigned int Flags); + // HIP: DEPRECATED("use hipHostMalloc instead") hipError_t hipHostAlloc(void** ptr, size_t size, unsigned int flags); + // CHECK: result = hipHostAlloc(&image, bytes, flags); + result = cuMemHostAlloc(&image, bytes, flags); - // CUDA: CUresult CUDAAPI cuMemAddressFree(CUdeviceptr ptr, size_t size); - // HIP: hipError_t hipMemAddressFree(void* devPtr, size_t size); - // CHECK: result = hipMemAddressFree(deviceptr, bytes); - result = cuMemAddressFree(deviceptr, bytes); + // CUDA: CUresult CUDAAPI cuMemHostGetDevicePointer(CUdeviceptr *pdptr, void *p, unsigned int Flags); + // HIP: hipError_t hipHostGetDevicePointer(void** devPtr, void* hstPtr, unsigned int flags); + // CHECK: result = hipHostGetDevicePointer(&deviceptr, image, flags); + // CHECK-NEXT: result = hipHostGetDevicePointer(&deviceptr, image, flags); + result = cuMemHostGetDevicePointer(&deviceptr, image, flags); + result = cuMemHostGetDevicePointer_v2(&deviceptr, image, flags); - // CUDA: CUresult CUDAAPI cuMemAddressReserve(CUdeviceptr *ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags); - // HIP: hipError_t hipMemAddressReserve(void** ptr, size_t size, size_t alignment, void* addr, unsigned long long flags); - // CHECK: result = hipMemAddressReserve(&deviceptr, bytes, bytes_2, deviceptr_2, ull); - result = cuMemAddressReserve(&deviceptr, bytes, bytes_2, deviceptr_2, ull); + // CUDA: CUresult CUDAAPI cuMemHostGetFlags(unsigned int *pFlags, void *p); + // HIP: hipError_t hipHostGetFlags(&flags, image); + // CHECK: result = hipHostGetFlags(&flags, image); + result = cuMemHostGetFlags(&flags, image); - // CUDA: CUresult CUDAAPI cuMemCreate(CUmemGenericAllocationHandle *handle, size_t size, const CUmemAllocationProp *prop, unsigned long long flags); - // HIP: hipError_t hipMemCreate(hipMemGenericAllocationHandle_t* handle, size_t size, const hipMemAllocationProp* prop, unsigned long long flags); - // CHECK: result = hipMemCreate(&memGenericAllocationHandle_t, bytes, &memAllocationProp, ull); - result = cuMemCreate(&memGenericAllocationHandle_t, bytes, &memAllocationProp, ull); + // CUDA: CUresult CUDAAPI cuMemHostRegister(void *p, size_t bytesize, unsigned int Flags); + // HIP: hipError_t hipHostRegister(void* hostPtr, size_t sizeBytes, unsigned int flags); + // CHECK: result = hipHostRegister(image, bytes, flags); + // CHECK-NEXT: result = hipHostRegister(image, bytes, flags); + result = cuMemHostRegister(image, bytes, flags); + result = cuMemHostRegister_v2(image, bytes, flags); - // CUDA: CUresult CUDAAPI cuMemExportToShareableHandle(void *shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags); - // HIP: hipError_t hipMemExportToShareableHandle(void* shareableHandle, hipMemGenericAllocationHandle_t handle, hipMemAllocationHandleType handleType, unsigned long long flags); - // CHECK: result = hipMemExportToShareableHandle(image, memGenericAllocationHandle_t, memAllocationHandleType, ull); - result = cuMemExportToShareableHandle(image, memGenericAllocationHandle_t, memAllocationHandleType, ull); + // CUDA: CUresult CUDAAPI cuMemHostUnregister(void *p); + // HIP: hipError_t hipHostUnregister(void* hostPtr); + // CHECK: result = hipHostUnregister(image); + result = cuMemHostUnregister(image); - // CUDA: CUresult CUDAAPI cuMemGetAccess(unsigned long long *flags, const CUmemLocation *location, CUdeviceptr ptr); - // HIP: hipError_t hipMemGetAccess(unsigned long long* flags, const hipMemLocation* location, void* ptr); - // CHECK: result = hipMemGetAccess(&ull_2, &memLocation, deviceptr); - result = cuMemGetAccess(&ull_2, &memLocation, deviceptr); + unsigned short us = 0; + // CUDA: CUresult CUDAAPI cuMemsetD16(CUdeviceptr dstDevice, unsigned short us, size_t N); + // HIP: hipError_t hipMemsetD16(hipDeviceptr_t dest, unsigned short value, size_t count); + // CHECK: result = hipMemsetD16(deviceptr, us, bytes); + // CHECK-NEXT: result = hipMemsetD16(deviceptr, us, bytes); + result = cuMemsetD16(deviceptr, us, bytes); + result = cuMemsetD16_v2(deviceptr, us, bytes); - // CUDA: CUresult CUDAAPI cuMemGetAllocationGranularity(size_t *granularity, const CUmemAllocationProp *prop, CUmemAllocationGranularity_flags option); - // HIP: hipError_t hipMemGetAllocationGranularity(size_t* granularity, const hipMemAllocationProp* prop, hipMemAllocationGranularity_flags option); - // CHECK: result = hipMemGetAllocationGranularity(&bytes, &memAllocationProp, memAllocationGranularity_flags); - result = cuMemGetAllocationGranularity(&bytes, &memAllocationProp, memAllocationGranularity_flags); + // CUDA: CUresult CUDAAPI cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream); + // HIP: hipError_t hipMemsetD16Async(hipDeviceptr_t dest, unsigned short value, size_t count, hipStream_t stream __dparm(0)); + // CHECK: result = hipMemsetD16Async(deviceptr, us, bytes, stream); + result = cuMemsetD16Async(deviceptr, us, bytes, stream); - // CUDA: CUresult CUDAAPI cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp *prop, CUmemGenericAllocationHandle handle); - // HIP: hipError_t hipMemGetAllocationPropertiesFromHandle(hipMemAllocationProp* prop, hipMemGenericAllocationHandle_t handle); - // CHECK: result = hipMemGetAllocationPropertiesFromHandle(&memAllocationProp, memGenericAllocationHandle_t); - result = cuMemGetAllocationPropertiesFromHandle(&memAllocationProp, memGenericAllocationHandle_t); + // CUDA: CUresult CUDAAPI cuMemsetD32(CUdeviceptr dstDevice, unsigned int ui, size_t N) + // HIP: hipError_t hipMemsetD32(hipDeviceptr_t dest, int value, size_t count); + // CHECK: result = hipMemsetD32(deviceptr, flags, bytes); + // CHECK-NEXT: result = hipMemsetD32(deviceptr, flags, bytes); + result = cuMemsetD32(deviceptr, flags, bytes); + result = cuMemsetD32_v2(deviceptr, flags, bytes); - // CUDA: CUresult CUDAAPI cuMemImportFromShareableHandle(CUmemGenericAllocationHandle *handle, void *osHandle, CUmemAllocationHandleType shHandleType); - // HIP: hipError_t hipMemImportFromShareableHandle(hipMemGenericAllocationHandle_t* handle, void* osHandle, hipMemAllocationHandleType shHandleType); - // CHECK: result = hipMemImportFromShareableHandle(&memGenericAllocationHandle_t, image, memAllocationHandleType); - result = cuMemImportFromShareableHandle(&memGenericAllocationHandle_t, image, memAllocationHandleType); + // CUDA: CUresult CUDAAPI cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream); + // HIP: hipError_t hipMemsetD32Async(hipDeviceptr_t dst, int value, size_t count, hipStream_t stream __dparm(0)); + // CHECK: result = hipMemsetD32Async(deviceptr, flags, bytes, stream); + result = cuMemsetD32Async(deviceptr, flags, bytes, stream); - // CUDA: CUresult CUDAAPI cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags); - // HIP: hipError_t hipMemMap(void* ptr, size_t size, size_t offset, hipMemGenericAllocationHandle_t handle, unsigned long long flags); - // CHECK: result = hipMemMap(deviceptr, bytes, bytes_2, memGenericAllocationHandle_t, ull); - result = cuMemMap(deviceptr, bytes, bytes_2, memGenericAllocationHandle_t, ull); + unsigned char uc = 0; + // CUDA: CUresult CUDAAPI cuMemsetD8(CUdeviceptr dstDevice, unsigned char uc, size_t N); + // HIP: hipError_t hipMemsetD8(hipDeviceptr_t dest, unsigned char value, size_t count); + // CHECK: result = hipMemsetD8(deviceptr, uc, bytes); + // CHECK-NEXT: result = hipMemsetD8(deviceptr, uc, bytes); + result = cuMemsetD8(deviceptr, uc, bytes); + result = cuMemsetD8_v2(deviceptr, uc, bytes); - // CUDA: CUresult CUDAAPI cuMemRelease(CUmemGenericAllocationHandle handle); - // HIP: hipError_t hipMemRelease(hipMemGenericAllocationHandle_t handle); - // CHECK: result = hipMemRelease(memGenericAllocationHandle_t); - result = cuMemRelease(memGenericAllocationHandle_t); + // CUDA: CUresult CUDAAPI cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream); + // HIP: hipError_t hipMemsetD8Async(hipDeviceptr_t dest, unsigned char value, size_t count, hipStream_t stream __dparm(0)); + // CHECK: result = hipMemsetD8Async(deviceptr, uc, bytes, stream); + result = cuMemsetD8Async(deviceptr, uc, bytes, stream); - // CUDA: CUresult CUDAAPI cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc *desc, size_t count); - // HIP: hipError_t hipMemSetAccess(void* ptr, size_t size, const hipMemAccessDesc* desc, size_t count); - // CHECK: result = hipMemSetAccess(deviceptr, bytes, &memAccessDesc, bytes_2); - result = cuMemSetAccess(deviceptr, bytes, &memAccessDesc, bytes_2); + // CUDA: CUresult CUDAAPI cuMipmappedArrayCreate(CUmipmappedArray *pHandle, const CUDA_ARRAY3D_DESCRIPTOR *pMipmappedArrayDesc, unsigned int numMipmapLevels); + // HIP: hipError_t hipMipmappedArrayCreate(hipMipmappedArray_t* pHandle, HIP_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels); + // CHECK: result = hipMipmappedArrayCreate(&mipmappedArray, &ARRAY3D_DESCRIPTOR, flags); + result = cuMipmappedArrayCreate(&mipmappedArray, &ARRAY3D_DESCRIPTOR, flags); - // CUDA: CUresult CUDAAPI cuMemUnmap(CUdeviceptr ptr, size_t size); - // HIP: hipError_t hipMemUnmap(void* ptr, size_t size); - // CHECK: result = hipMemUnmap(deviceptr, bytes); - result = cuMemUnmap(deviceptr, bytes); -#endif + // CUDA: CUresult CUDAAPI cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray); + // HIP: hipError_t hipMipmappedArrayDestroy(hipMipmappedArray_t hMipmappedArray); + // CHECK: result = hipMipmappedArrayDestroy(mipmappedArray); + result = cuMipmappedArrayDestroy(mipmappedArray); -#if CUDA_VERSION >= 11000 - // CHECK: hipKernelNodeAttrID kernelNodeAttrID; - CUkernelNodeAttrID kernelNodeAttrID; - // CHECK: hipKernelNodeAttrValue kernelNodeAttrValue; - CUkernelNodeAttrValue kernelNodeAttrValue; + // CUDA: CUresult CUDAAPI cuMipmappedArrayGetLevel(CUarray *pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level); + // HIP: hipError_t hipMipmappedArrayGetLevel(hipArray_t* pLevelArray, hipMipmappedArray_t hMipMappedArray, unsigned int level); + // CHECK: result = hipMipmappedArrayGetLevel(&array_, mipmappedArray, flags); + result = cuMipmappedArrayGetLevel(&array_, mipmappedArray, flags); - // CUDA: CUresult CUDAAPI cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value); - // HIP: hipError_t hipGraphKernelNodeSetAttribute(hipGraphNode_t hNode, hipKernelNodeAttrID attr, const hipKernelNodeAttrValue* value); - // CHECK: result = hipGraphKernelNodeSetAttribute(graphNode, kernelNodeAttrID, &kernelNodeAttrValue); - result = cuGraphKernelNodeSetAttribute(graphNode, kernelNodeAttrID, &kernelNodeAttrValue); + // CUDA: CUresult CUDAAPI cuPointerGetAttribute(void *data, CUpointer_attribute attribute, CUdeviceptr ptr); + // HIP: hipError_t hipPointerGetAttribute(void* data, hipPointer_attribute attribute, hipDeviceptr_t ptr); + // CHECK: result = hipPointerGetAttribute(image, pointer_attribute, deviceptr); + result = cuPointerGetAttribute(image, pointer_attribute, deviceptr); - // CUDA: CUresult CUDAAPI cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out); - // HIP: hipError_t hipGraphKernelNodeGetAttribute(hipGraphNode_t hNode, hipKernelNodeAttrID attr, hipKernelNodeAttrValue* value); - // CHECK: result = hipGraphKernelNodeGetAttribute(graphNode, kernelNodeAttrID, &kernelNodeAttrValue); - result = cuGraphKernelNodeGetAttribute(graphNode, kernelNodeAttrID, &kernelNodeAttrValue); + // CUDA: CUresult CUDAAPI cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute *attributes, void **data, CUdeviceptr ptr); + // HIP: hipError_t hipDrvPointerGetAttributes(unsigned int numAttributes, hipPointer_attribute* attributes, void** data, hipDeviceptr_t ptr); + // CHECK: result = hipDrvPointerGetAttributes(flags, &pointer_attribute, &image, deviceptr); + result = cuPointerGetAttributes(flags, &pointer_attribute, &image, deviceptr); - // CUDA: CUresult CUDAAPI cuMemRetainAllocationHandle(CUmemGenericAllocationHandle *handle, void *addr); - // HIP: hipError_t hipMemRetainAllocationHandle(hipMemGenericAllocationHandle_t* handle, void* addr); - // CHECK: result = hipMemRetainAllocationHandle(&memGenericAllocationHandle_t, image); - result = cuMemRetainAllocationHandle(&memGenericAllocationHandle_t, image); -#endif + // CUDA: CUresult CUDAAPI cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void *userData, unsigned int flags); + // HIP: hipError_t hipStreamAddCallback(hipStream_t stream, hipStreamCallback_t callback, void* userData, unsigned int flags); + // CHECK: result = hipStreamAddCallback(stream, streamCallback, image, flags); + result = cuStreamAddCallback(stream, streamCallback, image, flags); -#if CUDA_VERSION >= 11010 - // CHECK: hipArrayMapInfo arrayMapInfo; - CUarrayMapInfo arrayMapInfo; + // CUDA: CUresult CUDAAPI cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags); + // HIP: hipError_t hipStreamAttachMemAsync(hipStream_t stream, void* dev_ptr, size_t length __dparm(0), unsigned int flags __dparm(hipMemAttachSingle)); + // CHECK: result = hipStreamAttachMemAsync(stream, deviceptr, bytes, flags); + result = cuStreamAttachMemAsync(stream, deviceptr, bytes, flags); - // CUDA: CUresult CUDAAPI cuMemMapArrayAsync(CUarrayMapInfo *mapInfoList, unsigned int count, CUstream hStream); - // HIP: hipError_t hipMemMapArrayAsync(hipArrayMapInfo* mapInfoList, unsigned int count, hipStream_t stream); - // CHECK: result = hipMemMapArrayAsync(&arrayMapInfo, flags, stream); - result = cuMemMapArrayAsync(&arrayMapInfo, flags, stream); -#endif + // CUDA: CUresult CUDAAPI cuStreamCreate(CUstream *phStream, unsigned int Flags); + // HIP: hipError_t hipStreamCreateWithFlags(hipStream_t* stream, unsigned int flags); + // CHECK: result = hipStreamCreateWithFlags(&stream, flags); + result = cuStreamCreate(&stream, flags); -#if CUDA_VERSION >= 11020 - // CUDA: CUresult CUDAAPI cuDeviceGetDefaultMemPool(CUmemoryPool *pool_out, CUdevice dev); - // HIP: hipError_t hipDeviceGetDefaultMemPool(hipMemPool_t* mem_pool, int device); - // CHECK: result = hipDeviceGetDefaultMemPool(&memPool_t, device); - result = cuDeviceGetDefaultMemPool(&memPool_t, device); + // CUDA: CUresult CUDAAPI cuStreamCreateWithPriority(CUstream *phStream, unsigned int flags, int priority); + // HIP: hipError_t hipStreamCreateWithPriority(hipStream_t* stream, unsigned int flags, int priority); + // CHECK: result = hipStreamCreateWithPriority(&stream, flags, leastPriority); + result = cuStreamCreateWithPriority(&stream, flags, leastPriority); - // CUDA: CUresult CUDAAPI cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool); - // HIP: hipError_t hipDeviceSetMemPool(int device, hipMemPool_t mem_pool); - // CHECK: result = hipDeviceSetMemPool(device, memPool_t); - result = cuDeviceSetMemPool(device, memPool_t); + // CUDA: CUresult CUDAAPI cuStreamDestroy(CUstream hStream); + // HIP: hipError_t hipStreamDestroy(hipStream_t stream); + // CHECK: result = hipStreamDestroy(stream); + // CHECK-NEXT: result = hipStreamDestroy(stream); + result = cuStreamDestroy(stream); + result = cuStreamDestroy_v2(stream); - // CUDA: CUresult CUDAAPI cuDeviceGetMemPool(CUmemoryPool *pool, CUdevice dev); - // HIP: hipError_t hipDeviceGetMemPool(hipMemPool_t* mem_pool, int device); - // CHECK: result = hipDeviceGetMemPool(&memPool_t, device); - result = cuDeviceGetMemPool(&memPool_t, device); + // CUDA: CUresult CUDAAPI cuStreamGetFlags(CUstream hStream, unsigned int *flags); + // HIP: hipError_t hipStreamGetFlags(hipStream_t stream, unsigned int* flags); + // CHECK: result = hipStreamGetFlags(stream, &flags); + result = cuStreamGetFlags(stream, &flags); - // CUDA: CUresult CUDAAPI cuMemAllocAsync(CUdeviceptr *dptr, size_t bytesize, CUstream hStream); - // HIP: hipError_t hipMallocAsync(void** dev_ptr, size_t size, hipStream_t stream); - // CHECK: result = hipMallocAsync(&deviceptr, bytes, stream); - result = cuMemAllocAsync(&deviceptr, bytes, stream); + // CUDA: CUresult CUDAAPI cuStreamGetPriority(CUstream hStream, int *priority); + // HIP: hipError_t hipStreamGetPriority(hipStream_t stream, int* priority); + // CHECK: result = hipStreamGetPriority(stream, &leastPriority); + result = cuStreamGetPriority(stream, &leastPriority); - // CUDA: CUresult CUDAAPI cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream); - // HIP: hipError_t hipFreeAsync(void* dev_ptr, hipStream_t stream); - // CHECK: result = hipFreeAsync(deviceptr, stream); - result = cuMemFreeAsync(deviceptr, stream); + // CUDA: CUresult CUDAAPI cuStreamQuery(CUstream hStream); + // HIP: hipError_t hipStreamQuery(hipStream_t stream); + // CHECK: result = hipStreamQuery(stream); + result = cuStreamQuery(stream); - // CUDA: CUresult CUDAAPI cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep); - // HIP: hipError_t hipMemPoolTrimTo(hipMemPool_t mem_pool, size_t min_bytes_to_hold); - // CHECK: result = hipMemPoolTrimTo(memPool_t, bytes); - result = cuMemPoolTrimTo(memPool_t, bytes); + // CUDA: CUresult CUDAAPI cuStreamSynchronize(CUstream hStream); + // HIP: hipError_t hipStreamSynchronize(hipStream_t stream); + // CHECK: result = hipStreamSynchronize(stream); + result = cuStreamSynchronize(stream); - // CHECK: hipMemPoolAttr memPoolAttr; - CUmemPool_attribute memPoolAttr; + // CUDA: CUresult CUDAAPI cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags); + // HIP: hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, unsigned int flags); + // CHECK: result = hipStreamWaitEvent(stream, event_, flags); + result = cuStreamWaitEvent(stream, event_, flags); - // CUDA: CUresult CUDAAPI cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void *value); - // HIP: hipError_t hipMemPoolSetAttribute(hipMemPool_t mem_pool, hipMemPoolAttr attr, void* value); - // CHECK: result = hipMemPoolSetAttribute(memPool_t, memPoolAttr, image); - result = cuMemPoolSetAttribute(memPool_t, memPoolAttr, image); + // CUDA: CUresult CUDAAPI cuEventCreate(CUevent *phEvent, unsigned int Flags); + // HIP: hipError_t hipEventCreateWithFlags(hipEvent_t* event, unsigned flags); + // CHECK: result = hipEventCreateWithFlags(&event_, flags); + result = cuEventCreate(&event_, flags); - // CUDA: CUresult CUDAAPI cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void *value); - // HIP: hipError_t hipMemPoolGetAttribute(hipMemPool_t mem_pool, hipMemPoolAttr attr, void* value); - // CHECK: result = hipMemPoolGetAttribute(memPool_t, memPoolAttr, image); - result = cuMemPoolGetAttribute(memPool_t, memPoolAttr, image); + // CUDA: CUresult CUDAAPI cuEventDestroy(CUevent hEvent); + // HIP: hipError_t hipEventDestroy(hipEvent_t event); + // CHECK: result = hipEventDestroy(event_); + // CHECK-NEXT: result = hipEventDestroy(event_); + result = cuEventDestroy(event_); + result = cuEventDestroy_v2(event_); - // CUDA: CUresult CUDAAPI cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc *map, size_t count); - // HIP: hipError_t hipMemPoolSetAccess(hipMemPool_t mem_pool, const hipMemAccessDesc* desc_list, size_t count); - // CHECK: result = hipMemPoolSetAccess(memPool_t, &memAccessDesc, bytes); - result = cuMemPoolSetAccess(memPool_t, &memAccessDesc, bytes); + // CUDA: CUresult CUDAAPI cuEventElapsedTime(float *pMilliseconds, CUevent hStart, CUevent hEnd); + // HIP: hipError_t hipEventElapsedTime(float* ms, hipEvent_t start, hipEvent_t stop); + // CHECK: result = hipEventElapsedTime(&ms, event_start, event_end); + result = cuEventElapsedTime(&ms, event_start, event_end); - // CHECK: hipMemAccessFlags memAccessFlags; - CUmemAccess_flags memAccessFlags; + // CUDA: CUresult CUDAAPI cuEventRecord(CUevent hEvent, CUstream hStream); + // HIP: hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream); + // CHECK: result = hipEventRecord(event_, stream); + result = cuEventRecord(event_, stream); - // CUDA: CUresult CUDAAPI cuMemPoolGetAccess(CUmemAccess_flags *flags, CUmemoryPool memPool, CUmemLocation *location); - // HIP: hipError_t hipMemPoolGetAccess(hipMemAccessFlags* flags, hipMemPool_t mem_pool, hipMemLocation* location); - // CHECK: result = hipMemPoolGetAccess(&memAccessFlags, memPool_t, &memLocation); - result = cuMemPoolGetAccess(&memAccessFlags, memPool_t, &memLocation); + // CUDA: CUresult CUDAAPI cuEventSynchronize(CUevent hEvent); + // HIP: hipError_t hipEventSynchronize(hipEvent_t event); + // CHECK: result = hipEventSynchronize(event_); + result = cuEventSynchronize(event_); - // CUDA: CUresult CUDAAPI cuMemPoolCreate(CUmemoryPool *pool, const CUmemPoolProps *poolProps); - // HIP: hipError_t hipMemPoolCreate(hipMemPool_t* mem_pool, const hipMemPoolProps* pool_props); - // CHECK: result = hipMemPoolCreate(&memPool_t, &memPoolProps); - result = cuMemPoolCreate(&memPool_t, &memPoolProps); + // CUDA: CUresult CUDAAPI cuFuncGetAttribute(int *pi, CUfunction_attribute attrib, CUfunction hfunc); + // HIP: hipError_t hipFuncGetAttribute(int* value, hipFunction_attribute attrib, hipFunction_t hfunc); + // CHECK: result = hipFuncGetAttribute(value, function_attribute, function); + result = cuFuncGetAttribute(value, function_attribute, function); - // CUDA: CUresult CUDAAPI cuMemPoolDestroy(CUmemoryPool pool); - // HIP: hipError_t hipMemPoolDestroy(hipMemPool_t mem_pool); - // CHECK: result = hipMemPoolDestroy(memPool_t); - result = cuMemPoolDestroy(memPool_t); + unsigned int gridDimX = 0, gridDimY = 0, gridDimZ = 0, blockDimX = 0, blockDimY = 0, blockDimZ = 0, sharedMemBytes = 0; + void* kernelParams = nullptr, * extra = nullptr; + // CUDA: CUresult CUDAAPI cuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void **kernelParams, void **extra); + // HIP: hipError_t hipModuleLaunchKernel(hipFunction_t f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hipStream_t stream, void** kernelParams, void** extra); + // CHECK: result = hipModuleLaunchKernel(function, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, stream, &kernelParams, &extra); + result = cuLaunchKernel(function, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, stream, &kernelParams, &extra); - // CUDA: CUresult CUDAAPI cuMemPoolExportToShareableHandle(void *handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags); - // HIP: hipError_t hipMemPoolExportToShareableHandle(void* shared_handle, hipMemPool_t mem_pool, hipMemAllocationHandleType handle_type, unsigned int flags); - // CHECK: result = hipMemPoolExportToShareableHandle(image, memPool_t, memAllocationHandleType, ull); - result = cuMemPoolExportToShareableHandle(image, memPool_t, memAllocationHandleType, ull); + // CUDA: CUresult CUDAAPI cuOccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize); + // HIP: hipError_t hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk); + // CHECK: result = hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(value, function, iBlockSize, bytes); + result = cuOccupancyMaxActiveBlocksPerMultiprocessor(value, function, iBlockSize, bytes); - // CUDA: CUresult CUDAAPI cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags); - // HIP: hipError_t hipMemPoolImportFromShareableHandle(hipMemPool_t* mem_pool, void* shared_handle, hipMemAllocationHandleType handle_type, unsigned int flags); - // CHECK: result = hipMemPoolImportFromShareableHandle(&memPool_t, image, memAllocationHandleType, ull); - result = cuMemPoolImportFromShareableHandle(&memPool_t, image, memAllocationHandleType, ull); + // CUDA: CUresult CUDAAPI cuOccupancyMaxPotentialBlockSize(int *minGridSize, int *blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit); + // HIP: hipError_t hipModuleOccupancyMaxPotentialBlockSize(int* gridSize, int* blockSize, hipFunction_t f, size_t dynSharedMemPerBlk, int blockSizeLimit); + // CHECK: result = hipModuleOccupancyMaxPotentialBlockSize(value, value_2, function, bytes, iBlockSize); + result = cuOccupancyMaxPotentialBlockSize(value, value_2, function, occupancyB2DSize, bytes, iBlockSize); - // CHECK: hipMemPoolPtrExportData memPoolPtrExportData; - CUmemPoolPtrExportData memPoolPtrExportData; + // CUDA: CUresult CUDAAPI cuOccupancyMaxPotentialBlockSizeWithFlags(int *minGridSize, int *blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags); + // HIP: hipError_t hipModuleOccupancyMaxPotentialBlockSizeWithFlags(int* gridSize, int* blockSize, hipFunction_t f, size_t dynSharedMemPerBlk, int blockSizeLimit, unsigned int flags); + // CHECK: result = hipModuleOccupancyMaxPotentialBlockSizeWithFlags(value, value_2, function, bytes, iBlockSize, iBlockSize_2); + result = cuOccupancyMaxPotentialBlockSizeWithFlags(value, value_2, function, occupancyB2DSize, bytes, iBlockSize, iBlockSize_2); - // CUDA: CUresult CUDAAPI cuMemPoolExportPointer(CUmemPoolPtrExportData *shareData_out, CUdeviceptr ptr); - // HIP: hipError_t hipMemPoolExportPointer(hipMemPoolPtrExportData* export_data, void* dev_ptr); - // CHECK: result = hipMemPoolExportPointer(&memPoolPtrExportData, deviceptr); - result = cuMemPoolExportPointer(&memPoolPtrExportData, deviceptr); + // CUDA: CUresult CUDAAPI cuGraphicsGLRegisterImage(CUgraphicsResource *pCudaResource, GLuint image, GLenum target, unsigned int Flags); + // HIP: hipError_t hipGraphicsGLRegisterImage(hipGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags); + // CHECK: result = hipGraphicsGLRegisterImage(&graphicsResource, gl_uint, gl_enum, flags); + result = cuGraphicsGLRegisterImage(&graphicsResource, gl_uint, gl_enum, flags); - // CUDA: CUresult CUDAAPI cuMemPoolImportPointer(CUdeviceptr *ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData *shareData); - // HIP: hipError_t hipMemPoolImportPointer(void** dev_ptr, hipMemPool_t mem_pool, hipMemPoolPtrExportData* export_data); - // CHECK: result = hipMemPoolImportPointer(&deviceptr, memPool_t, &memPoolPtrExportData); - result = cuMemPoolImportPointer(&deviceptr, memPool_t, &memPoolPtrExportData); -#endif + // CUDA: CUresult CUDAAPI cuGraphicsSubResourceGetMappedArray(CUarray *pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel); + // HIP: hipError_t hipGraphicsSubResourceGetMappedArray(hipArray_t* array, hipGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel); + // CHECK: result = hipGraphicsSubResourceGetMappedArray(&array_, graphicsResource, flags, flags_2); + result = cuGraphicsSubResourceGetMappedArray(&array_, graphicsResource, flags, flags_2); // CUDA: CUresult CUDAAPI cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags); // HIP: hipError_t hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk, unsigned int flags); @@ -1462,13 +1496,6 @@ int main() { // CHECK: result = hipTexRefSetArray(texref, array_, flags); result = cuTexRefSetArray(texref, array_, flags); -#if CUDA_VERSION >= 8000 - // CUDA: __CUDA_DEPRECATED CUresult CUDAAPI cuTexRefSetBorderColor(CUtexref hTexRef, float *pBorderColor); - // HIP: DEPRECATED(DEPRECATED_MSG) hipError_t hipTexRefSetBorderColor(textureReference* texRef, float* pBorderColor); - // CHECK: result = hipTexRefSetBorderColor(texref, &ms); - result = cuTexRefSetBorderColor(texref, &ms); -#endif - // CUDA: __CUDA_DEPRECATED CUresult CUDAAPI cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm); // HIP: hipError_t hipError_t hipTexRefSetFilterMode(textureReference* texRef, enum hipTextureFilterMode fm); // CHECK: result = hipTexRefSetFilterMode(texref, filter_mode); @@ -1561,16 +1588,6 @@ int main() { // CHECK: result = hipDeviceCanAccessPeer(value, device, dim); result = cuDeviceCanAccessPeer(value, device, dim); -#if CUDA_VERSION >= 8000 - // CHECK: hipDeviceP2PAttr deviceP2PAttribute; - CUdevice_P2PAttribute deviceP2PAttribute; - - // CUDA: CUresult CUDAAPI cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice); - // HIP: hipError_t hipDeviceGetP2PAttribute(int* value, hipDeviceP2PAttr attr, int srcDevice, int dstDevice); - // CHECK: result = hipDeviceGetP2PAttribute(value, deviceP2PAttribute, iBlockSize, iBlockSize_2); - result = cuDeviceGetP2PAttribute(value, deviceP2PAttribute, iBlockSize, iBlockSize_2); -#endif - // CUDA: CUresult CUDAAPI cuGraphicsMapResources(unsigned int count, CUgraphicsResource *resources, CUstream hStream); // HIP: hipError_t hipGraphicsMapResources(int count, hipGraphicsResource_t* resources, hipStream_t stream __dparm(0)); // CHECK: result = hipGraphicsMapResources(iBlockSize, &graphicsResource, stream); @@ -1626,5 +1643,24 @@ int main() { // CHECK: result = hipGraphicsGLRegisterImage(&graphicsResource, gl_uint, gl_enum, flags); result = cuGraphicsGLRegisterImage(&graphicsResource, gl_uint, gl_enum, flags); + // CUDA: CUresult CUDAAPI cuCtxSetLimit(CUlimit limit, size_t value); + // HIP: hipError_t hipDeviceSetLimit(enum hipLimit_t limit, size_t value); + // CHECK: result = hipDeviceSetLimit(limit, bytes); + result = cuCtxSetLimit(limit, bytes); + + // CHECK: hipError_t result_2; + CUresult result_2; + const char* ret = NULL; + + // CUDA: CUresult CUDAAPI cuGetErrorName(CUresult error, const char **pStr); + // HIP: hipError_t hipDrvGetErrorName(hipError_t hipError, const char** errorString); + // CHECK: result = hipDrvGetErrorName(result_2, &ret); + result = cuGetErrorName(result_2, &ret); + + // CUDA: CUresult CUDAAPI cuGetErrorString(CUresult error, const char **pStr); + // HIP: hipError_t hipDrvGetErrorString(hipError_t hipError, const char** errorString); + // CHECK: result = hipDrvGetErrorString(result_2, &ret); + result = cuGetErrorString(result_2, &ret); + return 0; } diff --git a/tests/unit_tests/synthetic/driver_structs.cu b/tests/unit_tests/synthetic/driver_structs.cu index 0b95d037..57f3f7e6 100644 --- a/tests/unit_tests/synthetic/driver_structs.cu +++ b/tests/unit_tests/synthetic/driver_structs.cu @@ -11,10 +11,6 @@ int main() { // CHECK-NEXT: HIP_ARRAY3D_DESCRIPTOR array3D; CUDA_ARRAY3D_DESCRIPTOR_st array3D_st; CUDA_ARRAY3D_DESCRIPTOR array3D; -#if CUDA_VERSION > 11020 - // CHECK: HIP_ARRAY3D_DESCRIPTOR array3D_v2; - CUDA_ARRAY3D_DESCRIPTOR_v2 array3D_v2; -#endif // CHECK: HIP_ARRAY_DESCRIPTOR array_descr_st; // CHECK-NEXT: HIP_ARRAY_DESCRIPTOR array_descr; @@ -26,76 +22,6 @@ int main() { CUDA_ARRAY_DESCRIPTOR_v1_st array_descr_v1_st; CUDA_ARRAY_DESCRIPTOR_v1 array_descr_v1; #undef __CUDA_API_VERSION_INTERNAL -#if CUDA_VERSION > 11020 - // CHECK: HIP_ARRAY_DESCRIPTOR array_descr_v2; - CUDA_ARRAY_DESCRIPTOR_v2 array_descr_v2; -#endif - -#if CUDA_VERSION > 9020 - // CHECK: hipExternalMemoryBufferDesc_st ext_mem_buff_st; - // CHECK-NEXT: hipExternalMemoryBufferDesc ext_mem_buff; - CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st ext_mem_buff_st; - CUDA_EXTERNAL_MEMORY_BUFFER_DESC ext_mem_buff; -#endif -#if CUDA_VERSION > 11020 - // CHECK: hipExternalMemoryBufferDesc ext_mem_buff_v1; - CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 ext_mem_buff_v1; -#endif - -#if CUDA_VERSION > 9020 - // CHECK: hipExternalMemoryHandleDesc_st ext_mem_handle_st; - // CHECK-NEXT: hipExternalMemoryHandleDesc ext_mem_handle; - CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st ext_mem_handle_st; - CUDA_EXTERNAL_MEMORY_HANDLE_DESC ext_mem_handle; -#endif -#if CUDA_VERSION > 11020 - // CHECK: hipExternalMemoryHandleDesc ext_mem_handle_v1; - CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 ext_mem_handle_v1; -#endif - -#if CUDA_VERSION > 9020 - // CHECK: hipExternalSemaphoreHandleDesc_st ext_sema_handle_st; - // CHECK-NEXT: hipExternalSemaphoreHandleDesc ext_sema_handle; - CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st ext_sema_handle_st; - CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC ext_sema_handle; -#endif -#if CUDA_VERSION > 11020 - // CHECK: hipExternalSemaphoreHandleDesc ext_sema_handle_v1; - CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 ext_sema_handle_v1; -#endif - -#if CUDA_VERSION > 9020 - // CHECK: hipExternalSemaphoreSignalParams_st ext_sema_params_st; - // CHECK-NEXT: hipExternalSemaphoreSignalParams ext_sema_params; - CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st ext_sema_params_st; - CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS ext_sema_params; -#endif -#if CUDA_VERSION > 11020 - // CHECK: hipExternalSemaphoreSignalParams ext_sema_params_v1; - CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 ext_sema_params_v1; -#endif - -#if CUDA_VERSION > 9020 - // CHECK: hipHostNodeParams host_node_params_st; - // CHECK-NEXT: hipHostNodeParams host_node_params; - CUDA_HOST_NODE_PARAMS_st host_node_params_st; - CUDA_HOST_NODE_PARAMS host_node_params; -#endif -#if CUDA_VERSION > 11020 - // CHECK: hipHostNodeParams host_node_params_v1; - CUDA_HOST_NODE_PARAMS_v1 host_node_params_v1; -#endif - -#if CUDA_VERSION > 9020 - // CHECK: hipKernelNodeParams kern_node_params_st; - // CHECK-NEXT: hipKernelNodeParams kern_node_params; - CUDA_KERNEL_NODE_PARAMS_st kern_node_params_st; - CUDA_KERNEL_NODE_PARAMS kern_node_params; -#endif -#if CUDA_VERSION > 11020 - // CHECK: hipKernelNodeParams kern_node_params_v1; - CUDA_KERNEL_NODE_PARAMS_v1 kern_node_params_v1; -#endif // CHECK: hip_Memcpy2D memcpy2D_st; // CHECK-NEXT: hip_Memcpy2D memcpy2D_v1_st; @@ -105,10 +31,6 @@ int main() { CUDA_MEMCPY2D_v1_st memcpy2D_v1_st; CUDA_MEMCPY2D memcpy2D; CUDA_MEMCPY2D_v1 memcpy2D_v1; -#if CUDA_VERSION > 11020 - // CHECK: hip_Memcpy2D memcpy2D_v2; - CUDA_MEMCPY2D_v2 memcpy2D_v2; -#endif // CHECK: HIP_MEMCPY3D memcpy3D_st; // CHECK-NEXT: HIP_MEMCPY3D memcpy3D_v1_st; @@ -118,46 +40,26 @@ int main() { CUDA_MEMCPY3D_v1_st memcpy3D_v1_st; CUDA_MEMCPY3D memcpy3D; CUDA_MEMCPY3D_v1 memcpy3D_v1; -#if CUDA_VERSION > 11020 - // CHECK: HIP_MEMCPY3D memcpy3D_v2; - CUDA_MEMCPY3D_v2 memcpy3D_v2; -#endif // CHECK: HIP_RESOURCE_DESC_st res_descr_st; // CHECK-NEXT: HIP_RESOURCE_DESC res_descr; CUDA_RESOURCE_DESC_st res_descr_st; CUDA_RESOURCE_DESC res_descr; -#if CUDA_VERSION > 11020 - // CHECK: HIP_RESOURCE_DESC res_descr_v1; - CUDA_RESOURCE_DESC_v1 res_descr_v1; -#endif // CHECK: HIP_RESOURCE_VIEW_DESC_st res_view_descr_st; // CHECK-NEXT: HIP_RESOURCE_VIEW_DESC res_view_descr; CUDA_RESOURCE_VIEW_DESC_st res_view_descr_st; CUDA_RESOURCE_VIEW_DESC res_view_descr; -#if CUDA_VERSION > 11020 - // CHECK: HIP_RESOURCE_VIEW_DESC res_view_descr_v1; - CUDA_RESOURCE_VIEW_DESC_v1 res_view_descr_v1; -#endif // CHECK: HIP_TEXTURE_DESC_st tex_descr_st; // CHECK-NEXT: HIP_TEXTURE_DESC tex_descr; CUDA_TEXTURE_DESC_st tex_descr_st; CUDA_TEXTURE_DESC tex_descr; -#if CUDA_VERSION > 11020 - // CHECK: HIP_TEXTURE_DESC tex_descr_v1; - CUDA_TEXTURE_DESC_v1 tex_descr_v1; -#endif // CHECK: hipIpcMemHandle_st ipc_mem_handle_st; // CHECK-NEXT: hipIpcMemHandle_t ipc_mem_handle; CUipcMemHandle_st ipc_mem_handle_st; CUipcMemHandle ipc_mem_handle; -#if CUDA_VERSION > 11020 - // CHECK: hipIpcMemHandle_t ipc_mem_handle_v1; - CUipcMemHandle_v1 ipc_mem_handle_v1; -#endif // CHECK: hipArray* array_st_ptr; // CHECK-NEXT: hipArray_t array_ptr; @@ -174,16 +76,6 @@ int main() { CUevent_st* evnt_st_ptr; CUevent evnt; -#if CUDA_VERSION > 9020 - // CHECK: hipExternalMemory_t ext_mem; - CUexternalMemory ext_mem; -#endif - -#if CUDA_VERSION > 9020 - // CHECK: hipExternalSemaphore_t ext_sema; - CUexternalSemaphore ext_sema; -#endif - // CHECK: ihipModuleSymbol_t* func_st_ptr; // CHECK-NEXT: hipFunction_t func; CUfunc_st* func_st_ptr; @@ -204,27 +96,73 @@ int main() { CUtexref_st* tex_ref_st_ptr; CUtexref tex_ref; -#if CUDA_VERSION > 9020 + // CHECK: hipGraphicsResource* graphicsResource_st; + // CHECK-NEXT: hipGraphicsResource_t graphicsResource; + CUgraphicsResource_st* graphicsResource_st; + CUgraphicsResource graphicsResource; + + // CHECK: hipUUID_t uuid_st; + CUuuid_st uuid_st; + +#if CUDA_VERSION >= 10000 + // CHECK: hipExternalMemoryBufferDesc_st ext_mem_buff_st; + // CHECK-NEXT: hipExternalMemoryBufferDesc ext_mem_buff; + CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st ext_mem_buff_st; + CUDA_EXTERNAL_MEMORY_BUFFER_DESC ext_mem_buff; + + // CHECK: hipExternalMemoryHandleDesc_st ext_mem_handle_st; + // CHECK-NEXT: hipExternalMemoryHandleDesc ext_mem_handle; + CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st ext_mem_handle_st; + CUDA_EXTERNAL_MEMORY_HANDLE_DESC ext_mem_handle; + + // CHECK: hipExternalSemaphoreHandleDesc_st ext_sema_handle_st; + // CHECK-NEXT: hipExternalSemaphoreHandleDesc ext_sema_handle; + CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st ext_sema_handle_st; + CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC ext_sema_handle; + + // CHECK: hipExternalSemaphoreSignalParams_st ext_sema_params_st; + // CHECK-NEXT: hipExternalSemaphoreSignalParams ext_sema_params; + CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st ext_sema_params_st; + CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS ext_sema_params; + + // CHECK: hipHostNodeParams host_node_params_st; + // CHECK-NEXT: hipHostNodeParams host_node_params; + CUDA_HOST_NODE_PARAMS_st host_node_params_st; + CUDA_HOST_NODE_PARAMS host_node_params; + + // CHECK: hipKernelNodeParams kern_node_params_st; + // CHECK-NEXT: hipKernelNodeParams kern_node_params; + CUDA_KERNEL_NODE_PARAMS_st kern_node_params_st; + CUDA_KERNEL_NODE_PARAMS kern_node_params; + + // CHECK: hipExternalMemory_t ext_mem; + CUexternalMemory ext_mem; + + // CHECK: hipExternalSemaphore_t ext_sema; + CUexternalSemaphore ext_sema; + // CHECK: ihipGraph* graph_st; // CHECK-NEXT: hipGraph_t graph; CUgraph_st* graph_st; CUgraph graph; -#endif -#if CUDA_VERSION > 9020 // CHECK: hipGraphExec* graphExec_st; // CHECK-NEXT: hipGraphExec_t graphExec; CUgraphExec_st* graphExec_st; CUgraphExec graphExec; #endif - // CHECK: hipGraphicsResource* graphicsResource_st; - // CHECK-NEXT: hipGraphicsResource_t graphicsResource; - CUgraphicsResource_st* graphicsResource_st; - CUgraphicsResource graphicsResource; +#if CUDA_VERSION >= 10020 + // CHECK: hipMemAccessDesc memAccessDesc_st; + // CHECK-NEXT: hipMemAccessDesc memAccessDesc; + CUmemAccessDesc_st memAccessDesc_st; + CUmemAccessDesc memAccessDesc; - // CHECK: hipUUID_t uuid_st; - CUuuid_st uuid_st; + // CHECK: hipMemAllocationProp memAllocationProp_st; + // CHECK-NEXT: hipMemAllocationProp memAllocationProp; + CUmemAllocationProp_st memAllocationProp_st; + CUmemAllocationProp memAllocationProp; +#endif #if CUDA_VERSION >= 11000 // CHECK: hipAccessPolicyWindow accessPolicyWindow_st; @@ -233,50 +171,29 @@ int main() { CUaccessPolicyWindow accessPolicyWindow; #endif +#if CUDA_VERSION >= 11010 + // CHECK: hipArrayMapInfo arrayMapInfo_st; + // CHECK-NEXT: hipArrayMapInfo arrayMapInfo; + CUarrayMapInfo_st arrayMapInfo_st; + CUarrayMapInfo arrayMapInfo; +#endif + #if CUDA_VERSION >= 11020 // CHECK: ihipMemPoolHandle_t* memPoolHandle_st; // CHECK-NEXT: hipMemPool_t memPool_t; CUmemPoolHandle_st* memPoolHandle_st; CUmemoryPool memPool_t; -#endif -#if CUDA_VERSION >= 10020 // CHECK: hipMemLocation memLocation_st; // CHECK-NEXT: hipMemLocation memLocation; CUmemLocation_st memLocation_st; CUmemLocation memLocation; -#endif -#if CUDA_VERSION >= 11030 - // CHECK: hipMemLocation memLocation_v1; - CUmemLocation_v1 memLocation_v1; -#endif - -#if CUDA_VERSION >= 10020 - // CHECK: hipMemAccessDesc memAccessDesc_st; - // CHECK-NEXT: hipMemAccessDesc memAccessDesc; - CUmemAccessDesc_st memAccessDesc_st; - CUmemAccessDesc memAccessDesc; -#endif - -#if CUDA_VERSION >= 11030 - // CHECK: hipMemAccessDesc memAccessDesc_v1; - CUmemAccessDesc_v1 memAccessDesc_v1; -#endif - -#if CUDA_VERSION >= 11020 // CHECK: hipMemPoolProps memPoolProps_st; // CHECK-NEXT: hipMemPoolProps memPoolProps; CUmemPoolProps_st memPoolProps_st; CUmemPoolProps memPoolProps; -#endif - -#if CUDA_VERSION >= 11030 - // CHECK: hipMemPoolProps memPoolProps_v1; - CUmemPoolProps_v1 memPoolProps_v1; -#endif -#if CUDA_VERSION >= 11020 // CHECK: hipMemPoolPtrExportData memPoolPtrExportData_st; // CHECK-NEXT: hipMemPoolPtrExportData memPoolPtrExportData; CUmemPoolPtrExportData_st memPoolPtrExportData_st; @@ -284,30 +201,68 @@ int main() { #endif #if CUDA_VERSION >= 11030 + // CHECK: HIP_ARRAY3D_DESCRIPTOR array3D_v2; + CUDA_ARRAY3D_DESCRIPTOR_v2 array3D_v2; + + // CHECK: HIP_ARRAY_DESCRIPTOR array_descr_v2; + CUDA_ARRAY_DESCRIPTOR_v2 array_descr_v2; + + // CHECK: hipExternalMemoryBufferDesc ext_mem_buff_v1; + CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 ext_mem_buff_v1; + + // CHECK: hipExternalMemoryHandleDesc ext_mem_handle_v1; + CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 ext_mem_handle_v1; + + // CHECK: hipExternalSemaphoreHandleDesc ext_sema_handle_v1; + CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 ext_sema_handle_v1; + + // CHECK: hipExternalSemaphoreSignalParams ext_sema_params_v1; + CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 ext_sema_params_v1; + + // CHECK: hipHostNodeParams host_node_params_v1; + CUDA_HOST_NODE_PARAMS_v1 host_node_params_v1; + + // CHECK: hipKernelNodeParams kern_node_params_v1; + CUDA_KERNEL_NODE_PARAMS_v1 kern_node_params_v1; + + // CHECK: hip_Memcpy2D memcpy2D_v2; + CUDA_MEMCPY2D_v2 memcpy2D_v2; + + // CHECK: HIP_MEMCPY3D memcpy3D_v2; + CUDA_MEMCPY3D_v2 memcpy3D_v2; + + // CHECK: HIP_RESOURCE_DESC res_descr_v1; + CUDA_RESOURCE_DESC_v1 res_descr_v1; + + // CHECK: HIP_RESOURCE_VIEW_DESC res_view_descr_v1; + CUDA_RESOURCE_VIEW_DESC_v1 res_view_descr_v1; + + // CHECK: HIP_TEXTURE_DESC tex_descr_v1; + CUDA_TEXTURE_DESC_v1 tex_descr_v1; + + // CHECK: hipIpcMemHandle_t ipc_mem_handle_v1; + CUipcMemHandle_v1 ipc_mem_handle_v1; + + // CHECK: hipMemLocation memLocation_v1; + CUmemLocation_v1 memLocation_v1; + + // CHECK: hipUserObject* userObject_st_ptr; + // CHECK-NEXT: hipUserObject_t userObject; + CUuserObject_st* userObject_st_ptr; + CUuserObject userObject; + + // CHECK: hipMemAccessDesc memAccessDesc_v1; + CUmemAccessDesc_v1 memAccessDesc_v1; + + // CHECK: hipMemPoolProps memPoolProps_v1; + CUmemPoolProps_v1 memPoolProps_v1; + // CHECK: hipMemPoolPtrExportData memPoolPtrExportData_v1; CUmemPoolPtrExportData_v1 memPoolPtrExportData_v1; -#endif -#if CUDA_VERSION >= 10020 - // CHECK: hipMemAllocationProp memAllocationProp_st; - // CHECK-NEXT: hipMemAllocationProp memAllocationProp; - CUmemAllocationProp_st memAllocationProp_st; - CUmemAllocationProp memAllocationProp; -#endif - -#if CUDA_VERSION >= 11030 // CHECK: hipMemAllocationProp memAllocationProp_v1; CUmemAllocationProp_v1 memAllocationProp_v1; -#endif -#if CUDA_VERSION >= 11010 - // CHECK: hipArrayMapInfo arrayMapInfo_st; - // CHECK-NEXT: hipArrayMapInfo arrayMapInfo; - CUarrayMapInfo_st arrayMapInfo_st; - CUarrayMapInfo arrayMapInfo; -#endif - -#if CUDA_VERSION >= 11030 // CHECK: hipArrayMapInfo arrayMapInfo_v1; CUarrayMapInfo_v1 arrayMapInfo_v1; #endif diff --git a/tests/unit_tests/synthetic/driver_typedefs.cu b/tests/unit_tests/synthetic/driver_typedefs.cu index 70a9205f..1b3b22c2 100644 --- a/tests/unit_tests/synthetic/driver_typedefs.cu +++ b/tests/unit_tests/synthetic/driver_typedefs.cu @@ -9,51 +9,49 @@ int main() { // CHECK: hipDevice_t device; CUdevice device; -#if CUDA_VERSION > 11020 - // CHECK: hipDevice_t device_v1; - CUdevice_v1 device_v1; -#endif // CHECK: hipDeviceptr_t deviceptr; // CHECK-NEXT: hipDeviceptr_t deviceptr_v1; CUdeviceptr deviceptr; CUdeviceptr_v1 deviceptr_v1; -#if CUDA_VERSION > 11020 - // CHECK: hipDeviceptr_t deviceptr_v2; - CUdeviceptr_v2 deviceptr_v2; -#endif - -#if CUDA_VERSION > 9020 - // CHECK: hipHostFn_t hostFn; - CUhostFn hostFn; -#endif // CHECK: hipStreamCallback_t streamCallback; CUstreamCallback streamCallback; // CHECK: hipSurfaceObject_t surfObject; CUsurfObject surfObject; -#if CUDA_VERSION > 11020 - // CHECK: hipSurfaceObject_t surfObject_v1; - CUsurfObject_v1 surfObject_v1; -#endif // CHECK: hipTextureObject_t texObject; CUtexObject texObject; -#if CUDA_VERSION > 11020 - // CHECK: hipTextureObject_t texObject_v1; - CUtexObject_v1 texObject_v1; -#endif // CHECK: hipUUID uuid; CUuuid uuid; -#if CUDA_VERSION > 10020 +#if CUDA_VERSION >= 10000 + // CHECK: hipHostFn_t hostFn; + CUhostFn hostFn; +#endif + +#if CUDA_VERSION >= 11000 // CHECK: hipMemGenericAllocationHandle_t memGenericAllocationHandle_t; CUmemGenericAllocationHandle memGenericAllocationHandle_t; #endif -#if CUDA_VERSION > 11030 +#if CUDA_VERSION >= 11030 + // CHECK: hipDevice_t device_v1; + CUdevice_v1 device_v1; + + // CHECK: hipDeviceptr_t deviceptr_v2; + CUdeviceptr_v2 deviceptr_v2; + + // CHECK: hipSurfaceObject_t surfObject_v1; + CUsurfObject_v1 surfObject_v1; + + // CHECK: hipTextureObject_t texObject_v1; + CUtexObject_v1 texObject_v1; +#endif + +#if CUDA_VERSION >= 11040 // CHECK: hipMemGenericAllocationHandle_t memGenericAllocationHandle_v1; CUmemGenericAllocationHandle_v1 memGenericAllocationHandle_v1; #endif diff --git a/tests/unit_tests/synthetic/libraries/cublas2hipblas.cu b/tests/unit_tests/synthetic/libraries/cublas2hipblas.cu index b8bdfd48..c4a38256 100644 --- a/tests/unit_tests/synthetic/libraries/cublas2hipblas.cu +++ b/tests/unit_tests/synthetic/libraries/cublas2hipblas.cu @@ -2,6 +2,7 @@ // CHECK: #include #include +#include // CHECK: #include "hipblas.h" // CHECK-NOT: #include "cublas_v2.h" #include "cublas.h" @@ -20,11 +21,6 @@ int main() { cublasOperation_t BLAS_OP_T = CUBLAS_OP_T; cublasOperation_t BLAS_OP_C = CUBLAS_OP_C; -#if CUDA_VERSION >= 10010 - // CHECK: hipblasOperation_t BLAS_OP_HERMITAN = HIPBLAS_OP_C; - cublasOperation_t BLAS_OP_HERMITAN = CUBLAS_OP_HERMITAN; -#endif - // CHECK: hipblasStatus_t blasStatus; // CHECK-NEXT: hipblasStatus_t blasStatus_t; // CHECK-NEXT: hipblasStatus_t BLAS_STATUS_SUCCESS = HIPBLAS_STATUS_SUCCESS; @@ -55,11 +51,6 @@ int main() { cublasFillMode_t BLAS_FILL_MODE_LOWER = CUBLAS_FILL_MODE_LOWER; cublasFillMode_t BLAS_FILL_MODE_UPPER = CUBLAS_FILL_MODE_UPPER; -#if CUDA_VERSION >= 10010 - // CHECK: hipblasFillMode_t BLAS_FILL_MODE_FULL = HIPBLAS_FILL_MODE_FULL; - cublasFillMode_t BLAS_FILL_MODE_FULL = CUBLAS_FILL_MODE_FULL; -#endif - // CHECK: hipblasDiagType_t blasDiagType; // CHECK-NEXT: hipblasDiagType_t BLAS_DIAG_NON_UNIT = HIPBLAS_DIAG_NON_UNIT; // CHECK-NEXT: hipblasDiagType_t BLAS_DIAG_UNIT = HIPBLAS_DIAG_UNIT; @@ -88,67 +79,9 @@ int main() { cublasAtomicsMode_t BLAS_ATOMICS_NOT_ALLOWED = CUBLAS_ATOMICS_NOT_ALLOWED; cublasAtomicsMode_t BLAS_ATOMICS_ALLOWED = CUBLAS_ATOMICS_ALLOWED; -#if CUDA_VERSION >= 8000 - // CHECK: hipblasDatatype_t DataType; - // CHECK-NEXT: hipblasDatatype_t DataType_t; - // CHECK-NEXT: hipblasDatatype_t blasDataType; - // CHECK-NEXT: hipblasDatatype_t R_16F = HIPBLAS_R_16F; - // CHECK-NEXT: hipblasDatatype_t C_16F = HIPBLAS_C_16F; - // CHECK-NEXT: hipblasDatatype_t R_32F = HIPBLAS_R_32F; - // CHECK-NEXT: hipblasDatatype_t C_32F = HIPBLAS_C_32F; - // CHECK-NEXT: hipblasDatatype_t R_64F = HIPBLAS_R_64F; - // CHECK-NEXT: hipblasDatatype_t C_64F = HIPBLAS_C_64F; - // CHECK-NEXT: hipblasDatatype_t R_8I = HIPBLAS_R_8I; - // CHECK-NEXT: hipblasDatatype_t C_8I = HIPBLAS_C_8I; - // CHECK-NEXT: hipblasDatatype_t R_8U = HIPBLAS_R_8U; - // CHECK-NEXT: hipblasDatatype_t C_8U = HIPBLAS_C_8U; - // CHECK-NEXT: hipblasDatatype_t R_32I = HIPBLAS_R_32I; - // CHECK-NEXT: hipblasDatatype_t C_32I = HIPBLAS_C_32I; - // CHECK-NEXT: hipblasDatatype_t R_32U = HIPBLAS_R_32U; - // CHECK-NEXT: hipblasDatatype_t C_32U = HIPBLAS_C_32U; - cudaDataType DataType; - cudaDataType_t DataType_t; - cublasDataType_t blasDataType; - cublasDataType_t R_16F = CUDA_R_16F; - cublasDataType_t C_16F = CUDA_C_16F; - cublasDataType_t R_32F = CUDA_R_32F; - cublasDataType_t C_32F = CUDA_C_32F; - cublasDataType_t R_64F = CUDA_R_64F; - cublasDataType_t C_64F = CUDA_C_64F; - cublasDataType_t R_8I = CUDA_R_8I; - cublasDataType_t C_8I = CUDA_C_8I; - cublasDataType_t R_8U = CUDA_R_8U; - cublasDataType_t C_8U = CUDA_C_8U; - cublasDataType_t R_32I = CUDA_R_32I; - cublasDataType_t C_32I = CUDA_C_32I; - cublasDataType_t R_32U = CUDA_R_32U; - cublasDataType_t C_32U = CUDA_C_32U; -#endif - -#if CUDA_VERSION >= 11000 - // CHECK: hipblasDatatype_t R_16BF = HIPBLAS_R_16B; - // CHECK-NEXT: hipblasDatatype_t C_16BF = HIPBLAS_C_16B; - cublasDataType_t R_16BF = CUDA_R_16BF; - cublasDataType_t C_16BF = CUDA_C_16BF; -#endif - -#if CUDA_VERSION >= 8000 - // CHECK: hipblasGemmAlgo_t blasGemmAlgo; - // CHECK-NEXT: hipblasGemmAlgo_t BLAS_GEMM_DFALT = HIPBLAS_GEMM_DEFAULT; - cublasGemmAlgo_t blasGemmAlgo; - cublasGemmAlgo_t BLAS_GEMM_DFALT = CUBLAS_GEMM_DFALT; -#endif - -#if CUDA_VERSION >= 9000 - // CHECK: hipblasGemmAlgo_t BLAS_GEMM_DEFAULT = HIPBLAS_GEMM_DEFAULT; - cublasGemmAlgo_t BLAS_GEMM_DEFAULT = CUBLAS_GEMM_DEFAULT; -#endif - // CHECK: hipblasHandle_t blasHandle; cublasHandle_t blasHandle; -// Functions - // CUDA: CUBLASAPI cublasStatus_t CUBLASWINAPI cublasGetAtomicsMode(cublasHandle_t handle, cublasAtomicsMode_t* mode); // HIP: HIPBLAS_EXPORT hipblasStatus_t hipblasGetAtomicsMode(hipblasHandle_t handle, hipblasAtomicsMode_t* atomics_mode); // CHECK: blasStatus = hipblasGetAtomicsMode(blasHandle, &blasAtomicsMode); @@ -261,8 +194,6 @@ int main() { // CHECK: blasStatus = hipblasGetMatrixAsync(rows, cols, num, image, incx, image_2, incy, stream); blasStatus = cublasGetMatrixAsync(rows, cols, num, image, incx, image_2, incy, stream); - cudaDataType DataType_2, DataType_3; - float fx = 0; float fy = 0; float fresult = 0; @@ -304,13 +235,6 @@ int main() { blasStatus = cublasDznrm2(blasHandle, n, &dcomplex, incx, &dresult); blasStatus = cublasDznrm2_v2(blasHandle, n, &dcomplex, incx, &dresult); -#if CUDA_VERSION >= 8000 - // CUDA: CUBLASAPI cublasStatus_t CUBLASWINAPI cublasNrm2Ex(cublasHandle_t handle, int n, const void* x, cudaDataType xType, int incx, void* result, cudaDataType resultType, cudaDataType executionType); - // HIP: HIPBLAS_EXPORT hipblasStatus_t hipblasNrm2Ex(hipblasHandle_t handle, int n, const void* x, hipblasDatatype_t xType, int incx, void* result, hipblasDatatype_t resultType, hipblasDatatype_t executionType); - // CHECK: blasStatus = hipblasNrm2Ex(blasHandle, n, image, DataType, incx, image_2, DataType_2, DataType_3); - blasStatus = cublasNrm2Ex(blasHandle, n, image, DataType, incx, image_2, DataType_2, DataType_3); -#endif - // CUDA: CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSdot_v2(cublasHandle_t handle, int n, const float* x, int incx, const float* y, int incy, float* result); // HIP: HIPBLAS_EXPORT hipblasStatus_t hipblasSdot(hipblasHandle_t handle, int n, const float* x, int incx, const float* y, int incy, float* result); // CHECK: blasStatus = hipblasSdot(blasHandle, n, &fx, incx, &fy, incy, &fresult); @@ -395,5 +319,75 @@ int main() { blasStatus = cublasZdscal(blasHandle, n, &dx, &dcomplex, incx); blasStatus = cublasZdscal_v2(blasHandle, n, &dx, &dcomplex, incx); +#if CUDA_VERSION >= 8000 + // CHECK: hipblasDatatype_t DataType; + // CHECK-NEXT: hipblasDatatype_t DataType_t; + // CHECK-NEXT: hipblasDatatype_t blasDataType; + // CHECK-NEXT: hipblasDatatype_t R_16F = HIPBLAS_R_16F; + // CHECK-NEXT: hipblasDatatype_t C_16F = HIPBLAS_C_16F; + // CHECK-NEXT: hipblasDatatype_t R_32F = HIPBLAS_R_32F; + // CHECK-NEXT: hipblasDatatype_t C_32F = HIPBLAS_C_32F; + // CHECK-NEXT: hipblasDatatype_t R_64F = HIPBLAS_R_64F; + // CHECK-NEXT: hipblasDatatype_t C_64F = HIPBLAS_C_64F; + // CHECK-NEXT: hipblasDatatype_t R_8I = HIPBLAS_R_8I; + // CHECK-NEXT: hipblasDatatype_t C_8I = HIPBLAS_C_8I; + // CHECK-NEXT: hipblasDatatype_t R_8U = HIPBLAS_R_8U; + // CHECK-NEXT: hipblasDatatype_t C_8U = HIPBLAS_C_8U; + // CHECK-NEXT: hipblasDatatype_t R_32I = HIPBLAS_R_32I; + // CHECK-NEXT: hipblasDatatype_t C_32I = HIPBLAS_C_32I; + // CHECK-NEXT: hipblasDatatype_t R_32U = HIPBLAS_R_32U; + // CHECK-NEXT: hipblasDatatype_t C_32U = HIPBLAS_C_32U; + cudaDataType DataType; + cudaDataType_t DataType_t; + cublasDataType_t blasDataType; + cublasDataType_t R_16F = CUDA_R_16F; + cublasDataType_t C_16F = CUDA_C_16F; + cublasDataType_t R_32F = CUDA_R_32F; + cublasDataType_t C_32F = CUDA_C_32F; + cublasDataType_t R_64F = CUDA_R_64F; + cublasDataType_t C_64F = CUDA_C_64F; + cublasDataType_t R_8I = CUDA_R_8I; + cublasDataType_t C_8I = CUDA_C_8I; + cublasDataType_t R_8U = CUDA_R_8U; + cublasDataType_t C_8U = CUDA_C_8U; + cublasDataType_t R_32I = CUDA_R_32I; + cublasDataType_t C_32I = CUDA_C_32I; + cublasDataType_t R_32U = CUDA_R_32U; + cublasDataType_t C_32U = CUDA_C_32U; + + // CHECK: hipblasDatatype_t DataType_2, DataType_3; + cudaDataType DataType_2, DataType_3; + + // CHECK: hipblasGemmAlgo_t blasGemmAlgo; + // CHECK-NEXT: hipblasGemmAlgo_t BLAS_GEMM_DFALT = HIPBLAS_GEMM_DEFAULT; + cublasGemmAlgo_t blasGemmAlgo; + cublasGemmAlgo_t BLAS_GEMM_DFALT = CUBLAS_GEMM_DFALT; + + // CUDA: CUBLASAPI cublasStatus_t CUBLASWINAPI cublasNrm2Ex(cublasHandle_t handle, int n, const void* x, cudaDataType xType, int incx, void* result, cudaDataType resultType, cudaDataType executionType); + // HIP: HIPBLAS_EXPORT hipblasStatus_t hipblasNrm2Ex(hipblasHandle_t handle, int n, const void* x, hipblasDatatype_t xType, int incx, void* result, hipblasDatatype_t resultType, hipblasDatatype_t executionType); + // CHECK: blasStatus = hipblasNrm2Ex(blasHandle, n, image, DataType, incx, image_2, DataType_2, DataType_3); + blasStatus = cublasNrm2Ex(blasHandle, n, image, DataType, incx, image_2, DataType_2, DataType_3); +#endif + +#if CUDA_VERSION >= 9000 + // CHECK: hipblasGemmAlgo_t BLAS_GEMM_DEFAULT = HIPBLAS_GEMM_DEFAULT; + cublasGemmAlgo_t BLAS_GEMM_DEFAULT = CUBLAS_GEMM_DEFAULT; +#endif + +#if CUDA_VERSION >= 10010 + // CHECK: hipblasOperation_t BLAS_OP_HERMITAN = HIPBLAS_OP_C; + cublasOperation_t BLAS_OP_HERMITAN = CUBLAS_OP_HERMITAN; + + // CHECK: hipblasFillMode_t BLAS_FILL_MODE_FULL = HIPBLAS_FILL_MODE_FULL; + cublasFillMode_t BLAS_FILL_MODE_FULL = CUBLAS_FILL_MODE_FULL; +#endif + +#if CUDA_VERSION >= 11000 + // CHECK: hipblasDatatype_t R_16BF = HIPBLAS_R_16B; + // CHECK-NEXT: hipblasDatatype_t C_16BF = HIPBLAS_C_16B; + cublasDataType_t R_16BF = CUDA_R_16BF; + cublasDataType_t C_16BF = CUDA_C_16BF; +#endif + return 0; } diff --git a/tests/unit_tests/synthetic/runtime_defines.cu b/tests/unit_tests/synthetic/runtime_defines.cu index c1e6b847..60264728 100644 --- a/tests/unit_tests/synthetic/runtime_defines.cu +++ b/tests/unit_tests/synthetic/runtime_defines.cu @@ -88,19 +88,19 @@ int main() { int StreamNonBlocking = cudaStreamNonBlocking; cudaStream_t StreamPerThread = cudaStreamPerThread; -#if CUDA_VERSION > 7000 +#if CUDA_VERSION >= 7050 // CHECK: int HostRegisterIoMemory = hipHostRegisterIoMemory; int HostRegisterIoMemory = cudaHostRegisterIoMemory; #endif -#if CUDA_VERSION > 7050 +#if CUDA_VERSION >= 8000 // CHECK: int CpuDeviceId = hipCpuDeviceId; // CHECK-NEXT: int InvalidDeviceId = hipInvalidDeviceId; int CpuDeviceId = cudaCpuDeviceId; int InvalidDeviceId = cudaInvalidDeviceId; #endif -#if CUDA_VERSION > 8000 +#if CUDA_VERSION >= 9000 // CHECK: int CooperativeLaunchMultiDeviceNoPreSync = hipCooperativeLaunchMultiDeviceNoPreSync; // CHECK-NEXT: int CooperativeLaunchMultiDeviceNoPostSync = hipCooperativeLaunchMultiDeviceNoPostSync; int CooperativeLaunchMultiDeviceNoPreSync = cudaCooperativeLaunchMultiDeviceNoPreSync; diff --git a/tests/unit_tests/synthetic/runtime_enums.cu b/tests/unit_tests/synthetic/runtime_enums.cu index 08694116..55f4fa47 100644 --- a/tests/unit_tests/synthetic/runtime_enums.cu +++ b/tests/unit_tests/synthetic/runtime_enums.cu @@ -191,59 +191,6 @@ int main() { cudaDeviceAttr DevAttrManagedMemory = cudaDevAttrManagedMemory; cudaDeviceAttr DevAttrIsMultiGpuBoard = cudaDevAttrIsMultiGpuBoard; cudaDeviceAttr DevAttrMultiGpuBoardGroupID = cudaDevAttrMultiGpuBoardGroupID; -#if CUDA_VERSION > 7050 - // CHECK: hipDeviceAttribute_t DevAttrHostNativeAtomicSupported = hipDeviceAttributeHostNativeAtomicSupported; - // CHECK-NEXT: hipDeviceAttribute_t DevAttrSingleToDoublePrecisionPerfRatio = hipDeviceAttributeSingleToDoublePrecisionPerfRatio; - // CHECK-NEXT: hipDeviceAttribute_t DevAttrPageableMemoryAccess = hipDeviceAttributePageableMemoryAccess; - // CHECK-NEXT: hipDeviceAttribute_t DevAttrConcurrentManagedAccess = hipDeviceAttributeConcurrentManagedAccess; - // CHECK-NEXT: hipDeviceAttribute_t DevAttrComputePreemptionSupported = hipDeviceAttributeComputePreemptionSupported; - // CHECK-NEXT: hipDeviceAttribute_t DevAttrCanUseHostPointerForRegisteredMem = hipDeviceAttributeCanUseHostPointerForRegisteredMem; - cudaDeviceAttr DevAttrHostNativeAtomicSupported = cudaDevAttrHostNativeAtomicSupported; - cudaDeviceAttr DevAttrSingleToDoublePrecisionPerfRatio = cudaDevAttrSingleToDoublePrecisionPerfRatio; - cudaDeviceAttr DevAttrPageableMemoryAccess = cudaDevAttrPageableMemoryAccess; - cudaDeviceAttr DevAttrConcurrentManagedAccess = cudaDevAttrConcurrentManagedAccess; - cudaDeviceAttr DevAttrComputePreemptionSupported = cudaDevAttrComputePreemptionSupported; - cudaDeviceAttr DevAttrCanUseHostPointerForRegisteredMem = cudaDevAttrCanUseHostPointerForRegisteredMem; -#endif -#if CUDA_VERSION > 8000 - // CHECK: hipDeviceAttribute_t DevAttrReserved94 = hipDeviceAttributeCanUseStreamWaitValue; - // CHECK-NEXT: hipDeviceAttribute_t DevAttrCooperativeLaunch = hipDeviceAttributeCooperativeLaunch; - // CHECK-NEXT: hipDeviceAttribute_t DevAttrCooperativeMultiDeviceLaunch = hipDeviceAttributeCooperativeMultiDeviceLaunch; - // CHECK-NEXT: hipDeviceAttribute_t DevAttrMaxSharedMemoryPerBlockOptin = hipDeviceAttributeSharedMemPerBlockOptin; - cudaDeviceAttr DevAttrReserved94 = cudaDevAttrReserved94; - cudaDeviceAttr DevAttrCooperativeLaunch = cudaDevAttrCooperativeLaunch; - cudaDeviceAttr DevAttrCooperativeMultiDeviceLaunch = cudaDevAttrCooperativeMultiDeviceLaunch; - cudaDeviceAttr DevAttrMaxSharedMemoryPerBlockOptin = cudaDevAttrMaxSharedMemoryPerBlockOptin; -#endif -#if CUDA_VERSION > 9010 - // CHECK: hipDeviceAttribute_t DevAttrPageableMemoryAccessUsesHostPageTables = hipDeviceAttributePageableMemoryAccessUsesHostPageTables; - // CHECK-NEXT: hipDeviceAttribute_t DevAttrDirectManagedMemAccessFromHost = hipDeviceAttributeDirectManagedMemAccessFromHost; - cudaDeviceAttr DevAttrPageableMemoryAccessUsesHostPageTables = cudaDevAttrPageableMemoryAccessUsesHostPageTables; - cudaDeviceAttr DevAttrDirectManagedMemAccessFromHost = cudaDevAttrDirectManagedMemAccessFromHost; -#endif -#if CUDA_VERSION > 10020 - // CHECK: hipDeviceAttribute_t DevAttrMaxBlocksPerMultiprocessor = hipDeviceAttributeMaxBlocksPerMultiprocessor; - cudaDeviceAttr DevAttrMaxBlocksPerMultiprocessor = cudaDevAttrMaxBlocksPerMultiprocessor; -#endif -#if CUDA_VERSION >= 11020 - // CHECK: hipDeviceAttribute_t DevAttrMemoryPoolsSupported = hipDeviceAttributeMemoryPoolsSupported; - cudaDeviceAttr DevAttrMemoryPoolsSupported = cudaDevAttrMemoryPoolsSupported; -#endif - -#if CUDA_VERSION > 7050 - // CHECK: hipDeviceP2PAttr DeviceP2PAttr; - // CHECK-NEXT: hipDeviceP2PAttr DevP2PAttrPerformanceRank = hipDevP2PAttrPerformanceRank; - // CHECK-NEXT: hipDeviceP2PAttr DevP2PAttrAccessSupported = hipDevP2PAttrAccessSupported; - // CHECK-NEXT: hipDeviceP2PAttr DevP2PAttrNativeAtomicSupported = hipDevP2PAttrNativeAtomicSupported; - cudaDeviceP2PAttr DeviceP2PAttr; - cudaDeviceP2PAttr DevP2PAttrPerformanceRank = cudaDevP2PAttrPerformanceRank; - cudaDeviceP2PAttr DevP2PAttrAccessSupported = cudaDevP2PAttrAccessSupported; - cudaDeviceP2PAttr DevP2PAttrNativeAtomicSupported = cudaDevP2PAttrNativeAtomicSupported; -#endif -#if CUDA_VERSION > 9010 - // CHECK: hipDeviceP2PAttr DevP2PAttrCudaArrayAccessSupported = hipDevP2PAttrHipArrayAccessSupported; - cudaDeviceP2PAttr DevP2PAttrCudaArrayAccessSupported = cudaDevP2PAttrCudaArrayAccessSupported; -#endif // CHECK: hipError_t Error; // CHECK-NEXT: hipError_t Error_t; @@ -341,108 +288,10 @@ int main() { cudaError_t ErrorHostMemoryNotRegistered = cudaErrorHostMemoryNotRegistered; cudaError_t ErrorLaunchFailure = cudaErrorLaunchFailure; cudaError_t ErrorNotSupported = cudaErrorNotSupported; -#if CUDA_VERSION > 8000 - // CHECK: hipError_t ErrorCooperativeLaunchTooLarge = hipErrorCooperativeLaunchTooLarge; - cudaError_t ErrorCooperativeLaunchTooLarge = cudaErrorCooperativeLaunchTooLarge; -#endif -#if CUDA_VERSION > 9020 - // CHECK: hipError_t ErrorStreamCaptureUnsupported = hipErrorStreamCaptureUnsupported; - // CHECK-NEXT: hipError_t ErrorStreamCaptureInvalidated = hipErrorStreamCaptureInvalidated; - // CHECK-NEXT: hipError_t ErrorStreamCaptureMerge = hipErrorStreamCaptureMerge; - // CHECK-NEXT: hipError_t ErrorStreamCaptureUnmatched = hipErrorStreamCaptureUnmatched; - // CHECK-NEXT: hipError_t ErrorStreamCaptureUnjoined = hipErrorStreamCaptureUnjoined; - // CHECK-NEXT: hipError_t ErrorStreamCaptureIsolation = hipErrorStreamCaptureIsolation; - // CHECK-NEXT: hipError_t ErrorStreamCaptureImplicit = hipErrorStreamCaptureImplicit; - // CHECK-NEXT: hipError_t ErrorCapturedEvent = hipErrorCapturedEvent; - // CHECK-NEXT: hipError_t ErrorIllegalState = hipErrorIllegalState; - cudaError_t ErrorStreamCaptureUnsupported = cudaErrorStreamCaptureUnsupported; - cudaError_t ErrorStreamCaptureInvalidated = cudaErrorStreamCaptureInvalidated; - cudaError_t ErrorStreamCaptureMerge = cudaErrorStreamCaptureMerge; - cudaError_t ErrorStreamCaptureUnmatched = cudaErrorStreamCaptureUnmatched; - cudaError_t ErrorStreamCaptureUnjoined = cudaErrorStreamCaptureUnjoined; - cudaError_t ErrorStreamCaptureIsolation = cudaErrorStreamCaptureIsolation; - cudaError_t ErrorStreamCaptureImplicit = cudaErrorStreamCaptureImplicit; - cudaError_t ErrorCapturedEvent = cudaErrorCapturedEvent; - cudaError_t ErrorIllegalState = cudaErrorIllegalState; -#endif -#if CUDA_VERSION > 10000 - // CHECK: hipError_t ErrorArrayIsMapped = hipErrorArrayIsMapped; - // CHECK-NEXT: hipError_t ErrorAlreadyMapped = hipErrorAlreadyMapped; - // CHECK-NEXT: hipError_t ErrorAlreadyAcquired = hipErrorAlreadyAcquired; - // CHECK-NEXT: hipError_t ErrorNotMapped = hipErrorNotMapped; - // CHECK-NEXT: hipError_t ErrorNotMappedAsArray = hipErrorNotMappedAsArray; - // CHECK-NEXT: hipError_t ErrorNotMappedAsPointer = hipErrorNotMappedAsPointer; - // CHECK-NEXT: hipError_t ErrorInvalidSource = hipErrorInvalidSource; - // CHECK-NEXT: hipError_t ErrorFileNotFound = hipErrorFileNotFound; - // CHECK-NEXT: hipError_t ErrorSymbolNotFound = hipErrorNotFound; - // CHECK-NEXT: hipError_t ErrorContextIsDestroyed = hipErrorContextIsDestroyed; - // CHECK-NEXT: hipError_t ErrorStreamCaptureWrongThread = hipErrorStreamCaptureWrongThread; - cudaError_t ErrorArrayIsMapped = cudaErrorArrayIsMapped; - cudaError_t ErrorAlreadyMapped = cudaErrorAlreadyMapped; - cudaError_t ErrorAlreadyAcquired = cudaErrorAlreadyAcquired; - cudaError_t ErrorNotMapped = cudaErrorNotMapped; - cudaError_t ErrorNotMappedAsArray = cudaErrorNotMappedAsArray; - cudaError_t ErrorNotMappedAsPointer = cudaErrorNotMappedAsPointer; - cudaError_t ErrorInvalidSource = cudaErrorInvalidSource; - cudaError_t ErrorFileNotFound = cudaErrorFileNotFound; - cudaError_t ErrorSymbolNotFound = cudaErrorSymbolNotFound; - cudaError_t ErrorContextIsDestroyed = cudaErrorContextIsDestroyed; - cudaError_t ErrorStreamCaptureWrongThread = cudaErrorStreamCaptureWrongThread; -#endif -#if CUDA_VERSION > 10010 - // CHECK: hipError_t ErrorDeviceUninitialized = hipErrorInvalidContext; - // CHECK: hipError_t ErrorGraphExecUpdateFailure = hipErrorGraphExecUpdateFailure; - cudaError_t ErrorDeviceUninitialized = cudaErrorDeviceUninitialized; - cudaError_t ErrorGraphExecUpdateFailure = cudaErrorGraphExecUpdateFailure; -#endif + // CHECK: hipError_t ErrorUnknown = hipErrorUnknown; cudaError_t ErrorUnknown = cudaErrorUnknown; -#if CUDA_VERSION > 9020 - // CHECK: hipExternalMemoryHandleType ExternalMemoryHandleType; - // CHECK-NEXT: hipExternalMemoryHandleType ExternalMemoryHandleTypeOpaqueFd = hipExternalMemoryHandleTypeOpaqueFd; - // CHECK-NEXT: hipExternalMemoryHandleType ExternalMemoryHandleTypeOpaqueWin32 = hipExternalMemoryHandleTypeOpaqueWin32; - // CHECK-NEXT: hipExternalMemoryHandleType ExternalMemoryHandleTypeOpaqueWin32Kmt = hipExternalMemoryHandleTypeOpaqueWin32Kmt; - // CHECK-NEXT: hipExternalMemoryHandleType ExternalMemoryHandleTypeD3D12Heap = hipExternalMemoryHandleTypeD3D12Heap; - // CHECK-NEXT: hipExternalMemoryHandleType ExternalMemoryHandleTypeD3D12Resource = hipExternalMemoryHandleTypeD3D12Resource; - cudaExternalMemoryHandleType ExternalMemoryHandleType; - cudaExternalMemoryHandleType ExternalMemoryHandleTypeOpaqueFd = cudaExternalMemoryHandleTypeOpaqueFd; - cudaExternalMemoryHandleType ExternalMemoryHandleTypeOpaqueWin32 = cudaExternalMemoryHandleTypeOpaqueWin32; - cudaExternalMemoryHandleType ExternalMemoryHandleTypeOpaqueWin32Kmt = cudaExternalMemoryHandleTypeOpaqueWin32Kmt; - cudaExternalMemoryHandleType ExternalMemoryHandleTypeD3D12Heap = cudaExternalMemoryHandleTypeD3D12Heap; - cudaExternalMemoryHandleType ExternalMemoryHandleTypeD3D12Resource = cudaExternalMemoryHandleTypeD3D12Resource; -#endif -#if CUDA_VERSION > 10010 - // CHECK: hipExternalMemoryHandleType ExternalMemoryHandleTypeD3D11Resource = hipExternalMemoryHandleTypeD3D11Resource; - // CHECK-NEXT: hipExternalMemoryHandleType ExternalMemoryHandleTypeD3D11ResourceKmt = hipExternalMemoryHandleTypeD3D11ResourceKmt; - cudaExternalMemoryHandleType ExternalMemoryHandleTypeD3D11Resource = cudaExternalMemoryHandleTypeD3D11Resource; - cudaExternalMemoryHandleType ExternalMemoryHandleTypeD3D11ResourceKmt = cudaExternalMemoryHandleTypeD3D11ResourceKmt; -#endif - -#if CUDA_VERSION > 9020 - // CHECK: hipExternalSemaphoreHandleType ExternalSemaphoreHandleType; - // CHECK-NEXT: hipExternalSemaphoreHandleType ExternalSemaphoreHandleTypeOpaqueFd = hipExternalSemaphoreHandleTypeOpaqueFd; - // CHECK-NEXT: hipExternalSemaphoreHandleType ExternalSemaphoreHandleTypeOpaqueWin32 = hipExternalSemaphoreHandleTypeOpaqueWin32; - // CHECK-NEXT: hipExternalSemaphoreHandleType ExternalSemaphoreHandleTypeOpaqueWin32Kmt = hipExternalSemaphoreHandleTypeOpaqueWin32Kmt; - // CHECK-NEXT: hipExternalSemaphoreHandleType ExternalSemaphoreHandleTypeD3D12Fence = hipExternalSemaphoreHandleTypeD3D12Fence; - cudaExternalSemaphoreHandleType ExternalSemaphoreHandleType; - cudaExternalSemaphoreHandleType ExternalSemaphoreHandleTypeOpaqueFd = cudaExternalSemaphoreHandleTypeOpaqueFd; - cudaExternalSemaphoreHandleType ExternalSemaphoreHandleTypeOpaqueWin32 = cudaExternalSemaphoreHandleTypeOpaqueWin32; - cudaExternalSemaphoreHandleType ExternalSemaphoreHandleTypeOpaqueWin32Kmt = cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt; - cudaExternalSemaphoreHandleType ExternalSemaphoreHandleTypeD3D12Fence = cudaExternalSemaphoreHandleTypeD3D12Fence; -#endif - -#if CUDA_VERSION > 8000 - // CHECK: hipFuncAttribute FuncAttribute; - // CHECK-NEXT: hipFuncAttribute FuncAttributeMaxDynamicSharedMemorySize = hipFuncAttributeMaxDynamicSharedMemorySize; - // CHECK-NEXT: hipFuncAttribute FuncAttributePreferredSharedMemoryCarveout = hipFuncAttributePreferredSharedMemoryCarveout; - // CHECK-NEXT: hipFuncAttribute FuncAttributeMax = hipFuncAttributeMax; - cudaFuncAttribute FuncAttribute; - cudaFuncAttribute FuncAttributeMaxDynamicSharedMemorySize = cudaFuncAttributeMaxDynamicSharedMemorySize; - cudaFuncAttribute FuncAttributePreferredSharedMemoryCarveout = cudaFuncAttributePreferredSharedMemoryCarveout; - cudaFuncAttribute FuncAttributeMax = cudaFuncAttributeMax; -#endif - // CHECK: hipFuncCache_t FuncCache; // CHECK-NEXT: hipFuncCache_t FuncCachePreferNone = hipFuncCachePreferNone; // CHECK-NEXT: hipFuncCache_t FuncCachePreferShared = hipFuncCachePreferShared; @@ -467,60 +316,12 @@ int main() { cudaGraphicsRegisterFlags GraphicsRegisterFlagsSurfaceLoadStore = cudaGraphicsRegisterFlagsSurfaceLoadStore; cudaGraphicsRegisterFlags GraphicsRegisterFlagsTextureGather = cudaGraphicsRegisterFlagsTextureGather; -#if CUDA_VERSION > 9020 - // CHECK: hipGraphNodeType GraphNodeType; - // CHECK-NEXT: hipGraphNodeType GraphNodeTypeKernel = hipGraphNodeTypeKernel; - // CHECK-NEXT: hipGraphNodeType GraphNodeTypeMemcpy = hipGraphNodeTypeMemcpy; - // CHECK-NEXT: hipGraphNodeType GraphNodeTypeMemset = hipGraphNodeTypeMemset; - // CHECK-NEXT: hipGraphNodeType GraphNodeTypeHost = hipGraphNodeTypeHost; - // CHECK-NEXT: hipGraphNodeType GraphNodeTypeGraph = hipGraphNodeTypeGraph; - // CHECK-NEXT: hipGraphNodeType GraphNodeTypeEmpty = hipGraphNodeTypeEmpty; - cudaGraphNodeType GraphNodeType; - cudaGraphNodeType GraphNodeTypeKernel = cudaGraphNodeTypeKernel; - cudaGraphNodeType GraphNodeTypeMemcpy = cudaGraphNodeTypeMemcpy; - cudaGraphNodeType GraphNodeTypeMemset = cudaGraphNodeTypeMemset; - cudaGraphNodeType GraphNodeTypeHost = cudaGraphNodeTypeHost; - cudaGraphNodeType GraphNodeTypeGraph = cudaGraphNodeTypeGraph; - cudaGraphNodeType GraphNodeTypeEmpty = cudaGraphNodeTypeEmpty; -#endif -#if CUDA_VERSION > 11000 - // CHECK: hipGraphNodeType GraphNodeTypeWaitEvent = hipGraphNodeTypeWaitEvent; - // CHECK-NEXT: hipGraphNodeType GraphNodeTypeEventRecord = hipGraphNodeTypeEventRecord; - cudaGraphNodeType GraphNodeTypeWaitEvent = cudaGraphNodeTypeWaitEvent; - cudaGraphNodeType GraphNodeTypeEventRecord = cudaGraphNodeTypeEventRecord; -#endif -#if CUDA_VERSION > 9020 - // CHECK: hipGraphNodeType GraphNodeTypeCount = hipGraphNodeTypeCount; - cudaGraphNodeType GraphNodeTypeCount = cudaGraphNodeTypeCount; -#endif - -#if CUDA_VERSION > 10010 - // CHECK: hipGraphExecUpdateResult GraphExecUpdateResult; - // CHECK-NEXT: hipGraphExecUpdateResult GraphExecUpdateSuccess = hipGraphExecUpdateSuccess; - // CHECK-NEXT: hipGraphExecUpdateResult GraphExecUpdateError = hipGraphExecUpdateError; - // CHECK-NEXT: hipGraphExecUpdateResult GraphExecUpdateErrorTopologyChanged = hipGraphExecUpdateErrorTopologyChanged; - // CHECK-NEXT: hipGraphExecUpdateResult GraphExecUpdateErrorNodeTypeChanged = hipGraphExecUpdateErrorNodeTypeChanged; - // CHECK-NEXT: hipGraphExecUpdateResult GraphExecUpdateErrorFunctionChanged = hipGraphExecUpdateErrorFunctionChanged; - // CHECK-NEXT: hipGraphExecUpdateResult GraphExecUpdateErrorParametersChanged = hipGraphExecUpdateErrorParametersChanged; - // CHECK-NEXT: hipGraphExecUpdateResult GraphExecUpdateErrorNotSupported = hipGraphExecUpdateErrorNotSupported; - cudaGraphExecUpdateResult GraphExecUpdateResult; - cudaGraphExecUpdateResult GraphExecUpdateSuccess = cudaGraphExecUpdateSuccess; - cudaGraphExecUpdateResult GraphExecUpdateError = cudaGraphExecUpdateError; - cudaGraphExecUpdateResult GraphExecUpdateErrorTopologyChanged = cudaGraphExecUpdateErrorTopologyChanged; - cudaGraphExecUpdateResult GraphExecUpdateErrorNodeTypeChanged = cudaGraphExecUpdateErrorNodeTypeChanged; - cudaGraphExecUpdateResult GraphExecUpdateErrorFunctionChanged = cudaGraphExecUpdateErrorFunctionChanged; - cudaGraphExecUpdateResult GraphExecUpdateErrorParametersChanged = cudaGraphExecUpdateErrorParametersChanged; - cudaGraphExecUpdateResult GraphExecUpdateErrorNotSupported = cudaGraphExecUpdateErrorNotSupported; -#endif -#if CUDA_VERSION > 11010 - // CHECK: hipGraphExecUpdateResult GraphExecUpdateErrorUnsupportedFunctionChange = hipGraphExecUpdateErrorUnsupportedFunctionChange; - cudaGraphExecUpdateResult GraphExecUpdateErrorUnsupportedFunctionChange = cudaGraphExecUpdateErrorUnsupportedFunctionChange; -#endif - // CHECK: hipLimit_t Limit; + // CHECK-NEXT: hipLimit_t LimitStackSize = hipLimitStackSize; // CHECK-NEXT: hipLimit_t LimitPrintfFifoSize = hipLimitPrintfFifoSize; // CHECK-NEXT: hipLimit_t LimitMallocHeapSize = hipLimitMallocHeapSize; cudaLimit Limit; + cudaLimit LimitStackSize = cudaLimitStackSize; cudaLimit LimitPrintfFifoSize = cudaLimitPrintfFifoSize; cudaLimit LimitMallocHeapSize = cudaLimitMallocHeapSize; @@ -537,23 +338,6 @@ int main() { cudaMemcpyKind MemcpyDeviceToDevice = cudaMemcpyDeviceToDevice; cudaMemcpyKind MemcpyDefault = cudaMemcpyDefault; -#if CUDA_VERSION > 7050 - // CHECK: hipMemoryAdvise MemoryAdvise; - // CHECK-NEXT: hipMemoryAdvise MemAdviseSetReadMostly = hipMemAdviseSetReadMostly; - // CHECK-NEXT: hipMemoryAdvise MemAdviseUnsetReadMostly = hipMemAdviseUnsetReadMostly; - // CHECK-NEXT: hipMemoryAdvise MemAdviseSetPreferredLocation = hipMemAdviseSetPreferredLocation; - // CHECK-NEXT: hipMemoryAdvise MemAdviseUnsetPreferredLocation = hipMemAdviseUnsetPreferredLocation; - // CHECK-NEXT: hipMemoryAdvise MemAdviseSetAccessedBy = hipMemAdviseSetAccessedBy; - // CHECK-NEXT: hipMemoryAdvise MemAdviseUnsetAccessedBy = hipMemAdviseUnsetAccessedBy; - cudaMemoryAdvise MemoryAdvise; - cudaMemoryAdvise MemAdviseSetReadMostly = cudaMemAdviseSetReadMostly; - cudaMemoryAdvise MemAdviseUnsetReadMostly = cudaMemAdviseUnsetReadMostly; - cudaMemoryAdvise MemAdviseSetPreferredLocation = cudaMemAdviseSetPreferredLocation; - cudaMemoryAdvise MemAdviseUnsetPreferredLocation = cudaMemAdviseUnsetPreferredLocation; - cudaMemoryAdvise MemAdviseSetAccessedBy = cudaMemAdviseSetAccessedBy; - cudaMemoryAdvise MemAdviseUnsetAccessedBy = cudaMemAdviseUnsetAccessedBy; -#endif - // CHECK: hipMemoryType MemoryType; // CHECK-NEXT: hipMemoryType MemoryTypeHost = hipMemoryTypeHost; // CHECK-NEXT: hipMemoryType MemoryTypeDevice = hipMemoryTypeDevice; @@ -561,19 +345,6 @@ int main() { cudaMemoryType MemoryTypeHost = cudaMemoryTypeHost; cudaMemoryType MemoryTypeDevice = cudaMemoryTypeDevice; -#if CUDA_VERSION > 7050 - // CHECK: hipMemRangeAttribute MemRangeAttribute; - // CHECK-NEXT: hipMemRangeAttribute MemRangeAttributeReadMostly = hipMemRangeAttributeReadMostly; - // CHECK-NEXT: hipMemRangeAttribute MemRangeAttributePreferredLocation = hipMemRangeAttributePreferredLocation; - // CHECK-NEXT: hipMemRangeAttribute MemRangeAttributeAccessedBy = hipMemRangeAttributeAccessedBy; - // CHECK-NEXT: hipMemRangeAttribute MemRangeAttributeLastPrefetchLocation = hipMemRangeAttributeLastPrefetchLocation; - cudaMemRangeAttribute MemRangeAttribute; - cudaMemRangeAttribute MemRangeAttributeReadMostly = cudaMemRangeAttributeReadMostly; - cudaMemRangeAttribute MemRangeAttributePreferredLocation = cudaMemRangeAttributePreferredLocation; - cudaMemRangeAttribute MemRangeAttributeAccessedBy = cudaMemRangeAttributeAccessedBy; - cudaMemRangeAttribute MemRangeAttributeLastPrefetchLocation = cudaMemRangeAttributeLastPrefetchLocation; -#endif - // CHECK: hipResourceType ResourceType; // CHECK-NEXT: hipResourceType ResourceTypeArray = hipResourceTypeArray; // CHECK-NEXT: hipResourceType ResourceTypeMipmappedArray = hipResourceTypeMipmappedArray; @@ -667,28 +438,6 @@ int main() { cudaSharedMemConfig SharedMemBankSizeFourByte = cudaSharedMemBankSizeFourByte; cudaSharedMemConfig SharedMemBankSizeEightByte = cudaSharedMemBankSizeEightByte; -#if CUDA_VERSION > 9020 - // CHECK: hipStreamCaptureStatus StreamCaptureStatus; - // CHECK-NEXT: hipStreamCaptureStatus StreamCaptureStatusNone = hipStreamCaptureStatusNone; - // CHECK-NEXT: hipStreamCaptureStatus StreamCaptureStatusActive = hipStreamCaptureStatusActive; - // CHECK-NEXT: hipStreamCaptureStatus StreamCaptureStatusInvalidated = hipStreamCaptureStatusInvalidated; - cudaStreamCaptureStatus StreamCaptureStatus; - cudaStreamCaptureStatus StreamCaptureStatusNone = cudaStreamCaptureStatusNone; - cudaStreamCaptureStatus StreamCaptureStatusActive = cudaStreamCaptureStatusActive; - cudaStreamCaptureStatus StreamCaptureStatusInvalidated = cudaStreamCaptureStatusInvalidated; -#endif - -#if CUDA_VERSION > 10000 - // CHECK: hipStreamCaptureMode StreamCaptureMode; - // CHECK-NEXT: hipStreamCaptureMode StreamCaptureModeGlobal = hipStreamCaptureModeGlobal; - // CHECK-NEXT: hipStreamCaptureMode StreamCaptureModeThreadLocal = hipStreamCaptureModeThreadLocal; - // CHECK-NEXT: hipStreamCaptureMode StreamCaptureModeRelaxed = hipStreamCaptureModeRelaxed; - cudaStreamCaptureMode StreamCaptureMode; - cudaStreamCaptureMode StreamCaptureModeGlobal = cudaStreamCaptureModeGlobal; - cudaStreamCaptureMode StreamCaptureModeThreadLocal = cudaStreamCaptureModeThreadLocal; - cudaStreamCaptureMode StreamCaptureModeRelaxed = cudaStreamCaptureModeRelaxed; -#endif - // CHECK: hipSurfaceBoundaryMode SurfaceBoundaryMode; // CHECK-NEXT: hipSurfaceBoundaryMode BoundaryModeZero = hipBoundaryModeZero; // CHECK-NEXT: hipSurfaceBoundaryMode BoundaryModeClamp = hipBoundaryModeClamp; @@ -732,25 +481,238 @@ int main() { cudaGLDeviceList GLDeviceListCurrentFrame = cudaGLDeviceListCurrentFrame; cudaGLDeviceList GLDeviceListNextFrame = cudaGLDeviceListNextFrame; -#if CUDA_VERSION > 11020 - // CHECK: hipStreamUpdateCaptureDependenciesFlags StreamUpdateCaptureDependenciesFlags; - // CHECK-NEXT: hipStreamUpdateCaptureDependenciesFlags StreamAddCaptureDependencies = hipStreamAddCaptureDependencies; - // CHECK-NEXT: hipStreamUpdateCaptureDependenciesFlags StreamSetCaptureDependencies = hipStreamSetCaptureDependencies; - cudaStreamUpdateCaptureDependenciesFlags StreamUpdateCaptureDependenciesFlags; - cudaStreamUpdateCaptureDependenciesFlags StreamAddCaptureDependencies = cudaStreamAddCaptureDependencies; - cudaStreamUpdateCaptureDependenciesFlags StreamSetCaptureDependencies = cudaStreamSetCaptureDependencies; +#if CUDA_VERSION >= 8000 + // CHECK: hipDeviceAttribute_t DevAttrHostNativeAtomicSupported = hipDeviceAttributeHostNativeAtomicSupported; + // CHECK-NEXT: hipDeviceAttribute_t DevAttrSingleToDoublePrecisionPerfRatio = hipDeviceAttributeSingleToDoublePrecisionPerfRatio; + // CHECK-NEXT: hipDeviceAttribute_t DevAttrPageableMemoryAccess = hipDeviceAttributePageableMemoryAccess; + // CHECK-NEXT: hipDeviceAttribute_t DevAttrConcurrentManagedAccess = hipDeviceAttributeConcurrentManagedAccess; + // CHECK-NEXT: hipDeviceAttribute_t DevAttrComputePreemptionSupported = hipDeviceAttributeComputePreemptionSupported; + // CHECK-NEXT: hipDeviceAttribute_t DevAttrCanUseHostPointerForRegisteredMem = hipDeviceAttributeCanUseHostPointerForRegisteredMem; + cudaDeviceAttr DevAttrHostNativeAtomicSupported = cudaDevAttrHostNativeAtomicSupported; + cudaDeviceAttr DevAttrSingleToDoublePrecisionPerfRatio = cudaDevAttrSingleToDoublePrecisionPerfRatio; + cudaDeviceAttr DevAttrPageableMemoryAccess = cudaDevAttrPageableMemoryAccess; + cudaDeviceAttr DevAttrConcurrentManagedAccess = cudaDevAttrConcurrentManagedAccess; + cudaDeviceAttr DevAttrComputePreemptionSupported = cudaDevAttrComputePreemptionSupported; + cudaDeviceAttr DevAttrCanUseHostPointerForRegisteredMem = cudaDevAttrCanUseHostPointerForRegisteredMem; + + // CHECK: hipDeviceP2PAttr DeviceP2PAttr; + // CHECK-NEXT: hipDeviceP2PAttr DevP2PAttrPerformanceRank = hipDevP2PAttrPerformanceRank; + // CHECK-NEXT: hipDeviceP2PAttr DevP2PAttrAccessSupported = hipDevP2PAttrAccessSupported; + // CHECK-NEXT: hipDeviceP2PAttr DevP2PAttrNativeAtomicSupported = hipDevP2PAttrNativeAtomicSupported; + cudaDeviceP2PAttr DeviceP2PAttr; + cudaDeviceP2PAttr DevP2PAttrPerformanceRank = cudaDevP2PAttrPerformanceRank; + cudaDeviceP2PAttr DevP2PAttrAccessSupported = cudaDevP2PAttrAccessSupported; + cudaDeviceP2PAttr DevP2PAttrNativeAtomicSupported = cudaDevP2PAttrNativeAtomicSupported; + + // CHECK: hipMemoryAdvise MemoryAdvise; + // CHECK-NEXT: hipMemoryAdvise MemAdviseSetReadMostly = hipMemAdviseSetReadMostly; + // CHECK-NEXT: hipMemoryAdvise MemAdviseUnsetReadMostly = hipMemAdviseUnsetReadMostly; + // CHECK-NEXT: hipMemoryAdvise MemAdviseSetPreferredLocation = hipMemAdviseSetPreferredLocation; + // CHECK-NEXT: hipMemoryAdvise MemAdviseUnsetPreferredLocation = hipMemAdviseUnsetPreferredLocation; + // CHECK-NEXT: hipMemoryAdvise MemAdviseSetAccessedBy = hipMemAdviseSetAccessedBy; + // CHECK-NEXT: hipMemoryAdvise MemAdviseUnsetAccessedBy = hipMemAdviseUnsetAccessedBy; + cudaMemoryAdvise MemoryAdvise; + cudaMemoryAdvise MemAdviseSetReadMostly = cudaMemAdviseSetReadMostly; + cudaMemoryAdvise MemAdviseUnsetReadMostly = cudaMemAdviseUnsetReadMostly; + cudaMemoryAdvise MemAdviseSetPreferredLocation = cudaMemAdviseSetPreferredLocation; + cudaMemoryAdvise MemAdviseUnsetPreferredLocation = cudaMemAdviseUnsetPreferredLocation; + cudaMemoryAdvise MemAdviseSetAccessedBy = cudaMemAdviseSetAccessedBy; + cudaMemoryAdvise MemAdviseUnsetAccessedBy = cudaMemAdviseUnsetAccessedBy; + + // CHECK: hipMemRangeAttribute MemRangeAttribute; + // CHECK-NEXT: hipMemRangeAttribute MemRangeAttributeReadMostly = hipMemRangeAttributeReadMostly; + // CHECK-NEXT: hipMemRangeAttribute MemRangeAttributePreferredLocation = hipMemRangeAttributePreferredLocation; + // CHECK-NEXT: hipMemRangeAttribute MemRangeAttributeAccessedBy = hipMemRangeAttributeAccessedBy; + // CHECK-NEXT: hipMemRangeAttribute MemRangeAttributeLastPrefetchLocation = hipMemRangeAttributeLastPrefetchLocation; + cudaMemRangeAttribute MemRangeAttribute; + cudaMemRangeAttribute MemRangeAttributeReadMostly = cudaMemRangeAttributeReadMostly; + cudaMemRangeAttribute MemRangeAttributePreferredLocation = cudaMemRangeAttributePreferredLocation; + cudaMemRangeAttribute MemRangeAttributeAccessedBy = cudaMemRangeAttributeAccessedBy; + cudaMemRangeAttribute MemRangeAttributeLastPrefetchLocation = cudaMemRangeAttributeLastPrefetchLocation; +#endif + +#if CUDA_VERSION >= 9000 + // CHECK: hipDeviceAttribute_t DevAttrReserved94 = hipDeviceAttributeCanUseStreamWaitValue; + // CHECK-NEXT: hipDeviceAttribute_t DevAttrCooperativeLaunch = hipDeviceAttributeCooperativeLaunch; + // CHECK-NEXT: hipDeviceAttribute_t DevAttrCooperativeMultiDeviceLaunch = hipDeviceAttributeCooperativeMultiDeviceLaunch; + // CHECK-NEXT: hipDeviceAttribute_t DevAttrMaxSharedMemoryPerBlockOptin = hipDeviceAttributeSharedMemPerBlockOptin; + cudaDeviceAttr DevAttrReserved94 = cudaDevAttrReserved94; + cudaDeviceAttr DevAttrCooperativeLaunch = cudaDevAttrCooperativeLaunch; + cudaDeviceAttr DevAttrCooperativeMultiDeviceLaunch = cudaDevAttrCooperativeMultiDeviceLaunch; + cudaDeviceAttr DevAttrMaxSharedMemoryPerBlockOptin = cudaDevAttrMaxSharedMemoryPerBlockOptin; + + // CHECK: hipError_t ErrorCooperativeLaunchTooLarge = hipErrorCooperativeLaunchTooLarge; + cudaError_t ErrorCooperativeLaunchTooLarge = cudaErrorCooperativeLaunchTooLarge; + + // CHECK: hipFuncAttribute FuncAttribute; + // CHECK-NEXT: hipFuncAttribute FuncAttributeMaxDynamicSharedMemorySize = hipFuncAttributeMaxDynamicSharedMemorySize; + // CHECK-NEXT: hipFuncAttribute FuncAttributePreferredSharedMemoryCarveout = hipFuncAttributePreferredSharedMemoryCarveout; + // CHECK-NEXT: hipFuncAttribute FuncAttributeMax = hipFuncAttributeMax; + cudaFuncAttribute FuncAttribute; + cudaFuncAttribute FuncAttributeMaxDynamicSharedMemorySize = cudaFuncAttributeMaxDynamicSharedMemorySize; + cudaFuncAttribute FuncAttributePreferredSharedMemoryCarveout = cudaFuncAttributePreferredSharedMemoryCarveout; + cudaFuncAttribute FuncAttributeMax = cudaFuncAttributeMax; +#endif + +#if CUDA_VERSION >= 9020 + // CHECK: hipDeviceAttribute_t DevAttrPageableMemoryAccessUsesHostPageTables = hipDeviceAttributePageableMemoryAccessUsesHostPageTables; + // CHECK-NEXT: hipDeviceAttribute_t DevAttrDirectManagedMemAccessFromHost = hipDeviceAttributeDirectManagedMemAccessFromHost; + cudaDeviceAttr DevAttrPageableMemoryAccessUsesHostPageTables = cudaDevAttrPageableMemoryAccessUsesHostPageTables; + cudaDeviceAttr DevAttrDirectManagedMemAccessFromHost = cudaDevAttrDirectManagedMemAccessFromHost; + + // CHECK: hipDeviceP2PAttr DevP2PAttrCudaArrayAccessSupported = hipDevP2PAttrHipArrayAccessSupported; + cudaDeviceP2PAttr DevP2PAttrCudaArrayAccessSupported = cudaDevP2PAttrCudaArrayAccessSupported; +#endif + +#if CUDA_VERSION >= 10000 + // CHECK: hipError_t ErrorStreamCaptureUnsupported = hipErrorStreamCaptureUnsupported; + // CHECK-NEXT: hipError_t ErrorStreamCaptureInvalidated = hipErrorStreamCaptureInvalidated; + // CHECK-NEXT: hipError_t ErrorStreamCaptureMerge = hipErrorStreamCaptureMerge; + // CHECK-NEXT: hipError_t ErrorStreamCaptureUnmatched = hipErrorStreamCaptureUnmatched; + // CHECK-NEXT: hipError_t ErrorStreamCaptureUnjoined = hipErrorStreamCaptureUnjoined; + // CHECK-NEXT: hipError_t ErrorStreamCaptureIsolation = hipErrorStreamCaptureIsolation; + // CHECK-NEXT: hipError_t ErrorStreamCaptureImplicit = hipErrorStreamCaptureImplicit; + // CHECK-NEXT: hipError_t ErrorCapturedEvent = hipErrorCapturedEvent; + // CHECK-NEXT: hipError_t ErrorIllegalState = hipErrorIllegalState; + cudaError_t ErrorStreamCaptureUnsupported = cudaErrorStreamCaptureUnsupported; + cudaError_t ErrorStreamCaptureInvalidated = cudaErrorStreamCaptureInvalidated; + cudaError_t ErrorStreamCaptureMerge = cudaErrorStreamCaptureMerge; + cudaError_t ErrorStreamCaptureUnmatched = cudaErrorStreamCaptureUnmatched; + cudaError_t ErrorStreamCaptureUnjoined = cudaErrorStreamCaptureUnjoined; + cudaError_t ErrorStreamCaptureIsolation = cudaErrorStreamCaptureIsolation; + cudaError_t ErrorStreamCaptureImplicit = cudaErrorStreamCaptureImplicit; + cudaError_t ErrorCapturedEvent = cudaErrorCapturedEvent; + cudaError_t ErrorIllegalState = cudaErrorIllegalState; + + // CHECK: hipExternalMemoryHandleType ExternalMemoryHandleType; + // CHECK-NEXT: hipExternalMemoryHandleType ExternalMemoryHandleTypeOpaqueFd = hipExternalMemoryHandleTypeOpaqueFd; + // CHECK-NEXT: hipExternalMemoryHandleType ExternalMemoryHandleTypeOpaqueWin32 = hipExternalMemoryHandleTypeOpaqueWin32; + // CHECK-NEXT: hipExternalMemoryHandleType ExternalMemoryHandleTypeOpaqueWin32Kmt = hipExternalMemoryHandleTypeOpaqueWin32Kmt; + // CHECK-NEXT: hipExternalMemoryHandleType ExternalMemoryHandleTypeD3D12Heap = hipExternalMemoryHandleTypeD3D12Heap; + // CHECK-NEXT: hipExternalMemoryHandleType ExternalMemoryHandleTypeD3D12Resource = hipExternalMemoryHandleTypeD3D12Resource; + cudaExternalMemoryHandleType ExternalMemoryHandleType; + cudaExternalMemoryHandleType ExternalMemoryHandleTypeOpaqueFd = cudaExternalMemoryHandleTypeOpaqueFd; + cudaExternalMemoryHandleType ExternalMemoryHandleTypeOpaqueWin32 = cudaExternalMemoryHandleTypeOpaqueWin32; + cudaExternalMemoryHandleType ExternalMemoryHandleTypeOpaqueWin32Kmt = cudaExternalMemoryHandleTypeOpaqueWin32Kmt; + cudaExternalMemoryHandleType ExternalMemoryHandleTypeD3D12Heap = cudaExternalMemoryHandleTypeD3D12Heap; + cudaExternalMemoryHandleType ExternalMemoryHandleTypeD3D12Resource = cudaExternalMemoryHandleTypeD3D12Resource; + + // CHECK: hipExternalSemaphoreHandleType ExternalSemaphoreHandleType; + // CHECK-NEXT: hipExternalSemaphoreHandleType ExternalSemaphoreHandleTypeOpaqueFd = hipExternalSemaphoreHandleTypeOpaqueFd; + // CHECK-NEXT: hipExternalSemaphoreHandleType ExternalSemaphoreHandleTypeOpaqueWin32 = hipExternalSemaphoreHandleTypeOpaqueWin32; + // CHECK-NEXT: hipExternalSemaphoreHandleType ExternalSemaphoreHandleTypeOpaqueWin32Kmt = hipExternalSemaphoreHandleTypeOpaqueWin32Kmt; + // CHECK-NEXT: hipExternalSemaphoreHandleType ExternalSemaphoreHandleTypeD3D12Fence = hipExternalSemaphoreHandleTypeD3D12Fence; + cudaExternalSemaphoreHandleType ExternalSemaphoreHandleType; + cudaExternalSemaphoreHandleType ExternalSemaphoreHandleTypeOpaqueFd = cudaExternalSemaphoreHandleTypeOpaqueFd; + cudaExternalSemaphoreHandleType ExternalSemaphoreHandleTypeOpaqueWin32 = cudaExternalSemaphoreHandleTypeOpaqueWin32; + cudaExternalSemaphoreHandleType ExternalSemaphoreHandleTypeOpaqueWin32Kmt = cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt; + cudaExternalSemaphoreHandleType ExternalSemaphoreHandleTypeD3D12Fence = cudaExternalSemaphoreHandleTypeD3D12Fence; + + // CHECK: hipGraphNodeType GraphNodeType; + // CHECK-NEXT: hipGraphNodeType GraphNodeTypeKernel = hipGraphNodeTypeKernel; + // CHECK-NEXT: hipGraphNodeType GraphNodeTypeMemcpy = hipGraphNodeTypeMemcpy; + // CHECK-NEXT: hipGraphNodeType GraphNodeTypeMemset = hipGraphNodeTypeMemset; + // CHECK-NEXT: hipGraphNodeType GraphNodeTypeHost = hipGraphNodeTypeHost; + // CHECK-NEXT: hipGraphNodeType GraphNodeTypeGraph = hipGraphNodeTypeGraph; + // CHECK-NEXT: hipGraphNodeType GraphNodeTypeEmpty = hipGraphNodeTypeEmpty; + cudaGraphNodeType GraphNodeType; + cudaGraphNodeType GraphNodeTypeKernel = cudaGraphNodeTypeKernel; + cudaGraphNodeType GraphNodeTypeMemcpy = cudaGraphNodeTypeMemcpy; + cudaGraphNodeType GraphNodeTypeMemset = cudaGraphNodeTypeMemset; + cudaGraphNodeType GraphNodeTypeHost = cudaGraphNodeTypeHost; + cudaGraphNodeType GraphNodeTypeGraph = cudaGraphNodeTypeGraph; + cudaGraphNodeType GraphNodeTypeEmpty = cudaGraphNodeTypeEmpty; + + // CHECK: hipGraphNodeType GraphNodeTypeCount = hipGraphNodeTypeCount; + cudaGraphNodeType GraphNodeTypeCount = cudaGraphNodeTypeCount; + + // CHECK: hipMemoryType MemoryTypeManaged = hipMemoryTypeManaged; + cudaMemoryType MemoryTypeManaged = cudaMemoryTypeManaged; + + // CHECK: hipStreamCaptureStatus StreamCaptureStatus; + // CHECK-NEXT: hipStreamCaptureStatus StreamCaptureStatusNone = hipStreamCaptureStatusNone; + // CHECK-NEXT: hipStreamCaptureStatus StreamCaptureStatusActive = hipStreamCaptureStatusActive; + // CHECK-NEXT: hipStreamCaptureStatus StreamCaptureStatusInvalidated = hipStreamCaptureStatusInvalidated; + cudaStreamCaptureStatus StreamCaptureStatus; + cudaStreamCaptureStatus StreamCaptureStatusNone = cudaStreamCaptureStatusNone; + cudaStreamCaptureStatus StreamCaptureStatusActive = cudaStreamCaptureStatusActive; + cudaStreamCaptureStatus StreamCaptureStatusInvalidated = cudaStreamCaptureStatusInvalidated; +#endif + +#if CUDA_VERSION >= 10010 + // CHECK: hipError_t ErrorArrayIsMapped = hipErrorArrayIsMapped; + // CHECK-NEXT: hipError_t ErrorAlreadyMapped = hipErrorAlreadyMapped; + // CHECK-NEXT: hipError_t ErrorAlreadyAcquired = hipErrorAlreadyAcquired; + // CHECK-NEXT: hipError_t ErrorNotMapped = hipErrorNotMapped; + // CHECK-NEXT: hipError_t ErrorNotMappedAsArray = hipErrorNotMappedAsArray; + // CHECK-NEXT: hipError_t ErrorNotMappedAsPointer = hipErrorNotMappedAsPointer; + // CHECK-NEXT: hipError_t ErrorInvalidSource = hipErrorInvalidSource; + // CHECK-NEXT: hipError_t ErrorFileNotFound = hipErrorFileNotFound; + // CHECK-NEXT: hipError_t ErrorSymbolNotFound = hipErrorNotFound; + // CHECK-NEXT: hipError_t ErrorContextIsDestroyed = hipErrorContextIsDestroyed; + // CHECK-NEXT: hipError_t ErrorStreamCaptureWrongThread = hipErrorStreamCaptureWrongThread; + cudaError_t ErrorArrayIsMapped = cudaErrorArrayIsMapped; + cudaError_t ErrorAlreadyMapped = cudaErrorAlreadyMapped; + cudaError_t ErrorAlreadyAcquired = cudaErrorAlreadyAcquired; + cudaError_t ErrorNotMapped = cudaErrorNotMapped; + cudaError_t ErrorNotMappedAsArray = cudaErrorNotMappedAsArray; + cudaError_t ErrorNotMappedAsPointer = cudaErrorNotMappedAsPointer; + cudaError_t ErrorInvalidSource = cudaErrorInvalidSource; + cudaError_t ErrorFileNotFound = cudaErrorFileNotFound; + cudaError_t ErrorSymbolNotFound = cudaErrorSymbolNotFound; + cudaError_t ErrorContextIsDestroyed = cudaErrorContextIsDestroyed; + cudaError_t ErrorStreamCaptureWrongThread = cudaErrorStreamCaptureWrongThread; + + // CHECK: hipStreamCaptureMode StreamCaptureMode; + // CHECK-NEXT: hipStreamCaptureMode StreamCaptureModeGlobal = hipStreamCaptureModeGlobal; + // CHECK-NEXT: hipStreamCaptureMode StreamCaptureModeThreadLocal = hipStreamCaptureModeThreadLocal; + // CHECK-NEXT: hipStreamCaptureMode StreamCaptureModeRelaxed = hipStreamCaptureModeRelaxed; + cudaStreamCaptureMode StreamCaptureMode; + cudaStreamCaptureMode StreamCaptureModeGlobal = cudaStreamCaptureModeGlobal; + cudaStreamCaptureMode StreamCaptureModeThreadLocal = cudaStreamCaptureModeThreadLocal; + cudaStreamCaptureMode StreamCaptureModeRelaxed = cudaStreamCaptureModeRelaxed; +#endif + +#if CUDA_VERSION >= 10020 + // CHECK: hipError_t ErrorDeviceUninitialized = hipErrorInvalidContext; + // CHECK: hipError_t ErrorGraphExecUpdateFailure = hipErrorGraphExecUpdateFailure; + cudaError_t ErrorDeviceUninitialized = cudaErrorDeviceUninitialized; + cudaError_t ErrorGraphExecUpdateFailure = cudaErrorGraphExecUpdateFailure; + + // CHECK: hipExternalMemoryHandleType ExternalMemoryHandleTypeD3D11Resource = hipExternalMemoryHandleTypeD3D11Resource; + // CHECK-NEXT: hipExternalMemoryHandleType ExternalMemoryHandleTypeD3D11ResourceKmt = hipExternalMemoryHandleTypeD3D11ResourceKmt; + cudaExternalMemoryHandleType ExternalMemoryHandleTypeD3D11Resource = cudaExternalMemoryHandleTypeD3D11Resource; + cudaExternalMemoryHandleType ExternalMemoryHandleTypeD3D11ResourceKmt = cudaExternalMemoryHandleTypeD3D11ResourceKmt; + + // CHECK: hipGraphExecUpdateResult GraphExecUpdateResult; + // CHECK-NEXT: hipGraphExecUpdateResult GraphExecUpdateSuccess = hipGraphExecUpdateSuccess; + // CHECK-NEXT: hipGraphExecUpdateResult GraphExecUpdateError = hipGraphExecUpdateError; + // CHECK-NEXT: hipGraphExecUpdateResult GraphExecUpdateErrorTopologyChanged = hipGraphExecUpdateErrorTopologyChanged; + // CHECK-NEXT: hipGraphExecUpdateResult GraphExecUpdateErrorNodeTypeChanged = hipGraphExecUpdateErrorNodeTypeChanged; + // CHECK-NEXT: hipGraphExecUpdateResult GraphExecUpdateErrorFunctionChanged = hipGraphExecUpdateErrorFunctionChanged; + // CHECK-NEXT: hipGraphExecUpdateResult GraphExecUpdateErrorParametersChanged = hipGraphExecUpdateErrorParametersChanged; + // CHECK-NEXT: hipGraphExecUpdateResult GraphExecUpdateErrorNotSupported = hipGraphExecUpdateErrorNotSupported; + cudaGraphExecUpdateResult GraphExecUpdateResult; + cudaGraphExecUpdateResult GraphExecUpdateSuccess = cudaGraphExecUpdateSuccess; + cudaGraphExecUpdateResult GraphExecUpdateError = cudaGraphExecUpdateError; + cudaGraphExecUpdateResult GraphExecUpdateErrorTopologyChanged = cudaGraphExecUpdateErrorTopologyChanged; + cudaGraphExecUpdateResult GraphExecUpdateErrorNodeTypeChanged = cudaGraphExecUpdateErrorNodeTypeChanged; + cudaGraphExecUpdateResult GraphExecUpdateErrorFunctionChanged = cudaGraphExecUpdateErrorFunctionChanged; + cudaGraphExecUpdateResult GraphExecUpdateErrorParametersChanged = cudaGraphExecUpdateErrorParametersChanged; + cudaGraphExecUpdateResult GraphExecUpdateErrorNotSupported = cudaGraphExecUpdateErrorNotSupported; #endif #if CUDA_VERSION >= 11000 + // CHECK: hipDeviceAttribute_t DevAttrMaxBlocksPerMultiprocessor = hipDeviceAttributeMaxBlocksPerMultiprocessor; + cudaDeviceAttr DevAttrMaxBlocksPerMultiprocessor = cudaDevAttrMaxBlocksPerMultiprocessor; + // CHECK: hipKernelNodeAttrID kernelNodeAttrID; // CHECK-NEXT: hipKernelNodeAttrID KernelNodeAttributeAccessPolicyWindow = hipKernelNodeAttributeAccessPolicyWindow; // CHECK-NEXT: hipKernelNodeAttrID KernelNodeAttributeCooperative = hipKernelNodeAttributeCooperative; cudaKernelNodeAttrID kernelNodeAttrID; cudaKernelNodeAttrID KernelNodeAttributeAccessPolicyWindow = cudaKernelNodeAttributeAccessPolicyWindow; cudaKernelNodeAttrID KernelNodeAttributeCooperative = cudaKernelNodeAttributeCooperative; -#endif -#if CUDA_VERSION >= 11000 // CHECK: hipAccessProperty accessProperty; // CHECK-NEXT: hipAccessProperty AccessPropertyNormal = hipAccessPropertyNormal; // CHECK-NEXT: hipAccessProperty AccessPropertyStreaming = hipAccessPropertyStreaming; @@ -761,7 +723,20 @@ int main() { cudaAccessProperty AccessPropertyPersisting = cudaAccessPropertyPersisting; #endif +#if CUDA_VERSION >= 11010 + // CHECK: hipGraphNodeType GraphNodeTypeWaitEvent = hipGraphNodeTypeWaitEvent; + // CHECK-NEXT: hipGraphNodeType GraphNodeTypeEventRecord = hipGraphNodeTypeEventRecord; + cudaGraphNodeType GraphNodeTypeWaitEvent = cudaGraphNodeTypeWaitEvent; + cudaGraphNodeType GraphNodeTypeEventRecord = cudaGraphNodeTypeEventRecord; +#endif + #if CUDA_VERSION >= 11020 + // CHECK: hipDeviceAttribute_t DevAttrMemoryPoolsSupported = hipDeviceAttributeMemoryPoolsSupported; + cudaDeviceAttr DevAttrMemoryPoolsSupported = cudaDevAttrMemoryPoolsSupported; + + // CHECK: hipGraphExecUpdateResult GraphExecUpdateErrorUnsupportedFunctionChange = hipGraphExecUpdateErrorUnsupportedFunctionChange; + cudaGraphExecUpdateResult GraphExecUpdateErrorUnsupportedFunctionChange = cudaGraphExecUpdateErrorUnsupportedFunctionChange; + // CHECK: hipMemPoolAttr MemPoolAttr; // CHECK-NEXT: hipMemPoolAttr MemPoolReuseFollowEventDependencies = hipMemPoolReuseFollowEventDependencies; // CHECK-NEXT: hipMemPoolAttr MemPoolReuseAllowOpportunistic = hipMemPoolReuseAllowOpportunistic; @@ -772,29 +747,14 @@ int main() { cudaMemPoolAttr MemPoolReuseAllowOpportunistic = cudaMemPoolReuseAllowOpportunistic; cudaMemPoolAttr MemPoolReuseAllowInternalDependencies = cudaMemPoolReuseAllowInternalDependencies; cudaMemPoolAttr MemPoolAttrReleaseThreshold = cudaMemPoolAttrReleaseThreshold; -#endif -#if CUDA_VERSION >= 11030 - // CHECK: hipMemPoolAttr MemPoolAttrReservedMemCurrent = hipMemPoolAttrReservedMemCurrent; - // CHECK-NEXT: hipMemPoolAttr MemPoolAttrReservedMemHigh = hipMemPoolAttrReservedMemHigh; - // CHECK-NEXT: hipMemPoolAttr MemPoolAttrUsedMemCurrent = hipMemPoolAttrUsedMemCurrent; - // CHECK-NEXT: hipMemPoolAttr MemPoolAttrUsedMemHigh = hipMemPoolAttrUsedMemHigh; - cudaMemPoolAttr MemPoolAttrReservedMemCurrent = cudaMemPoolAttrReservedMemCurrent; - cudaMemPoolAttr MemPoolAttrReservedMemHigh = cudaMemPoolAttrReservedMemHigh; - cudaMemPoolAttr MemPoolAttrUsedMemCurrent = cudaMemPoolAttrUsedMemCurrent; - cudaMemPoolAttr MemPoolAttrUsedMemHigh = cudaMemPoolAttrUsedMemHigh; -#endif - -#if CUDA_VERSION >= 11020 // CHECK: hipMemLocationType memLocationType; // CHECK-NEXT: hipMemLocationType MemLocationTypeInvalid = hipMemLocationTypeInvalid; // CHECK-NEXT: hipMemLocationType MemLocationTypeDevice = hipMemLocationTypeDevice; cudaMemLocationType memLocationType; cudaMemLocationType MemLocationTypeInvalid = cudaMemLocationTypeInvalid; cudaMemLocationType MemLocationTypeDevice = cudaMemLocationTypeDevice; -#endif -#if CUDA_VERSION >= 11020 // CHECK: hipMemAccessFlags MemAccessFlags; // CHECK-NEXT: hipMemAccessFlags MemAccessFlagsProtNone = hipMemAccessFlagsProtNone; // CHECK-NEXT: hipMemAccessFlags MemAccessFlagsProtRead = hipMemAccessFlagsProtRead; @@ -803,9 +763,7 @@ int main() { cudaMemAccessFlags MemAccessFlagsProtNone = cudaMemAccessFlagsProtNone; cudaMemAccessFlags MemAccessFlagsProtRead = cudaMemAccessFlagsProtRead; cudaMemAccessFlags MemAccessFlagsProtReadWrite = cudaMemAccessFlagsProtReadWrite; -#endif -#if CUDA_VERSION >= 11020 // CHECK: hipMemAllocationType memAllocationType; // CHECK-NEXT: hipMemAllocationType MemAllocationTypeInvalid = hipMemAllocationTypeInvalid; // CHECK-NEXT: hipMemAllocationType MemAllocationTypePinned = hipMemAllocationTypePinned; @@ -814,9 +772,7 @@ int main() { cudaMemAllocationType MemAllocationTypeInvalid = cudaMemAllocationTypeInvalid; cudaMemAllocationType MemAllocationTypePinned = cudaMemAllocationTypePinned; cudaMemAllocationType MemAllocationTypeMax = cudaMemAllocationTypeMax; -#endif -#if CUDA_VERSION >= 11020 // CHECK: hipMemAllocationHandleType memAllocationHandleType; // CHECK-NEXT: hipMemAllocationHandleType MEM_HANDLE_TYPE_NONE = hipMemHandleTypeNone; // CHECK-NEXT: hipMemAllocationHandleType MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = hipMemHandleTypePosixFileDescriptor; @@ -829,11 +785,55 @@ int main() { cudaMemAllocationHandleType MEM_HANDLE_TYPE_WIN32_KMT = cudaMemHandleTypeWin32Kmt; #endif +#if CUDA_VERSION >= 11030 + // CHECK: hipStreamUpdateCaptureDependenciesFlags StreamUpdateCaptureDependenciesFlags; + // CHECK-NEXT: hipStreamUpdateCaptureDependenciesFlags StreamAddCaptureDependencies = hipStreamAddCaptureDependencies; + // CHECK-NEXT: hipStreamUpdateCaptureDependenciesFlags StreamSetCaptureDependencies = hipStreamSetCaptureDependencies; + cudaStreamUpdateCaptureDependenciesFlags StreamUpdateCaptureDependenciesFlags; + cudaStreamUpdateCaptureDependenciesFlags StreamAddCaptureDependencies = cudaStreamAddCaptureDependencies; + cudaStreamUpdateCaptureDependenciesFlags StreamSetCaptureDependencies = cudaStreamSetCaptureDependencies; + + // CHECK: hipMemPoolAttr MemPoolAttrReservedMemCurrent = hipMemPoolAttrReservedMemCurrent; + // CHECK-NEXT: hipMemPoolAttr MemPoolAttrReservedMemHigh = hipMemPoolAttrReservedMemHigh; + // CHECK-NEXT: hipMemPoolAttr MemPoolAttrUsedMemCurrent = hipMemPoolAttrUsedMemCurrent; + // CHECK-NEXT: hipMemPoolAttr MemPoolAttrUsedMemHigh = hipMemPoolAttrUsedMemHigh; + cudaMemPoolAttr MemPoolAttrReservedMemCurrent = cudaMemPoolAttrReservedMemCurrent; + cudaMemPoolAttr MemPoolAttrReservedMemHigh = cudaMemPoolAttrReservedMemHigh; + cudaMemPoolAttr MemPoolAttrUsedMemCurrent = cudaMemPoolAttrUsedMemCurrent; + cudaMemPoolAttr MemPoolAttrUsedMemHigh = cudaMemPoolAttrUsedMemHigh; + + // CHECK: hipUserObjectFlags UserObjectFlags; + // CHECK-NEXT: hipUserObjectFlags UserObjectNoDestructorSync = hipUserObjectNoDestructorSync; + cudaUserObjectFlags UserObjectFlags; + cudaUserObjectFlags UserObjectNoDestructorSync = cudaUserObjectNoDestructorSync; + + // CHECK: hipUserObjectRetainFlags UserObjectRetainFlags; + // CHECK-NEXT: hipUserObjectRetainFlags GraphUserObjectMove = hipGraphUserObjectMove; + cudaUserObjectRetainFlags UserObjectRetainFlags; + cudaUserObjectRetainFlags GraphUserObjectMove = cudaGraphUserObjectMove; +#endif + #if CUDA_VERSION >= 11040 // CHECK: hipGraphInstantiateFlags GraphInstantiateFlags; // CHECK-NEXT: hipGraphInstantiateFlags GraphInstantiateFlagAutoFreeOnLaunch = hipGraphInstantiateFlagAutoFreeOnLaunch; cudaGraphInstantiateFlags GraphInstantiateFlags; cudaGraphInstantiateFlags GraphInstantiateFlagAutoFreeOnLaunch = cudaGraphInstantiateFlagAutoFreeOnLaunch; + + // CHECK: hipGraphMemAttributeType GraphMemAttributeType; + // CHECK-NEXT: hipGraphMemAttributeType GraphMemAttrUsedMemCurrent = hipGraphMemAttrUsedMemCurrent; + // CHECK-NEXT: hipGraphMemAttributeType GraphMemAttrUsedMemHigh = hipGraphMemAttrUsedMemHigh; + // CHECK-NEXT: hipGraphMemAttributeType GraphMemAttrReservedMemCurrent = hipGraphMemAttrReservedMemCurrent; + // CHECK-NEXT: hipGraphMemAttributeType GraphMemAttrReservedMemHigh = hipGraphMemAttrReservedMemHigh; + cudaGraphMemAttributeType GraphMemAttributeType; + cudaGraphMemAttributeType GraphMemAttrUsedMemCurrent = cudaGraphMemAttrUsedMemCurrent; + cudaGraphMemAttributeType GraphMemAttrUsedMemHigh = cudaGraphMemAttrUsedMemHigh; + cudaGraphMemAttributeType GraphMemAttrReservedMemCurrent = cudaGraphMemAttrReservedMemCurrent; + cudaGraphMemAttributeType GraphMemAttrReservedMemHigh = cudaGraphMemAttrReservedMemHigh; + + // CHECK: hipGraphNodeType GraphNodeTypeExtSemaphoreSignal = hipGraphNodeTypeExtSemaphoreSignal; + // CHECK-NEXT: hipGraphNodeType GraphNodeTypeExtSemaphoreWait = hipGraphNodeTypeExtSemaphoreWait; + cudaGraphNodeType GraphNodeTypeExtSemaphoreSignal = cudaGraphNodeTypeExtSemaphoreSignal; + cudaGraphNodeType GraphNodeTypeExtSemaphoreWait = cudaGraphNodeTypeExtSemaphoreWait; #endif return 0; diff --git a/tests/unit_tests/synthetic/runtime_functions.cu b/tests/unit_tests/synthetic/runtime_functions.cu index 4e1a3578..12938a89 100644 --- a/tests/unit_tests/synthetic/runtime_functions.cu +++ b/tests/unit_tests/synthetic/runtime_functions.cu @@ -133,6 +133,23 @@ int main() { result = cudaLaunchCooperativeKernelMultiDevice(&LaunchParams, intVal, flags); #endif +#if CUDA_VERSION <= 10000 + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaConfigureCall(dim3 gridDim, dim3 blockDim, size_t sharedMem __dv(0), cudaStream_t stream __dv(0)); + // HIP: hipError_t hipConfigureCall(dim3 gridDim, dim3 blockDim, size_t sharedMem __dparm(0), hipStream_t stream __dparm(0)); + // CHECK: result = hipConfigureCall(gridDim, blockDim, bytes, stream); + result = cudaConfigureCall(gridDim, blockDim, bytes, stream); + + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaLaunch(const void *func); + // HIP: hipError_t hipLaunchByPtr(const void* func); + // CHECK: result = hipLaunchByPtr(deviceptr); + result = cudaLaunch(deviceptr); + + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaSetupArgument(const void *arg, size_t size, size_t offset); + // HIP: hipError_t hipSetupArgument(const void* arg, size_t size, size_t offset); + // CHECK: result = hipSetupArgument(deviceptr, bytes, wOffset); + result = cudaSetupArgument(deviceptr, bytes, wOffset); +#endif + #if CUDA_VERSION >= 10000 // CHECK: hipHostFn_t hostFn; cudaHostFn_t hostFn; @@ -142,14 +159,6 @@ int main() { // CHECK: result = hipLaunchHostFunc(stream, hostFn, image); result = cudaLaunchHostFunc(stream, hostFn, image); - // CHECK: hipStreamCaptureMode StreamCaptureMode; - cudaStreamCaptureMode StreamCaptureMode; - - // CUDA: extern __host__ cudaError_t CUDARTAPI cudaStreamBeginCapture(cudaStream_t stream, enum cudaStreamCaptureMode mode); - // HIP: hipError_t hipStreamBeginCapture(hipStream_t stream, hipStreamCaptureMode mode); - // CHECK: result = hipStreamBeginCapture(stream, StreamCaptureMode); - result = cudaStreamBeginCapture(stream, StreamCaptureMode); - // CHECK: hipGraph_t Graph_t, Graph_t_2; cudaGraph_t Graph_t, Graph_t_2; @@ -347,6 +356,11 @@ int main() { // CHECK: hipStreamCaptureMode streamCaptureMode; cudaStreamCaptureMode streamCaptureMode; + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaStreamBeginCapture(cudaStream_t stream, enum cudaStreamCaptureMode mode); + // HIP: hipError_t hipStreamBeginCapture(hipStream_t stream, hipStreamCaptureMode mode); + // CHECK: result = hipStreamBeginCapture(stream, streamCaptureMode); + result = cudaStreamBeginCapture(stream, streamCaptureMode); + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaThreadExchangeStreamCaptureMode(enum cudaStreamCaptureMode *mode); // HIP: hipError_t hipThreadExchangeStreamCaptureMode(hipStreamCaptureMode* mode); // CHECK: result = hipThreadExchangeStreamCaptureMode(&streamCaptureMode); @@ -471,31 +485,11 @@ int main() { #endif #if CUDA_VERSION >= 11010 - // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphAddMemcpyNodeToSymbol(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const void* symbol, const void* src, size_t count, size_t offset, enum cudaMemcpyKind kind); - // HIP: hipError_t hipGraphAddMemcpyNodeToSymbol(hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, size_t numDependencies, const void* symbol, const void* src, size_t count, size_t offset, hipMemcpyKind kind); - // CHECK: result = hipGraphAddMemcpyNodeToSymbol(&graphNode, Graph_t, &graphNode_2, width, HIP_SYMBOL(image), src, bytes, wOffset, MemcpyKind); - result = cudaGraphAddMemcpyNodeToSymbol(&graphNode, Graph_t, &graphNode_2, width, image, src, bytes, wOffset, MemcpyKind); - - // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphAddMemcpyNodeFromSymbol(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* symbol, size_t count, size_t offset, enum cudaMemcpyKind kind); - // HIP: hipError_t hipGraphAddMemcpyNodeFromSymbol(hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* symbol, size_t count, size_t offset, hipMemcpyKind kind); - // CHECK: result = hipGraphAddMemcpyNodeFromSymbol(&graphNode, Graph_t, &graphNode_2, width, dst, HIP_SYMBOL(image), bytes, wOffset, MemcpyKind); - result = cudaGraphAddMemcpyNodeFromSymbol(&graphNode, Graph_t, &graphNode_2, width, dst, image, bytes, wOffset, MemcpyKind); - // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, enum cudaMemcpyKind kind); // HIP: hipError_t hipGraphAddMemcpyNode1D(hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, hipMemcpyKind kind); // CHECK: result = hipGraphAddMemcpyNode1D(&graphNode, Graph_t, &graphNode_2, width, dst, src, bytes, MemcpyKind); result = cudaGraphAddMemcpyNode1D(&graphNode, Graph_t, &graphNode_2, width, dst, src, bytes, MemcpyKind); - // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphMemcpyNodeSetParamsToSymbol(cudaGraphNode_t node, const void* symbol, const void* src, size_t count, size_t offset, enum cudaMemcpyKind kind); - // HIP: hipError_t hipGraphMemcpyNodeSetParamsToSymbol(hipGraphNode_t node, const void* symbol, const void* src, size_t count, size_t offset, hipMemcpyKind kind); - // CHECK: result = hipGraphMemcpyNodeSetParamsToSymbol(graphNode, HIP_SYMBOL(image), src, bytes, wOffset, MemcpyKind); - result = cudaGraphMemcpyNodeSetParamsToSymbol(graphNode, image, src, bytes, wOffset, MemcpyKind); - - // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphMemcpyNodeSetParamsFromSymbol(cudaGraphNode_t node, void* dst, const void* symbol, size_t count, size_t offset, enum cudaMemcpyKind kind); - // HIP: hipError_t hipGraphMemcpyNodeSetParamsFromSymbol(hipGraphNode_t node, void* dst, const void* symbol, size_t count, size_t offset, hipMemcpyKind kind); - // CHECK: result = hipGraphMemcpyNodeSetParamsFromSymbol(graphNode, dst, HIP_SYMBOL(image), bytes, wOffset, MemcpyKind); - result = cudaGraphMemcpyNodeSetParamsFromSymbol(graphNode, dst, image, bytes, wOffset, MemcpyKind); - // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, enum cudaMemcpyKind kind); // HIP: hipError_t hipGraphMemcpyNodeSetParams1D(hipGraphNode_t node, void* dst, const void* src, size_t count, hipMemcpyKind kind); // CHECK: result = hipGraphMemcpyNodeSetParams1D(graphNode, dst, src, bytes, MemcpyKind); @@ -531,16 +525,6 @@ int main() { // CHECK: result = hipGraphEventWaitNodeSetEvent(graphNode, Event_t); result = cudaGraphEventWaitNodeSetEvent(graphNode, Event_t); - // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphExecMemcpyNodeSetParamsToSymbol(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const void* symbol, const void* src, size_t count, size_t offset, enum cudaMemcpyKind kind); - // HIP: hipError_t hipGraphExecMemcpyNodeSetParamsToSymbol(hipGraphExec_t hGraphExec, hipGraphNode_t node, const void* symbol, const void* src, size_t count, size_t offset, hipMemcpyKind kind); - // CHECK: result = hipGraphExecMemcpyNodeSetParamsToSymbol(GraphExec_t, graphNode, HIP_SYMBOL(image), src, bytes, wOffset, MemcpyKind); - result = cudaGraphExecMemcpyNodeSetParamsToSymbol(GraphExec_t, graphNode, image, src, bytes, wOffset, MemcpyKind); - - // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphExecMemcpyNodeSetParamsFromSymbol(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* symbol, size_t count, size_t offset, enum cudaMemcpyKind kind); - // HIP: hipError_t hipGraphExecMemcpyNodeSetParamsFromSymbol(hipGraphExec_t hGraphExec, hipGraphNode_t node, void* dst, const void* symbol, size_t count, size_t offset, hipMemcpyKind kind); - // CHECK: result = hipGraphExecMemcpyNodeSetParamsFromSymbol(GraphExec_t, graphNode, dst, HIP_SYMBOL(image), bytes, wOffset, MemcpyKind); - result = cudaGraphExecMemcpyNodeSetParamsFromSymbol(GraphExec_t, graphNode, dst, image, bytes, wOffset, MemcpyKind); - // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, enum cudaMemcpyKind kind); // HIP: hipError_t hipGraphExecMemcpyNodeSetParams1D(hipGraphExec_t hGraphExec, hipGraphNode_t node, void* dst, const void* src, size_t count, hipMemcpyKind kind); // CHECK: result = hipGraphExecMemcpyNodeSetParams1D(GraphExec_t, graphNode, dst, src, bytes, MemcpyKind); @@ -560,6 +544,11 @@ int main() { // HIP: hipError_t hipGraphExecEventWaitNodeSetEvent(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, hipEvent_t event); // CHECK: result = hipGraphExecEventWaitNodeSetEvent(GraphExec_t, graphNode, Event_t); result = cudaGraphExecEventWaitNodeSetEvent(GraphExec_t, graphNode, Event_t); + + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream); + // HIP: hipError_t hipGraphUpload(hipGraphExec_t graphExec, hipStream_t stream); + // CHECK: result = hipGraphUpload(GraphExec_t, stream); + result = cudaGraphUpload(GraphExec_t, stream); #endif #if CUDA_VERSION >= 11020 @@ -667,11 +656,59 @@ int main() { result = cudaMemPoolImportPointer(&deviceptr, memPool_t, &memPoolPtrExportData); #endif +#if CUDA_VERSION >= 11030 + // CHECK: hipUserObject_t userObject; + cudaUserObject_t userObject; + + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaUserObjectCreate(cudaUserObject_t *object_out, void *ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags); + // HIP: hipError_t hipUserObjectCreate(hipUserObject_t* object_out, void* ptr, hipHostFn_t destroy, unsigned int initialRefcount, unsigned int flags); + // CHECK: result = hipUserObjectCreate(&userObject, image, hostFn, count, flags); + result = cudaUserObjectCreate(&userObject, image, hostFn, count, flags); + + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaUserObjectRelease(cudaUserObject_t object, unsigned int count __dv(1)); + // HIP: hipError_t hipUserObjectRelease(hipUserObject_t object, unsigned int count); + // CHECK: result = hipUserObjectRelease(userObject, count); + result = cudaUserObjectRelease(userObject, count); + + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaUserObjectRetain(cudaUserObject_t object, unsigned int count __dv(1)); + // HIP: hipError_t hipUserObjectRetain(hipUserObject_t object, unsigned int count); + // CHECK: result = hipUserObjectRetain(userObject, count); + result = cudaUserObjectRetain(userObject, count); + + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count __dv(1), unsigned int flags __dv(0)); + // HIP: hipError_t hipGraphRetainUserObject(hipGraph_t graph, hipUserObject_t object, unsigned int count, unsigned int flags); + // CHECK: result = hipGraphRetainUserObject(Graph_t, userObject, count, flags); + result = cudaGraphRetainUserObject(Graph_t, userObject, count, flags); + + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count __dv(1)); + // HIP: hipError_t hipGraphReleaseUserObject(hipGraph_t graph, hipUserObject_t object, unsigned int count); + // CHECK: result = hipGraphReleaseUserObject(Graph_t, userObject, count); + result = cudaGraphReleaseUserObject(Graph_t, userObject, count); +#endif + #if CUDA_VERSION >= 11040 // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphInstantiateWithFlags(cudaGraphExec_t *pGraphExec, cudaGraph_t graph, unsigned long long flags); // HIP: hipError_t hipGraphInstantiateWithFlags(hipGraphExec_t* pGraphExec, hipGraph_t graph, unsigned long long flags); // CHECK: result = hipGraphInstantiateWithFlags(&GraphExec_t, Graph_t, ull); result = cudaGraphInstantiateWithFlags(&GraphExec_t, Graph_t, ull); + + // CHECK: hipGraphMemAttributeType GraphMemAttributeType; + cudaGraphMemAttributeType GraphMemAttributeType; + + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaDeviceGetGraphMemAttribute(int device, enum cudaGraphMemAttributeType attr, void* value); + // HIP: hipError_t hipDeviceGetGraphMemAttribute(int device, hipGraphMemAttributeType attr, void* value); + // CHECK: result = hipDeviceGetGraphMemAttribute(device, GraphMemAttributeType, image); + result = cudaDeviceGetGraphMemAttribute(device, GraphMemAttributeType, image); + + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaDeviceSetGraphMemAttribute(int device, enum cudaGraphMemAttributeType attr, void* value); + // HIP: hipError_t hipDeviceSetGraphMemAttribute(int device, hipGraphMemAttributeType attr, void* value); + // CHECK: result = hipDeviceSetGraphMemAttribute(device, GraphMemAttributeType, image); + result = cudaDeviceSetGraphMemAttribute(device, GraphMemAttributeType, image); + + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaDeviceGraphMemTrim(int device); + // HIP: hipError_t hipDeviceGraphMemTrim(int device); + // CHECK: result = hipDeviceGraphMemTrim(device); + result = cudaDeviceGraphMemTrim(device); #endif // CHECK: hipDeviceProp_t DeviceProp; @@ -1436,22 +1473,10 @@ int main() { // CHECK: result = hipProfilerStop(); result = cudaProfilerStop(); -#if CUDA_VERSION <= 10000 - // CUDA: extern __host__ cudaError_t CUDARTAPI cudaConfigureCall(dim3 gridDim, dim3 blockDim, size_t sharedMem __dv(0), cudaStream_t stream __dv(0)); - // HIP: hipError_t hipConfigureCall(dim3 gridDim, dim3 blockDim, size_t sharedMem __dparm(0), hipStream_t stream __dparm(0)); - // CHECK: result = hipConfigureCall(gridDim, blockDim, bytes, stream); - result = cudaConfigureCall(gridDim, blockDim, bytes, stream); - - // CUDA: extern __host__ cudaError_t CUDARTAPI cudaLaunch(const void *func); - // HIP: hipError_t hipLaunchByPtr(const void* func); - // CHECK: result = hipLaunchByPtr(deviceptr); - result = cudaLaunch(deviceptr); - - // CUDA: extern __host__ cudaError_t CUDARTAPI cudaSetupArgument(const void *arg, size_t size, size_t offset); - // HIP: hipError_t hipSetupArgument(const void* arg, size_t size, size_t offset); - // CHECK: result = hipSetupArgument(deviceptr, bytes, wOffset); - result = cudaSetupArgument(deviceptr, bytes, wOffset); -#endif + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaDeviceSetLimit(enum cudaLimit limit, size_t value); + // HIP: hipError_t hipDeviceSetLimit(enum hipLimit_t limit, size_t value); + // CHECK: result = hipDeviceSetLimit(Limit, bytes); + result = cudaDeviceSetLimit(Limit, bytes); return 0; } diff --git a/tests/unit_tests/synthetic/runtime_functions_11010.cu b/tests/unit_tests/synthetic/runtime_functions_11010.cu new file mode 100644 index 00000000..32478b13 --- /dev/null +++ b/tests/unit_tests/synthetic/runtime_functions_11010.cu @@ -0,0 +1,68 @@ +// RUN: %run_test hipify "%s" "%t" %hipify_args 2 --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args + +// CHECK: #include +#include +#include +#include + +int main() { + printf("12.11010. CUDA Runtime API Functions synthetic test for CUDA >= 11010\n"); + + size_t bytes = 0; + size_t width = 0; + size_t wOffset = 0; + void* image = nullptr; + void* src = nullptr; + void* dst = nullptr; + + // CHECK: hipError_t result = hipSuccess; + cudaError result = cudaSuccess; + + // CHECK: hipMemcpyKind MemcpyKind; + cudaMemcpyKind MemcpyKind; + +#if CUDA_VERSION >= 10000 + // CHECK: hipGraphNode_t graphNode, graphNode_2; + cudaGraphNode_t graphNode, graphNode_2; + + // CHECK: hipGraph_t Graph_t, Graph_t_2; + cudaGraph_t Graph_t, Graph_t_2; + + // CHECK: hipGraphExec_t GraphExec_t; + cudaGraphExec_t GraphExec_t; +#endif + +#if CUDA_VERSION >= 11010 + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphAddMemcpyNodeToSymbol(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const void* symbol, const void* src, size_t count, size_t offset, enum cudaMemcpyKind kind); + // HIP: hipError_t hipGraphAddMemcpyNodeToSymbol(hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, size_t numDependencies, const void* symbol, const void* src, size_t count, size_t offset, hipMemcpyKind kind); + // CHECK: result = hipGraphAddMemcpyNodeToSymbol(&graphNode, Graph_t, &graphNode_2, width, HIP_SYMBOL(image), src, bytes, wOffset, MemcpyKind); + result = cudaGraphAddMemcpyNodeToSymbol(&graphNode, Graph_t, &graphNode_2, width, image, src, bytes, wOffset, MemcpyKind); + + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphAddMemcpyNodeFromSymbol(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* symbol, size_t count, size_t offset, enum cudaMemcpyKind kind); + // HIP: hipError_t hipGraphAddMemcpyNodeFromSymbol(hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* symbol, size_t count, size_t offset, hipMemcpyKind kind); + // CHECK: result = hipGraphAddMemcpyNodeFromSymbol(&graphNode, Graph_t, &graphNode_2, width, dst, HIP_SYMBOL(image), bytes, wOffset, MemcpyKind); + result = cudaGraphAddMemcpyNodeFromSymbol(&graphNode, Graph_t, &graphNode_2, width, dst, image, bytes, wOffset, MemcpyKind); + + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphMemcpyNodeSetParamsToSymbol(cudaGraphNode_t node, const void* symbol, const void* src, size_t count, size_t offset, enum cudaMemcpyKind kind); + // HIP: hipError_t hipGraphMemcpyNodeSetParamsToSymbol(hipGraphNode_t node, const void* symbol, const void* src, size_t count, size_t offset, hipMemcpyKind kind); + // CHECK: result = hipGraphMemcpyNodeSetParamsToSymbol(graphNode, HIP_SYMBOL(image), src, bytes, wOffset, MemcpyKind); + result = cudaGraphMemcpyNodeSetParamsToSymbol(graphNode, image, src, bytes, wOffset, MemcpyKind); + + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphMemcpyNodeSetParamsFromSymbol(cudaGraphNode_t node, void* dst, const void* symbol, size_t count, size_t offset, enum cudaMemcpyKind kind); + // HIP: hipError_t hipGraphMemcpyNodeSetParamsFromSymbol(hipGraphNode_t node, void* dst, const void* symbol, size_t count, size_t offset, hipMemcpyKind kind); + // CHECK: result = hipGraphMemcpyNodeSetParamsFromSymbol(graphNode, dst, HIP_SYMBOL(image), bytes, wOffset, MemcpyKind); + result = cudaGraphMemcpyNodeSetParamsFromSymbol(graphNode, dst, image, bytes, wOffset, MemcpyKind); + + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphExecMemcpyNodeSetParamsToSymbol(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const void* symbol, const void* src, size_t count, size_t offset, enum cudaMemcpyKind kind); + // HIP: hipError_t hipGraphExecMemcpyNodeSetParamsToSymbol(hipGraphExec_t hGraphExec, hipGraphNode_t node, const void* symbol, const void* src, size_t count, size_t offset, hipMemcpyKind kind); + // CHECK: result = hipGraphExecMemcpyNodeSetParamsToSymbol(GraphExec_t, graphNode, HIP_SYMBOL(image), src, bytes, wOffset, MemcpyKind); + result = cudaGraphExecMemcpyNodeSetParamsToSymbol(GraphExec_t, graphNode, image, src, bytes, wOffset, MemcpyKind); + + // CUDA: extern __host__ cudaError_t CUDARTAPI cudaGraphExecMemcpyNodeSetParamsFromSymbol(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* symbol, size_t count, size_t offset, enum cudaMemcpyKind kind); + // HIP: hipError_t hipGraphExecMemcpyNodeSetParamsFromSymbol(hipGraphExec_t hGraphExec, hipGraphNode_t node, void* dst, const void* symbol, size_t count, size_t offset, hipMemcpyKind kind); + // CHECK: result = hipGraphExecMemcpyNodeSetParamsFromSymbol(GraphExec_t, graphNode, dst, HIP_SYMBOL(image), bytes, wOffset, MemcpyKind); + result = cudaGraphExecMemcpyNodeSetParamsFromSymbol(GraphExec_t, graphNode, dst, image, bytes, wOffset, MemcpyKind); +#endif + + return 0; +} diff --git a/tests/unit_tests/synthetic/runtime_structs.cu b/tests/unit_tests/synthetic/runtime_structs.cu index f443ed0a..d4ebf9ba 100644 --- a/tests/unit_tests/synthetic/runtime_structs.cu +++ b/tests/unit_tests/synthetic/runtime_structs.cu @@ -16,41 +16,9 @@ int main() { // CHECK: hipExtent Extent; cudaExtent Extent; -#if CUDA_VERSION > 9020 - // CHECK: hipExternalMemoryBufferDesc ExternalMemoryBufferDesc; - cudaExternalMemoryBufferDesc ExternalMemoryBufferDesc; - - // CHECK: hipExternalMemoryHandleDesc ExternalMemoryHandleDesc; - cudaExternalMemoryHandleDesc ExternalMemoryHandleDesc; - - // CHECK: hipExternalSemaphoreHandleDesc ExternalSemaphoreHandleDesc; - cudaExternalSemaphoreHandleDesc ExternalSemaphoreHandleDesc; - - // CHECK: hipExternalSemaphoreSignalParams ExternalSemaphoreSignalParams; - cudaExternalSemaphoreSignalParams ExternalSemaphoreSignalParams; -#endif -#if CUDA_VERSION > 11010 - // CHECK: hipExternalSemaphoreSignalParams ExternalSemaphoreSignalParams_v1; - cudaExternalSemaphoreSignalParams_v1 ExternalSemaphoreSignalParams_v1; -#endif - -#if CUDA_VERSION > 9020 - // CHECK: hipExternalSemaphoreWaitParams ExternalSemaphoreWaitParams; - cudaExternalSemaphoreWaitParams ExternalSemaphoreWaitParams; -#endif -#if CUDA_VERSION > 11010 - // CHECK: hipExternalSemaphoreWaitParams ExternalSemaphoreWaitParams_v1; - cudaExternalSemaphoreWaitParams_v1 ExternalSemaphoreWaitParams_v1; -#endif - // CHECK: hipFuncAttributes FuncAttributes; cudaFuncAttributes FuncAttributes; -#if CUDA_VERSION > 9020 - // CHECK: hipHostNodeParams HostNodeParams; - cudaHostNodeParams HostNodeParams; -#endif - // CHECK: hipIpcEventHandle_st IpcEventHandle_st; // CHECK-NEXT: hipIpcEventHandle_t IpcEventHandle_t; cudaIpcEventHandle_st IpcEventHandle_st; @@ -61,24 +29,9 @@ int main() { cudaIpcMemHandle_st IpcMemHandle_st; cudaIpcMemHandle_t IpcMemHandle_t; -#if CUDA_VERSION > 9020 - // CHECK: hipKernelNodeParams KernelNodeParams; - cudaKernelNodeParams KernelNodeParams; -#endif - -#if CUDA_VERSION > 8000 - // CHECK: hipLaunchParams LaunchParams; - cudaLaunchParams LaunchParams; -#endif - // CHECK: hipMemcpy3DParms Memcpy3DParms; cudaMemcpy3DParms Memcpy3DParms; -#if CUDA_VERSION > 9020 - // CHECK: hipMemsetParams MemsetParams; - cudaMemsetParams MemsetParams; -#endif - // CHECK: hipPitchedPtr PitchedPtr; cudaPitchedPtr PitchedPtr; @@ -105,36 +58,11 @@ int main() { CUevent_st* event_st; cudaEvent_t Event_t; -#if CUDA_VERSION > 9020 - // CHECK: hipExternalMemory_t ExternalMemory_t; - cudaExternalMemory_t ExternalMemory_t; - - // CHECK: hipExternalSemaphore_t ExternalSemaphore_t; - cudaExternalSemaphore_t ExternalSemaphore_t; - - // CHECK: ihipGraph* graph_st; - // CHECK-NEXT: hipGraph_t Graph_t; - CUgraph_st* graph_st; - cudaGraph_t Graph_t; - - // CHECK: hipGraphExec* graphExec_st; - // CHECK-NEXT: hipGraphExec_t GraphExec_t; - CUgraphExec_st* graphExec_st; - cudaGraphExec_t GraphExec_t; -#endif - // CHECK: hipGraphicsResource* GraphicsResource; // CHECK-NEXT: hipGraphicsResource_t GraphicsResource_t; cudaGraphicsResource* GraphicsResource; cudaGraphicsResource_t GraphicsResource_t; -#if CUDA_VERSION > 9020 - // CHECK: hipGraphNode* graphNode_st; - // CHECK-NEXT: hipGraphNode_t GraphNode_t; - CUgraphNode_st* graphNode_st; - cudaGraphNode_t GraphNode_t; -#endif - // CHECK: hipArray* Array; // CHECK-NEXT: hipArray_t Array_t; // CHECK-NEXT: hipArray_const_t Array_const_t; @@ -156,20 +84,77 @@ int main() { // CHECK: ihipModuleSymbol_t* func_st_ptr; CUfunc_st* func_st_ptr; -#if CUDA_VERSION > 10020 - // CHECK: hipFunction_t func; - cudaFunction_t func; -#endif // CHECK: hipUUID_t uuid_st; CUuuid_st uuid_st; +#if CUDA_VERSION >= 9000 + // CHECK: hipLaunchParams LaunchParams; + cudaLaunchParams LaunchParams; +#endif + +#if CUDA_VERSION >= 10000 + // CHECK: hipExternalMemoryBufferDesc ExternalMemoryBufferDesc; + cudaExternalMemoryBufferDesc ExternalMemoryBufferDesc; + + // CHECK: hipExternalMemoryHandleDesc ExternalMemoryHandleDesc; + cudaExternalMemoryHandleDesc ExternalMemoryHandleDesc; + + // CHECK: hipExternalSemaphoreHandleDesc ExternalSemaphoreHandleDesc; + cudaExternalSemaphoreHandleDesc ExternalSemaphoreHandleDesc; + + // CHECK: hipExternalSemaphoreSignalParams ExternalSemaphoreSignalParams; + cudaExternalSemaphoreSignalParams ExternalSemaphoreSignalParams; + + // CHECK: hipExternalSemaphoreWaitParams ExternalSemaphoreWaitParams; + cudaExternalSemaphoreWaitParams ExternalSemaphoreWaitParams; + + // CHECK: hipHostNodeParams HostNodeParams; + cudaHostNodeParams HostNodeParams; + + // CHECK: hipKernelNodeParams KernelNodeParams; + cudaKernelNodeParams KernelNodeParams; + + // CHECK: hipMemsetParams MemsetParams; + cudaMemsetParams MemsetParams; + + // CHECK: hipExternalMemory_t ExternalMemory_t; + cudaExternalMemory_t ExternalMemory_t; + + // CHECK: hipExternalSemaphore_t ExternalSemaphore_t; + cudaExternalSemaphore_t ExternalSemaphore_t; + + // CHECK: ihipGraph* graph_st; + // CHECK-NEXT: hipGraph_t Graph_t; + CUgraph_st* graph_st; + cudaGraph_t Graph_t; + + // CHECK: hipGraphExec* graphExec_st; + // CHECK-NEXT: hipGraphExec_t GraphExec_t; + CUgraphExec_st* graphExec_st; + cudaGraphExec_t GraphExec_t; + + // CHECK: hipGraphNode* graphNode_st; + // CHECK-NEXT: hipGraphNode_t GraphNode_t; + CUgraphNode_st* graphNode_st; + cudaGraphNode_t GraphNode_t; +#endif + #if CUDA_VERSION >= 11000 + // CHECK: hipFunction_t func; + cudaFunction_t func; + // CHECK: hipAccessPolicyWindow AccessPolicyWindow; cudaAccessPolicyWindow AccessPolicyWindow; #endif #if CUDA_VERSION >= 11020 + // CHECK: hipExternalSemaphoreSignalParams ExternalSemaphoreSignalParams_v1; + cudaExternalSemaphoreSignalParams_v1 ExternalSemaphoreSignalParams_v1; + + // CHECK: hipExternalSemaphoreWaitParams ExternalSemaphoreWaitParams_v1; + cudaExternalSemaphoreWaitParams_v1 ExternalSemaphoreWaitParams_v1; + // CHECK: hipMemPool_t memPool_t; cudaMemPool_t memPool_t; @@ -178,9 +163,7 @@ int main() { // CHECK: hipMemAccessDesc MemAccessDesc; cudaMemAccessDesc MemAccessDesc; -#endif -#if CUDA_VERSION >= 11020 // CHECK: hipMemPoolProps MemPoolProps; cudaMemPoolProps MemPoolProps; #endif @@ -188,6 +171,9 @@ int main() { #if CUDA_VERSION >= 11030 // CHECK: hipMemPoolPtrExportData memPoolPtrExportData; cudaMemPoolPtrExportData memPoolPtrExportData; + + // CHECK: hipUserObject_t userObject; + cudaUserObject_t userObject; #endif return 0; diff --git a/tests/unit_tests/synthetic/runtime_typedefs.cu b/tests/unit_tests/synthetic/runtime_typedefs.cu index 59d845fd..0d9c608b 100644 --- a/tests/unit_tests/synthetic/runtime_typedefs.cu +++ b/tests/unit_tests/synthetic/runtime_typedefs.cu @@ -7,7 +7,7 @@ int main() { printf("07. CUDA Runtime API Typedefs synthetic test\n"); -#if CUDA_VERSION > 9020 +#if CUDA_VERSION >= 10000 // CHECK: hipHostFn_t HostFn_t; cudaHostFn_t HostFn_t; #endif