From 5d0ce396697e4ea1ac8896f1acb1c8809140d384 Mon Sep 17 00:00:00 2001 From: Evgeny Mankov Date: Tue, 7 Apr 2020 11:33:30 +0300 Subject: [PATCH] [HIP][HIPIFY] Remove HIPIFY related stuff due to moving of HIPIFY to a separate repo (#2002) HIPIFY tools now are here: https://github.com/ROCm-Developer-Tools/HIPIFY --- hipamd/hipify-clang/CMakeLists.txt | 198 -- hipamd/hipify-clang/README.md | 507 ------ .../hipify-clang/packaging/hipify-clang.txt | 58 - .../patch_for_clang_7.0.0_bug_38811.zip | Bin 14641 -> 0 bytes .../patch_for_clang_7.0.1_bug_38811.zip | Bin 14641 -> 0 bytes .../patch_for_clang_7.1.0_bug_38811.zip | Bin 14641 -> 0 bytes .../patch_for_clang_8.0.0_bug_38811.zip | Bin 14641 -> 0 bytes .../patch_for_clang_8.0.1_bug_38811.zip | Bin 14641 -> 0 bytes hipamd/hipify-clang/src/ArgParse.cpp | 149 -- hipamd/hipify-clang/src/ArgParse.h | 55 - hipamd/hipify-clang/src/CUDA2HIP.cpp | 110 -- hipamd/hipify-clang/src/CUDA2HIP.h | 81 - .../src/CUDA2HIP_BLAS_API_functions.cpp | 671 ------- .../src/CUDA2HIP_BLAS_API_types.cpp | 158 -- .../src/CUDA2HIP_CAFFE2_API_functions.cpp | 28 - .../src/CUDA2HIP_CAFFE2_API_types.cpp | 34 - .../src/CUDA2HIP_CUB_API_types.cpp | 28 - .../src/CUDA2HIP_Complex_API_functions.cpp | 50 - .../src/CUDA2HIP_Complex_API_types.cpp | 30 - .../src/CUDA2HIP_DNN_API_functions.cpp | 299 --- .../src/CUDA2HIP_DNN_API_types.cpp | 391 ---- .../src/CUDA2HIP_Device_functions.cpp | 616 ------- .../src/CUDA2HIP_Driver_API_functions.cpp | 815 --------- .../src/CUDA2HIP_Driver_API_types.cpp | 1617 ----------------- .../src/CUDA2HIP_FFT_API_functions.cpp | 59 - .../src/CUDA2HIP_FFT_API_types.cpp | 71 - hipamd/hipify-clang/src/CUDA2HIP_Perl.cpp | 488 ----- hipamd/hipify-clang/src/CUDA2HIP_Python.cpp | 103 -- .../src/CUDA2HIP_RAND_API_functions.cpp | 86 - .../src/CUDA2HIP_RAND_API_types.cpp | 140 -- .../src/CUDA2HIP_Runtime_API_functions.cpp | 693 ------- .../src/CUDA2HIP_Runtime_API_types.cpp | 1426 --------------- .../src/CUDA2HIP_SPARSE_API_functions.cpp | 758 -------- .../src/CUDA2HIP_SPARSE_API_types.cpp | 187 -- hipamd/hipify-clang/src/CUDA2HIP_Scripting.h | 41 - hipamd/hipify-clang/src/HipifyAction.cpp | 755 -------- hipamd/hipify-clang/src/HipifyAction.h | 110 -- hipamd/hipify-clang/src/LLVMCompat.cpp | 154 -- hipamd/hipify-clang/src/LLVMCompat.h | 94 - .../src/ReplacementsFrontendActionFactory.h | 55 - hipamd/hipify-clang/src/Statistics.cpp | 368 ---- hipamd/hipify-clang/src/Statistics.h | 250 --- hipamd/hipify-clang/src/StringUtils.cpp | 97 - hipamd/hipify-clang/src/StringUtils.h | 48 - hipamd/hipify-clang/src/main.cpp | 352 ---- hipamd/tests/hipify-clang/lit.cfg | 151 -- hipamd/tests/hipify-clang/lit.site.cfg.in | 38 - hipamd/tests/hipify-clang/run_test.bat | 21 - hipamd/tests/hipify-clang/run_test.sh | 18 - .../unit_tests/casts/reinterpret_cast.cu | 52 - .../hipify-clang/unit_tests/device/atomics.cu | 286 --- .../unit_tests/device/device_symbols.cu | 152 -- .../unit_tests/device/math_functions.cu | 58 - .../unit_tests/headers/headers_test_01.cu | 8 - .../unit_tests/headers/headers_test_02.cu | 8 - .../unit_tests/headers/headers_test_03.cu | 10 - .../unit_tests/headers/headers_test_04.cu | 12 - .../unit_tests/headers/headers_test_05.cu | 12 - .../unit_tests/headers/headers_test_06.cu | 8 - .../unit_tests/headers/headers_test_07.cu | 8 - .../unit_tests/headers/headers_test_08.cu | 14 - .../unit_tests/headers/headers_test_09.cu | 100 - .../unit_tests/headers/headers_test_10.cu | 14 - .../unit_tests/headers/headers_test_11.cu | 14 - .../kernel_launch/kernel_launch_01.cu | 46 - .../CAFFE2/caffe2/core/common_cudnn.h | 7 - .../caffe2/operators/spatial_batch_norm_op.h | 14 - .../unit_tests/libraries/CAFFE2/caffe2_01.cu | 12 - .../unit_tests/libraries/CAFFE2/caffe2_02.cu | 102 -- .../unit_tests/libraries/CUB/cub_01.cu | 60 - .../unit_tests/libraries/CUB/cub_02.cu | 69 - .../unit_tests/libraries/CUB/cub_03.cu | 33 - .../cuBLAS/cublas_0_based_indexing.cu | 81 - .../cuBLAS/cublas_1_based_indexing.cu | 90 - .../cublas_sgemm_matrix_multiplication.cu | 108 -- .../cublas_0_based_indexing_rocblas.cu | 81 - .../cublas_1_based_indexing_rocblas.cu | 90 - ...las_sgemm_matrix_multiplication_rocblas.cu | 108 -- .../libraries/cuComplex/cuComplex_Julia.cu | 58 - .../cuDNN/cudnn_convolution_forward.cu | 267 --- .../libraries/cuDNN/cudnn_softmax.cu | 159 -- .../libraries/cuFFT/simple_cufft.cu | 78 - .../cuRAND/benchmark_curand_generate.cpp | 346 ---- .../cuRAND/benchmark_curand_kernel.cpp | 673 ------- .../unit_tests/libraries/cuRAND/cmdparser.hpp | 494 ----- .../libraries/cuRAND/poisson_api_example.cu | 416 ----- .../libraries/cuSPARSE/cuSPARSE_01.cu | 367 ---- .../libraries/cuSPARSE/cuSPARSE_02.cu | 284 --- .../libraries/cuSPARSE/cuSPARSE_03.cu | 229 --- .../libraries/cuSPARSE/cuSPARSE_04.cu | 261 --- .../libraries/cuSPARSE/cuSPARSE_05.cu | 288 --- .../libraries/cuSPARSE/cuSPARSE_06.cu | 269 --- .../libraries/cuSPARSE/cuSPARSE_07.cu | 302 --- .../libraries/cuSPARSE/cuSPARSE_08.cu | 413 ----- .../libraries/cuSPARSE/cuSPARSE_09.cu | 414 ----- .../libraries/cuSPARSE/cuSPARSE_10.cu | 507 ------ .../libraries/cuSPARSE/cuSPARSE_11.cu | 327 ---- .../libraries/cuSPARSE/cuSPARSE_12.cu | 410 ----- .../unit_tests/namespace/ns_kernel_launch.cu | 28 - .../unit_tests/pp/pp_if_else_conditionals.cu | 30 - .../pp/pp_if_else_conditionals_01.cu | 52 - .../pp/pp_if_else_conditionals_01_LLVM_10.cu | 52 - .../pp/pp_if_else_conditionals_LLVM_10.cu | 30 - .../0_MatrixTranspose/MatrixTranspose.cpp | 130 -- .../11_texture_driver/tex2dKernel.cpp | 36 - .../11_texture_driver/texture2dDrv.cpp | 169 -- .../2_Cookbook/13_occupancy/occupancy.cpp | 198 -- .../2_Cookbook/1_hipEvent/hipEvent.cpp | 181 -- .../2_Cookbook/2_Profiler/Profiler.cpp | 250 --- .../samples/2_Cookbook/7_streams/stream.cpp | 153 -- .../2_Cookbook/8_peer2peer/peer2peer.cpp | 225 --- .../unit_tests/samples/MallocManaged.cpp | 45 - .../unit_tests/samples/allocators.cu | 53 - .../hipify-clang/unit_tests/samples/axpy.cu | 97 - .../unit_tests/samples/coalescing.cu | 117 -- .../unit_tests/samples/cudaRegister.cu | 106 -- .../samples/dynamic_shared_memory.cu | 45 - .../hipify-clang/unit_tests/samples/intro.cu | 174 -- .../hipify-clang/unit_tests/samples/square.cu | 112 -- .../samples/static_shared_memory.cu | 45 - .../unit_tests/samples/vec_add.cu | 89 - 121 files changed, 23094 deletions(-) delete mode 100644 hipamd/hipify-clang/CMakeLists.txt delete mode 100644 hipamd/hipify-clang/README.md delete mode 100644 hipamd/hipify-clang/packaging/hipify-clang.txt delete mode 100644 hipamd/hipify-clang/patches/patch_for_clang_7.0.0_bug_38811.zip delete mode 100644 hipamd/hipify-clang/patches/patch_for_clang_7.0.1_bug_38811.zip delete mode 100644 hipamd/hipify-clang/patches/patch_for_clang_7.1.0_bug_38811.zip delete mode 100644 hipamd/hipify-clang/patches/patch_for_clang_8.0.0_bug_38811.zip delete mode 100644 hipamd/hipify-clang/patches/patch_for_clang_8.0.1_bug_38811.zip delete mode 100644 hipamd/hipify-clang/src/ArgParse.cpp delete mode 100644 hipamd/hipify-clang/src/ArgParse.h delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP.h delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_BLAS_API_functions.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_BLAS_API_types.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_CAFFE2_API_functions.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_CAFFE2_API_types.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_CUB_API_types.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_Complex_API_functions.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_Complex_API_types.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_DNN_API_functions.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_DNN_API_types.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_Device_functions.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_Driver_API_functions.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_Driver_API_types.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_FFT_API_functions.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_FFT_API_types.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_Perl.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_Python.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_RAND_API_functions.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_RAND_API_types.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_Runtime_API_functions.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_Runtime_API_types.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_SPARSE_API_functions.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_SPARSE_API_types.cpp delete mode 100644 hipamd/hipify-clang/src/CUDA2HIP_Scripting.h delete mode 100644 hipamd/hipify-clang/src/HipifyAction.cpp delete mode 100644 hipamd/hipify-clang/src/HipifyAction.h delete mode 100644 hipamd/hipify-clang/src/LLVMCompat.cpp delete mode 100644 hipamd/hipify-clang/src/LLVMCompat.h delete mode 100644 hipamd/hipify-clang/src/ReplacementsFrontendActionFactory.h delete mode 100644 hipamd/hipify-clang/src/Statistics.cpp delete mode 100644 hipamd/hipify-clang/src/Statistics.h delete mode 100644 hipamd/hipify-clang/src/StringUtils.cpp delete mode 100644 hipamd/hipify-clang/src/StringUtils.h delete mode 100644 hipamd/hipify-clang/src/main.cpp delete mode 100644 hipamd/tests/hipify-clang/lit.cfg delete mode 100644 hipamd/tests/hipify-clang/lit.site.cfg.in delete mode 100644 hipamd/tests/hipify-clang/run_test.bat delete mode 100755 hipamd/tests/hipify-clang/run_test.sh delete mode 100644 hipamd/tests/hipify-clang/unit_tests/casts/reinterpret_cast.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/device/atomics.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/device/device_symbols.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/device/math_functions.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/headers/headers_test_01.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/headers/headers_test_02.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/headers/headers_test_03.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/headers/headers_test_04.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/headers/headers_test_05.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/headers/headers_test_06.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/headers/headers_test_07.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/headers/headers_test_08.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/headers/headers_test_09.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/headers/headers_test_10.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/headers/headers_test_11.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/kernel_launch/kernel_launch_01.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/CAFFE2/caffe2/core/common_cudnn.h delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/CAFFE2/caffe2/operators/spatial_batch_norm_op.h delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/CAFFE2/caffe2_01.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/CAFFE2/caffe2_02.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/CUB/cub_01.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/CUB/cub_02.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/CUB/cub_03.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/cublas_0_based_indexing.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/cublas_1_based_indexing.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/cublas_sgemm_matrix_multiplication.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/rocBLAS/cublas_0_based_indexing_rocblas.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/rocBLAS/cublas_1_based_indexing_rocblas.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/rocBLAS/cublas_sgemm_matrix_multiplication_rocblas.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuComplex/cuComplex_Julia.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuDNN/cudnn_convolution_forward.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuDNN/cudnn_softmax.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuFFT/simple_cufft.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuRAND/benchmark_curand_generate.cpp delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuRAND/benchmark_curand_kernel.cpp delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuRAND/cmdparser.hpp delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuRAND/poisson_api_example.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_01.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_02.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_03.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_04.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_05.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_06.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_07.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_08.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_09.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_10.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_11.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_12.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/namespace/ns_kernel_launch.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/pp/pp_if_else_conditionals.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/pp/pp_if_else_conditionals_01.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/pp/pp_if_else_conditionals_01_LLVM_10.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/pp/pp_if_else_conditionals_LLVM_10.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/0_MatrixTranspose/MatrixTranspose.cpp delete mode 100644 hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/11_texture_driver/tex2dKernel.cpp delete mode 100644 hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/11_texture_driver/texture2dDrv.cpp delete mode 100644 hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/13_occupancy/occupancy.cpp delete mode 100644 hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/1_hipEvent/hipEvent.cpp delete mode 100644 hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/2_Profiler/Profiler.cpp delete mode 100644 hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/7_streams/stream.cpp delete mode 100644 hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/8_peer2peer/peer2peer.cpp delete mode 100644 hipamd/tests/hipify-clang/unit_tests/samples/MallocManaged.cpp delete mode 100644 hipamd/tests/hipify-clang/unit_tests/samples/allocators.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/samples/axpy.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/samples/coalescing.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/samples/cudaRegister.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/samples/dynamic_shared_memory.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/samples/intro.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/samples/square.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/samples/static_shared_memory.cu delete mode 100644 hipamd/tests/hipify-clang/unit_tests/samples/vec_add.cu diff --git a/hipamd/hipify-clang/CMakeLists.txt b/hipamd/hipify-clang/CMakeLists.txt deleted file mode 100644 index 875b5dad74..0000000000 --- a/hipamd/hipify-clang/CMakeLists.txt +++ /dev/null @@ -1,198 +0,0 @@ -cmake_minimum_required(VERSION 3.5.1) - -project(hipify-clang) - -if (MSVC AND MSVC_VERSION VERSION_LESS "1900") - message(SEND_ERROR "hipify-clang could be built by Visual Studio 14 2015 or higher.") - return() -endif() - -find_package(LLVM REQUIRED) -message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}:") -message(STATUS " - CMake module path: ${LLVM_CMAKE_DIR}") -message(STATUS " - Include path : ${LLVM_INCLUDE_DIRS}") -message(STATUS " - Binary path : ${LLVM_TOOLS_BINARY_DIR}") - -option(HIPIFY_CLANG_TESTS "Build the tests for hipify-clang, if lit is installed" OFF) - -list(APPEND CMAKE_MODULE_PATH ${LLVM_CMAKE_DIR}) -include(AddLLVM) - -include_directories(${LLVM_INCLUDE_DIRS}) -link_directories(${LLVM_LIBRARY_DIRS}) -add_definitions(${LLVM_DEFINITIONS}) - -file(GLOB_RECURSE HIPIFY_SOURCES src/*.cpp) -file(GLOB_RECURSE HIPIFY_HEADERS src/*.h) -add_llvm_executable(hipify-clang ${HIPIFY_SOURCES} ${HIPIFY_HEADERS}) - -set(CMAKE_CXX_COMPILER ${LLVM_TOOLS_BINARY_DIR}/clang++) -set(CMAKE_C_COMPILER ${LLVM_TOOLS_BINARY_DIR}/clang) - -# Link against LLVM and CLANG libraries -target_link_libraries(hipify-clang PRIVATE - clangASTMatchers - clangFrontend - clangTooling - clangParse - clangSerialization - clangSema - clangEdit - clangFormat - clangLex - clangAnalysis - clangDriver - clangAST - clangToolingCore - clangRewrite - clangBasic - LLVMProfileData - LLVMSupport - LLVMMCParser - LLVMMC - LLVMBitReader - LLVMOption - LLVMCore) - -if (LLVM_PACKAGE_VERSION VERSION_GREATER "6.0.1") - target_link_libraries(hipify-clang PRIVATE clangToolingInclusions) -endif() - -if (LLVM_PACKAGE_VERSION VERSION_GREATER "9.0.1") - target_link_libraries(hipify-clang PRIVATE LLVMFrontendOpenMP) -endif() - -if (MSVC) - target_link_libraries(hipify-clang PRIVATE version) - target_compile_options(hipify-clang PRIVATE "/Od /GR- /EHs- /EHc-") - set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} /SUBSYSTEM:WINDOWS") - set(StdCpp "/std:c++") -else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -fno-rtti -fvisibility-inlines-hidden") - set(StdCpp "-std=c++") -endif() - -if (LLVM_PACKAGE_VERSION VERSION_GREATER "9.0") - string(APPEND StdCpp "14") -# MSVC starting from 1900 (VS 2015) supports only the following c++ std values: c++14|c++17|c++latest -elseif (MSVC) - set(StdCpp "") -else() - string(APPEND StdCpp "11") -endif() - -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${StdCpp} -DHIPIFY_CLANG_RES=\\\"${LLVM_LIBRARY_DIRS}/clang/${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}\\\"") - -set(INSTALL_PATH_DOC_STRING "Installation path for hipify-clang") -set(HIPIFY_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}) -if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - if(CMAKE_BUILD_TYPE MATCHES Debug) - set(HIPIFY_INSTALL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/bin" CACHE PATH ${INSTALL_PATH_DOC_STRING} FORCE) - elseif(CMAKE_BUILD_TYPE MATCHES Release) - if (BIN_INSTALL_DIR) - set(HIPIFY_INSTALL_PATH "${BIN_INSTALL_DIR}" CACHE PATH ${INSTALL_PATH_DOC_STRING} FORCE) - else() - set(HIPIFY_INSTALL_PATH "${PROJECT_BINARY_DIR}/bin" CACHE PATH ${INSTALL_PATH_DOC_STRING} FORCE) - endif() - else() - message(FATAL_ERROR "Invalid CMAKE_BUILD_TYPE specified. Valid values are Debug and Release") - endif() -elseif(BIN_INSTALL_DIR) - set(HIPIFY_INSTALL_PATH "${BIN_INSTALL_DIR}" CACHE PATH ${INSTALL_PATH_DOC_STRING} FORCE) -endif() - -install(TARGETS hipify-clang DESTINATION ${HIPIFY_INSTALL_PATH}) - -install( - DIRECTORY ${LLVM_DIR}/../../clang/${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}/ - DESTINATION ${HIPIFY_INSTALL_PATH} - COMPONENT clang-resource-headers - FILES_MATCHING - PATTERN "*.h" - PATTERN "*.modulemap" - PATTERN "algorithm" - PATTERN "complex" - PATTERN "new" - PATTERN "ppc_wrappers" EXCLUDE - PATTERN "openmp_wrappers" EXCLUDE) - -if (UNIX) - set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hipify-clang) - configure_file(packaging/hipify-clang.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) - add_custom_target(pkg_hipify-clang COMMAND ${CMAKE_COMMAND} . - COMMAND rm -rf *.deb *.rpm *.tar.gz - COMMAND make package - COMMAND cp *.deb ${PROJECT_BINARY_DIR} - COMMAND cp *.rpm ${PROJECT_BINARY_DIR} - COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} - WORKING_DIRECTORY ${BUILD_DIR}) - - file(GENERATE OUTPUT ${PROJECT_BINARY_DIR}/fixnames - CONTENT "pwd; for i in *.deb; do mv \"\$i\" \"\${i/.deb/-amd64.deb}\" ; done - for i in *.rpm ; do mv \$i \${i/.rpm/.x86_64.rpm} ; done") - - add_custom_target(package_hipify-clang - COMMAND bash ${PROJECT_BINARY_DIR}/fixnames - WORKING_DIRECTORY ${PROJECT_BINARY_DIR} - DEPENDS pkg_hipify-clang) -endif() - -if (HIPIFY_CLANG_TESTS) - find_package(PythonInterp 2.7 REQUIRED) - - function (require_program PROGRAM_NAME) - find_program(FOUND_${PROGRAM_NAME} ${PROGRAM_NAME}) - if (FOUND_${PROGRAM_NAME}) - message(STATUS "Found ${PROGRAM_NAME}: ${FOUND_${PROGRAM_NAME}}") - else() - message(SEND_ERROR "Can't find ${PROGRAM_NAME}. Either set HIPIFY_CLANG_TESTS to OFF to disable hipify tests, or install the missing program.") - endif() - endfunction() - - require_program(lit) - require_program(FileCheck) - - find_package(CUDA REQUIRED) - if ((CUDA_VERSION VERSION_LESS "7.0") OR (LLVM_PACKAGE_VERSION VERSION_LESS "3.8") OR - (CUDA_VERSION VERSION_GREATER "7.5" AND LLVM_PACKAGE_VERSION VERSION_LESS "4.0") OR - (CUDA_VERSION VERSION_GREATER "8.0" AND LLVM_PACKAGE_VERSION VERSION_LESS "6.0") OR - (CUDA_VERSION VERSION_GREATER "9.0" AND LLVM_PACKAGE_VERSION VERSION_LESS "7.0") OR - (CUDA_VERSION VERSION_GREATER "9.2" AND LLVM_PACKAGE_VERSION VERSION_LESS "8.0") OR - (CUDA_VERSION VERSION_GREATER "10.0" AND LLVM_PACKAGE_VERSION VERSION_LESS "9.0") OR - (CUDA_VERSION VERSION_GREATER "10.1" AND LLVM_PACKAGE_VERSION VERSION_LESS "10.0")) - message(SEND_ERROR "CUDA ${CUDA_VERSION} is not supported by LLVM ${LLVM_PACKAGE_VERSION}.") - if (CUDA_VERSION_MAJOR VERSION_LESS "7") - message(STATUS "Please install CUDA 7.0 or higher.") - elseif (CUDA_VERSION_MAJOR VERSION_LESS "8") - message(STATUS "Please install LLVM + clang 3.8 or higher.") - elseif (CUDA_VERSION_MAJOR VERSION_LESS "9") - message(STATUS "Please install LLVM + clang 4.0 or higher.") - elseif (CUDA_VERSION VERSION_EQUAL "9.0") - message(STATUS "Please install LLVM + clang 6.0 or higher.") - elseif (CUDA_VERSION_MAJOR VERSION_LESS "10") - message(STATUS "Please install LLVM + clang 7.0 or higher.") - elseif (CUDA_VERSION VERSION_EQUAL "10.0") - message(STATUS "Please install LLVM + clang 8.0 or higher.") - elseif (CUDA_VERSION VERSION_EQUAL "10.1") - message(STATUS "Please install LLVM + clang 9.0 or higher.") - elseif (CUDA_VERSION VERSION_EQUAL "10.2") - message(STATUS "Please install LLVM + clang 10.0 or higher.") - endif() - endif() - - configure_file( - ${CMAKE_CURRENT_LIST_DIR}/../tests/hipify-clang/lit.site.cfg.in - ${CMAKE_CURRENT_BINARY_DIR}/tests/hipify-clang/lit.site.cfg - @ONLY) - - add_lit_testsuite(test-hipify "Running HIPify regression tests" - ${CMAKE_CURRENT_LIST_DIR}/../tests/hipify-clang - PARAMS site_config=${CMAKE_CURRENT_BINARY_DIR}/tests/hipify-clang/lit.site.cfg - ARGS -v - DEPENDS hipify-clang) - - add_custom_target(test-hipify-clang) - add_dependencies(test-hipify-clang test-hipify) - set_target_properties(test-hipify-clang PROPERTIES FOLDER "Tests") -endif() diff --git a/hipamd/hipify-clang/README.md b/hipamd/hipify-clang/README.md deleted file mode 100644 index 8cdeceace0..0000000000 --- a/hipamd/hipify-clang/README.md +++ /dev/null @@ -1,507 +0,0 @@ -# HIPIFY -### Tools to translate CUDA source code into portable HIP C++ automatically -## Table of Contents - - - -- [hipify-clang](#clang) - * [Dependencies](#dependencies) - * [Usage](#hipify-clang-usage) - * [Building](#building) - * [Testing](#testing) - * [Linux](#linux) - * [Windows](#windows) -- [hipify-perl](#perl) - * [Usage](#hipify-perl-usage) - * [Building](#hipify-perl-building) -- [Supported CUDA APIs](#cuda-apis) -- [Disclaimer](#disclaimer) - - - -## hipify-clang - -`hipify-clang` is a clang-based tool for translation CUDA sources into HIP sources. -It translates CUDA source into an abstract syntax tree, which is being traversed by transformation matchers. -After applying all the matchers, the output HIP source is produced. - -**Advantages:** - -1. It is a translator; thus, any even very complicated constructs will be parsed successfully, or an error will be reported. -2. It supports clang options like [`-I`](https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-i-dir), [`-D`](https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-d-macro), [`--cuda-path`](https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-cuda-path), etc. -3. Seamless support of new CUDA versions as it is clang's responsibility. -4. Ease in support. - -**Disadvantages:** - -1. The main advantage is also the main disadvantage: the input CUDA code should be correct; incorrect code wouldn't be translated to HIP. -2. CUDA should be installed and provided in case of multiple installations by `--cuda-path` option. -3. All the includes and defines should be provided to transform code successfully. - -### hipify-clang: dependencies - -`hipify-clang` requires: - -1. [**LLVM+CLANG**](http://releases.llvm.org) of at least version [3.8.0](http://releases.llvm.org/download.html#3.8.0); the latest stable and recommended release: [**10.0.0**](http://releases.llvm.org/download.html#10.0.0). - -2. [**CUDA**](https://developer.nvidia.com/cuda-downloads) of at least version [7.0](https://developer.nvidia.com/cuda-toolkit-70), the latest supported version is [**10.2**](https://developer.nvidia.com/cuda-downloads). - -| **LLVM release version** | **CUDA latest supported version** | **Windows** | **Linux** | -|:----------------------------------------------------------:|:------------------------------------------------------------------------:|:-----------:|:---------:| -| [3.8.0](http://releases.llvm.org/download.html#3.8.0) | [7.5](https://developer.nvidia.com/cuda-75-downloads-archive) | + | + | -| [3.8.1](http://releases.llvm.org/download.html#3.8.1) | [7.5](https://developer.nvidia.com/cuda-75-downloads-archive) | + | + | -| [3.9.0](http://releases.llvm.org/download.html#3.9.0) | [7.5](https://developer.nvidia.com/cuda-75-downloads-archive) | + | + | -| [3.9.1](http://releases.llvm.org/download.html#3.9.1) | [7.5](https://developer.nvidia.com/cuda-75-downloads-archive) | + | + | -| [4.0.0](http://releases.llvm.org/download.html#4.0.0) | [8.0](https://developer.nvidia.com/cuda-80-ga2-download-archive) | + | + | -| [4.0.1](http://releases.llvm.org/download.html#4.0.1) | [8.0](https://developer.nvidia.com/cuda-80-ga2-download-archive) | + | + | -| [5.0.0](http://releases.llvm.org/download.html#5.0.0) | [8.0](https://developer.nvidia.com/cuda-80-ga2-download-archive) | + | + | -| [5.0.1](http://releases.llvm.org/download.html#5.0.1) | [8.0](https://developer.nvidia.com/cuda-80-ga2-download-archive) | + | + | -| [5.0.2](http://releases.llvm.org/download.html#5.0.2) | [8.0](https://developer.nvidia.com/cuda-80-ga2-download-archive) | + | + | -| [6.0.0](http://releases.llvm.org/download.html#6.0.0) | [9.0](https://developer.nvidia.com/cuda-90-download-archive) | + | + | -| [6.0.1](http://releases.llvm.org/download.html#6.0.1) | [9.0](https://developer.nvidia.com/cuda-90-download-archive) | + | + | -| [7.0.0](http://releases.llvm.org/download.html#7.0.0) | [9.2](https://developer.nvidia.com/cuda-92-download-archive) | -
not working due to
the clang's bug [38811](https://bugs.llvm.org/show_bug.cgi?id=38811)
+
[patch](patches/patch_for_clang_7.0.0_bug_38811.zip)*
| -
not working due to
the clang's bug [36384](https://bugs.llvm.org/show_bug.cgi?id=36384) | -| [7.0.1](http://releases.llvm.org/download.html#7.0.1) | [9.2](https://developer.nvidia.com/cuda-92-download-archive) | -
not working due to
the clang's bug [38811](https://bugs.llvm.org/show_bug.cgi?id=38811)
+
[patch](patches/patch_for_clang_7.0.1_bug_38811.zip)*
| -
not working due to
the clang's bug [36384](https://bugs.llvm.org/show_bug.cgi?id=36384) | -| [7.1.0](http://releases.llvm.org/download.html#7.1.0) | [9.2](https://developer.nvidia.com/cuda-92-download-archive) | -
not working due to
the clang's bug [38811](https://bugs.llvm.org/show_bug.cgi?id=38811)
+
[patch](patches/patch_for_clang_7.1.0_bug_38811.zip)*
| -
not working due to
the clang's bug [36384](https://bugs.llvm.org/show_bug.cgi?id=36384) | -| [8.0.0](http://releases.llvm.org/download.html#8.0.0) | [10.0](https://developer.nvidia.com/cuda-10.0-download-archive) | -
not working due to
the clang's bug [38811](https://bugs.llvm.org/show_bug.cgi?id=38811)
+
[patch](patches/patch_for_clang_8.0.0_bug_38811.zip)*
| + | -| [8.0.1](http://releases.llvm.org/download.html#8.0.1) | [10.0](https://developer.nvidia.com/cuda-10.0-download-archive) | -
not working due to
the clang's bug [38811](https://bugs.llvm.org/show_bug.cgi?id=38811)
+
[patch](patches/patch_for_clang_8.0.1_bug_38811.zip)*
| + | -| [9.0.0](http://releases.llvm.org/download.html#9.0.0) | [10.1](https://developer.nvidia.com/cuda-10.1-download-archive-base) | + | + | -| [9.0.1](http://releases.llvm.org/download.html#9.0.1) | [10.1](https://developer.nvidia.com/cuda-10.1-download-archive-base) | + | + | -| [**10.0.0**](http://releases.llvm.org/download.html#10.0.0)| [**10.2**](https://developer.nvidia.com/cuda-downloads) | +
**LATEST STABLE RELEASE** | +
**LATEST STABLE RELEASE** | - -`*` Download the patch and unpack it into your `LLVM` distributive directory; a few header files will be overwritten; rebuilding of `LLVM` is not needed. - -In most cases, you can get a suitable version of `LLVM+CLANG` with your package manager. - -Failing that or having multiple versions of `LLVM`, you can [download a release archive](http://releases.llvm.org/), build or install it, and set -[CMAKE_PREFIX_PATH](https://cmake.org/cmake/help/v3.5/variable/CMAKE_PREFIX_PATH.html) so `cmake` can find it; for instance: `-DCMAKE_PREFIX_PATH=d:\LLVM\10.0.0\dist` - -### hipify-clang: usage - -To process a file, `hipify-clang` needs access to the same headers that would be required to compile it with clang. - -For example: - -```shell -./hipify-clang square.cu --cuda-path=/usr/local/cuda-10.2 -I /usr/local/cuda-10.2/samples/common/inc -``` - -`hipify-clang` arguments are given first, followed by a separator `'--'`, and then the arguments you'd pass to `clang` if you -were compiling the input file. For example: - -```bash -./hipify-clang cpp17.cu --cuda-path=/usr/local/cuda-10.2 -- -std=c++17 -``` - -The [Clang manual for compiling CUDA](https://llvm.org/docs/CompileCudaWithLLVM.html#compiling-cuda-code) may be useful. - -For a list of `hipify-clang` options, run `hipify-clang --help`. - -### hipify-clang: building - -Assuming this repository is at `./HIP`: - -```bash -cd hipify-clang -mkdir build dist -cd build - -cmake \ - -DCMAKE_INSTALL_PREFIX=../dist \ - -DCMAKE_BUILD_TYPE=Release \ - .. - -make -j install -``` -On Windows, the following option should be specified for `cmake` at first place: `-G "Visual Studio 16 2019 Win64"`; the generated `hipify-clang.sln` should be built by `Visual Studio 16 2019` instead of `make.` -Please, see [hipify-clang: Windows](#windows) for the supported tools for building. - -Debug build type `-DCMAKE_BUILD_TYPE=Debug` is also supported and tested; `LLVM+CLANG` should be built in `Debug` mode as well. -64-bit build mode (`-Thost=x64` on Windows) is also supported; `LLVM+CLANG` should be built in 64-bit mode as well. - -The binary can then be found at `./dist/bin/hipify-clang`. - -### hipify-clang: testing - -`hipify-clang` has unit tests using `LLVM` [`lit`](https://llvm.org/docs/CommandGuide/lit.html)/[`FileCheck`](https://llvm.org/docs/CommandGuide/FileCheck.html). - -`LLVM+CLANG` should be built from sources, pre-built binaries are not exhaustive for testing. - -**LLVM 9.0.1 or older:** - -1. download [`LLVM`](http://releases.llvm.org/9.0.1/llvm-9.0.1.src.tar.xz)+[`CLANG`](http://releases.llvm.org/9.0.1/cfe-9.0.1.src.tar.xz) sources; -2. build [`LLVM+CLANG`](http://releases.llvm.org/9.0.0/docs/CMake.html): - - **Linux**: - ```bash - cmake \ - -DCMAKE_INSTALL_PREFIX=../dist \ - -DLLVM_SOURCE_DIR=../llvm \ - -DLLVM_TARGETS_TO_BUILD="X86;NVPTX" \ - -DCMAKE_BUILD_TYPE=Release \ - ../llvm - make -j install - ``` - **Windows**: - ```shell - cmake \ - -G "Visual Studio 16 2019" \ - -A x64 \ - -DCMAKE_INSTALL_PREFIX=../dist \ - -DLLVM_SOURCE_DIR=../llvm \ - -DLLVM_TARGETS_TO_BUILD="NVPTX" \ - -DCMAKE_BUILD_TYPE=Release \ - -Thost=x64 \ - ../llvm - ``` -Run `Visual Studio 16 2019`, open the generated `LLVM.sln`, build all, build project `INSTALL`. - -**LLVM 10.0.0 or newer:** - -1. download [`LLVM project`](https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/llvm-project-10.0.0.tar.xz) sources; -2. build [`LLVM project`](http://llvm.org/docs/CMake.html): - - **Linux**: - ```bash - cmake \ - -DCMAKE_INSTALL_PREFIX=../dist \ - -DLLVM_SOURCE_DIR=../llvm-project \ - -DLLVM_TARGETS_TO_BUILD="X86;NVPTX" \ - -DLLVM_ENABLE_PROJECTS="clang" \ - -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON - -DCMAKE_BUILD_TYPE=Release \ - ../llvm-project/llvm - make -j install - ``` - **Windows**: - ```shell - cmake \ - -G "Visual Studio 16 2019" \ - -A x64 \ - -DCMAKE_INSTALL_PREFIX=../dist \ - -DLLVM_SOURCE_DIR=../llvm-project \ - -DLLVM_TARGETS_TO_BUILD="NVPTX" \ - -DLLVM_ENABLE_PROJECTS="clang" \ - -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON - -DCMAKE_BUILD_TYPE=Release \ - -Thost=x64 \ - ../llvm-project/llvm - ``` -Run `Visual Studio 16 2019`, open the generated `LLVM.sln`, build all, build project `INSTALL`. - -3. Ensure [`CUDA`](https://developer.nvidia.com/cuda-toolkit-archive) of minimum version 7.0 is installed. - - * Having multiple CUDA installations to choose a particular version the `DCUDA_TOOLKIT_ROOT_DIR` option should be specified: - - - ***Linux***: `-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.2` - - - ***Windows***: `-DCUDA_TOOLKIT_ROOT_DIR="c:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2"` - - `-DCUDA_SDK_ROOT_DIR="c:/ProgramData/NVIDIA Corporation/CUDA Samples/v10.2"` - -4. Ensure [`cuDNN`](https://developer.nvidia.com/rdp/cudnn-archive) of the version corresponding to CUDA's version is installed. - - * Path to cuDNN should be specified by the `CUDA_DNN_ROOT_DIR` option: - - - ***Linux***: `-DCUDA_DNN_ROOT_DIR=/srv/CUDNN/cudnn-10.2-v7.6.5.32` - - - ***Windows***: `-DCUDA_DNN_ROOT_DIR=d:/CUDNN/cudnn-10.2-windows10-x64-v7.6.5.32` - -5. Ensure [`CUB`](https://github.com/NVlabs/cub) of the version corresponding to CUDA's version is installed. - - * Path to CUB should be specified by the `CUDA_CUB_ROOT_DIR` option: - - - ***Linux***: `-DCUDA_CUB_ROOT_DIR=/srv/git/CUB` - - - ***Windows***: `-DCUDA_CUB_ROOT_DIR=d:/GIT/cub` - -5. Ensure [`python`](https://www.python.org/downloads) of minimum required version 2.7 is installed. - -6. Ensure `lit` and `FileCheck` are installed - these are distributed with `LLVM`. - - * Install `lit` into `python`: - - - ***Linux***: `python /srv/git/LLVM/10.0.0/llvm/utils/lit/setup.py install` - - - ***Windows***: `python d:/LLVM/10.0.0/llvm/utils/lit/setup.py install` - - * Starting with LLVM 6.0.1 path to `llvm-lit` python script should be specified by the `LLVM_EXTERNAL_LIT` option: - - - ***Linux***: `-DLLVM_EXTERNAL_LIT=/srv/git/LLVM/10.0.0/build/bin/llvm-lit` - - - ***Windows***: `-DLLVM_EXTERNAL_LIT=d:/LLVM/10.0.0/build/Release/bin/llvm-lit.py` - - * `FileCheck`: - - - ***Linux***: copy from `/srv/git/LLVM/10.0.0/build/bin/` to `CMAKE_INSTALL_PREFIX/dist/bin` - - - ***Windows***: copy from `d:/LLVM/10.0.0/build/Release/bin` to `CMAKE_INSTALL_PREFIX/dist/bin` - - - Or specify the path to `FileCheck` in `CMAKE_INSTALL_PREFIX` option - -7. Set `HIPIFY_CLANG_TESTS` option turned on: `-DHIPIFY_CLANG_TESTS=1`. - -8. Build and run tests: - -### hipify-clang: Linux - -On Linux the following configurations are tested: - -Ubuntu 14: LLVM 5.0.0 - 6.0.1, CUDA 7.0 - 9.0, cudnn-5.0.5 - cudnn-7.6.5.32 - -Ubuntu 16-18: LLVM 8.0.0 - 10.0.0, CUDA 8.0 - 10.2, cudnn-5.1.10 - cudnn-7.6.5.32 - -Minimum build system requirements for the above configurations: - -Python 2.7, cmake 3.5.1, GNU C/C++ 5.4.0. - -Here is an example of building `hipify-clang` with testing support on `Ubuntu 16.04`: - -```bash -cmake - -DHIPIFY_CLANG_TESTS=1 \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=../dist \ - -DCMAKE_PREFIX_PATH=/srv/git/LLVM/10.0.0/dist \ - -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.2 \ - -DCUDA_DNN_ROOT_DIR=/srv/CUDNN/cudnn-10.2-v7.6.5.32 \ - -DCUDA_CUB_ROOT_DIR=/srv/git/CUB \ - -DLLVM_EXTERNAL_LIT=/srv/git/LLVM/10.0.0/build/bin/llvm-lit \ - .. -``` -*A corresponding successful output:* -```shell --- The C compiler identification is GNU 7.4.0 --- The CXX compiler identification is GNU 7.4.0 --- Check for working C compiler: /usr/bin/cc --- Check for working C compiler: /usr/bin/cc -- works --- Detecting C compiler ABI info --- Detecting C compiler ABI info - done --- Detecting C compile features --- Detecting C compile features - done --- Check for working CXX compiler: /usr/bin/c++ --- Check for working CXX compiler: /usr/bin/c++ -- works --- Detecting CXX compiler ABI info --- Detecting CXX compiler ABI info - done --- Detecting CXX compile features --- Detecting CXX compile features - done --- Found LLVM 10.0.0: --- - CMake module path: /srv/git/LLVM/10.0.0/dist/lib/cmake/llvm --- - Include path : /srv/git/LLVM/10.0.0/dist/include --- - Binary path : /srv/git/LLVM/10.0.0/dist/bin --- Linker detection: GNU ld --- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.12", minimum required is "2.7") --- Found lit: /usr/local/bin/lit --- Found FileCheck: /srv/git/LLVM/10.0.0/dist/bin/FileCheck --- Looking for pthread.h --- Looking for pthread.h - found --- Looking for pthread_create --- Looking for pthread_create - not found --- Looking for pthread_create in pthreads --- Looking for pthread_create in pthreads - not found --- Looking for pthread_create in pthread --- Looking for pthread_create in pthread - found --- Found Threads: TRUE --- Found CUDA: /usr/local/cuda-10.2 (found version "10.2") --- Configuring done --- Generating done --- Build files have been written to: /srv/git/HIP/hipify-clang/build -``` -```shell -make test-hipify -``` -*A corresponding successful output:* -```shell -Running HIPify regression tests -======================================== -CUDA 10.2 - will be used for testing -LLVM 10.0.0 - will be used for testing -x86_64 - Platform architecture -Linux 5.2.0 - Platform OS -64 - hipify-clang binary bitness -64 - python 2.7.12 binary bitness -======================================== --- Testing: 69 tests, 12 threads -- -PASS: hipify :: unit_tests/casts/reinterpret_cast.cu (1 of 69) -PASS: hipify :: unit_tests/device/math_functions.cu (2 of 69) -PASS: hipify :: unit_tests/device/atomics.cu (3 of 69) -PASS: hipify :: unit_tests/headers/headers_test_01.cu (4 of 69) -PASS: hipify :: unit_tests/device/device_symbols.cu (5 of 69) -PASS: hipify :: unit_tests/headers/headers_test_02.cu (6 of 69) -PASS: hipify :: unit_tests/headers/headers_test_03.cu (7 of 69) -PASS: hipify :: unit_tests/headers/headers_test_05.cu (8 of 69) -PASS: hipify :: unit_tests/headers/headers_test_04.cu (9 of 69) -PASS: hipify :: unit_tests/headers/headers_test_07.cu (10 of 69) -PASS: hipify :: unit_tests/headers/headers_test_06.cu (11 of 69) -PASS: hipify :: unit_tests/headers/headers_test_11.cu (12 of 69) -PASS: hipify :: unit_tests/headers/headers_test_10.cu (13 of 69) -PASS: hipify :: unit_tests/headers/headers_test_08.cu (14 of 69) -PASS: hipify :: unit_tests/kernel_launch/kernel_launch_01.cu (15 of 69) -PASS: hipify :: unit_tests/libraries/CAFFE2/caffe2_02.cu (16 of 69) -PASS: hipify :: unit_tests/headers/headers_test_09.cu (17 of 69) -PASS: hipify :: unit_tests/libraries/CAFFE2/caffe2_01.cu (18 of 69) -PASS: hipify :: unit_tests/libraries/cuBLAS/cublas_0_based_indexing.cu (19 of 69) -PASS: hipify :: unit_tests/libraries/cuBLAS/cublas_1_based_indexing.cu (20 of 69) -PASS: hipify :: unit_tests/libraries/CUB/cub_03.cu (21 of 69) -PASS: hipify :: unit_tests/libraries/CUB/cub_01.cu (22 of 69) -PASS: hipify :: unit_tests/libraries/CUB/cub_02.cu (23 of 69) -PASS: hipify :: unit_tests/libraries/cuBLAS/cublas_sgemm_matrix_multiplication.cu (24 of 69) -PASS: hipify :: unit_tests/libraries/cuBLAS/rocBLAS/cublas_0_based_indexing_rocblas.cu (25 of 69) -PASS: hipify :: unit_tests/libraries/cuBLAS/rocBLAS/cublas_1_based_indexing_rocblas.cu (26 of 69) -PASS: hipify :: unit_tests/libraries/cuBLAS/rocBLAS/cublas_sgemm_matrix_multiplication_rocblas.cu (27 of 69) -PASS: hipify :: unit_tests/libraries/cuComplex/cuComplex_Julia.cu (28 of 69) -PASS: hipify :: unit_tests/libraries/cuDNN/cudnn_softmax.cu (29 of 69) -PASS: hipify :: unit_tests/libraries/cuFFT/simple_cufft.cu (30 of 69) -PASS: hipify :: unit_tests/libraries/cuDNN/cudnn_convolution_forward.cu (31 of 69) -PASS: hipify :: unit_tests/libraries/cuRAND/poisson_api_example.cu (32 of 69) -PASS: hipify :: unit_tests/libraries/cuRAND/benchmark_curand_generate.cpp (33 of 69) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_01.cu (34 of 69) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_02.cu (35 of 69) -PASS: hipify :: unit_tests/libraries/cuRAND/benchmark_curand_kernel.cpp (36 of 69) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_03.cu (37 of 69) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_04.cu (38 of 69) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_05.cu (39 of 69) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_06.cu (40 of 69) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_07.cu (41 of 69) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_08.cu (42 of 69) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_09.cu (43 of 69) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_10.cu (44 of 69) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_11.cu (45 of 69) -PASS: hipify :: unit_tests/namespace/ns_kernel_launch.cu (46 of 69) -PASS: hipify :: unit_tests/libraries/cuSPARSE/cuSPARSE_12.cu (47 of 69) -PASS: hipify :: unit_tests/pp/pp_if_else_conditionals.cu (48 of 69) -PASS: hipify :: unit_tests/pp/pp_if_else_conditionals_01.cu (49 of 69) -PASS: hipify :: unit_tests/pp/pp_if_else_conditionals_01_LLVM_10.cu (50 of 69) -PASS: hipify :: unit_tests/pp/pp_if_else_conditionals_LLVM_10.cu (51 of 69) -PASS: hipify :: unit_tests/samples/2_Cookbook/11_texture_driver/tex2dKernel.cpp (52 of 69) -PASS: hipify :: unit_tests/samples/2_Cookbook/0_MatrixTranspose/MatrixTranspose.cpp (53 of 69) -PASS: hipify :: unit_tests/samples/2_Cookbook/11_texture_driver/texture2dDrv.cpp (54 of 69) -PASS: hipify :: unit_tests/samples/2_Cookbook/1_hipEvent/hipEvent.cpp (55 of 69) -PASS: hipify :: unit_tests/samples/2_Cookbook/13_occupancy/occupancy.cpp (56 of 69) -PASS: hipify :: unit_tests/samples/2_Cookbook/2_Profiler/Profiler.cpp (57 of 69) -PASS: hipify :: unit_tests/samples/MallocManaged.cpp (58 of 69) -PASS: hipify :: unit_tests/samples/2_Cookbook/7_streams/stream.cpp (59 of 69) -PASS: hipify :: unit_tests/samples/2_Cookbook/8_peer2peer/peer2peer.cpp (60 of 69) -PASS: hipify :: unit_tests/samples/allocators.cu (61 of 69) -PASS: hipify :: unit_tests/samples/coalescing.cu (62 of 69) -PASS: hipify :: unit_tests/samples/axpy.cu (63 of 69) -PASS: hipify :: unit_tests/samples/dynamic_shared_memory.cu (64 of 69) -PASS: hipify :: unit_tests/samples/cudaRegister.cu (65 of 69) -PASS: hipify :: unit_tests/samples/intro.cu (66 of 69) -PASS: hipify :: unit_tests/samples/square.cu (67 of 69) -PASS: hipify :: unit_tests/samples/static_shared_memory.cu (68 of 69) -PASS: hipify :: unit_tests/samples/vec_add.cu (69 of 69) -Testing Time: 3.23s - Expected Passes : 69 -[100%] Built target test-hipify -``` -### hipify-clang: Windows - -*Tested configurations:* - -| **LLVM** | **CUDA** | **cuDNN** | **Visual Studio** | **cmake** | **Python** | -|:--------------:|---------:|--------------------:|--------------------------:|----------:|-----------:| -| 5.0.0 - 5.0.2 | 8.0 | 5.1.10 - 7.1.4.18 | 2017.15.5.2 | 3.5.1 | 3.6.4 | -| 6.0.0 - 6.0.1 | 9.0 | 7.0.5.15 - 7.6.5.32 | 2017.15.5.5 | 3.6.0 | 3.7.2 | -| 7.0.0 - 7.1.0 | 9.2 | 7.6.5.32 | 2017.15.9.11 | 3.13.3 | 3.7.3 | -| 8.0.0 - 8.0.1 | 10.0 | 7.6.5.32 | 2017.15.9.15 | 3.14.2 | 3.7.4 | -| 9.0.0 - 9.0.1 | 10.1 | 7.6.5.32 | 2017.15.9.20, 2019.16.4.5 | 3.16.4 | 3.8.0 | -| 10.0.0 | 10.2 | 7.6.5.32 | 2017.15.9.21, 2019.16.5.1 | 3.17.0 | 3.8.2 | -| 11.0.0git | 10.2 | 7.6.5.32 | 2017.15.9.21, 2019.16.5.1 | 3.17.0 | 3.8.2 | - -*Building with testing support on `Windows 10` by `Visual Studio 16 2019`:* - -```shell -cmake - -G "Visual Studio 16 2019" \ - -A x64 \ - -DHIPIFY_CLANG_TESTS=1 \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=../dist \ - -DCMAKE_PREFIX_PATH=d:/LLVM/10.0.0/dist \ - -DCUDA_TOOLKIT_ROOT_DIR="c:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2" \ - -DCUDA_SDK_ROOT_DIR="c:/ProgramData/NVIDIA Corporation/CUDA Samples/v10.2" \ - -DCUDA_DNN_ROOT_DIR=d:/CUDNN/cudnn-10.2-windows10-x64-v7.6.5.32 \ - -DCUDA_CUB_ROOT_DIR=d:/GIT/cub \ - -DLLVM_EXTERNAL_LIT=d:/LLVM/10.0.0/build/Release/bin/llvm-lit.py \ - -Thost=x64 - .. -``` -*A corresponding successful output:* -```shell --- Found LLVM 10.0.0: --- - CMake module path: d:/LLVM/10.0.0/dist/lib/cmake/llvm --- - Include path : d:/LLVM/10.0.0/dist/include --- - Binary path : d:/LLVM/10.0.0/dist/bin --- Found PythonInterp: c:/Program Files/Python38/python.exe (found suitable version "3.8.2", minimum required is "3.6") --- Found lit: c:/Program Files/Python38/Scripts/lit.exe --- Found FileCheck: d:/LLVM/10.0.0/dist/bin/FileCheck.exe --- Found CUDA: c:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2 (found version "10.2") --- Configuring done --- Generating done --- Build files have been written to: d:/HIP/hipify-clang/build -``` - -Run `Visual Studio 16 2019`, open the generated `hipify-clang.sln`, build project `test-hipify`. - -## hipify-perl - -`hipify-perl` is autogenerated perl-based script which heavily uses regular expressions. - -**Advantages:** - -1. Ease in use. - -2. It doesn't check the input source CUDA code for correctness. - -3. It doesn't have dependencies on 3rd party tools, including CUDA. - -**Disadvantages:** - -1. Current disability (and difficulty in implementing) of transforming the following constructs: - - * macros expansion; - - * namespaces: - - - redefines of CUDA entities in user namespaces; - - - using directive; - - * templates (some cases); - - * device/host function calls distinguishing; - - * header files correct injection; - - * complicated argument lists parsing. - -2. Difficulties in supporting. - -### hipify-perl: usage - -```shell -perl hipify-perl square.cu > square.cu.hip -``` - -### hipify-perl: building - -To generate `hipify-perl`, run `hipify-clang --perl`. Output directory for the generated `hipify-perl` file might be specified by `--o-hipify-perl-dir` option. - -## Supported CUDA APIs - -- [Runtime API](../docs/markdown/CUDA_Runtime_API_functions_supported_by_HIP.md) -- [Driver API](../docs/markdown/CUDA_Driver_API_functions_supported_by_HIP.md) -- [cuComplex API](../docs/markdown/cuComplex_API_supported_by_HIP.md) -- [cuBLAS](../docs/markdown/CUBLAS_API_supported_by_HIP.md) -- [cuRAND](../docs/markdown/CURAND_API_supported_by_HIP.md) -- [cuDNN](../docs/markdown/CUDNN_API_supported_by_HIP.md) -- [cuFFT](../docs/markdown/CUFFT_API_supported_by_HIP.md) -- [cuSPARSE](../docs/markdown/CUSPARSE_API_supported_by_HIP.md) - -## Disclaimer - -The information contained herein is for informational purposes only, and is subject to change without notice. While every precaution has been taken in the preparation of this document, it may contain technical inaccuracies, omissions and typographical errors, and AMD is under no obligation to update or otherwise correct this information. Advanced Micro Devices, Inc. makes no representations or warranties with respect to the accuracy or completeness of the contents of this document, and assumes no liability of any kind, including the implied warranties of noninfringement, merchantability or fitness for particular purposes, with respect to the operation or use of AMD hardware, software or other products described herein. No license, including implied or arising by estoppel, to any intellectual property rights is granted by this document. Terms and limitations applicable to the purchase or use of AMD's products are as set forth in a signed agreement between the parties or in AMD's Standard Terms and Conditions of Sale. - -AMD, the AMD Arrow logo, and combinations thereof are trademarks of Advanced Micro Devices, Inc. Other product names used in this publication are for identification purposes only and may be trademarks of their respective companies. - -Copyright (c) 2014-2020 Advanced Micro Devices, Inc. All rights reserved. diff --git a/hipamd/hipify-clang/packaging/hipify-clang.txt b/hipamd/hipify-clang/packaging/hipify-clang.txt deleted file mode 100644 index b189eff1e6..0000000000 --- a/hipamd/hipify-clang/packaging/hipify-clang.txt +++ /dev/null @@ -1,58 +0,0 @@ -cmake_minimum_required(VERSION 2.8.3) -project(hipify-clang) - -install(PROGRAMS @HIPIFY_INSTALL_PATH@/hipify-clang DESTINATION bin) -install(DIRECTORY @HIPIFY_INSTALL_PATH@/include DESTINATION bin) - -# Check if .hipversion exists(only exists when hipify-clang is built with HIP) -if(EXISTS "@HIPIFY_INSTALL_PATH@/.hipVersion") - set(HIP_BUILD "TRUE") -else() - set(HIP_BUILD "FALSE") -endif() - -if(${HIP_BUILD}) - file(STRINGS @HIPIFY_INSTALL_PATH@/.hipVersion HipVersion) - foreach(NameAndValue ${HipVersion}) - # Get variable name - string(REGEX MATCH "^[^=]+" Name ${NameAndValue}) - # Get the value - string(REPLACE "${Name}=" "" Value ${NameAndValue}) - # Assign the vale to the variable - set(${Name} "${Value}") - endforeach() -endif() - -############################# -# Packaging steps -############################# -set(CPACK_SET_DESTDIR TRUE) -set(CPACK_INSTALL_PREFIX "/opt/rocm/hip") -set(CPACK_PACKAGE_NAME "hipify-clang") -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "hipify-clang: a clang-based tool to translate CUDA source code into portable HIP C++ automatically") -set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc.") -set(CPACK_PACKAGE_CONTACT "Mankov Evgeny ") - -if(${HIP_BUILD}) - set(CPACK_PACKAGE_VERSION ${HIP_VERSION_MAJOR}.${HIP_VERSION_MINOR}.${HIP_VERSION_PATCH}) - set(CPACK_PACKAGE_VERSION_MAJOR ${HIP_VERSION_MAJOR}) - set(CPACK_PACKAGE_VERSION_MINOR ${HIP_VERSION_MINOR}) - set(CPACK_PACKAGE_VERSION_PATCH ${HIP_VERSION_PATCH}) -else() - set(CPACK_PACKAGE_VERSION @LLVM_VERSION_MAJOR@.@LLVM_VERSION_MINOR@.@LLVM_VERSION_PATCH@) - set(CPACK_PACKAGE_VERSION_MAJOR @LLVM_VERSION_MAJOR@) - set(CPACK_PACKAGE_VERSION_MINOR @LLVM_VERSION_MINOR@) - set(CPACK_PACKAGE_VERSION_PATCH @LLVM_VERSION_PATCH@) -endif() - -set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}) -set(CPACK_GENERATOR "TGZ;DEB;RPM") -set(CPACK_BINARY_DEB "ON") -set(CPACK_DEBIAN_PACKAGE_DEPENDS "cuda (>= 7.0)") -set(CPACK_BINARY_RPM "ON") -set(CPACK_RPM_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}") -set(CPACK_RPM_PACKAGE_AUTOREQPROV "NO") -set(CPACK_RPM_PACKAGE_REQUIRES "cuda >= 7.0") -set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/opt") -set(CPACK_SOURCE_GENERATOR "TGZ") -include(CPack) diff --git a/hipamd/hipify-clang/patches/patch_for_clang_7.0.0_bug_38811.zip b/hipamd/hipify-clang/patches/patch_for_clang_7.0.0_bug_38811.zip deleted file mode 100644 index 28205a2645b83be0a278f2132b603ceb697b5d53..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14641 zcma)j19ariwrwK&U?4IcUA9S?{Dww zTD@u&_9rU=0*V3v1^@saIVsX#&3_fpuTPd{`gF4Y(E|D(76z7j)+YZCJB0sX$3{y} zOaI@jaq|9WT#SEXZDws?>11g1UnodGX>N-2TGCYpGXVgAg8>9!`+uNxbpF;u9Rnvr zJsm?MXEOsM9b+eJ14lC(YX@4>aV-yr*`c~mJ|)i(j=W@hcIh3^@HQBjruIM7RoF;W zP&FD(r==(obzpUS^TZ@;^@sJF$J0kf7VdaRaGAYG9<4s_soB{o5*(gyH~XVrFCnT6 z)HS^=ETcH9_G{Qa2kP2r6Y_k}2?1cssY8V0A}UIT{)g zn1W46wX`8U9h?%Wvz}k4DQlyJDAtTFWrnuK48NaE$UlLzw^KmoSL^OlL*wQ+JveMc zsQg~Cm3W=Dr(Bk77$w$j+p4=+=TwzNhZCu}KBmq{Ri zC)v0{+j+Av&QOW;eBqX9h>WKryhR}-ka(dM038b``;OL zWP4_2OIEPqPo#dNENG0bxQPzGO)2Gq$|gfp#{8D)2I`8}5iXdX5MYZoQ`PyC>iY)b zHd%5^>v%IQG6*7t05?kVP4_d!C!XTl1suh9T-S|>iETn9Ux^0a&EhnsT#!iWb2Xg( zih9$QLIWB*1q>SJky|KK@uJ?XXROulqOgF+q_SE~FxtWa?tQy+xFPbCK-zh7KS$Pp z0Sf0*ilKhCxJ!hTgH)88pJ@I&0F?=F%O?#qR1SxC`rN7l=zuC+hgfo(G6{Jz0T$BN zLy@^9CCkYa*73069(`w6=kMh%kLF%-t^TK`sP*v;v>DH|SJk)9b>Rirn?N~BP~*$f zDlbu7w`%dg^5V5*K4`TT>+YOj;~Z@iH(zjk)Uw@hur-u{CB?LC=F) z)6#`d)MFmCXu`XX%v$ey(|OL$Zj2lrQV{P?ckwG%NqP*KYlb0HV)5gD0)s*Nmmj-* z-;1PPv#9DX|ID?^;9`k1y;5dLC1CcUD{S(JSqA%LYsQ=e^~3mUmBhz<_Gb>Ap79ewZJr2|4O7t`e8=|_Is%Vv%;$hE*)7< zm0u7f=$%}o(A(4sWDmE_PpjFg#BU;)cgsty2t;;RI{9wY7cQb3_pI(x=d9{-*U^J4@`PjIsmQtZ`CtSgLx|KTPUse=!EfVrBzi49X%%DJ5n(qiS&N+DJ`*(vBu+3pa?M&1x01U3T{DF*_6AZ!847D2)T z^Si?QNZR3oRP^TxP4wp?Pq<`bcUwR^I5#)G7u}Q_P(G=sztwaTMLDk;DT}byYC55JCeRY0X)LF47EcO;nJP+Xi({_5 z%h(4m2*NhV_N&!|rJLo2E9fHMXP}jFf4aSqNFplPTQ3MIJ(TZFRfLtDsSJmyAuBCc z$M4p0mR&Yy+q+C-=I#o@GoGUFrs=7~KB>gFcs`^e6&$>Pjj0%02ym?T583a9JmA(+4Q>~`*>xN#^ockAvHmR?k&S!@YNiQBQF|f znpJ~ex|mqx_o;I1Eo_QHRdRBp$#d0dcyj)H%y~SOwU*m?grbsL{D*nmVyCB468Uix zn%g;yhLRiSyUCi9dWZ3vp1POOnv^<^;Tp%udpsCc8`p4@7qXI@3wcYGO+MA-1&PbO zl;Zw+){aoeV9aShQ}z>gSC}7-XMf4F)Hlo8@4TZn`noWh*J9p5ayZq*6hly+VG5ZK z5qhz&zAPw`m`+;sheR$w78I!-aT&hQqit-6nNnFzFl*bHuP*6{y0m49Tthj9e=u-;WU; zlxkYpG9DJ!iBv0#ANiG&`@%14R8dBVu0oz@Lg&0(OdiKIBWcZ3ls0s*!Gf$k>9Epc z*2Cn;GKmI`)YjG-aCT9Z3`5sMH!lt9?CL+dPli~h0oL7C3#-d zd_bM^9Oz1PdiRQxWbU_6D0p=UV}wM3iDim)RW5ncDg6{ZmL6G<-}k`vu*|antBz(% zkoRJs6?Z)~N7AD2$nfgl6vzdIZG;++C4unLi>T_P_@J+*B$eWVTt5=T(zcP+xLBMjawcuKyDr%cr z%3|WAoQorxi^DllMLbc3yB9<}83soY2~}pA=JjiUQfZi?DhE1X9>P!;(rGwJ$MhnO z-Qp3tJYUjorED*yl8~>fvC-5|pwqi!F}&we+fy?;n>72b5Z7TI ze1P{+hdGLMR+W4K+unNOGn*q!=RACS*!DqNu)gXjTHy$RQIO(m@t(1i;frlkXhwMk z;4R9J?kkpLRTt2TgA@RoYk5$xEK!Xg`av%R9gg_n6b=h6|&AY^c3s3EcwjPcpq7K1L4F#lE#057B z|1dl+9|L=bvh~?WTKwFZ{91b)^?J?rAo)0YRHs#<%%26G^=6ffPKUUGc!~ufz?JaN zRz#LF!U_d=*tyd1g6A((W~xs&Xt!fUs#ZF7L1-(@}mw5$kr=Iw@>rxgJxv?(HiqNHLxfj=U zSb4viN-6T-+7(oEFet2qkAwt$IH5rbGUCVU;Jir7*aj`hHWh>Q zU=dKuDh6*?9&fy5vR^F+d5!Ti_?7rzmeSbh(^$2B}CUh$H;06z%TizSCR(q z*J;Ty0xW;+bN|W<6J;}jYqKD&@X0GnaB_)i-NT^j5*@5b7s=c1-j2Pyx3G2xNmryW z@y(Ik?W@l5;vjKfGWIJcNAd^JS!UV(bs*aB@g*ApkFwB%r|iZ2T=9~HB~-4)J$mde z7H26xH8vO~E0}s~G-Gu%vU9`*|11=_V&7#flgd)JKdHz~gpkj+iEX2kbDdk@Y_uGQqS4)N(l{{AqWor*KU8 zQ|!=8qw8}=*b2u zsV5A(NP)e}K+)VZ+=MSvemgT*jwDQai5dKul!ASu zj1$?S97?mZXlVfVCM-@(G}1DE4IdE-qBlDypmg}p8^BWpGdjij#)!TZ7dJ}y%H`=6 zZ`nskxG9?r>yJ*ZiO<3jCQA{YyD}r-8S;D5F953tp0_AkX9{a8PHWoRi^X&u{O_9? z@af=|YpXYZZv*ntKh|;ycAl}^l%MfA!o4}s!F;&zKJGXADd-_C1UeUKM z&v45!1vi@==t+pRng-L(n)%nWud}N46-RAtcqC9#$4&ajZ7$H}64ec|GuFe|i9VP8 ziFh9Scv6Tt+sBa+0e#Xm@nzX9Y8z}CB@R$a8ZM2SZFs;f~~_d zjuJ*%O&*lI_`%APoCc}}kE~1_V>NEn0jgGvZ^)@)XP!pA9zGaZg}}z0oNmaN1tZiT z*+`Rek7)RdpKP`TRcX{v<3^P(jhbcHkkh5jJk3&r_LOw!jwwx)nxMAP~mNaFfIC-+w^ig*x#sJBM*L3P7 z@e8)^rz=;f!|9UcLlQIzR-;B-o|(>K+*A4)1zoXrv%RcNRC1=p0#Y#_Y~j zKJS}RhdR;O`P*Iraqd!OO$E-ay?^Rb_TYF zf|iF&EJ>}u1s&^_;16Y2Qc??7~b-TkiK9bn>lKF@}G1ou1v7)wY2DpKkV=%^D z+=x)8i9U5Q(B63}TRC<-W4<*vuc3NemC<5|&$DsR`Td-dk$VeTvP%qtgKa;xgv)Ce zx3R)P{W|gTMUo}Ys70E>=DNZ)cl{Xvxd%GEm_G=^PO_a&A*T8+4r*>$2Tbjn2CJ~9+Fg|r8HP(jzt6Vm#; z3s^6i4q_(NTZM`mCPr)9q5qi4T8IzTYn56S-xI@}do0^Nky`cxJ z)Kg$4c9A$HV5Vy{-)`DKRc_=yX{A(-WeYz1B=Yo=&=KvUlYI`u*Wbxgqt0s7?@?o- z#cs%ID43C3y>%A!HZN!tV4CpKG{9HxGI?l)E%SbvF^8L)8^cWQ`q6+pq0rsi-kWZB zJ2jzqzBA!x9OnAl!FbUwJk(_T=kZiHVIUpj4d4y$dLzH z0Sm}G$Q#E15bUg#8$?JF& zy3woOUi-T}D!f!*%}yR}oDaI{qIG<;-+l}|50<08*NI`OwiGAJdo;>Dm;CIds9YDZ zBp=%YLS-)Me%AIFQ!VLKI7TenZr%HpFcBVwEG&heAe6A*sonSK9kj)5<@`TZ9{wdsyE~ZL}G^cs3Xn;HgzPWD;8&CEKW%pDJbJC zEJz=q^EvJEur_s@Xw^zN-cJUdZQ(_#e|IUt>Jub^GLXuB)Bl=7c8X%CPZqD>3!Jdc3GQKCnHns?HuA`bHy4o)++NAr(HN`s_+ZsZt=)b zxBaxd5yq?I#7J$>EhE*48Gl_lUsv2kDS$LBxwC$n(y%W7DlD5O!{zAW2tY+Jq1*scgWOB5akK6UFcV}odblHo4? zS<_}U?uAXw{IQhb#)YH+#t-w;sRBjO8tu7tT7w8B^)kI{Q1L-S%mHuuSOz3RT4iOa z^Qo^a8h2K@kCTu*76YDHRm2t;6B-46r?csMyeW%*J04nKnI4o9+lDK0R>Pci=@=FSn;jA^m^8zt6djx51yRe2kv zT`=<6!X1+2q|CmHnFj$8;%OBe*L=ETMP#oi{`e!xeH}HDG5t5@dQv5O;ULRQg>d;~ zNq=?5Xi|uh)2UOFl1lg8kdn$+d!JnxKn~7s9;cGEmwqL!O zc;zxDwbvDRr;?|3GPmv(9JPa9V`sH5bJ_`I96tTw$f;+663sAsWn$8eg@@{PH|V_h zHDA+)>A>FMx&HI;7+jS=Qd+#ij)ReOA)^LbV*GP_9GDbXMo7h#BJ=wX?YLviHT}=H z6yHVKJe@eiXPcXc-b>`u-KRuu^4I=JI`g-#gSS~GpwA;+(2Bbp^=H?0N`zdG9>H-~ zv*zLqLYtH1_Gza6QK@TI$!lAUaBcpG7O;l3vnAg~mQnIkuG_*7Ap5<52D$MTw=oiK zA>O6uSHB;!uh~4m-rEUL3MJXH{+p%^*D4VnFVQLeNg-E z$pMBF08asc_(OnU3{YWR+oYoXW7^0Cufp}ZNuEGvkSeCt2JHeModN9T0qx`Fxcp>> zcJ%V6hB^U5qRq;W&)yjU+qruxyA1<^#JiK_p(r?m)MmaffbKbKTE$tJ(t~{lyiVscx zcI)}<^UtIRNWjWhB7)_Pbwf1_08pR?0C4d*h zTqBy-#P(S1j)CBQ@9Ja@Uzf*VvIL!D{`}0SmkB2H;$ckBu0)Q2UC->J#Y6OPL?W17 z4;%n(FD@mFU3|ICCD(CaqX)iicUZWPGLb2+jzy-q&7iz5jPU|qHP&`w$Jfn*TVTSo35F~yqro*$hU@We< z=0_m65&Cj^{jJ+D`={3Yt^;|ZKau{;>3h?enBgh=Bt~;O=}$LiKrH$}=WoMLCkod5 z3c(rVT6L3Ob0EjuU@C=wKpMlm5QjcnZfr8z@WH zC)p7Ybp!3+O$&o1pjsK()-!7UqIOds%xLBNsfM~I28!w+bZY>aQ}*cRkwzUCNdVXT zB=&ODA4jLC@KI^m59WEj%Z8RAQ;ohE!W6OW;LMicT`#f_ngxGo>&2_PdEP&M z=luu3fGv&2w{({dOU}2{bvA6;UE#AiUh$kMWg6A)gZVNvG_k1Bv!-}whDWAodffm%i)_C^3UlNm)@`o??evW^Yf znK37xn(R|Q@N2NnfU+F6s|yR>N)rex)&^XcdN>Oh;eMeYnsMDFTQYT01KjqZxtBT);-|VN<6O03rqbh{+bZ$y8f_O8tIuQByZUMopkaK&dHz(fAn$hQU#HSfvMl>R5 zC<0xo8`LQ#HUJ8u=$`EB!$@*Ot}afKPYx~(+R<8jC|n+ppd-8E=3^nd?YECds-Bqb z#zWGfh}j4Meh`en+5}v?KmDD#0=7{~n!6+lht3X63=}FGNL1bLCs0w-zTJ=3_J#53@~=)`5<&Lv=t>9(%T~G_UXIO@e(&% zUg5Jh_$Q?pBYluU!czx@LXkiFDs2Y6yu@Z&%ro!`3Q z@Q_e|~iW*0pEoSbgUKitxwjg+EE5wTxU z)EMKWxisyC%jbo|74)L#41Ed32|eE)8@GzmBW`D@L8QfA@_G+`|0AC~+@&72BAe=} zp^z(G`%;ssf6vd}f1*{TH=7ey3)AEqhlZ|OI1Gki;c)Sgj)q!2_`B4Vr&y@JK<1Sj zihGQi)UMPi7c~3`u^dYF_ZgG&9p?8il)jPecj318_IHp5a@ijhd!+K$NZ&)}dPl5e zJy5^|#lRWef@BlfD|KO2&YW7C8p#Vw;VCZ#-1FjR#+oaw^~ZUtz@i4gYl0AY2MgiS z=jgQ&BY}T+Ml|_OFIl|>)_yRcc?Tthmu>(&c2@TpD?J~^k}__RrKnlUA*AZ^tXoJz zR)Y7*+91N*4U$$*@kqv^oKz7Z{K%}dg$QPo=`BJdEmlu!S|u0l>Pke9_E(?+)B_z+ zDI8lS34FyyIKbZWLD-b1z>1dGWHHrG8@^S-s0S~^%{g)rg??#tRb`jHD-~}ADUjh3w z%||c?unnRSQH(owC9y3?)K#x%QKH1;KZk{e+DAdCo?m@O-*|Ip%HUrz%~8P~@Grji zX?`N$Zl@k1eL%9-+Y&y;Ad# z-Ip%OKLr<*234JuVeSKkzN%t#3iP|g{=vE4;?*!a2aW)u`&j$_VPKAk z%)r2{Y0g(1?}pd6S9%Y zlq*p}(?*J+a_Gqvd0&Mcc%3pF-i|V8ZawGz1S5r8>;p$|Z`leOB*!CZsY#-FX}B1$ zMVa6HE*RRzTOZJ@`d?LPCeF|H7jGGL>Zh)L|S4A=%-3EO%7x4FPBD`*-PtKQC zC-vM79V&q*fgoZj{PC7HxYE`<#(5kP=U?4svw9rDn@qq+$YS8JPln`ZpRbH=Urb-c zZsA{zU!R}?zcO5n+mNsbw<=YsZJ_%T3)Dh#7d+P-$Njjvu7*Mk>TIH{!HNhv{L5^6n^xdtuqBJchPykb@}ju1(JRNmtGx?9#xS+vQwO54>KYTRDk zXRVa72DPg@ypmv5&O&JId)5*gXYJP-Y4Z@2;G&WNtWS){hGjQP8C9?oGMtAY*b8>< z3C&arA**8aYPgkpn0W5l1ndm2)}E!DZNm9Sh;<@H@P2#ts0~8ULU()eyp6hVe%4%Y z!T!4`9rFsqt4;B|zS?MiBi=cGU4csNtxBzq?3sCU8OQ2}X6EF%X6E3RbhQSkyT$#s zO2NovxXV!nL$?W>>c9Ln?z2NF69RBRHVlW(66VE3j{LbtGaqoy$?@=Vd>vHTfA;1# zjn}>viip*uav9b2pWPZ#TEs@Azdse|RI6`!L#6zD8~b><-W7RRwYk6X`Ek8JxR7=| zZ8tj_-5$~B`BT>u5mcnMYX8x1IthYTZ*Py&ULKc{iinbktW$=5{t-&~#akSzAuwUi zA>CbC&PP+O4@hdJ_zv#JZbQd-@@HSfcXlzaekeQ2D?zWHmeAZ%e8ej`i06}`4<^j7 z0{UzYkaz=;JuJjHYqw6ua z6awD>TTScLB!KI?x-H#xE<5P#Qfkn~wNtyEb+L5eV?+_%#o~xhK+*TsIsFOruU)`j zNzDH95>2{L001Ki0Komf-33_bIhyJi+t|D4*&BZ4CjWCIP^o5Pv)Yd6W3%-PC-|Z- zcE~PsTQ|x1BP>bK6=$_3s~8L%GEq=%%}|bXpL3w*vXe`^jzT0~%Tj1+&()>tRp8o{ zbNz4W$Sl|I^hL`nn^Q#B281q(!rpzla*QnELo8_$a-sS;OhSU+ZV+FG1rA<8l|(Zs z?Y&@SL2eMehcbs@Rl*}8ZH17?)N05r#OnQp1dt>K5J)9UHR}l}LGzZg_av!g5%~Gt z2I^VzNKl^fu75O(0>r|a0h<^@B7sz-Kc#`<1&P+IRh6fJr3Sdc*ythx<06cT?Cgrp z1tW_ghnW1&(j}bRMf(~F5UdH^Lg@t%pl7WDv**qdZCs5&=Sg+QgMM=RZcssj;o`+d zg}O#|rA5Wvt#|q+12Ur0`K%)yJ=b;HY5R=GJ&rbkB(%o9Vl=e@_Mi0}JIZ|pa zlj_e#hgekaRE~Ai&zi^i-kG(18tVCdFGY-CM&*iRKvC;sV7_lz=|{aXBk*R#O@>Q0 z%m-9UsMw0!7?*rc7B@|g_fI0~lPa@%4iZHZmEu<@p-%DzP(q}Z39xOA#_TR^B`fCW)aRj&T97q3zH6q?Hw)A~vlqxN z?Sbgevx;m_QG!&wR|9m_E7K>LPQE8V54XYLDBBYSB#flEYaN}kD{T$9-g$t&cr1L( z2ic*S8kb=5g$Q~sfSeZZo3*uQfr8TJY3s{Qo~(Xv+0VA|o|}p@j22K!ZaOSJJ!b!K z+aOaeIFm|f2uVf`qP?WJNL(tQ?De`_08l@Pt}gmS3oCHdoQX@QEf5T)BAXQqycOsN zKjk-)BoA8)8Kg1`!D8r#K_ChRKp?A~UT3 zn-E}!_Oo#)%4!#G`O5a|NMO*L$OhYs)_3XVf(lckq@Eju5vLWcJ6yH*YEoyGR+J1gMS#Rs~u`}Yfx+i+p z`FJ<@VQY~K03n)`_XQW+ED>_re)`xam2z>crh1s4XK4F&abiwSpBWCirr-)&I(jo% z&L`>oO^kwB<#XQnro!;gB`YziYa0l}*LhOI(_V+{xgte{Hep*YjQ|%%UiQ)*>ZIk# zP@{!LrA4O@{=~Lb5g!Q}4o%4?9uimPIJV(xL**Y+?=EkQp`QGzWi+b+g$&j@nw6;) ziq46Np?&^4L(X&f;`bKrYt?L5sSyO5bH?HteUj(s zEXyfBPKPIR6F9h@)nrr*YhHUt0@tQ4CJJe$;cLO5T+0m}ULK^I`F4#2*4N!t_Q|56 z!&Ou&DTC5y=A(WWXY_i_g~>zTz5M!=prHdUP6cJ-wCX@Up<9#v5 z)3~?dN&FhuHj7t&t{RKgq}Rt|!IRf`ZM%Nf2+NgppB+pyC`8wcobXew)vpDaiPj7yKCjXybu?rbauHlVR`s47{sX*}wV zNBSqAmk1XW#AORN*SOL;^@*2*Z>TxHPY6F4W)i#@eBZdA>)_EM-MlD!^=R8jP{><; zZ2UY@Jn<4KnNcB>3iy58w~4-lRFYiYbKJrCThrOR_xrET_qis_PGg96E*2Uf3EPG1 zNH0zYeRcSB?t!c1A6iS`u<<9tw$Zz7N9NTmb)SGI;ZfCS+u6H z7hxZvg(cok9bwWt_YV&xg~9PaG^4{l?xQ&2mupjW{5_^zceq{2-TXSC9reGXO87A1 zy!f|r7}0f5oAi#iV_Yp^!`higHDj*RC(X(d;})MnD#0%iVhGV@*u;gv#}wl1u_CAl z5cz(0X~$W(9F|UGvgsRjd!oCt%t+AH8NuwmrW$dXeV1TWk5RXWyk~n$jjLHWg%6Ks4N6Aampn1n&{X01SmjI>;Ay;?{Z zu`3mz&&^V5zGqrhilzr(z-$Vg%H6m@vs=w)&B0={HUg9=g9pu$2dqt@T^q|A+uPph z%Z4C^*OF=AoyZ9boU{b;D=Ppy6uA?gsm@fF9dNcYW{`AB#vB{c*ik{YU#ngh^jx%fYU6{?95(TG1|m6(Ts>5F_c|kt1GXX3s=UwQ}~9^B@8inepvy`C0iyu^ zGx6a{!WAY&xpT>aDOj%P{|84K6DI2L6{fh_4sP7en%q^)K!J0K7J^f&c&j diff --git a/hipamd/hipify-clang/patches/patch_for_clang_7.0.1_bug_38811.zip b/hipamd/hipify-clang/patches/patch_for_clang_7.0.1_bug_38811.zip deleted file mode 100644 index fca5bf52e36ea96d4e9d5a32ced95e8a2d4e3588..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14641 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

j10_E1wk5$p#$(ov;US^kS5j# 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

j10_E1wk5$p#$(ov;US^kS5j# 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 Bw2%M* diff --git a/hipamd/hipify-clang/patches/patch_for_clang_8.0.1_bug_38811.zip b/hipamd/hipify-clang/patches/patch_for_clang_8.0.1_bug_38811.zip deleted file mode 100644 index 16d66a20621fce2101711a0cd3b9360830387e3f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14641 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 Bw3+|_ diff --git a/hipamd/hipify-clang/src/ArgParse.cpp b/hipamd/hipify-clang/src/ArgParse.cpp deleted file mode 100644 index cbf2f941e8..0000000000 --- a/hipamd/hipify-clang/src/ArgParse.cpp +++ /dev/null @@ -1,149 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "ArgParse.h" - -cl::OptionCategory ToolTemplateCategory("CUDA to HIP source translator options"); - -cl::opt OutputFilename("o", - cl::desc("Output filename"), - cl::value_desc("filename"), - cl::cat(ToolTemplateCategory)); - -cl::opt OutputDir("o-dir", - cl::desc("Output directory"), - cl::value_desc("directory"), - cl::cat(ToolTemplateCategory)); - -cl::opt GeneratePerl("perl", - cl::desc("Generate hipify-perl"), - cl::value_desc("perl"), - cl::cat(ToolTemplateCategory)); - -cl::opt GeneratePython("python", - cl::desc("Generate hipify-python"), - cl::value_desc("python"), - cl::cat(ToolTemplateCategory)); - -cl::opt OutputHipifyPerlDir("o-hipify-perl-dir", - cl::desc("Output directory for hipify-perl script"), - cl::value_desc("directory"), - cl::cat(ToolTemplateCategory)); - -cl::opt OutputPythonMapDir("o-python-map-dir", - cl::desc("Output directory for Python map"), - cl::value_desc("directory"), - cl::cat(ToolTemplateCategory)); - -cl::opt TemporaryDir("temp-dir", - cl::desc("Temporary directory"), - cl::value_desc("directory"), - cl::cat(ToolTemplateCategory)); - -cl::opt CudaPath("cuda-path", - cl::desc("CUDA installation path"), - cl::value_desc("directory"), - cl::cat(ToolTemplateCategory)); - -cl::opt SaveTemps("save-temps", - cl::desc("Save temporary files"), - cl::value_desc("save-temps"), - cl::cat(ToolTemplateCategory)); - -cl::opt Verbose("v", - cl::desc("Show commands to run and use verbose output"), - cl::value_desc("v"), - cl::cat(ToolTemplateCategory)); - -cl::opt TranslateToRoc("roc", - cl::desc("Translate to roc instead of hip where it is possible"), - cl::value_desc("roc"), - cl::cat(ToolTemplateCategory)); - -cl::opt Inplace("inplace", - cl::desc("Modify input file inplace, replacing input with hipified output, save backup in .prehip file"), - cl::value_desc("inplace"), - cl::cat(ToolTemplateCategory)); - -cl::opt NoBackup("no-backup", - cl::desc("Don't create a backup file for the hipified source"), - cl::value_desc("no-backup"), - cl::cat(ToolTemplateCategory)); - -cl::opt NoOutput("no-output", - cl::desc("Don't write any translated output to stdout"), - cl::value_desc("no-output"), - cl::cat(ToolTemplateCategory)); - -cl::opt PrintStats("print-stats", - cl::desc("Print translation statistics"), - cl::value_desc("print-stats"), - cl::cat(ToolTemplateCategory)); - -cl::opt PrintStatsCSV("print-stats-csv", - cl::desc("Print translation statistics in CSV file"), - cl::value_desc("print-stats-csv"), - cl::cat(ToolTemplateCategory)); - -cl::opt OutputStatsFilename("o-stats", - cl::desc("Output filename for statistics"), - cl::value_desc("filename"), - cl::cat(ToolTemplateCategory)); - -cl::opt Examine("examine", - cl::desc("Combines -no-output and -print-stats options"), - cl::value_desc("examine"), - cl::cat(ToolTemplateCategory)); - -cl::opt DashDash(" ", - cl::desc("Separator between hipify-clang and clang options;\ndon't specify if there are no clang options"), - cl::ValueDisallowed, - cl::cat(ToolTemplateCategory)); - -cl::list IncludeDirs("I", - cl::desc("Add directory to include search path"), - cl::value_desc("directory"), - cl::ZeroOrMore, - cl::Prefix, - cl::cat(ToolTemplateCategory)); - -cl::list MacroNames("D", - cl::desc("Define to or 1 if omitted"), - cl::value_desc("macro>= SkipExcludedPPConditionalBlocks("skip-excluded-preprocessor-conditional-blocks", - cl::desc("Enable default preprocessor behaviour by skipping undefined conditional blocks"), - cl::value_desc("skip-excluded-preprocessor-conditional-blocks"), - cl::cat(ToolTemplateCategory)); - -cl::opt CudaGpuArch("cuda-gpu-arch", - cl::desc("CUDA GPU architecture (e.g. sm_35);\nmay be specified more than once"), - cl::value_desc("value"), - cl::ZeroOrMore, - cl::Prefix, - cl::cat(ToolTemplateCategory)); - - -cl::extrahelp CommonHelp(ct::CommonOptionsParser::HelpMessage); diff --git a/hipamd/hipify-clang/src/ArgParse.h b/hipamd/hipify-clang/src/ArgParse.h deleted file mode 100644 index 84053a036c..0000000000 --- a/hipamd/hipify-clang/src/ArgParse.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#pragma once - -#include "clang/Tooling/CommonOptionsParser.h" -#include "llvm/Support/CommandLine.h" - -namespace cl = llvm::cl; -namespace ct = clang::tooling; - -extern cl::OptionCategory ToolTemplateCategory; -extern cl::opt OutputFilename; -extern cl::opt OutputHipifyPerlDir; -extern cl::opt OutputPythonMapDir; -extern cl::opt OutputDir; -extern cl::opt TemporaryDir; -extern cl::opt CudaPath; -extern cl::list IncludeDirs; -extern cl::list MacroNames; -extern cl::opt Inplace; -extern cl::opt SaveTemps; -extern cl::opt GeneratePerl; -extern cl::opt GeneratePython; -extern cl::opt Verbose; -extern cl::opt NoBackup; -extern cl::opt NoOutput; -extern cl::opt PrintStats; -extern cl::opt PrintStatsCSV; -extern cl::opt OutputStatsFilename; -extern cl::opt Examine; -extern cl::extrahelp CommonHelp; -extern cl::opt TranslateToRoc; -extern cl::opt DashDash; -extern cl::opt SkipExcludedPPConditionalBlocks; -extern cl::opt CudaGpuArch; diff --git a/hipamd/hipify-clang/src/CUDA2HIP.cpp b/hipamd/hipify-clang/src/CUDA2HIP.cpp deleted file mode 100644 index 50f4682af2..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Maps CUDA header names to HIP header names -const std::map CUDA_INCLUDE_MAP{ - // CUDA includes - {"cuda.h", {"hip/hip_runtime.h", "", CONV_INCLUDE_CUDA_MAIN_H, API_DRIVER}}, - {"cuda_runtime.h", {"hip/hip_runtime.h", "", CONV_INCLUDE_CUDA_MAIN_H, API_RUNTIME}}, - {"cuda_runtime_api.h", {"hip/hip_runtime_api.h", "", CONV_INCLUDE, API_RUNTIME}}, - {"channel_descriptor.h", {"hip/channel_descriptor.h", "", CONV_INCLUDE, API_RUNTIME}}, - {"device_functions.h", {"hip/device_functions.h", "", CONV_INCLUDE, API_RUNTIME}}, - {"driver_types.h", {"hip/driver_types.h", "", CONV_INCLUDE, API_RUNTIME}}, - {"cuda_fp16.h", {"hip/hip_fp16.h", "", CONV_INCLUDE, API_RUNTIME}}, - {"cuda_texture_types.h", {"hip/hip_texture_types.h", "", CONV_INCLUDE, API_RUNTIME}}, - {"texture_fetch_functions.h", {"", "", CONV_INCLUDE, API_RUNTIME}}, - {"vector_types.h", {"hip/hip_vector_types.h", "", CONV_INCLUDE, API_RUNTIME}}, - {"cuda_profiler_api.h", {"hip/hip_profile.h", "", CONV_INCLUDE, API_RUNTIME}}, - {"cooperative_groups.h", {"hip/hip_cooperative_groups.h", "", CONV_INCLUDE, API_RUNTIME}}, - // cuComplex includes - {"cuComplex.h", {"hip/hip_complex.h", "", CONV_INCLUDE_CUDA_MAIN_H, API_COMPLEX}}, - // cuBLAS includes - {"cublas.h", {"hipblas.h", "rocblas.h", CONV_INCLUDE_CUDA_MAIN_H, API_BLAS}}, - {"cublas_v2.h", {"hipblas.h", "rocblas.h", CONV_INCLUDE_CUDA_MAIN_H, API_BLAS}}, - // cuRAND includes - {"curand.h", {"hiprand.h", "", CONV_INCLUDE_CUDA_MAIN_H, API_RAND}}, - {"curand_kernel.h", {"hiprand_kernel.h", "", CONV_INCLUDE, API_RAND}}, - {"curand_discrete.h", {"hiprand_kernel.h", "", CONV_INCLUDE, API_RAND}}, - {"curand_discrete2.h", {"hiprand_kernel.h", "", CONV_INCLUDE, API_RAND}}, - {"curand_globals.h", {"hiprand_kernel.h", "", CONV_INCLUDE, API_RAND}}, - {"curand_lognormal.h", {"hiprand_kernel.h", "", CONV_INCLUDE, API_RAND}}, - {"curand_mrg32k3a.h", {"hiprand_kernel.h", "", CONV_INCLUDE, API_RAND}}, - {"curand_mtgp32.h", {"hiprand_kernel.h", "", CONV_INCLUDE, API_RAND}}, - {"curand_mtgp32_host.h", {"hiprand_mtgp32_host.h", "", CONV_INCLUDE, API_RAND}}, - {"curand_mtgp32_kernel.h", {"hiprand_kernel.h", "", CONV_INCLUDE, API_RAND}}, - {"curand_mtgp32dc_p_11213.h", {"rocrand_mtgp32_11213.h", "", CONV_INCLUDE, API_RAND}}, - {"curand_normal.h", {"hiprand_kernel.h", "", CONV_INCLUDE, API_RAND}}, - {"curand_normal_static.h", {"hiprand_kernel.h", "", CONV_INCLUDE, API_RAND}}, - {"curand_philox4x32_x.h", {"hiprand_kernel.h", "", CONV_INCLUDE, API_RAND}}, - {"curand_poisson.h", {"hiprand_kernel.h", "", CONV_INCLUDE, API_RAND}}, - {"curand_precalc.h", {"hiprand_kernel.h", "", CONV_INCLUDE, API_RAND}}, - {"curand_uniform.h", {"hiprand_kernel.h", "", CONV_INCLUDE, API_RAND}}, - // cuDNN includes - {"cudnn.h", {"hipDNN.h", "", CONV_INCLUDE_CUDA_MAIN_H, API_DNN}}, - // cuFFT includes - {"cufft.h", {"hipfft.h", "", CONV_INCLUDE_CUDA_MAIN_H, API_FFT}}, - // cuSPARSE includes - {"cusparse.h", {"hipsparse.h", "", CONV_INCLUDE_CUDA_MAIN_H, API_SPARSE}}, - {"cusparse_v2.h", {"hipsparse.h", "", CONV_INCLUDE_CUDA_MAIN_H, API_SPARSE}}, - // CUB includes - {"cub/cub.cuh", {"hipcub/hipcub.hpp", "", CONV_INCLUDE_CUDA_MAIN_H, API_CUB}}, - // CAFFE2 includes - {"caffe2/core/common_gpu.h", {"caffe2/core/hip/common_gpu.h", "", CONV_INCLUDE, API_CAFFE2, UNSUPPORTED}}, - {"caffe2/core/context_gpu.h", {"caffe2/core/hip/context_gpu.h", "", CONV_INCLUDE, API_CAFFE2, UNSUPPORTED}}, - {"caffe2/operators/operator_fallback_gpu.h", {"", "", CONV_INCLUDE, API_CAFFE2, UNSUPPORTED}}, - {"caffe2/operators/spatial_batch_norm_op.h", {"caffe2/operators/hip/spatial_batch_norm_op_miopen.hip", "", CONV_INCLUDE, API_CAFFE2}}, - {"caffe2/operators/generate_proposals_op_util_nms_gpu.h", {"", "", CONV_INCLUDE, API_CAFFE2, UNSUPPORTED}}, - {"caffe2/operators/max_pool_with_index_gpu.h", {"", "", CONV_INCLUDE, API_CAFFE2, UNSUPPORTED}}, - {"caffe2/operators/rnn/recurrent_network_executor_gpu.h", {"", "", CONV_INCLUDE, API_CAFFE2, UNSUPPORTED}}, - {"caffe2/utils/math/reduce.cuh", {"caffe2/utils/math/hip/reduce.cuh", "", CONV_INCLUDE, API_CAFFE2, UNSUPPORTED}}, - {"caffe2/operators/gather_op.cuh", {"caffe2/operators/math/gather_op.cuh", "", CONV_INCLUDE, API_CAFFE2, UNSUPPORTED}}, - {"caffe2/core/common_cudnn.h", {"caffe2/core/hip/common_miopen.h", "", CONV_INCLUDE, API_CAFFE2}}, -}; - -const std::map& CUDA_RENAMES_MAP() { - static std::map ret; - if (!ret.empty()) { - return ret; - } - // First run, so compute the union map. - ret.insert(CUDA_DRIVER_TYPE_NAME_MAP.begin(), CUDA_DRIVER_TYPE_NAME_MAP.end()); - ret.insert(CUDA_DRIVER_FUNCTION_MAP.begin(), CUDA_DRIVER_FUNCTION_MAP.end()); - ret.insert(CUDA_RUNTIME_TYPE_NAME_MAP.begin(), CUDA_RUNTIME_TYPE_NAME_MAP.end()); - ret.insert(CUDA_RUNTIME_FUNCTION_MAP.begin(), CUDA_RUNTIME_FUNCTION_MAP.end()); - ret.insert(CUDA_COMPLEX_TYPE_NAME_MAP.begin(), CUDA_COMPLEX_TYPE_NAME_MAP.end()); - ret.insert(CUDA_COMPLEX_FUNCTION_MAP.begin(), CUDA_COMPLEX_FUNCTION_MAP.end()); - ret.insert(CUDA_BLAS_TYPE_NAME_MAP.begin(), CUDA_BLAS_TYPE_NAME_MAP.end()); - ret.insert(CUDA_BLAS_FUNCTION_MAP.begin(), CUDA_BLAS_FUNCTION_MAP.end()); - ret.insert(CUDA_RAND_TYPE_NAME_MAP.begin(), CUDA_RAND_TYPE_NAME_MAP.end()); - ret.insert(CUDA_RAND_FUNCTION_MAP.begin(), CUDA_RAND_FUNCTION_MAP.end()); - ret.insert(CUDA_DNN_TYPE_NAME_MAP.begin(), CUDA_DNN_TYPE_NAME_MAP.end()); - ret.insert(CUDA_DNN_FUNCTION_MAP.begin(), CUDA_DNN_FUNCTION_MAP.end()); - ret.insert(CUDA_FFT_TYPE_NAME_MAP.begin(), CUDA_FFT_TYPE_NAME_MAP.end()); - ret.insert(CUDA_FFT_FUNCTION_MAP.begin(), CUDA_FFT_FUNCTION_MAP.end()); - ret.insert(CUDA_SPARSE_TYPE_NAME_MAP.begin(), CUDA_SPARSE_TYPE_NAME_MAP.end()); - ret.insert(CUDA_SPARSE_FUNCTION_MAP.begin(), CUDA_SPARSE_FUNCTION_MAP.end()); - ret.insert(CUDA_CAFFE2_TYPE_NAME_MAP.begin(), CUDA_CAFFE2_TYPE_NAME_MAP.end()); - ret.insert(CUDA_CAFFE2_FUNCTION_MAP.begin(), CUDA_CAFFE2_FUNCTION_MAP.end()); - return ret; -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP.h b/hipamd/hipify-clang/src/CUDA2HIP.h deleted file mode 100644 index b02e7f1f3e..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP.h +++ /dev/null @@ -1,81 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#pragma once - -#include "llvm/ADT/StringRef.h" -#include -#include -#include "Statistics.h" - -// Maps CUDA header names to HIP header names -extern const std::map CUDA_INCLUDE_MAP; -// Maps the names of CUDA DRIVER API types to the corresponding HIP types -extern const std::map CUDA_DRIVER_TYPE_NAME_MAP; -// Maps the names of CUDA DRIVER API functions to the corresponding HIP functions -extern const std::map CUDA_DRIVER_FUNCTION_MAP; -// Maps the names of CUDA RUNTIME API types to the corresponding HIP types -extern const std::map CUDA_RUNTIME_TYPE_NAME_MAP; -// Maps the names of CUDA Complex API types to the corresponding HIP types -extern const std::map CUDA_COMPLEX_TYPE_NAME_MAP; -// Maps the names of CUDA Complex API functions to the corresponding HIP functions -extern const std::map CUDA_COMPLEX_FUNCTION_MAP; -// Maps the names of CUDA RUNTIME API functions to the corresponding HIP functions -extern const std::map CUDA_RUNTIME_FUNCTION_MAP; -// Maps the names of CUDA BLAS API types to the corresponding HIP types -extern const std::map CUDA_BLAS_TYPE_NAME_MAP; -// Maps the names of CUDA BLAS API functions to the corresponding HIP functions -extern const std::map CUDA_BLAS_FUNCTION_MAP; -// Maps the names of CUDA RAND API types to the corresponding HIP types -extern const std::map CUDA_RAND_TYPE_NAME_MAP; -// Maps the names of CUDA RAND API functions to the corresponding HIP functions -extern const std::map CUDA_RAND_FUNCTION_MAP; -// Maps the names of CUDA DNN API types to the corresponding HIP types -extern const std::map CUDA_DNN_TYPE_NAME_MAP; -// Maps the names of CUDA DNN API functions to the corresponding HIP functions -extern const std::map CUDA_DNN_FUNCTION_MAP; -// Maps the names of CUDA FFT API types to the corresponding HIP types -extern const std::map CUDA_FFT_TYPE_NAME_MAP; -// Maps the names of CUDA FFT API functions to the corresponding HIP functions -extern const std::map CUDA_FFT_FUNCTION_MAP; -// Maps the names of CUDA SPARSE API types to the corresponding HIP types -extern const std::map CUDA_SPARSE_TYPE_NAME_MAP; -// Maps the names of CUDA SPARSE API functions to the corresponding HIP functions -extern const std::map CUDA_SPARSE_FUNCTION_MAP; -// Maps the names of CUDA CAFFE2 API types to the corresponding HIP types -extern const std::map CUDA_CAFFE2_TYPE_NAME_MAP; -// Maps the names of CUDA CAFFE2 API functions to the corresponding HIP functions -extern const std::map CUDA_CAFFE2_FUNCTION_MAP; -// Maps the names of CUDA Device functions to the corresponding HIP functions -extern const std::map CUDA_DEVICE_FUNC_MAP; -// Maps the names of CUDA CUB API types to the corresponding HIP types -extern const std::map CUDA_CUB_TYPE_NAME_MAP; - -/** - * The union of all the above maps, except includes. - * - * This should be used rarely, but is still needed to convert macro definitions (which can - * contain any combination of the above things). AST walkers can usually get away with just - * looking in the lookup table for the type of element they are processing, however, saving - * a great deal of time. - */ -const std::map& CUDA_RENAMES_MAP(); diff --git a/hipamd/hipify-clang/src/CUDA2HIP_BLAS_API_functions.cpp b/hipamd/hipify-clang/src/CUDA2HIP_BLAS_API_functions.cpp deleted file mode 100644 index 8c9d3ea662..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_BLAS_API_functions.cpp +++ /dev/null @@ -1,671 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Map of all functions -const std::map CUDA_BLAS_FUNCTION_MAP{ - - // Blas management functions - {"cublasInit", {"hipblasInit", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasShutdown", {"hipblasShutdown", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasGetVersion", {"hipblasGetVersion", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasGetError", {"hipblasGetError", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasAlloc", {"hipblasAlloc", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasFree", {"hipblasFree", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasSetKernelStream", {"hipblasSetKernelStream", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasGetAtomicsMode", {"hipblasGetAtomicsMode", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasSetAtomicsMode", {"hipblasSetAtomicsMode", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasGetMathMode", {"hipblasGetMathMode", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasSetMathMode", {"hipblasSetMathMode", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // Blas logging - {"cublasLogCallback", {"hipblasLogCallback", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasLoggerConfigure", {"hipblasLoggerConfigure", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasSetLoggerCallback", {"hipblasSetLoggerCallback", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasGetLoggerCallback", {"hipblasGetLoggerCallback", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // Blas1 (v1) Routines - {"cublasCreate", {"hipblasCreate", "rocblas_create_handle", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDestroy", {"hipblasDestroy", "rocblas_destroy_handle", CONV_LIB_FUNC, API_BLAS}}, - {"cublasSetStream", {"hipblasSetStream", "rocblas_set_stream", CONV_LIB_FUNC, API_BLAS}}, - {"cublasGetStream", {"hipblasGetStream", "rocblas_get_stream", CONV_LIB_FUNC, API_BLAS}}, - {"cublasSetPointerMode", {"hipblasSetPointerMode", "rocblas_set_pointer_mode", CONV_LIB_FUNC, API_BLAS}}, - {"cublasGetPointerMode", {"hipblasGetPointerMode", "rocblas_get_pointer_mode", CONV_LIB_FUNC, API_BLAS}}, - {"cublasSetVector", {"hipblasSetVector", "rocblas_set_vector", CONV_LIB_FUNC, API_BLAS}}, - {"cublasGetVector", {"hipblasGetVector", "rocblas_get_vector", CONV_LIB_FUNC, API_BLAS}}, - {"cublasSetVectorAsync", {"hipblasSetVectorAsync", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasGetVectorAsync", {"hipblasGetVectorAsync", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasSetMatrix", {"hipblasSetMatrix", "rocblas_set_matrix", CONV_LIB_FUNC, API_BLAS}}, - {"cublasGetMatrix", {"hipblasGetMatrix", "rocblas_get_matrix", CONV_LIB_FUNC, API_BLAS}}, - {"cublasSetMatrixAsync", {"hipblasSetMatrixAsync", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasGetMatrixAsync", {"hipblasGetMatrixAsync", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasXerbla", {"hipblasXerbla", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // NRM2 - {"cublasSnrm2", {"hipblasSnrm2", "rocblas_snrm2", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDnrm2", {"hipblasDnrm2", "rocblas_dnrm2", CONV_LIB_FUNC, API_BLAS}}, - {"cublasScnrm2", {"hipblasScnrm2", "rocblas_scnrm2", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDznrm2", {"hipblasDznrm2", "rocblas_dznrm2", CONV_LIB_FUNC, API_BLAS}}, - {"cublasNrm2Ex", {"hipblasNrm2Ex", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // DOT - {"cublasSdot", {"hipblasSdot", "rocblas_sdot", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDdot", {"hipblasDdot", "rocblas_ddot", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCdotu", {"hipblasCdotu", "rocblas_cdotu", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCdotc", {"hipblasCdotc", "rocblas_cdotc", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZdotu", {"hipblasZdotu", "rocblas_zdotu", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZdotc", {"hipblasZdotc", "rocblas_zdotc", CONV_LIB_FUNC, API_BLAS}}, - - // SCAL - {"cublasSscal", {"hipblasSscal", "rocblas_sscal", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDscal", {"hipblasDscal", "rocblas_dscal", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCscal", {"hipblasCscal", "rocblas_cscal", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCsscal", {"hipblasCsscal", "rocblas_csscal", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZscal", {"hipblasZscal", "rocblas_zscal", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZdscal", {"hipblasZdscal", "rocblas_zdscal", CONV_LIB_FUNC, API_BLAS}}, - - // AXPY - {"cublasSaxpy", {"hipblasSaxpy", "rocblas_saxpy", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDaxpy", {"hipblasDaxpy", "rocblas_daxpy", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCaxpy", {"hipblasCaxpy", "rocblas_caxpy", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZaxpy", {"hipblasZaxpy", "rocblas_zaxpy", CONV_LIB_FUNC, API_BLAS}}, - - // COPY - {"cublasScopy", {"hipblasScopy", "rocblas_scopy", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDcopy", {"hipblasDcopy", "rocblas_dcopy", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCcopy", {"hipblasCcopy", "rocblas_ccopy", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZcopy", {"hipblasZcopy", "rocblas_zcopy", CONV_LIB_FUNC, API_BLAS}}, - - // SWAP - {"cublasSswap", {"hipblasSswap", "rocblas_sswap", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDswap", {"hipblasDswap", "rocblas_dswap", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCswap", {"hipblasCswap", "rocblas_cswap", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZswap", {"hipblasZswap", "rocblas_zswap", CONV_LIB_FUNC, API_BLAS}}, - - // AMAX - {"cublasIsamax", {"hipblasIsamax", "rocblas_isamax", CONV_LIB_FUNC, API_BLAS}}, - {"cublasIdamax", {"hipblasIdamax", "rocblas_idamax", CONV_LIB_FUNC, API_BLAS}}, - {"cublasIcamax", {"hipblasIcamax", "rocblas_icamax", CONV_LIB_FUNC, API_BLAS}}, - {"cublasIzamax", {"hipblasIzamax", "rocblas_izamax", CONV_LIB_FUNC, API_BLAS}}, - - // AMIN - {"cublasIsamin", {"hipblasIsamin", "rocblas_isamin", CONV_LIB_FUNC, API_BLAS}}, - {"cublasIdamin", {"hipblasIdamin", "rocblas_idamin", CONV_LIB_FUNC, API_BLAS}}, - {"cublasIcamin", {"hipblasIcamin", "rocblas_icamin", CONV_LIB_FUNC, API_BLAS}}, - {"cublasIzamin", {"hipblasIzamin", "rocblas_izamin", CONV_LIB_FUNC, API_BLAS}}, - - // ASUM - {"cublasSasum", {"hipblasSasum", "rocblas_sasum", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDasum", {"hipblasDasum", "rocblas_dasum", CONV_LIB_FUNC, API_BLAS}}, - {"cublasScasum", {"hipblasScasum", "rocblas_scasum", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDzasum", {"hipblasDzasum", "rocblas_dzasum", CONV_LIB_FUNC, API_BLAS}}, - - // ROT - {"cublasSrot", {"hipblasSrot", "rocblas_srot", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDrot", {"hipblasDrot", "rocblas_drot", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCrot", {"hipblasCrot", "rocblas_crot", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCsrot", {"hipblasCsrot", "rocblas_csrot", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZrot", {"hipblasZrot", "rocblas_zrot", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZdrot", {"hipblasZdrot", "rocblas_zdrot", CONV_LIB_FUNC, API_BLAS}}, - - // ROTG - {"cublasSrotg", {"hipblasSrotg", "rocblas_srotg", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDrotg", {"hipblasDrotg", "rocblas_drotg", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCrotg", {"hipblasCrotg", "rocblas_crotg", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZrotg", {"hipblasZrotg", "rocblas_zrotg", CONV_LIB_FUNC, API_BLAS}}, - - // ROTM - {"cublasSrotm", {"hipblasSrotm", "rocblas_srotm", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDrotm", {"hipblasDrotm", "rocblas_drotm", CONV_LIB_FUNC, API_BLAS}}, - - // ROTMG - {"cublasSrotmg", {"hipblasSrotmg", "rocblas_srotmg", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDrotmg", {"hipblasDrotmg", "rocblas_drotmg", CONV_LIB_FUNC, API_BLAS}}, - - // GEMV - {"cublasSgemv", {"hipblasSgemv", "rocblas_sgemv", CONV_LIB_FUNC, API_BLAS}}, - // NOTE: there is no such a function in CUDA - {"cublasSgemvBatched", {"hipblasSgemvBatched", "rocblas_sgemv_batched", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDgemv", {"hipblasDgemv", "rocblas_dgemv", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCgemv", {"hipblasCgemv", "rocblas_cgemv", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZgemv", {"hipblasZgemv", "rocblas_zgemv", CONV_LIB_FUNC, API_BLAS}}, - - // GBMV - {"cublasSgbmv", {"hipblasSgbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDgbmv", {"hipblasDgbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCgbmv", {"hipblasCgbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZgbmv", {"hipblasZgbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TRMV - {"cublasStrmv", {"hipblasStrmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDtrmv", {"hipblasDtrmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCtrmv", {"hipblasCtrmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtrmv", {"hipblasZtrmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TBMV - {"cublasStbmv", {"hipblasStbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDtbmv", {"hipblasDtbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCtbmv", {"hipblasCtbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtbmv", {"hipblasZtbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TPMV - {"cublasStpmv", {"hipblasStpmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDtpmv", {"hipblasDtpmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCtpmv", {"hipblasCtpmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtpmv", {"hipblasZtpmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TRSV - {"cublasStrsv", {"hipblasStrsv", "rocblas_strsv", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDtrsv", {"hipblasDtrsv", "rocblas_dtrsv", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCtrsv", {"hipblasCtrsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtrsv", {"hipblasZtrsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TPSV - {"cublasStpsv", {"hipblasStpsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDtpsv", {"hipblasDtpsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCtpsv", {"hipblasCtpsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtpsv", {"hipblasZtpsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TBSV - {"cublasStbsv", {"hipblasStbsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDtbsv", {"hipblasDtbsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCtbsv", {"hipblasCtbsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtbsv", {"hipblasZtbsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SYMV/HEMV - {"cublasSsymv", {"hipblasSsymv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDsymv", {"hipblasDsymv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCsymv", {"hipblasCsymv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZsymv", {"hipblasZsymv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasChemv", {"hipblasChemv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZhemv", {"hipblasZhemv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SBMV/HBMV - {"cublasSsbmv", {"hipblasSsbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDsbmv", {"hpiblasDsbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasChbmv", {"hipblasChbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZhbmv", {"hipblasZhbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SPMV/HPMV - {"cublasSspmv", {"hipblasSspmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDspmv", {"hipblasDspmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasChpmv", {"hipblasChpmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZhpmv", {"hipblasZhpmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // GER - {"cublasSger", {"hipblasSger", "rocblas_sger", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDger", {"hipblasDger", "rocblas_dger", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCgeru", {"hipblasCgeru", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCgerc", {"hipblasCgerc", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZgeru", {"hipblasZgeru", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZgerc", {"hipblasZgerc", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SYR/HER - {"cublasSsyr", {"hipblasSsyr", "rocblas_ssyr", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDsyr", {"hipblasDsyr", "rocblas_dsyr", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCsyr", {"hipblasCsyr", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZsyr", {"hipblasZsyr", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCher", {"hipblasCher", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZher", {"hipblasZher", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SPR/HPR - {"cublasSspr", {"hipblasSspr", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDspr", {"hipblasDspr", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasChpr", {"hipblasChpr", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZhpr", {"hipblasZhpr", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SYR2/HER2 - {"cublasSsyr2", {"hipblasSsyr2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDsyr2", {"hipblasDsyr2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCsyr2", {"hipblasCsyr2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZsyr2", {"hipblasZsyr2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCher2", {"hipblasCher2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZher2", {"hipblasZher2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SPR2/HPR2 - {"cublasSspr2", {"hipblasSspr2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDspr2", {"hipblasDspr2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasChpr2", {"hipblasChpr2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZhpr2", {"hipblasZhpr2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // Blas3 (v1) Routines - // GEMM - {"cublasSgemm", {"hipblasSgemm", "rocblas_sgemm", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDgemm", {"hipblasDgemm", "rocblas_dgemm", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCgemm", {"hipblasCgemm", "rocblas_cgemm", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZgemm", {"hipblasZgemm", "rocblas_zgemm", CONV_LIB_FUNC, API_BLAS}}, - {"cublasHgemm", {"hipblasHgemm", "rocblas_hgemm", CONV_LIB_FUNC, API_BLAS}}, - - // BATCH GEMM - {"cublasSgemmBatched", {"hipblasSgemmBatched", "rocblas_sgemm_batched", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDgemmBatched", {"hipblasDgemmBatched", "rocblas_dgemm_batched", CONV_LIB_FUNC, API_BLAS}}, - {"cublasHgemmBatched", {"hipblasHgemmBatched", "rocblas_hgemm_batched", CONV_LIB_FUNC, API_BLAS}}, - {"cublasSgemmStridedBatched", {"hipblasSgemmStridedBatched", "rocblas_sgemm_strided_batched", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDgemmStridedBatched", {"hipblasDgemmStridedBatched", "rocblas_dgemm_strided_batched", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCgemmBatched", {"hipblasCgemmBatched", "rocblas_cgemm_batched", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCgemm3mBatched", {"hipblasCgemm3mBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZgemmBatched", {"hipblasZgemmBatched", "rocblas_zgemm_batched", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCgemmStridedBatched", {"hipblasCgemmStridedBatched", "rocblas_cgemm_strided_batched", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCgemm3mStridedBatched", {"hipblasCgemm3mStridedBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZgemmStridedBatched", {"hipblasZgemmStridedBatched", "rocblas_zgemm_strided_batched", CONV_LIB_FUNC, API_BLAS}}, - {"cublasHgemmStridedBatched", {"hipblasHgemmStridedBatched", "rocblas_hgemm_strided_batched", CONV_LIB_FUNC, API_BLAS}}, - - // SYRK - {"cublasSsyrk", {"hipblasSsyrk", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDsyrk", {"hipblasDsyrk", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCsyrk", {"hipblasCsyrk", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZsyrk", {"hipblasZsyrk", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // HERK - {"cublasCherk", {"hipblasCherk", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZherk", {"hipblasZherk", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SYR2K - {"cublasSsyr2k", {"hipblasSsyr2k", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDsyr2k", {"hipblasDsyr2k", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCsyr2k", {"hipblasCsyr2k", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZsyr2k", {"hipblasZsyr2k", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SYRKX - eXtended SYRK - {"cublasSsyrkx", {"hipblasSsyrkx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDsyrkx", {"hipblasDsyrkx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCsyrkx", {"hipblasCsyrkx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZsyrkx", {"hipblasZsyrkx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // HER2K - {"cublasCher2k", {"hipblasCher2k", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZher2k", {"hipblasZher2k", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // HERKX - eXtended HERK - {"cublasCherkx", {"hipblasCherkx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZherkx", {"hipblasZherkx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SYMM - {"cublasSsymm", {"hipblasSsymm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDsymm", {"hipblasDsymm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCsymm", {"hipblasCsymm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZsymm", {"hipblasZsymm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // HEMM - {"cublasChemm", {"hipblasChemm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZhemm", {"hipblasZhemm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TRSM - {"cublasStrsm", {"hipblasStrsm", "rocblas_strsm", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDtrsm", {"hipblasDtrsm", "rocblas_dtrsm", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCtrsm", {"hipblasCtrsm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtrsm", {"hipblasZtrsm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TRMM - {"cublasStrmm", {"hipblasStrmm", "rocblas_strmm", CONV_LIB_FUNC, API_BLAS, HIP_UNSUPPORTED}}, - {"cublasDtrmm", {"hipblasDtrmm", "rocblas_dtrmm", CONV_LIB_FUNC, API_BLAS, HIP_UNSUPPORTED}}, - {"cublasCtrmm", {"hipblasCtrmm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtrmm", {"hipblasZtrmm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // ------------------------ CUBLAS BLAS - like extension (cublas_api.h) - // GEAM - {"cublasSgeam", {"hipblasSgeam", "rocblas_sgeam", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDgeam", {"hipblasDgeam", "rocblas_dgeam", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCgeam", {"hipblasCgeam", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZgeam", {"hipblasZgeam", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // GETRF - Batched LU - {"cublasSgetrfBatched", {"hipblasSgetrfBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDgetrfBatched", {"hipblasDgetrfBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCgetrfBatched", {"hipblasCgetrfBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZgetrfBatched", {"hipblasZgetrfBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // Batched inversion based on LU factorization from getrf - {"cublasSgetriBatched", {"hipblasSgetriBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDgetriBatched", {"hipblasDgetriBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCgetriBatched", {"hipblasCgetriBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZgetriBatched", {"hipblasZgetriBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // Batched solver based on LU factorization from getrf - {"cublasSgetrsBatched", {"hipblasSgetrsBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDgetrsBatched", {"hipblasDgetrsBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCgetrsBatched", {"hipblasCgetrsBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZgetrsBatched", {"hipblasZgetrsBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TRSM - Batched Triangular Solver - {"cublasStrsmBatched", {"hipblasStrsmBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDtrsmBatched", {"hipblasDtrsmBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCtrsmBatched", {"hipblasCtrsmBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtrsmBatched", {"hipblasZtrsmBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // MATINV - Batched - {"cublasSmatinvBatched", {"hipblasSmatinvBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDmatinvBatched", {"hipblasDmatinvBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCmatinvBatched", {"hipblasCmatinvBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZmatinvBatched", {"hipblasZmatinvBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // Batch QR Factorization - {"cublasSgeqrfBatched", {"hipblasSgeqrfBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDgeqrfBatched", {"hipblasDgeqrfBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCgeqrfBatched", {"hipblasCgeqrfBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZgeqrfBatched", {"hipblasZgeqrfBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // Least Square Min only m >= n and Non-transpose supported - {"cublasSgelsBatched", {"hipblasSgelsBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDgelsBatched", {"hipblasDgelsBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCgelsBatched", {"hipblasCgelsBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZgelsBatched", {"hipblasZgelsBatched", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // DGMM - {"cublasSdgmm", {"hipblasSdgmm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDdgmm", {"hipblasDdgmm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCdgmm", {"hipblasCdgmm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZdgmm", {"hipblasZdgmm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TPTTR - Triangular Pack format to Triangular format - {"cublasStpttr", {"hipblasStpttr", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDtpttr", {"hipblasDtpttr", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCtpttr", {"hipblasCtpttr", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtpttr", {"hipblasZtpttr", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TRTTP - Triangular format to Triangular Pack format - {"cublasStrttp", {"hipblasStrttp", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDtrttp", {"hipblasDtrttp", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCtrttp", {"hipblasCtrttp", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtrttp", {"hipblasZtrttp", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // Blas2 (v2) Routines - {"cublasCreate_v2", {"hipblasCreate", "rocblas_create_handle", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDestroy_v2", {"hipblasDestroy", "rocblas_destroy_handle", CONV_LIB_FUNC, API_BLAS}}, - {"cublasGetVersion_v2", {"hipblasGetVersion", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasGetProperty", {"hipblasGetProperty", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasSetStream_v2", {"hipblasSetStream", "rocblas_set_stream", CONV_LIB_FUNC, API_BLAS}}, - {"cublasGetStream_v2", {"hipblasGetStream", "rocblas_get_stream", CONV_LIB_FUNC, API_BLAS}}, - {"cublasGetPointerMode_v2", {"hipblasGetPointerMode", "rocblas_set_pointer_mode", CONV_LIB_FUNC, API_BLAS}}, - {"cublasSetPointerMode_v2", {"hipblasSetPointerMode", "rocblas_get_pointer_mode", CONV_LIB_FUNC, API_BLAS}}, - {"cublasGetCudartVersion", {"hipblasGetCudartVersion", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // GEMV - {"cublasSgemv_v2", {"hipblasSgemv", "rocblas_sgemv", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDgemv_v2", {"hipblasDgemv", "rocblas_dgemv", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCgemv_v2", {"hipblasCgemv", "rocblas_cgemv", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZgemv_v2", {"hipblasZgemv", "rocblas_zgemv", CONV_LIB_FUNC, API_BLAS}}, - - // GBMV - {"cublasSgbmv_v2", {"hipblasSgbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDgbmv_v2", {"hipblasDgbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCgbmv_v2", {"hipblasCgbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZgbmv_v2", {"hipblasZgbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TRMV - {"cublasStrmv_v2", {"hipblasStrmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDtrmv_v2", {"hipblasDtrmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCtrmv_v2", {"hipblasCtrmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtrmv_v2", {"hipblasZtrmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TBMV - {"cublasStbmv_v2", {"hipblasStbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDtbmv_v2", {"hipblasDtbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCtbmv_v2", {"hipblasCtbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtbmv_v2", {"hipblasZtbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TPMV - {"cublasStpmv_v2", {"hipblasStpmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDtpmv_v2", {"hipblasDtpmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCtpmv_v2", {"hipblasCtpmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtpmv_v2", {"hipblasZtpmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TRSV - {"cublasStrsv_v2", {"hipblasStrsv", "rocblas_strsv", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDtrsv_v2", {"hipblasDtrsv", "rocblas_dtrsv", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCtrsv_v2", {"hipblasCtrsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtrsv_v2", {"hipblasZtrsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TPSV - {"cublasStpsv_v2", {"hipblasStpsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDtpsv_v2", {"hipblasDtpsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCtpsv_v2", {"hipblasCtpsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtpsv_v2", {"hipblasZtpsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TBSV - {"cublasStbsv_v2", {"hipblasStbsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDtbsv_v2", {"hipblasDtbsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCtbsv_v2", {"hipblasCtbsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtbsv_v2", {"hipblasZtbsv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SYMV/HEMV - {"cublasSsymv_v2", {"hipblasSsymv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDsymv_v2", {"hipblasDsymv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCsymv_v2", {"hipblasCsymv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZsymv_v2", {"hipblasZsymv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasChemv_v2", {"hipblasChemv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZhemv_v2", {"hipblasZhemv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SBMV/HBMV - {"cublasSsbmv_v2", {"hipblasSsbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDsbmv_v2", {"hpiblasDsbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasChbmv_v2", {"hipblasChbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZhbmv_v2", {"hipblasZhbmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SPMV/HPMV - {"cublasSspmv_v2", {"hipblasSspmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDspmv_v2", {"hipblasDspmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasChpmv_v2", {"hipblasChpmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZhpmv_v2", {"hipblasZhpmv", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // GER - {"cublasSger_v2", {"hipblasSger", "rocblas_sger", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDger_v2", {"hipblasDger", "rocblas_dger", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCgeru_v2", {"hipblasCgeru", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCgerc_v2", {"hipblasCgerc", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZgeru_v2", {"hipblasZgeru", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZgerc_v2", {"hipblasZgerc", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SYR/HER - {"cublasSsyr_v2", {"hipblasSsyr", "rocblas_ssyr", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDsyr_v2", {"hipblasDsyr", "rocblas_dsyr", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCsyr_v2", {"hipblasCsyr", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZsyr_v2", {"hipblasZsyr", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCher_v2", {"hipblasCher", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZher_v2", {"hipblasZher", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SPR/HPR - {"cublasSspr_v2", {"hipblasSspr", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDspr_v2", {"hipblasDspr", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasChpr_v2", {"hipblasChpr", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZhpr_v2", {"hipblasZhpr", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SYR2/HER2 - {"cublasSsyr2_v2", {"hipblasSsyr2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDsyr2_v2", {"hipblasDsyr2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCsyr2_v2", {"hipblasCsyr2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZsyr2_v2", {"hipblasZsyr2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCher2_v2", {"hipblasCher2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZher2_v2", {"hipblasZher2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SPR2/HPR2 - {"cublasSspr2_v2", {"hipblasSspr2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDspr2_v2", {"hipblasDspr2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasChpr2_v2", {"hipblasChpr2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZhpr2_v2", {"hipblasZhpr2", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // Blas3 (v2) Routines - // GEMM - {"cublasSgemm_v2", {"hipblasSgemm", "rocblas_sgemm", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDgemm_v2", {"hipblasDgemm", "rocblas_dgemm", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCgemm_v2", {"hipblasCgemm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCgemm3m", {"hipblasCgemm3m", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCgemm3mEx", {"hipblasCgemm3mEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZgemm_v2", {"hipblasZgemm", "rocblas_zgemm", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZgemm3m", {"hipblasZgemm3m", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - //IO in FP16 / FP32, computation in float - {"cublasSgemmEx", {"hipblasSgemmEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasGemmEx", {"hipblasGemmEx", "rocblas_gemm_ex", CONV_LIB_FUNC, API_BLAS}}, - {"cublasGemmBatchedEx", {"hipblasGemmBatchedEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasGemmStridedBatchedEx", {"hipblasGemmStridedBatchedEx", "rocblas_gemm_strided_batched_ex", CONV_LIB_FUNC, API_BLAS, HIP_UNSUPPORTED}}, - // IO in Int8 complex/cuComplex, computation in cuComplex - {"cublasCgemmEx", {"hipblasCgemmEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasUint8gemmBias", {"hipblasUint8gemmBias", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SYRK - {"cublasSsyrk_v2", {"hipblasSsyrk", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDsyrk_v2", {"hipblasDsyrk", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCsyrk_v2", {"hipblasCsyrk", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZsyrk_v2", {"hipblasZsyrk", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // IO in Int8 complex/cuComplex, computation in cuComplex - {"cublasCsyrkEx", {"hipblasCsyrkEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - // IO in Int8 complex/cuComplex, computation in cuComplex, Gaussian math - {"cublasCsyrk3mEx", {"hipblasCsyrk3mEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // HERK - {"cublasCherk_v2", {"hipblasCherk", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - // IO in Int8 complex/cuComplex, computation in cuComplex - {"cublasCherkEx", {"hipblasCherkEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - // IO in Int8 complex/cuComplex, computation in cuComplex, Gaussian math - {"cublasCherk3mEx", {"hipblasCherk3mEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZherk_v2", {"hipblasZherk", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SYR2K - {"cublasSsyr2k_v2", {"hipblasSsyr2k", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDsyr2k_v2", {"hipblasDsyr2k", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCsyr2k_v2", {"hipblasCsyr2k", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZsyr2k_v2", {"hipblasZsyr2k", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // HER2K - {"cublasCher2k_v2", {"hipblasCher2k", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZher2k_v2", {"hipblasZher2k", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // SYMM - {"cublasSsymm_v2", {"hipblasSsymm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDsymm_v2", {"hipblasDsymm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasCsymm_v2", {"hipblasCsymm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZsymm_v2", {"hipblasZsymm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // HEMM - {"cublasChemm_v2", {"hipblasChemm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZhemm_v2", {"hipblasZhemm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TRSM - {"cublasStrsm_v2", {"hipblasStrsm", "rocblas_strsm", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDtrsm_v2", {"hipblasDtrsm", "rocblas_dtrsm", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCtrsm_v2", {"hipblasCtrsm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtrsm_v2", {"hipblasZtrsm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // TRMM - {"cublasStrmm_v2", {"hipblasStrmm", "rocblas_strmm", CONV_LIB_FUNC, API_BLAS, HIP_UNSUPPORTED}}, - {"cublasDtrmm_v2", {"hipblasDtrmm", "rocblas_dtrmm", CONV_LIB_FUNC, API_BLAS, HIP_UNSUPPORTED}}, - {"cublasCtrmm_v2", {"hipblasCtrmm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasZtrmm_v2", {"hipblasZtrmm", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - // NRM2 - {"cublasSnrm2_v2", {"hipblasSnrm2", "rocblas_snrm2", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDnrm2_v2", {"hipblasDnrm2", "rocblas_dnrm2", CONV_LIB_FUNC, API_BLAS}}, - {"cublasScnrm2_v2", {"hipblasScnrm2", "rocblas_scnrm2", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDznrm2_v2", {"hipblasDznrm2", "rocblas_dznrm2", CONV_LIB_FUNC, API_BLAS}}, - - // DOT - {"cublasDotEx", {"hipblasDotEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasDotcEx", {"hipblasDotcEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - - {"cublasSdot_v2", {"hipblasSdot", "rocblas_sdot", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDdot_v2", {"hipblasDdot", "rocblas_ddot", CONV_LIB_FUNC, API_BLAS}}, - - {"cublasCdotu_v2", {"hipblasCdotu", "rocblas_cdotu", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCdotc_v2", {"hipblasCdotc", "rocblas_cdotc", CONV_LIB_FUNC, API_BLAS,}}, - {"cublasZdotu_v2", {"hipblasZdotu", "rocblas_zdotu", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZdotc_v2", {"hipblasZdotc", "rocblas_zdotc", CONV_LIB_FUNC, API_BLAS}}, - - // SCAL - {"cublasScalEx", {"hipblasScalEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasSscal_v2", {"hipblasSscal", "rocblas_sscal", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDscal_v2", {"hipblasDscal", "rocblas_dscal", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCscal_v2", {"hipblasCscal", "rocblas_cscal", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCsscal_v2", {"hipblasCsscal", "rocblas_csscal", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZscal_v2", {"hipblasZscal", "rocblas_zscal", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZdscal_v2", {"hipblasZdscal", "rocblas_zdscal", CONV_LIB_FUNC, API_BLAS}}, - - // AXPY - {"cublasAxpyEx", {"hipblasAxpyEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasSaxpy_v2", {"hipblasSaxpy", "rocblas_saxpy", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDaxpy_v2", {"hipblasDaxpy", "rocblas_daxpy", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCaxpy_v2", {"hipblasCaxpy", "rocblas_caxpy", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZaxpy_v2", {"hipblasZaxpy", "rocblas_zaxpy", CONV_LIB_FUNC, API_BLAS}}, - - // COPY - {"cublasCopyEx", {"hipblasCopyEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasScopy_v2", {"hipblasScopy", "rocblas_scopy", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDcopy_v2", {"hipblasDcopy", "rocblas_dcopy", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCcopy_v2", {"hipblasCcopy", "rocblas_ccopy", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZcopy_v2", {"hipblasZcopy", "rocblas_zcopy", CONV_LIB_FUNC, API_BLAS}}, - - // SWAP - {"cublasSwapEx", {"hipblasSwapEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasSswap_v2", {"hipblasSswap", "rocblas_sswap", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDswap_v2", {"hipblasDswap", "rocblas_dswap", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCswap_v2", {"hipblasCswap", "rocblas_cswap", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZswap_v2", {"hipblasZswap", "rocblas_zswap", CONV_LIB_FUNC, API_BLAS}}, - - // AMAX - {"cublasIamaxEx", {"hipblasIamaxEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasIsamax_v2", {"hipblasIsamax", "rocblas_isamax", CONV_LIB_FUNC, API_BLAS}}, - {"cublasIdamax_v2", {"hipblasIdamax", "rocblas_idamax", CONV_LIB_FUNC, API_BLAS}}, - {"cublasIcamax_v2", {"hipblasIcamax", "rocblas_icamax", CONV_LIB_FUNC, API_BLAS}}, - {"cublasIzamax_v2", {"hipblasIzamax", "rocblas_izamax", CONV_LIB_FUNC, API_BLAS}}, - - // AMIN - {"cublasIaminEx", {"hipblasIaminEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasIsamin_v2", {"hipblasIsamin", "rocblas_isamin", CONV_LIB_FUNC, API_BLAS}}, - {"cublasIdamin_v2", {"hipblasIdamin", "rocblas_idamin", CONV_LIB_FUNC, API_BLAS}}, - {"cublasIcamin_v2", {"hipblasIcamin", "rocblas_icamin", CONV_LIB_FUNC, API_BLAS}}, - {"cublasIzamin_v2", {"hipblasIzamin", "rocblas_izamin", CONV_LIB_FUNC, API_BLAS}}, - - // ASUM - {"cublasAsumEx", {"hipblasAsumEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasSasum_v2", {"hipblasSasum", "rocblas_sasum", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDasum_v2", {"hipblasDasum", "rocblas_dasum", CONV_LIB_FUNC, API_BLAS}}, - {"cublasScasum_v2", {"hipblasScasum", "rocblas_scasum", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDzasum_v2", {"hipblasDzasum", "rocblas_dzasum", CONV_LIB_FUNC, API_BLAS}}, - - // ROT - {"cublasRotEx", {"hipblasRotEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasSrot_v2", {"hipblasSrot", "rocblas_srot", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDrot_v2", {"hipblasDrot", "rocblas_drot", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCrot_v2", {"hipblasCrot", "rocblas_crot", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCsrot_v2", {"hipblasCsrot", "rocblas_csrot", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZrot_v2", {"hipblasZrot", "rocblas_zrot", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZdrot_v2", {"hipblasZdrot", "rocblas_zdrot", CONV_LIB_FUNC, API_BLAS}}, - - // ROTG - {"cublasRotgEx", {"hipblasRotgEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasSrotg_v2", {"hipblasSrotg", "rocblas_srotg", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDrotg_v2", {"hipblasDrotg", "rocblas_drotg", CONV_LIB_FUNC, API_BLAS}}, - {"cublasCrotg_v2", {"hipblasCrotg", "rocblas_crotg", CONV_LIB_FUNC, API_BLAS}}, - {"cublasZrotg_v2", {"hipblasZrotg", "rocblas_zrotg", CONV_LIB_FUNC, API_BLAS}}, - - // ROTM - {"cublasRotmEx", {"hipblasRotmEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasSrotm_v2", {"hipblasSrotm", "rocblas_srotm", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDrotm_v2", {"hipblasDrotm", "rocblas_drotm", CONV_LIB_FUNC, API_BLAS}}, - - // ROTMG - {"cublasRotmgEx", {"hipblasRotmgEx", "", CONV_LIB_FUNC, API_BLAS, UNSUPPORTED}}, - {"cublasSrotmg_v2", {"hipblasSrotmg", "rocblas_srotmg", CONV_LIB_FUNC, API_BLAS}}, - {"cublasDrotmg_v2", {"hipblasDrotmg", "rocblas_drotmg", CONV_LIB_FUNC, API_BLAS}}, -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_BLAS_API_types.cpp b/hipamd/hipify-clang/src/CUDA2HIP_BLAS_API_types.cpp deleted file mode 100644 index a747eb0040..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_BLAS_API_types.cpp +++ /dev/null @@ -1,158 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Map of all functions -const std::map CUDA_BLAS_TYPE_NAME_MAP{ - // Blas defines - {"CUBLAS_VER_MAJOR", {"HIPBLAS_VER_MAJOR", "", CONV_DEFINE, API_BLAS, HIP_UNSUPPORTED}}, - {"CUBLAS_VER_MINOR", {"HIPBLAS_VER_MINOR", "", CONV_DEFINE, API_BLAS, HIP_UNSUPPORTED}}, - {"CUBLAS_VER_PATCH", {"HIPBLAS_VER_PATCH", "", CONV_DEFINE, API_BLAS, HIP_UNSUPPORTED}}, - {"CUBLAS_VER_BUILD", {"HIPBLAS_VER_BUILD", "", CONV_DEFINE, API_BLAS, HIP_UNSUPPORTED}}, - {"CUBLAS_VERSION", {"HIPBLAS_VERSION", "", CONV_DEFINE, API_BLAS, HIP_UNSUPPORTED}}, - - // Blas operations - {"cublasOperation_t", {"hipblasOperation_t", "rocblas_operation", CONV_TYPE, API_BLAS}}, - {"CUBLAS_OP_N", {"HIPBLAS_OP_N", "rocblas_operation_none", CONV_NUMERIC_LITERAL, API_BLAS}}, - {"CUBLAS_OP_T", {"HIPBLAS_OP_T", "rocblas_operation_transpose", CONV_NUMERIC_LITERAL, API_BLAS}}, - {"CUBLAS_OP_C", {"HIPBLAS_OP_C", "rocblas_operation_conjugate_transpose", CONV_NUMERIC_LITERAL, API_BLAS}}, - {"CUBLAS_OP_HERMITAN", {"HIPBLAS_OP_C", "rocblas_operation_conjugate_transpose", CONV_NUMERIC_LITERAL, API_BLAS}}, - {"CUBLAS_OP_CONJG", {"HIPBLAS_OP_CONJG", "rocblas_operation_conjugate", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, - - // Blas statuses - {"cublasStatus", {"hipblasStatus_t", "rocblas_status", CONV_TYPE, API_BLAS}}, - {"cublasStatus_t", {"hipblasStatus_t", "rocblas_status", CONV_TYPE, API_BLAS}}, - {"CUBLAS_STATUS_SUCCESS", {"HIPBLAS_STATUS_SUCCESS", "rocblas_status_success", CONV_NUMERIC_LITERAL, API_BLAS}}, - {"CUBLAS_STATUS_NOT_INITIALIZED", {"HIPBLAS_STATUS_NOT_INITIALIZED", "rocblas_status_invalid_handle", CONV_NUMERIC_LITERAL, API_BLAS}}, - {"CUBLAS_STATUS_ALLOC_FAILED", {"HIPBLAS_STATUS_ALLOC_FAILED", "rocblas_status_memory_error", CONV_NUMERIC_LITERAL, API_BLAS}}, - {"CUBLAS_STATUS_INVALID_VALUE", {"HIPBLAS_STATUS_INVALID_VALUE", "rocblas_status_invalid_pointer", CONV_NUMERIC_LITERAL, API_BLAS}}, - {"CUBLAS_STATUS_MAPPING_ERROR", {"HIPBLAS_STATUS_MAPPING_ERROR", "rocblas_status_internal_error", CONV_NUMERIC_LITERAL, API_BLAS}}, - {"CUBLAS_STATUS_EXECUTION_FAILED", {"HIPBLAS_STATUS_EXECUTION_FAILED", "rocblas_status_internal_error", CONV_NUMERIC_LITERAL, API_BLAS}}, - {"CUBLAS_STATUS_INTERNAL_ERROR", {"HIPBLAS_STATUS_INTERNAL_ERROR", "rocblas_status_internal_error", CONV_NUMERIC_LITERAL, API_BLAS}}, - {"CUBLAS_STATUS_NOT_SUPPORTED", {"HIPBLAS_STATUS_NOT_SUPPORTED", "rocblas_status_not_implemented", CONV_NUMERIC_LITERAL, API_BLAS}}, - {"CUBLAS_STATUS_ARCH_MISMATCH", {"HIPBLAS_STATUS_ARCH_MISMATCH", "rocblas_status_not_implemented", CONV_NUMERIC_LITERAL, API_BLAS}}, - {"CUBLAS_STATUS_LICENSE_ERROR", {"HIPBLAS_STATUS_LICENSE_ERROR", "rocblas_status_not_implemented", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, - - // Blas Fill Modes - {"cublasFillMode_t", {"hipblasFillMode_t", "rocblas_fill", CONV_TYPE, API_BLAS}}, - {"CUBLAS_FILL_MODE_LOWER", {"HIPBLAS_FILL_MODE_LOWER", "rocblas_fill_lower", CONV_NUMERIC_LITERAL, API_BLAS}}, - {"CUBLAS_FILL_MODE_UPPER", {"HIPBLAS_FILL_MODE_UPPER", "rocblas_fill_upper", CONV_NUMERIC_LITERAL, API_BLAS}}, - {"CUBLAS_FILL_MODE_FULL", {"HIPBLAS_FILL_MODE_FULL", "rocblas_fill_full", CONV_NUMERIC_LITERAL, API_BLAS}}, - - // Blas Diag Types - {"cublasDiagType_t", {"hipblasDiagType_t", "rocblas_diagonal", CONV_TYPE, API_BLAS}}, - {"CUBLAS_DIAG_NON_UNIT", {"HIPBLAS_DIAG_NON_UNIT", "rocblas_diagonal_non_unit", CONV_NUMERIC_LITERAL, API_BLAS}}, - {"CUBLAS_DIAG_UNIT", {"HIPBLAS_DIAG_UNIT", "rocblas_diagonal_unit", CONV_NUMERIC_LITERAL, API_BLAS}}, - - // Blas Side Modes - {"cublasSideMode_t", {"hipblasSideMode_t", "rocblas_side", CONV_TYPE, API_BLAS}}, - {"CUBLAS_SIDE_LEFT", {"HIPBLAS_SIDE_LEFT", "rocblas_side_left", CONV_NUMERIC_LITERAL, API_BLAS}}, - {"CUBLAS_SIDE_RIGHT", {"HIPBLAS_SIDE_RIGHT", "rocblas_side_right", CONV_NUMERIC_LITERAL, API_BLAS}}, - - // Blas Pointer Modes - {"cublasPointerMode_t", {"hipblasPointerMode_t", "rocblas_pointer_mode", CONV_TYPE, API_BLAS}}, - {"CUBLAS_POINTER_MODE_HOST", {"HIPBLAS_POINTER_MODE_HOST", "rocblas_pointer_mode_host", CONV_NUMERIC_LITERAL, API_BLAS}}, - {"CUBLAS_POINTER_MODE_DEVICE", {"HIPBLAS_POINTER_MODE_DEVICE", "rocblas_pointer_mode_device", CONV_NUMERIC_LITERAL, API_BLAS}}, - - // Blas Atomics Modes - {"cublasAtomicsMode_t", {"hipblasAtomicsMode_t", "rocblas_atomics_mode", CONV_TYPE, API_BLAS, HIP_UNSUPPORTED}}, - {"CUBLAS_ATOMICS_NOT_ALLOWED", {"HIPBLAS_ATOMICS_NOT_ALLOWED", "rocblas_atomics_not_allowed", CONV_NUMERIC_LITERAL, API_BLAS, HIP_UNSUPPORTED}}, - {"CUBLAS_ATOMICS_ALLOWED", {"HIPBLAS_ATOMICS_ALLOWED", "rocblas_atomics_allowed", CONV_NUMERIC_LITERAL, API_BLAS, HIP_UNSUPPORTED}}, - - // Blas Data Type - {"cublasDataType_t", {"hipblasDatatype_t", "rocblas_datatype", CONV_TYPE, API_BLAS}}, - - // Blas Math mode/tensor operation - {"cublasMath_t", {"hipblasMath_t", "", CONV_TYPE, API_BLAS, UNSUPPORTED}}, - {"CUBLAS_DEFAULT_MATH", {"HIPBLAS_DEFAULT_MATH", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, - {"CUBLAS_TENSOR_OP_MATH", {"HIPBLAS_TENSOR_OP_MATH", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, - - // Blass different GEMM algorithms - {"cublasGemmAlgo_t", {"hipblasGemmAlgo_t", "rocblas_gemm_algo", CONV_TYPE, API_BLAS}}, - {"CUBLAS_GEMM_DFALT", {"HIPBLAS_GEMM_DEFAULT", "rocblas_gemm_algo_standard", CONV_NUMERIC_LITERAL, API_BLAS}}, // -1 // 160 // 0b0000000000 - {"CUBLAS_GEMM_DEFAULT", {"HIPBLAS_GEMM_DEFAULT", "rocblas_gemm_algo_standard", CONV_NUMERIC_LITERAL, API_BLAS}}, // -1 // 160 // 0b0000000000 - {"CUBLAS_GEMM_ALGO0", {"HIPBLAS_GEMM_ALGO0", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 0 - {"CUBLAS_GEMM_ALGO1", {"HIPBLAS_GEMM_ALGO1", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 1 - {"CUBLAS_GEMM_ALGO2", {"HIPBLAS_GEMM_ALGO2", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 2 - {"CUBLAS_GEMM_ALGO3", {"HIPBLAS_GEMM_ALGO3", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 3 - {"CUBLAS_GEMM_ALGO4", {"HIPBLAS_GEMM_ALGO4", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 4 - {"CUBLAS_GEMM_ALGO5", {"HIPBLAS_GEMM_ALGO5", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 5 - {"CUBLAS_GEMM_ALGO6", {"HIPBLAS_GEMM_ALGO6", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 6 - {"CUBLAS_GEMM_ALGO7", {"HIPBLAS_GEMM_ALGO7", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 7 - {"CUBLAS_GEMM_ALGO8", {"HIPBLAS_GEMM_ALGO8", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 8 - {"CUBLAS_GEMM_ALGO9", {"HIPBLAS_GEMM_ALGO9", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 9 - {"CUBLAS_GEMM_ALGO10", {"HIPBLAS_GEMM_ALGO10", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 10 - {"CUBLAS_GEMM_ALGO11", {"HIPBLAS_GEMM_ALGO11", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 11 - {"CUBLAS_GEMM_ALGO12", {"HIPBLAS_GEMM_ALGO12", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 12 - {"CUBLAS_GEMM_ALGO13", {"HIPBLAS_GEMM_ALGO13", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 13 - {"CUBLAS_GEMM_ALGO14", {"HIPBLAS_GEMM_ALGO14", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 14 - {"CUBLAS_GEMM_ALGO15", {"HIPBLAS_GEMM_ALGO15", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 15 - {"CUBLAS_GEMM_ALGO16", {"HIPBLAS_GEMM_ALGO16", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 16 - {"CUBLAS_GEMM_ALGO17", {"HIPBLAS_GEMM_ALGO17", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 17 - {"CUBLAS_GEMM_ALGO18", {"HIPBLAS_GEMM_ALGO18", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 18 - {"CUBLAS_GEMM_ALGO19", {"HIPBLAS_GEMM_ALGO19", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 19 - {"CUBLAS_GEMM_ALGO20", {"HIPBLAS_GEMM_ALGO20", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 20 - {"CUBLAS_GEMM_ALGO21", {"HIPBLAS_GEMM_ALGO21", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 21 - {"CUBLAS_GEMM_ALGO22", {"HIPBLAS_GEMM_ALGO22", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 22 - {"CUBLAS_GEMM_ALGO23", {"HIPBLAS_GEMM_ALGO23", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 23 - {"CUBLAS_GEMM_DEFAULT_TENSOR_OP", {"HIPBLAS_GEMM_DEFAULT_TENSOR_OP", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 99 - {"CUBLAS_GEMM_DFALT_TENSOR_OP", {"HIPBLAS_GEMM_DFALT_TENSOR_OP", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 99 - {"CUBLAS_GEMM_ALGO0_TENSOR_OP", {"HIPBLAS_GEMM_ALGO0_TENSOR_OP", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 100 - {"CUBLAS_GEMM_ALGO1_TENSOR_OP", {"HIPBLAS_GEMM_ALGO1_TENSOR_OP", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 101 - {"CUBLAS_GEMM_ALGO2_TENSOR_OP", {"HIPBLAS_GEMM_ALGO2_TENSOR_OP", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 102 - {"CUBLAS_GEMM_ALGO3_TENSOR_OP", {"HIPBLAS_GEMM_ALGO3_TENSOR_OP", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 103 - {"CUBLAS_GEMM_ALGO4_TENSOR_OP", {"HIPBLAS_GEMM_ALGO4_TENSOR_OP", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 104 - {"CUBLAS_GEMM_ALGO5_TENSOR_OP", {"HIPBLAS_GEMM_ALGO5_TENSOR_OP", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 105 - {"CUBLAS_GEMM_ALGO6_TENSOR_OP", {"HIPBLAS_GEMM_ALGO6_TENSOR_OP", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 106 - {"CUBLAS_GEMM_ALGO7_TENSOR_OP", {"HIPBLAS_GEMM_ALGO7_TENSOR_OP", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 107 - {"CUBLAS_GEMM_ALGO8_TENSOR_OP", {"HIPBLAS_GEMM_ALGO8_TENSOR_OP", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 108 - {"CUBLAS_GEMM_ALGO9_TENSOR_OP", {"HIPBLAS_GEMM_ALGO9_TENSOR_OP", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 109 - {"CUBLAS_GEMM_ALGO10_TENSOR_OP", {"HIPBLAS_GEMM_ALGO10_TENSOR_OP", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 110 - {"CUBLAS_GEMM_ALGO11_TENSOR_OP", {"HIPBLAS_GEMM_ALGO11_TENSOR_OP", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 111 - {"CUBLAS_GEMM_ALGO12_TENSOR_OP", {"HIPBLAS_GEMM_ALGO12_TENSOR_OP", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 112 - {"CUBLAS_GEMM_ALGO13_TENSOR_OP", {"HIPBLAS_GEMM_ALGO13_TENSOR_OP", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 113 - {"CUBLAS_GEMM_ALGO14_TENSOR_OP", {"HIPBLAS_GEMM_ALGO14_TENSOR_OP", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 114 - {"CUBLAS_GEMM_ALGO15_TENSOR_OP", {"HIPBLAS_GEMM_ALGO15_TENSOR_OP", "", CONV_NUMERIC_LITERAL, API_BLAS, UNSUPPORTED}}, // 115 - - // TODO: rename hipblasDatatype_t to hipDataType_t and move from hipBLAS to HIP - {"cudaDataType_t", {"hipblasDatatype_t", "rocblas_datatype_", CONV_TYPE, API_RUNTIME}}, - {"cudaDataType", {"hipblasDatatype_t", "rocblas_datatype", CONV_TYPE, API_RUNTIME}}, - {"CUDA_R_16F", {"HIPBLAS_R_16F", "rocblas_datatype_f16_r", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 2 // 150 - {"CUDA_C_16F", {"HIPBLAS_C_16F", "rocblas_datatype_f16_c", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 6 // 153 - {"CUDA_R_32F", {"HIPBLAS_R_32F", "rocblas_datatype_f32_r", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0 // 151 - {"CUDA_C_32F", {"HIPBLAS_C_32F", "rocblas_datatype_f32_c", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 4 // 154 - {"CUDA_R_64F", {"HIPBLAS_R_64F", "rocblas_datatype_f64_r", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 1 // 152 - {"CUDA_C_64F", {"HIPBLAS_C_64F", "rocblas_datatype_f64_c", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 5 // 155 - {"CUDA_R_8I", {"HIPBLAS_R_8I", "rocblas_datatype_i8_r", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 3 // 160 - {"CUDA_C_8I", {"HIPBLAS_C_8I", "rocblas_datatype_i8_c", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 7 // 164 - {"CUDA_R_8U", {"HIPBLAS_R_8U", "rocblas_datatype_u8_r", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 8 // 161 - {"CUDA_C_8U", {"HIPBLAS_C_8U", "rocblas_datatype_u8_c", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 9 // 165 - {"CUDA_R_32I", {"HIPBLAS_R_32I", "rocblas_datatype_i32_r", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 10 // 162 - {"CUDA_C_32I", {"HIPBLAS_C_32I", "rocblas_datatype_i32_c", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 11 // 166 - {"CUDA_R_32U", {"HIPBLAS_R_32U", "rocblas_datatype_u32_r", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 12 // 163 - {"CUDA_C_32U", {"HIPBLAS_C_32U", "rocblas_datatype_u32_c", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 13 // 167 - - {"cublasHandle_t", {"hipblasHandle_t", "rocblas_handle", CONV_TYPE, API_BLAS}}, - // TODO: dereferencing: typedef struct cublasContext *cublasHandle_t; - {"cublasContext", {"hipblasHandle_t", "_rocblas_handle", CONV_TYPE, API_BLAS, HIP_UNSUPPORTED}}, -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_CAFFE2_API_functions.cpp b/hipamd/hipify-clang/src/CUDA2HIP_CAFFE2_API_functions.cpp deleted file mode 100644 index 63860de262..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_CAFFE2_API_functions.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Maps the names of CUDA SPARSE API functions to the corresponding HIP functions -const std::map CUDA_CAFFE2_FUNCTION_MAP{ - {"cuda_stream", {"hip_stream", "", CONV_LIB_FUNC, API_CAFFE2}}, -}; \ No newline at end of file diff --git a/hipamd/hipify-clang/src/CUDA2HIP_CAFFE2_API_types.cpp b/hipamd/hipify-clang/src/CUDA2HIP_CAFFE2_API_types.cpp deleted file mode 100644 index 4791cffeee..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_CAFFE2_API_types.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Map of all types -const std::map CUDA_CAFFE2_TYPE_NAME_MAP{ - - // 5. Defines - {"REGISTER_CUDA_OPERATOR", {"REGISTER_HIP_OPERATOR", "", CONV_DEFINE, API_CAFFE2}}, - {"REGISTER_CUDA_OPERATOR_CREATOR", {"REGISTER_HIP_OPERATOR_CREATOR", "", CONV_DEFINE, API_CAFFE2}}, - - // 6. Classes - {"CUDAContext", {"HIPContext", "", CONV_TYPE, API_CAFFE2}}, -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_CUB_API_types.cpp b/hipamd/hipify-clang/src/CUDA2HIP_CUB_API_types.cpp deleted file mode 100644 index 0ef1912b54..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_CUB_API_types.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Maps the names of CUDA CUB API types to the corresponding HIP types -const std::map CUDA_CUB_TYPE_NAME_MAP{ - {"cub", {"hipcub", "", CONV_TYPE, API_CUB}}, -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_Complex_API_functions.cpp b/hipamd/hipify-clang/src/CUDA2HIP_Complex_API_functions.cpp deleted file mode 100644 index 6e0c1a54e7..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_Complex_API_functions.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Maps the names of CUDA Complex API functions to the corresponding HIP functions -const std::map CUDA_COMPLEX_FUNCTION_MAP{ - {"cuCrealf", {"hipCrealf", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuCimagf", {"hipCimagf", "", CONV_COMPLEX, API_COMPLEX}}, - {"make_cuFloatComplex", {"make_hipFloatComplex", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuConjf", {"hipConjf", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuCaddf", {"hipCaddf", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuCsubf", {"hipCsubf", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuCmulf", {"hipCmulf", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuCdivf", {"hipCdivf", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuCabsf", {"hipCabsf", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuCreal", {"hipCreal", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuCimag", {"hipCimag", "", CONV_COMPLEX, API_COMPLEX}}, - {"make_cuDoubleComplex", {"make_hipDoubleComplex", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuConj", {"hipConj", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuCadd", {"hipCadd", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuCsub", {"hipCsub", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuCmul", {"hipCmul", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuCdiv", {"hipCdiv", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuCabs", {"hipCabs", "", CONV_COMPLEX, API_COMPLEX}}, - {"make_cuComplex", {"make_hipComplex", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuComplexFloatToDouble", {"hipComplexFloatToDouble", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuComplexDoubleToFloat", {"hipComplexDoubleToFloat", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuCfmaf", {"hipCfmaf", "", CONV_COMPLEX, API_COMPLEX}}, - {"cuCfma", {"hipCfma", "", CONV_COMPLEX, API_COMPLEX}}, -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_Complex_API_types.cpp b/hipamd/hipify-clang/src/CUDA2HIP_Complex_API_types.cpp deleted file mode 100644 index 87016a21a0..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_Complex_API_types.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Maps the names of CUDA Complex API types to the corresponding HIP types -const std::map CUDA_COMPLEX_TYPE_NAME_MAP{ - {"cuFloatComplex", {"hipFloatComplex", "", CONV_TYPE, API_COMPLEX}}, - {"cuDoubleComplex", {"hipDoubleComplex", "", CONV_TYPE, API_COMPLEX}}, - {"cuComplex", {"hipComplex", "", CONV_TYPE, API_COMPLEX}}, -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_DNN_API_functions.cpp b/hipamd/hipify-clang/src/CUDA2HIP_DNN_API_functions.cpp deleted file mode 100644 index 765ce78a26..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_DNN_API_functions.cpp +++ /dev/null @@ -1,299 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Map of all functions -const std::map CUDA_DNN_FUNCTION_MAP{ - - {"cudnnGetVersion", {"hipdnnGetVersion", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetCudartVersion", {"hipdnnGetCudartVersion", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnQueryRuntimeError", {"hipdnnQueryRuntimeError", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetProperty", {"hipdnnGetProperty", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetErrorString", {"hipdnnGetErrorString", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnIm2Col", {"hipdnnIm2Col", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnCreate", {"hipdnnCreate", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnDestroy", {"hipdnnDestroy", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetStream", {"hipdnnSetStream", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetStream", {"hipdnnGetStream", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetCallback", {"hipdnnSetCallback", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetCallback", {"hipdnnGetCallback", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - - // cuDNN Tensor functions - {"cudnnCreateTensorDescriptor", {"hipdnnCreateTensorDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetTensor4dDescriptor", {"hipdnnSetTensor4dDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetTensor4dDescriptorEx", {"hipdnnSetTensor4dDescriptorEx", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetTensor4dDescriptor", {"hipdnnGetTensor4dDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetTensorNdDescriptor", {"hipdnnSetTensorNdDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetTensorNdDescriptorEx", {"hipdnnSetTensorNdDescriptorEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetTensorNdDescriptor", {"hipdnnGetTensorNdDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetTensorSizeInBytes", {"hipdnnGetTensorSizeInBytes", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDestroyTensorDescriptor", {"hipdnnDestroyTensorDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnTransformTensor", {"hipdnnTransformTensor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnTransformTensorEx", {"hipdnnTransformTensorEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnInitTransformDest", {"hipdnnInitTransformDest", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnCreateTensorTransformDescriptor", {"hipdnnCreateTensorTransformDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetTensorTransformDescriptor", {"hipdnnSetTensorTransformDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetTensorTransformDescriptor", {"hipdnnGetTensorTransformDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDestroyTensorTransformDescriptor", {"hipdnnDestroyTensorTransformDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnAddTensor", {"hipdnnAddTensor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnCreateOpTensorDescriptor", {"hipdnnCreateOpTensorDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetOpTensorDescriptor", {"hipdnnSetOpTensorDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetOpTensorDescriptor", {"hipdnnGetOpTensorDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnDestroyOpTensorDescriptor", {"hipdnnDestroyOpTensorDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnOpTensor", {"hipdnnOpTensor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetFoldedConvBackwardDataDescriptors", {"hipdnnGetFoldedConvBackwardDataDescriptors", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - - // cuDNN Reduce Tensor functions - {"cudnnCreateReduceTensorDescriptor", {"hipdnnCreateReduceTensorDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetReduceTensorDescriptor", {"hipdnnSetReduceTensorDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetReduceTensorDescriptor", {"hipdnnGetReduceTensorDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnDestroyReduceTensorDescriptor", {"hipdnnDestroyReduceTensorDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetReductionIndicesSize", {"hipdnnGetReductionIndicesSize", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetReductionWorkspaceSize", {"hipdnnGetReductionWorkspaceSize", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnReduceTensor", {"hipdnnReduceTensor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetTensor", {"hipdnnSetTensor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnScaleTensor", {"hipdnnScaleTensor", "", CONV_LIB_FUNC, API_DNN}}, - - // cuDNN Filter functions - {"cudnnCreateFilterDescriptor", {"hipdnnCreateFilterDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetFilter4dDescriptor", {"hipdnnSetFilter4dDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetFilter4dDescriptor", {"hipdnnGetFilter4dDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetFilterNdDescriptor", {"hipdnnSetFilterNdDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetFilterNdDescriptor", {"hipdnnGetFilterNdDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetFilterSizeInBytes", {"hipdnnGetFilterSizeInBytes", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnTransformFilter", {"hipdnnTransformFilter", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDestroyFilterDescriptor", {"hipdnnDestroyFilterDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnReorderFilterAndBias", {"hipdnnReorderFilterAndBias", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - - // cuDNN Convolution functions - {"cudnnCreateConvolutionDescriptor", {"hipdnnCreateConvolutionDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetConvolutionMathType", {"hipdnnSetConvolutionMathType", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetConvolutionMathType", {"hipdnnGetConvolutionMathType", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetConvolutionGroupCount", {"hipdnnSetConvolutionGroupCount", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetConvolutionGroupCount", {"hipdnnGetConvolutionGroupCount", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetConvolutionReorderType", {"hipdnnSetConvolutionReorderType", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetConvolutionReorderType", {"hipdnnGetConvolutionReorderType", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetConvolution2dDescriptor", {"hipdnnSetConvolution2dDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetConvolution2dDescriptor", {"hipdnnGetConvolution2dDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetConvolution2dForwardOutputDim", {"hipdnnGetConvolution2dForwardOutputDim", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetConvolutionNdDescriptor", {"hipdnnSetConvolutionNdDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetConvolutionNdDescriptor", {"hipdnnGetConvolutionNdDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetConvolutionNdForwardOutputDim", {"hipdnnGetConvolutionNdForwardOutputDim", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDestroyConvolutionDescriptor", {"hipdnnDestroyConvolutionDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetConvolutionForwardAlgorithmMaxCount", {"hipdnnGetConvolutionForwardAlgorithmMaxCount", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnFindConvolutionForwardAlgorithm", {"hipdnnFindConvolutionForwardAlgorithm", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnFindConvolutionForwardAlgorithmEx", {"hipdnnFindConvolutionForwardAlgorithmEx", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetConvolutionForwardAlgorithm", {"hipdnnGetConvolutionForwardAlgorithm", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetConvolutionForwardAlgorithm_v7", {"hipdnnGetConvolutionForwardAlgorithm_v7", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetConvolutionForwardWorkspaceSize", {"hipdnnGetConvolutionForwardWorkspaceSize", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnConvolutionForward", {"hipdnnConvolutionForward", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnConvolutionBiasActivationForward", {"hipdnnConvolutionBiasActivationForward", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnConvolutionBackwardBias", {"hipdnnConvolutionBackwardBias", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetConvolutionBackwardFilterAlgorithmMaxCount", {"hipdnnGetConvolutionBackwardFilterAlgorithmMaxCount", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnFindConvolutionBackwardFilterAlgorithm", {"hipdnnFindConvolutionBackwardFilterAlgorithm", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnFindConvolutionBackwardFilterAlgorithmEx", {"hipdnnFindConvolutionBackwardFilterAlgorithmEx", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetConvolutionBackwardFilterAlgorithm", {"hipdnnGetConvolutionBackwardFilterAlgorithm", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetConvolutionBackwardFilterAlgorithm_v7", {"hipdnnGetConvolutionBackwardFilterAlgorithm_v7", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetConvolutionBackwardFilterWorkspaceSize", {"hipdnnGetConvolutionBackwardFilterWorkspaceSize", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnConvolutionBackwardFilter", {"hipdnnConvolutionBackwardFilter", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetConvolutionBackwardDataAlgorithmMaxCount", {"hipdnnGetConvolutionBackwardDataAlgorithmMaxCount", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnFindConvolutionBackwardDataAlgorithm", {"hipdnnFindConvolutionBackwardDataAlgorithm", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnFindConvolutionBackwardDataAlgorithmEx", {"hipdnnFindConvolutionBackwardDataAlgorithmEx", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetConvolutionBackwardDataAlgorithm", {"hipdnnGetConvolutionBackwardDataAlgorithm", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetConvolutionBackwardDataAlgorithm_v7", {"hipdnnGetConvolutionBackwardDataAlgorithm_v7", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetConvolutionBackwardDataWorkspaceSize", {"hipdnnGetConvolutionBackwardDataWorkspaceSize", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnConvolutionBackwardData", {"hipdnnConvolutionBackwardData", "", CONV_LIB_FUNC, API_DNN}}, - - // cuDNN Sortmax functions - {"cudnnSoftmaxForward", {"hipdnnSoftmaxForward", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSoftmaxBackward", {"hipdnnSoftmaxBackward", "", CONV_LIB_FUNC, API_DNN}}, - - // cuDNN Pooling functions - {"cudnnCreatePoolingDescriptor", {"hipdnnCreatePoolingDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetPooling2dDescriptor", {"hipdnnSetPooling2dDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetPooling2dDescriptor", {"hipdnnGetPooling2dDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetPoolingNdDescriptor", {"hipdnnSetPoolingNdDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetPoolingNdDescriptor", {"hipdnnGetPoolingNdDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetPoolingNdForwardOutputDim", {"hipdnnGetPoolingNdForwardOutputDim", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetPooling2dForwardOutputDim", {"hipdnnGetPooling2dForwardOutputDim", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnDestroyPoolingDescriptor", {"hipdnnDestroyPoolingDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnPoolingForward", {"hipdnnPoolingForward", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnPoolingBackward", {"hipdnnPoolingBackward", "", CONV_LIB_FUNC, API_DNN}}, - - // cuDNN Activation functions - {"cudnnCreateActivationDescriptor", {"hipdnnCreateActivationDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetActivationDescriptor", {"hipdnnSetActivationDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetActivationDescriptor", {"hipdnnGetActivationDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnDestroyActivationDescriptor", {"hipdnnDestroyActivationDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnActivationForward", {"hipdnnActivationForward", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnActivationBackward", {"hipdnnActivationBackward", "", CONV_LIB_FUNC, API_DNN}}, - - // cuDNN LRN functions - {"cudnnCreateLRNDescriptor", {"hipdnnCreateLRNDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetLRNDescriptor", {"hipdnnSetLRNDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetLRNDescriptor", {"hipdnnGetLRNDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnDestroyLRNDescriptor", {"hipdnnDestroyLRNDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnLRNCrossChannelForward", {"hipdnnLRNCrossChannelForward", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnLRNCrossChannelBackward", {"hipdnnLRNCrossChannelBackward", "", CONV_LIB_FUNC, API_DNN}}, - - // cuDNN Divisive Normalization functions - {"cudnnDivisiveNormalizationForward", {"hipdnnDivisiveNormalizationForward", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDivisiveNormalizationBackward", {"hipdnnDivisiveNormalizationBackward", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - - // cuDNN Batch Normalization functions - {"cudnnDeriveBNTensorDescriptor", {"hipdnnDeriveBNTensorDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnBatchNormalizationForwardTraining", {"hipdnnBatchNormalizationForwardTraining", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnBatchNormalizationForwardTrainingEx", {"hipdnnBatchNormalizationForwardTrainingEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnBatchNormalizationForwardInference", {"hipdnnBatchNormalizationForwardInference", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnBatchNormalizationBackward", {"hipdnnBatchNormalizationBackward", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnBatchNormalizationBackwardEx", {"hipdnnBatchNormalizationBackwardEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetBatchNormalizationForwardTrainingExWorkspaceSize", {"hipdnnGetBatchNormalizationForwardTrainingExWorkspaceSize", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetBatchNormalizationBackwardExWorkspaceSize", {"hipdnnGetBatchNormalizationBackwardExWorkspaceSize", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetBatchNormalizationTrainingExReserveSpaceSize", {"hipdnnGetBatchNormalizationTrainingExReserveSpaceSize", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - - // cuDNN Spatial Transformer functions - {"cudnnCreateSpatialTransformerDescriptor", {"hipdnnCreateSpatialTransformerDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetSpatialTransformerNdDescriptor", {"hipdnnSetSpatialTransformerNdDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDestroySpatialTransformerDescriptor", {"hipdnnDestroySpatialTransformerDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSpatialTfGridGeneratorForward", {"hipdnnSpatialTfGridGeneratorForward", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSpatialTfGridGeneratorBackward", {"hipdnnSpatialTfGridGeneratorBackward", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSpatialTfSamplerForward", {"hipdnnSpatialTfSamplerForward", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSpatialTfSamplerBackward", {"hipdnnSpatialTfSamplerBackward", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - - // cuDNN Dropout functions - {"cudnnCreateDropoutDescriptor", {"hipdnnCreateDropoutDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnDestroyDropoutDescriptor", {"hipdnnDestroyDropoutDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnDropoutGetStatesSize", {"hipdnnDropoutGetStatesSize", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnDropoutGetReserveSpaceSize", {"hipdnnDropoutGetReserveSpaceSize", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetDropoutDescriptor", {"hipdnnSetDropoutDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetDropoutDescriptor", {"hipdnnGetDropoutDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnRestoreDropoutDescriptor", {"hipdnnRestoreDropoutDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDropoutForward", {"hipdnnDropoutForward", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDropoutBackward", {"hipdnnDropoutBackward", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - - // cuDNN RNN functions - {"cudnnCreateRNNDescriptor", {"hipdnnCreateRNNDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnDestroyRNNDescriptor", {"hipdnnDestroyRNNDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetRNNForwardInferenceAlgorithmMaxCount", {"hipdnnGetRNNForwardInferenceAlgorithmMaxCount", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnFindRNNForwardInferenceAlgorithmEx", {"hipdnnFindRNNForwardInferenceAlgorithmEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetRNNForwardTrainingAlgorithmMaxCount", {"hipdnnGetRNNForwardTrainingAlgorithmMaxCount", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnFindRNNForwardTrainingAlgorithmEx", {"hipdnnFindRNNForwardTrainingAlgorithmEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetRNNBackwardDataAlgorithmMaxCount", {"hipdnnGetRNNBackwardDataAlgorithmMaxCount", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnFindRNNBackwardDataAlgorithmEx", {"hipdnnFindRNNBackwardDataAlgorithmEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetRNNBackwardWeightsAlgorithmMaxCount", {"hipdnnGetRNNBackwardWeightsAlgorithmMaxCount", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnFindRNNBackwardWeightsAlgorithmEx", {"hipdnnFindRNNBackwardWeightsAlgorithmEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnCreatePersistentRNNPlan", {"hipdnnCreatePersistentRNNPlan", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetPersistentRNNPlan", {"hipdnnSetPersistentRNNPlan", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnDestroyPersistentRNNPlan", {"hipdnnDestroyPersistentRNNPlan", "", CONV_LIB_FUNC, API_DNN}}, - // NOTE" hipdnnSetRNNDescriptor has additional argument hipdnnRNNBiasMode_t *biasMode without default value - {"cudnnSetRNNDescriptor", {"hipdnnSetRNNDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - // NOTE" hipdnnGetRNNDescriptor has additional argument hipdnnRNNBiasMode_t *biasMode without default value - {"cudnnGetRNNDescriptor", {"hipdnnGetRNNDescriptor", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetRNNProjectionLayers", {"hipdnnSetRNNProjectionLayers", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetRNNProjectionLayers", {"hipdnnGetRNNProjectionLayers", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetRNNAlgorithmDescriptor", {"hipdnnSetRNNAlgorithmDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetRNNMatrixMathType", {"hipdnnSetRNNMatrixMathType", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetRNNMatrixMathType", {"hipdnnGetRNNMatrixMathType", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetRNNWorkspaceSize", {"hipdnnGetRNNWorkspaceSize", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetRNNTrainingReserveSize", {"hipdnnGetRNNTrainingReserveSize", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetRNNParamsSize", {"hipdnnGetRNNParamsSize", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetRNNLinLayerMatrixParams", {"hipdnnGetRNNLinLayerMatrixParams", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnGetRNNLinLayerBiasParams", {"hipdnnGetRNNLinLayerBiasParams", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnRNNForwardInference", {"hipdnnRNNForwardInference", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnRNNForwardInferenceEx", {"hipdnnRNNForwardInferenceEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnRNNForwardTraining", {"hipdnnRNNForwardTraining", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnRNNForwardTrainingEx", {"hipdnnRNNForwardTrainingEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnRNNBackwardData", {"hipdnnRNNBackwardData", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnRNNBackwardDataEx", {"hipdnnRNNBackwardDataEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnRNNBackwardWeights", {"hipdnnRNNBackwardWeights", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnRNNBackwardWeightsEx", {"hipdnnRNNBackwardWeightsEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetRNNDescriptor_v5", {"hipdnnSetRNNDescriptor_v5", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetRNNDescriptor_v6", {"hipdnnSetRNNDescriptor_v6", "", CONV_LIB_FUNC, API_DNN}}, - {"cudnnSetRNNPaddingMode", {"hipdnnSetRNNPaddingMode", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetRNNPaddingMode", {"hipdnnGetRNNPaddingMode", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnCreateRNNDataDescriptor", {"hipdnnCreateRNNDataDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDestroyRNNDataDescriptor", {"hipdnnDestroyRNNDataDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetRNNDataDescriptor", {"hipdnnSetRNNDataDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetRNNDataDescriptor", {"hipdnnGetRNNDataDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetRNNBiasMode", {"hipdnnSetRNNBiasMode", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetRNNBiasMode", {"hipdnnGetRNNBiasMode", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - - // cuDNN Connectionist Temporal Classification loss functions - {"cudnnCreateCTCLossDescriptor", {"hipdnnCreateCTCLossDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetCTCLossDescriptor", {"hipdnnSetCTCLossDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetCTCLossDescriptorEx", {"hipdnnSetCTCLossDescriptorEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetCTCLossDescriptor", {"hipdnnGetCTCLossDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetCTCLossDescriptorEx", {"hipdnnGetCTCLossDescriptorEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDestroyCTCLossDescriptor", {"hipdnnDestroyCTCLossDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnCTCLoss", {"hipdnnCTCLoss", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetCTCLossWorkspaceSize", {"hipdnnGetCTCLossWorkspaceSize", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - - // cuDNN Algorithm functions - {"cudnnCreateAlgorithmDescriptor", {"hipdnnCreateAlgorithmDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetAlgorithmDescriptor", {"hipdnnSetAlgorithmDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetAlgorithmDescriptor", {"hipdnnGetAlgorithmDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnCopyAlgorithmDescriptor", {"hipdnnCopyAlgorithmDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDestroyAlgorithmDescriptor", {"hipdnnDestroyAlgorithmDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnCreateAlgorithmPerformance", {"hipdnnCreateAlgorithmPerformance", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetAlgorithmPerformance", {"hipdnnSetAlgorithmPerformance", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetAlgorithmPerformance", {"hipdnnGetAlgorithmPerformance", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDestroyAlgorithmPerformance", {"hipdnnDestroyAlgorithmPerformance", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetAlgorithmSpaceSize", {"hipdnnGetAlgorithmSpaceSize", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSaveAlgorithm", {"hipdnnSaveAlgorithm", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnRestoreAlgorithm", {"hipdnnRestoreAlgorithm", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - - // cuDNN Clipping functions - {"cudnnRNNSetClip", {"hipdnnRNNSetClip", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnRNNGetClip", {"hipdnnRNNGetClip", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - - // cuDNN Sequence functions - {"cudnnCreateSeqDataDescriptor", {"hipdnnCreateSeqDataDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDestroySeqDataDescriptor", {"hipdnnDestroySeqDataDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetSeqDataDescriptor", {"hipdnnSetSeqDataDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetSeqDataDescriptor", {"hipdnnGetSeqDataDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - - // cuDNN Multihead Attention functions - {"cudnnCreateAttnDescriptor", {"hipdnnCreateAttnDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDestroyAttnDescriptor", {"hipdnnDestroyAttnDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetAttnDescriptor", {"hipdnnSetAttnDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetAttnDescriptor", {"hipdnnGetAttnDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetMultiHeadAttnBuffers", {"hipdnnGetMultiHeadAttnBuffers", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetMultiHeadAttnWeights", {"hipdnnGetMultiHeadAttnWeights", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnMultiHeadAttnForward", {"hipdnnMultiHeadAttnForward", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnMultiHeadAttnBackwardData", {"hipdnnMultiHeadAttnBackwardData", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnMultiHeadAttnBackwardWeights", {"hipdnnMultiHeadAttnBackwardWeights", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - - // cuDNN Fuse functions - {"cudnnCreateFusedOpsConstParamPack", {"hipdnnCreateFusedOpsConstParamPack", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDestroyFusedOpsConstParamPack", {"hipdnnDestroyFusedOpsConstParamPack", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetFusedOpsConstParamPackAttribute", {"hipdnnSetFusedOpsConstParamPackAttribute", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetFusedOpsConstParamPackAttribute", {"hipdnnGetFusedOpsConstParamPackAttribute", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnCreateFusedOpsVariantParamPack", {"hipdnnCreateFusedOpsVariantParamPack", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDestroyFusedOpsVariantParamPack", {"hipdnnDestroyFusedOpsVariantParamPack", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSetFusedOpsVariantParamPackAttribute", {"hipdnnSetFusedOpsVariantParamPackAttribute", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnGetFusedOpsVariantParamPackAttribute", {"hipdnnGetFusedOpsVariantParamPackAttribute", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnCreateFusedOpsPlan", {"hipdnnCreateFusedOpsPlan", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDestroyFusedOpsPlan", {"hipdnnDestroyFusedOpsPlan", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnMakeFusedOpsPlan", {"hipdnnMakeFusedOpsPlan", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnFusedOpsExecute", {"hipdnnFusedOpsExecute", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}}, -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_DNN_API_types.cpp b/hipamd/hipify-clang/src/CUDA2HIP_DNN_API_types.cpp deleted file mode 100644 index cc372067b1..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_DNN_API_types.cpp +++ /dev/null @@ -1,391 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Map of all functions -const std::map CUDA_DNN_TYPE_NAME_MAP{ - // cuDNN defines - {"CUDNN_VERSION", {"HIPDNN_VERSION", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 7000 - {"CUDNN_DIM_MAX", {"HIPDNN_DIM_MAX", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 8 - {"CUDNN_LRN_MIN_N", {"HIPDNN_LRN_MIN_N", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1 - {"CUDNN_LRN_MAX_N", {"HIPDNN_LRN_MAX_N", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 16 - {"CUDNN_LRN_MIN_K", {"HIPDNN_LRN_MIN_K", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1e-5 - {"CUDNN_LRN_MIN_BETA", {"HIPDNN_LRN_MIN_BETA", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0.01 - {"CUDNN_BN_MIN_EPSILON", {"HIPDNN_BN_MIN_EPSILON", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1e-5 - {"CUDNN_SEV_ERROR_EN", {"HIPDNN_SEV_ERROR_EN", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_SEV_WARNING_EN", {"HIPDNN_SEV_WARNING_EN", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_SEV_INFO_EN", {"HIPDNN_SEV_INFO_EN", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_SEQDATA_DIM_COUNT", {"HIPDNN_SEQDATA_DIM_COUNT", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 4 - - // cuDNN enums - {"cudnnStatus_t", {"hipdnnStatus_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_STATUS_SUCCESS", {"HIPDNN_STATUS_SUCCESS", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_STATUS_NOT_INITIALIZED", {"HIPDNN_STATUS_NOT_INITIALIZED", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_STATUS_ALLOC_FAILED", {"HIPDNN_STATUS_ALLOC_FAILED", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 2 - {"CUDNN_STATUS_BAD_PARAM", {"HIPDNN_STATUS_BAD_PARAM", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 3 - {"CUDNN_STATUS_INTERNAL_ERROR", {"HIPDNN_STATUS_INTERNAL_ERROR", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 4 - {"CUDNN_STATUS_INVALID_VALUE", {"HIPDNN_STATUS_INVALID_VALUE", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 5 - {"CUDNN_STATUS_ARCH_MISMATCH", {"HIPDNN_STATUS_ARCH_MISMATCH", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 6 - {"CUDNN_STATUS_MAPPING_ERROR", {"HIPDNN_STATUS_MAPPING_ERROR", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 7 - {"CUDNN_STATUS_EXECUTION_FAILED", {"HIPDNN_STATUS_EXECUTION_FAILED", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 8 - {"CUDNN_STATUS_NOT_SUPPORTED", {"HIPDNN_STATUS_NOT_SUPPORTED", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 9 - {"CUDNN_STATUS_LICENSE_ERROR", {"HIPDNN_STATUS_LICENSE_ERROR", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 10 - {"CUDNN_STATUS_RUNTIME_PREREQUISITE_MISSING", {"HIPDNN_STATUS_RUNTIME_PREREQUISITE_MISSING", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 11 - {"CUDNN_STATUS_RUNTIME_IN_PROGRESS", {"HIPDNN_STATUS_RUNTIME_IN_PROGRESS", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 12 - {"CUDNN_STATUS_RUNTIME_FP_OVERFLOW", {"HIPDNN_STATUS_RUNTIME_FP_OVERFLOW", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 13 - {"cudnnRuntimeTag_t", {"hipdnnRuntimeTag_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnConvolutionMode_t", {"hipdnnConvolutionMode_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_CONVOLUTION", {"HIPDNN_CONVOLUTION", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_CROSS_CORRELATION", {"HIPDNN_CROSS_CORRELATION", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"cudnnTensorFormat_t", {"hipdnnTensorFormat_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_TENSOR_NCHW", {"HIPDNN_TENSOR_NCHW", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_TENSOR_NHWC", {"HIPDNN_TENSOR_NHWC", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_TENSOR_NCHW_VECT_C", {"HIPDNN_TENSOR_NCHW_VECT_C", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 2 - {"cudnnFoldingDirection_t", {"hipdnnFoldingDirection_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_TRANSFORM_FOLD", {"HIPDNN_TRANSFORM_FOLD", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0U - {"CUDNN_TRANSFORM_UNFOLD", {"HIPDNN_TRANSFORM_UNFOLD", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1U - {"cudnnDataType_t", {"hipdnnDataType_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_DATA_FLOAT", {"HIPDNN_DATA_FLOAT", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_DATA_DOUBLE", {"HIPDNN_DATA_DOUBLE", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_DATA_HALF", {"HIPDNN_DATA_HALF", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 2 - {"CUDNN_DATA_INT8", {"HIPDNN_DATA_INT8", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 3 - {"CUDNN_DATA_INT32", {"HIPDNN_DATA_INT32", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 4 - {"CUDNN_DATA_INT8x4", {"HIPDNN_DATA_INT8x4", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 5 - {"CUDNN_DATA_UINT8", {"HIPDNN_DATA_UINT8", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 6 - {"CUDNN_DATA_UINT8x4", {"HIPDNN_DATA_UINT8x4", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 7 - {"CUDNN_DATA_INT8x32", {"HIPDNN_DATA_INT8x32", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 8 - {"cudnnErrQueryMode_t", {"hipdnnErrQueryMode_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_ERRQUERY_RAWCODE", {"HIPDNN_ERRQUERY_RAWCODE", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_ERRQUERY_NONBLOCKING", {"HIPDNN_ERRQUERY_NONBLOCKING", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1 - {"CUDNN_ERRQUERY_BLOCKING", {"HIPDNN_ERRQUERY_BLOCKING", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 2 - {"cudnnSeverity_t", {"hipdnnSeverity_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_SEV_FATAL", {"HIPDNN_SEV_FATAL", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_SEV_ERROR", {"HIPDNN_SEV_ERROR", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1 - {"CUDNN_SEV_WARNING", {"HIPDNN_SEV_WARNING", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 2 - {"CUDNN_SEV_INFO", {"HIPDNN_SEV_INFO", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 3 - {"cudnnConvolutionFwdAlgo_t", {"hipdnnConvolutionFwdAlgo_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_GEMM", {"HIPDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_GEMM", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_PRECOMP_GEMM", {"HIPDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_PRECOMP_GEMM", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_CONVOLUTION_FWD_ALGO_GEMM", {"HIPDNN_CONVOLUTION_FWD_ALGO_GEMM", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 2 - {"CUDNN_CONVOLUTION_FWD_ALGO_DIRECT", {"HIPDNN_CONVOLUTION_FWD_ALGO_DIRECT", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 3 - {"CUDNN_CONVOLUTION_FWD_ALGO_FFT", {"HIPDNN_CONVOLUTION_FWD_ALGO_FFT", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 4 - {"CUDNN_CONVOLUTION_FWD_ALGO_FFT_TILING", {"HIPDNN_CONVOLUTION_FWD_ALGO_FFT_TILING", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 5 - {"CUDNN_CONVOLUTION_FWD_ALGO_WINOGRAD", {"HIPDNN_CONVOLUTION_FWD_ALGO_WINOGRAD", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 6 - {"CUDNN_CONVOLUTION_FWD_ALGO_WINOGRAD_NONFUSED", {"HIPDNN_CONVOLUTION_FWD_ALGO_WINOGRAD_NONFUSED", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 7 - {"CUDNN_CONVOLUTION_FWD_ALGO_COUNT", {"HIPDNN_CONVOLUTION_FWD_ALGO_COUNT", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 8 - {"cudnnConvolutionFwdPreference_t", {"hipdnnConvolutionFwdPreference_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_CONVOLUTION_FWD_NO_WORKSPACE", {"HIPDNN_CONVOLUTION_FWD_NO_WORKSPACE", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_CONVOLUTION_FWD_PREFER_FASTEST", {"HIPDNN_CONVOLUTION_FWD_PREFER_FASTEST", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT", {"HIPDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 2 - {"cudnnDeterminism_t", {"hipdnnDeterminism_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_NON_DETERMINISTIC", {"HIPDNN_NON_DETERMINISTIC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_DETERMINISTIC", {"HIPDNN_DETERMINISTIC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1 - {"cudnnDivNormMode_t", {"hipdnnDivNormMode_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_DIVNORM_PRECOMPUTED_MEANS", {"HIPDNN_DIVNORM_PRECOMPUTED_MEANS", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"cudnnCTCLossAlgo_t", {"hipdnnCTCLossAlgo_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_CTC_LOSS_ALGO_DETERMINISTIC", {"HIPDNN_CTC_LOSS_ALGO_DETERMINISTIC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_CTC_LOSS_ALGO_NON_DETERMINISTIC", {"HIPDNN_CTC_LOSS_ALGO_NON_DETERMINISTIC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1 - {"cudnnLRNMode_t", {"hipdnnLRNMode_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_LRN_CROSS_CHANNEL_DIM1", {"HIPDNN_LRN_CROSS_CHANNEL", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 vs 1 - {"cudnnRNNInputMode_t", {"hipdnnRNNInputMode_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_LINEAR_INPUT", {"HIPDNN_LINEAR_INPUT", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_SKIP_INPUT", {"HIPDNN_SKIP_INPUT", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"cudnnDirectionMode_t", {"hipdnnDirectionMode_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_UNIDIRECTIONAL", {"HIPDNN_UNIDIRECTIONAL", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_BIDIRECTIONAL", {"HIPDNN_BIDIRECTIONAL", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"cudnnMathType_t", {"hipdnnMathType_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_DEFAULT_MATH", {"HIPDNN_DEFAULT_MATH", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_TENSOR_OP_MATH", {"HIPDNN_TENSOR_OP_MATH", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_TENSOR_OP_MATH_ALLOW_CONVERSION", {"HIPDNN_TENSOR_OP_MATH_ALLOW_CONVERSION", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 2 - {"cudnnNanPropagation_t", {"hipdnnNanPropagation_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_NOT_PROPAGATE_NAN", {"HIPDNN_NOT_PROPAGATE_NAN", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_PROPAGATE_NAN", {"HIPDNN_PROPAGATE_NAN", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"cudnnConvolutionBwdDataAlgo_t", {"hipdnnConvolutionBwdDataAlgo_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_CONVOLUTION_BWD_DATA_ALGO_0", {"HIPDNN_CONVOLUTION_BWD_DATA_ALGO_0", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_CONVOLUTION_BWD_DATA_ALGO_1", {"HIPDNN_CONVOLUTION_BWD_DATA_ALGO_1", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_CONVOLUTION_BWD_DATA_ALGO_FFT", {"HIPDNN_CONVOLUTION_BWD_DATA_ALGO_FFT", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 2 - {"CUDNN_CONVOLUTION_BWD_DATA_ALGO_FFT_TILING", {"HIPDNN_CONVOLUTION_BWD_DATA_ALGO_FFT_TILING", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 3 - {"CUDNN_CONVOLUTION_BWD_DATA_ALGO_WINOGRAD", {"HIPDNN_CONVOLUTION_BWD_DATA_ALGO_WINOGRAD", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 4 - {"CUDNN_CONVOLUTION_BWD_DATA_ALGO_WINOGRAD_NONFUSED", {"HIPDNN_CONVOLUTION_BWD_DATA_ALGO_WINOGRAD_NONFUSED", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 5 - {"CUDNN_CONVOLUTION_BWD_DATA_ALGO_COUNT", {"HIPDNN_CONVOLUTION_BWD_DATA_ALGO_TRANSPOSE_GEMM", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 6 - {"cudnnConvolutionBwdFilterAlgo_t", {"hipdnnConvolutionBwdFilterAlgo_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0", {"HIPDNN_CONVOLUTION_BWD_FILTER_ALGO_0", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_CONVOLUTION_BWD_FILTER_ALGO_1", {"HIPDNN_CONVOLUTION_BWD_FILTER_ALGO_1", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_CONVOLUTION_BWD_FILTER_ALGO_FFT", {"HIPDNN_CONVOLUTION_BWD_FILTER_ALGO_FFT", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 2 - {"CUDNN_CONVOLUTION_BWD_FILTER_ALGO_3", {"HIPDNN_CONVOLUTION_BWD_FILTER_ALGO_3", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 3 - {"CUDNN_CONVOLUTION_BWD_FILTER_ALGO_WINOGRAD", {"HIPDNN_CONVOLUTION_BWD_FILTER_ALGO_WINOGRAD", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 4 - {"CUDNN_CONVOLUTION_BWD_FILTER_ALGO_WINOGRAD_NONFUSED", {"HIPDNN_CONVOLUTION_BWD_FILTER_ALGO_WINOGRAD_NONFUSED", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 5 - {"CUDNN_CONVOLUTION_BWD_FILTER_ALGO_FFT_TILING", {"HIPDNN_CONVOLUTION_BWD_FILTER_ALGO_FFT_TILING", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 6 - {"CUDNN_CONVOLUTION_BWD_FILTER_ALGO_COUNT", {"HIPDNN_CONVOLUTION_BWD_FILTER_ALGO_COUNT", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 7 - {"cudnnConvolutionBwdFilterPreference_t", {"hipdnnConvolutionBwdFilterPreference_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_CONVOLUTION_BWD_FILTER_NO_WORKSPACE", {"HIPDNN_CONVOLUTION_BWD_FILTER_NO_WORKSPACE", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_CONVOLUTION_BWD_FILTER_PREFER_FASTEST", {"HIPDNN_CONVOLUTION_BWD_FILTER_PREFER_FASTEST", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_CONVOLUTION_BWD_FILTER_SPECIFY_WORKSPACE_LIMIT",{"HIPDNN_CONVOLUTION_BWD_FILTER_SPECIFY_WORKSPACE_LIMIT","", CONV_NUMERIC_LITERAL, API_DNN}}, // 2 - {"cudnnRNNAlgo_t", {"hipdnnRNNAlgo_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_RNN_ALGO_STANDARD", {"HIPDNN_RNN_ALGO_STANDARD", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_RNN_ALGO_PERSIST_STATIC", {"HIPDNN_RNN_ALGO_PERSIST_STATIC", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_RNN_ALGO_PERSIST_DYNAMIC", {"HIPDNN_RNN_ALGO_PERSIST_DYNAMIC", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 2 - {"CUDNN_RNN_ALGO_COUNT", {"HIPDNN_RNN_ALGO_COUNT", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 3 - {"cudnnRNNMode_t", {"hipdnnRNNMode_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_RNN_RELU", {"HIPDNN_RNN_RELU", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_RNN_TANH", {"HIPDNN_RNN_TANH", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_LSTM", {"HIPDNN_LSTM", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 2 - {"CUDNN_GRU", {"HIPDNN_GRU", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 3 - {"cudnnRNNBiasMode_t", {"hipdnnRNNBiasMode_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_RNN_NO_BIAS", {"HIPDNN_RNN_NO_BIAS", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_RNN_SINGLE_INP_BIAS", {"HIPDNN_RNN_WITH_BIAS", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_RNN_DOUBLE_BIAS", {"HIPDNN_RNN_WITH_BIAS", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_RNN_SINGLE_REC_BIAS", {"HIPDNN_RNN_WITH_BIAS", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"cudnnOpTensorOp_t", {"hipdnnOpTensorOp_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_OP_TENSOR_ADD", {"HIPDNN_OP_TENSOR_ADD", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_OP_TENSOR_MUL", {"HIPDNN_OP_TENSOR_MUL", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_OP_TENSOR_MIN", {"HIPDNN_OP_TENSOR_MIN", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 2 - {"CUDNN_OP_TENSOR_MAX", {"HIPDNN_OP_TENSOR_MAX", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 3 - {"CUDNN_OP_TENSOR_SQRT", {"HIPDNN_OP_TENSOR_SQRT", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 4 - {"CUDNN_OP_TENSOR_NOT", {"HIPDNN_OP_TENSOR_NOT", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 5 - {"cudnnReduceTensorOp_t", {"hipdnnReduceTensorOp_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_REDUCE_TENSOR_ADD", {"HIPDNN_REDUCE_TENSOR_ADD", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_REDUCE_TENSOR_MUL", {"HIPDNN_REDUCE_TENSOR_MUL", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_REDUCE_TENSOR_MIN", {"HIPDNN_REDUCE_TENSOR_MIN", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 2 - {"CUDNN_REDUCE_TENSOR_MAX", {"HIPDNN_REDUCE_TENSOR_MAX", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 3 - {"CUDNN_REDUCE_TENSOR_AMAX", {"HIPDNN_REDUCE_TENSOR_AMAX", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 4 - {"CUDNN_REDUCE_TENSOR_AVG", {"HIPDNN_REDUCE_TENSOR_AVG", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 5 - {"CUDNN_REDUCE_TENSOR_NORM1", {"HIPDNN_REDUCE_TENSOR_NORM1", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 6 - {"CUDNN_REDUCE_TENSOR_NORM2", {"HIPDNN_REDUCE_TENSOR_NORM2", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 7 - {"CUDNN_REDUCE_TENSOR_MUL_NO_ZEROS", {"HIPDNN_REDUCE_TENSOR_MUL_NO_ZEROS", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 8 - {"cudnnReduceTensorIndices_t", {"hipdnnReduceTensorIndices_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_REDUCE_TENSOR_NO_INDICES", {"HIPDNN_REDUCE_TENSOR_NO_INDICES", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_REDUCE_TENSOR_FLATTENED_INDICES", {"HIPDNN_REDUCE_TENSOR_FLATTENED_INDICES", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"cudnnConvolutionBwdDataPreference_t", {"hipdnnConvolutionBwdDataPreference_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_CONVOLUTION_BWD_DATA_NO_WORKSPACE", {"HIPDNN_CONVOLUTION_BWD_DATA_NO_WORKSPACE", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_CONVOLUTION_BWD_DATA_PREFER_FASTEST", {"HIPDNN_CONVOLUTION_BWD_DATA_PREFER_FASTEST", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_CONVOLUTION_BWD_DATA_SPECIFY_WORKSPACE_LIMIT", {"HIPDNN_CONVOLUTION_BWD_DATA_SPECIFY_WORKSPACE_LIMIT", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 2 - {"cudnnIndicesType_t", {"hipdnnIndicesType_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_32BIT_INDICES", {"HIPDNN_32BIT_INDICES", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_64BIT_INDICES", {"HIPDNN_64BIT_INDICES", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_16BIT_INDICES", {"HIPDNN_16BIT_INDICES", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 2 - {"CUDNN_8BIT_INDICES", {"HIPDNN_8BIT_INDICES", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 3 - {"cudnnSoftmaxAlgorithm_t", {"hipdnnSoftmaxAlgorithm_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_SOFTMAX_FAST", {"HIPDNN_SOFTMAX_FAST", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_SOFTMAX_ACCURATE", {"HIPDNN_SOFTMAX_ACCURATE", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_SOFTMAX_LOG", {"HIPDNN_SOFTMAX_LOG", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 2 - {"cudnnSoftmaxMode_t", {"hipdnnSoftmaxMode_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_SOFTMAX_MODE_INSTANCE", {"HIPDNN_SOFTMAX_MODE_INSTANCE", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_SOFTMAX_MODE_CHANNEL", {"HIPDNN_SOFTMAX_MODE_CHANNEL", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"cudnnPoolingMode_t", {"hipdnnPoolingMode_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_POOLING_MAX", {"HIPDNN_POOLING_MAX", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING", {"HIPDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_POOLING_AVERAGE_COUNT_EXCLUDE_PADDING", {"HIPDNN_POOLING_AVERAGE_COUNT_EXCLUDE_PADDING", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 2 - {"CUDNN_POOLING_MAX_DETERMINISTIC", {"HIPDNN_POOLING_MAX_DETERMINISTIC", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 3 - {"cudnnActivationMode_t", {"hipdnnActivationMode_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_ACTIVATION_SIGMOID", {"HIPDNN_ACTIVATION_SIGMOID", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_ACTIVATION_RELU", {"HIPDNN_ACTIVATION_RELU", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_ACTIVATION_TANH", {"HIPDNN_ACTIVATION_TANH", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 2 - {"CUDNN_ACTIVATION_CLIPPED_RELU", {"HIPDNN_ACTIVATION_CLIPPED_RELU", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 3 - {"CUDNN_ACTIVATION_ELU", {"HIPDNN_ACTIVATION_ELU", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 4 - {"CUDNN_ACTIVATION_IDENTITY", {"HIPDNN_ACTIVATION_PATHTRU", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 5 - {"cudnnBatchNormMode_t", {"hipdnnBatchNormMode_t", "", CONV_TYPE, API_DNN}}, - {"CUDNN_BATCHNORM_PER_ACTIVATION", {"HIPDNN_BATCHNORM_PER_ACTIVATION", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0 - {"CUDNN_BATCHNORM_SPATIAL", {"HIPDNN_BATCHNORM_SPATIAL", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUDNN_BATCHNORM_SPATIAL_PERSISTENT", {"HIPDNN_BATCHNORM_SPATIAL_PERSISTENT", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 2 - {"cudnnSamplerType_t", {"hipdnnSamplerType_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_SAMPLER_BILINEAR", {"HIPDNN_SAMPLER_BILINEAR", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"cudnnBatchNormOps_t", {"hipdnnBatchNormOps_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_BATCHNORM_OPS_BN", {"HIPDNN_BATCHNORM_OPS_BN", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_BATCHNORM_OPS_BN_ACTIVATION", {"HIPDNN_BATCHNORM_OPS_BN_ACTIVATION", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1 - {"CUDNN_BATCHNORM_OPS_BN_ADD_ACTIVATION", {"HIPDNN_BATCHNORM_OPS_BN_ADD_ACTIVATION", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 2 - {"cudnnRNNClipMode_t", {"hipdnnRNNClipMode_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_RNN_CLIP_NONE", {"HIPDNN_RNN_CLIP_NONE", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_RNN_CLIP_MINMAX", {"HIPDNN_RNN_CLIP_MINMAX", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1 - {"cudnnRNNDataLayout_t", {"hipdnnRNNDataLayout_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_RNN_DATA_LAYOUT_SEQ_MAJOR_UNPACKED", {"HIPDNN_RNN_DATA_LAYOUT_SEQ_MAJOR_UNPACKED", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_RNN_DATA_LAYOUT_SEQ_MAJOR_PACKED", {"HIPDNN_RNN_DATA_LAYOUT_SEQ_MAJOR_PACKED", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1 - {"CUDNN_RNN_DATA_LAYOUT_BATCH_MAJOR_UNPACKED", {"HIPDNN_RNN_DATA_LAYOUT_BATCH_MAJOR_UNPACKED", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 2 - {"cudnnRNNPaddingMode_t", {"hipdnnRNNPaddingMode_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_RNN_PADDED_IO_DISABLED", {"HIPDNN_RNN_PADDED_IO_DISABLED", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_RNN_PADDED_IO_ENABLED", {"HIPDNN_RNN_PADDED_IO_ENABLED", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1 - {"cudnnSeqDataAxis_t", {"hipdnnSeqDataAxis_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_SEQDATA_TIME_DIM", {"HIPDNN_SEQDATA_TIME_DIM", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_SEQDATA_BATCH_DIM", {"HIPDNN_SEQDATA_BATCH_DIM", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1 - {"CUDNN_SEQDATA_BEAM_DIM", {"HIPDNN_SEQDATA_BEAM_DIM", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 2 - {"CUDNN_SEQDATA_VECT_DIM", {"HIPDNN_SEQDATA_VECT_DIM", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 3 - {"cudnnAttnQueryMap_t", {"hipdnnAttnQueryMap_t", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_ATTN_QUERYMAP_ALL_TO_ONE", {"HIPDNN_ATTN_QUERYMAP_ALL_TO_ONE", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_ATTN_QUERYMAP_ONE_TO_ONE", {"HIPDNN_ATTN_QUERYMAP_ONE_TO_ONE", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1U << 0 - {"CUDNN_ATTN_DISABLE_PROJ_BIASES", {"HIPDNN_ATTN_DISABLE_PROJ_BIASES", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_ATTN_ENABLE_PROJ_BIASES", {"HIPDNN_ATTN_ENABLE_PROJ_BIASES", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1U << 1 - {"cudnnMultiHeadAttnWeightKind_t", {"hipdnnMultiHeadAttnWeightKind_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_MH_ATTN_Q_WEIGHTS", {"HIPDNN_MH_ATTN_Q_WEIGHTS", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_MH_ATTN_K_WEIGHTS", {"HIPDNN_MH_ATTN_K_WEIGHTS", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1 - {"CUDNN_MH_ATTN_V_WEIGHTS", {"HIPDNN_MH_ATTN_V_WEIGHTS", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 2 - {"CUDNN_MH_ATTN_O_WEIGHTS", {"HIPDNN_MH_ATTN_O_WEIGHTS", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 3 - {"CUDNN_MH_ATTN_Q_BIASES", {"HIPDNN_MH_ATTN_Q_BIASES", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 4 - {"CUDNN_MH_ATTN_K_BIASES", {"HIPDNN_MH_ATTN_K_BIASES", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 5 - {"CUDNN_MH_ATTN_V_BIASES", {"HIPDNN_MH_ATTN_V_BIASES", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 6 - {"CUDNN_MH_ATTN_O_BIASES", {"HIPDNN_MH_ATTN_O_BIASES", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 7 - {"CUDNN_ATTN_WKIND_COUNT", {"HIPDNN_ATTN_WKIND_COUNT", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 8 - {"cudnnWgradMode_t", {"hipdnnWgradMode_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_WGRAD_MODE_ADD", {"HIPDNN_WGRAD_MODE_ADD", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_WGRAD_MODE_SET", {"HIPDNN_WGRAD_MODE_SET", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1 - {"cudnnReorderType_t", {"hipdnnReorderType_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_DEFAULT_REORDER", {"HIPDNN_DEFAULT_REORDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_NO_REORDER", {"HIPDNN_NO_REORDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1 - {"cudnnLossNormalizationMode_t", {"hipdnnLossNormalizationMode_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_LOSS_NORMALIZATION_NONE", {"HIPDNN_LOSS_NORMALIZATION_NONE", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_LOSS_NORMALIZATION_SOFTMAX", {"HIPDNN_LOSS_NORMALIZATION_SOFTMAX", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1 - {"cudnnFusedOps_t", {"hipdnnFusedOps_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_FUSED_SCALE_BIAS_ACTIVATION_CONV_BNSTATS", {"HIPDNN_FUSED_SCALE_BIAS_ACTIVATION_CONV_BNSTATS", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_FUSED_SCALE_BIAS_ACTIVATION_WGRAD", {"HIPDNN_FUSED_SCALE_BIAS_ACTIVATION_WGRAD", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1 - {"CUDNN_FUSED_BN_FINALIZE_STATISTICS_TRAINING", {"HIPDNN_FUSED_BN_FINALIZE_STATISTICS_TRAINING", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 2 - {"CUDNN_FUSED_BN_FINALIZE_STATISTICS_INFERENCE", {"HIPDNN_FUSED_BN_FINALIZE_STATISTICS_INFERENCE", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 3 - {"CUDNN_FUSED_CONV_SCALE_BIAS_ADD_ACTIVATION", {"HIPDNN_FUSED_CONV_SCALE_BIAS_ADD_ACTIVATION", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 4 - {"CUDNN_FUSED_SCALE_BIAS_ADD_ACTIVATION_GEN_BITMASK", {"HIPDNN_FUSED_SCALE_BIAS_ADD_ACTIVATION_GEN_BITMASK", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 5 - {"CUDNN_FUSED_DACTIVATION_FORK_DBATCHNORM", {"HIPDNN_FUSED_DACTIVATION_FORK_DBATCHNORM", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 6 - {"cudnnFusedOpsConstParamLabel_t", {"hipdnnFusedOpsConstParamLabel_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_PARAM_XDESC", {"HIPDNN_PARAM_XDESC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_PARAM_XDATA_PLACEHOLDER", {"HIPDNN_PARAM_XDATA_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1 - {"CUDNN_PARAM_BN_MODE", {"HIPDNN_PARAM_BN_MODE", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 2 - {"CUDNN_PARAM_BN_EQSCALEBIAS_DESC", {"HIPDNN_PARAM_BN_EQSCALEBIAS_DESC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 3 - {"CUDNN_PARAM_BN_EQSCALE_PLACEHOLDER", {"HIPDNN_PARAM_BN_EQSCALE_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 4 - {"CUDNN_PARAM_BN_EQBIAS_PLACEHOLDER", {"HIPDNN_PARAM_BN_EQBIAS_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 5 - {"CUDNN_PARAM_ACTIVATION_DESC", {"HIPDNN_PARAM_ACTIVATION_DESC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 6 - {"CUDNN_PARAM_CONV_DESC", {"HIPDNN_PARAM_CONV_DESC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 7 - {"CUDNN_PARAM_WDESC", {"HIPDNN_PARAM_WDESC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 8 - {"CUDNN_PARAM_WDATA_PLACEHOLDER", {"HIPDNN_PARAM_WDATA_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 9 - {"CUDNN_PARAM_DWDESC", {"HIPDNN_PARAM_DWDESC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 10 - {"CUDNN_PARAM_DWDATA_PLACEHOLDER", {"HIPDNN_PARAM_DWDATA_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 11 - {"CUDNN_PARAM_YDESC", {"HIPDNN_PARAM_YDESC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 12 - {"CUDNN_PARAM_YDATA_PLACEHOLDER", {"HIPDNN_PARAM_YDATA_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 13 - {"CUDNN_PARAM_DYDESC", {"HIPDNN_PARAM_DYDESC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 14 - {"CUDNN_PARAM_DYDATA_PLACEHOLDER", {"HIPDNN_PARAM_DYDATA_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 15 - {"CUDNN_PARAM_YSTATS_DESC", {"HIPDNN_PARAM_YSTATS_DESC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 16 - {"CUDNN_PARAM_YSUM_PLACEHOLDER", {"HIPDNN_PARAM_YSUM_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 17 - {"CUDNN_PARAM_YSQSUM_PLACEHOLDER", {"HIPDNN_PARAM_YSQSUM_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 18 - {"CUDNN_PARAM_BN_SCALEBIAS_MEANVAR_DESC", {"HIPDNN_PARAM_BN_SCALEBIAS_MEANVAR_DESC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 19 - {"CUDNN_PARAM_BN_SCALE_PLACEHOLDER", {"HIPDNN_PARAM_BN_SCALE_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 20 - {"CUDNN_PARAM_BN_BIAS_PLACEHOLDER", {"HIPDNN_PARAM_BN_BIAS_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 21 - {"CUDNN_PARAM_BN_SAVED_MEAN_PLACEHOLDER", {"HIPDNN_PARAM_BN_SAVED_MEAN_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 22 - {"CUDNN_PARAM_BN_SAVED_INVSTD_PLACEHOLDER", {"HIPDNN_PARAM_BN_SAVED_INVSTD_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 23 - {"CUDNN_PARAM_BN_RUNNING_MEAN_PLACEHOLDER", {"HIPDNN_PARAM_BN_RUNNING_MEAN_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 24 - {"CUDNN_PARAM_BN_RUNNING_VAR_PLACEHOLDER", {"HIPDNN_PARAM_BN_RUNNING_VAR_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 25 - {"CUDNN_PARAM_ZDESC", {"HIPDNN_PARAM_ZDESC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 26 - {"CUDNN_PARAM_ZDATA_PLACEHOLDER", {"HIPDNN_PARAM_ZDATA_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 27 - {"CUDNN_PARAM_BN_Z_EQSCALEBIAS_DESC", {"HIPDNN_PARAM_BN_Z_EQSCALEBIAS_DESC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 28 - {"CUDNN_PARAM_BN_Z_EQSCALE_PLACEHOLDER", {"HIPDNN_PARAM_BN_Z_EQSCALE_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 29 - {"CUDNN_PARAM_BN_Z_EQBIAS_PLACEHOLDER", {"HIPDNN_PARAM_BN_Z_EQBIAS_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 30 - {"CUDNN_PARAM_ACTIVATION_BITMASK_DESC", {"HIPDNN_PARAM_ACTIVATION_BITMASK_DESC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 31 - {"CUDNN_PARAM_ACTIVATION_BITMASK_PLACEHOLDER", {"HIPDNN_PARAM_ACTIVATION_BITMASK_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 32 - {"CUDNN_PARAM_DXDESC", {"HIPDNN_PARAM_DXDESC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 33 - {"CUDNN_PARAM_DXDATA_PLACEHOLDER", {"HIPDNN_PARAM_DXDATA_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 34 - {"CUDNN_PARAM_DZDESC", {"HIPDNN_PARAM_DZDESC", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 35 - {"CUDNN_PARAM_DZDATA_PLACEHOLDER", {"HIPDNN_PARAM_DZDATA_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 36 - {"CUDNN_PARAM_BN_DSCALE_PLACEHOLDER", {"HIPDNN_PARAM_BN_DSCALE_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 37 - {"CUDNN_PARAM_BN_DBIAS_PLACEHOLDER", {"HIPDNN_PARAM_BN_DBIAS_PLACEHOLDER", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 38 - {"cudnnFusedOpsPointerPlaceHolder_t", {"hipdnnActivationMode_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_PTR_NULL", {"HIPDNN_ACTIVATION_SIGMOID", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_PTR_ELEM_ALIGNED", {"HIPDNN_ACTIVATION_RELU", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1 - {"CUDNN_PTR_16B_ALIGNED", {"HIPDNN_ACTIVATION_TANH", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 2 - {"cudnnFusedOpsVariantParamLabel_t", {"hipdnnFusedOpsVariantParamLabel_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"CUDNN_PTR_XDATA", {"HIPDNN_PTR_XDATA", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0 - {"CUDNN_PTR_BN_EQSCALE", {"HIPDNN_PTR_BN_EQSCALE", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1 - {"CUDNN_PTR_BN_EQBIAS", {"HIPDNN_PTR_BN_EQBIAS", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 2 - {"CUDNN_PTR_WDATA", {"HIPDNN_PTR_WDATA", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 3 - {"CUDNN_PTR_DWDATA", {"HIPDNN_PTR_DWDATA", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 4 - {"CUDNN_PTR_YDATA", {"HIPDNN_PTR_YDATA", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 5 - {"CUDNN_PTR_DYDATA", {"HIPDNN_PTR_DYDATA", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 6 - {"CUDNN_PTR_YSUM", {"HIPDNN_PTR_YSUM", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 7 - {"CUDNN_PTR_YSQSUM", {"HIPDNN_PTR_YSQSUM", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 8 - {"CUDNN_PTR_WORKSPACE", {"HIPDNN_PTR_WORKSPACE", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 9 - {"CUDNN_PTR_BN_SCALE", {"HIPDNN_PTR_BN_SCALE", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 10 - {"CUDNN_PTR_BN_BIAS", {"HIPDNN_PTR_BN_BIAS", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 11 - {"CUDNN_PTR_BN_SAVED_MEAN", {"HIPDNN_PTR_BN_SAVED_MEAN", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 12 - {"CUDNN_PTR_BN_SAVED_INVSTD", {"HIPDNN_PTR_BN_SAVED_INVSTD", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 13 - {"CUDNN_PTR_BN_RUNNING_MEAN", {"HIPDNN_PTR_BN_RUNNING_MEAN", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 14 - {"CUDNN_PTR_BN_RUNNING_VAR", {"HIPDNN_PTR_BN_RUNNING_VAR", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 15 - {"CUDNN_PTR_ZDATA", {"HIPDNN_PTR_ZDATA", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 16 - {"CUDNN_PTR_BN_Z_EQSCALE", {"HIPDNN_PTR_BN_Z_EQSCALE", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 17 - {"CUDNN_PTR_BN_Z_EQBIAS", {"HIPDNN_PTR_BN_Z_EQBIAS", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 18 - {"CUDNN_PTR_ACTIVATION_BITMASK", {"HIPDNN_PTR_ACTIVATION_BITMASK", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 19 - {"CUDNN_PTR_DXDATA", {"HIPDNN_PTR_DXDATA", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 20 - {"CUDNN_PTR_DZDATA", {"HIPDNN_PTR_DZDATA", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 21 - {"CUDNN_PTR_BN_DSCALE", {"HIPDNN_PTR_BN_DSCALE", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 22 - {"CUDNN_PTR_BN_DBIAS", {"HIPDNN_PTR_BN_DBIAS", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 23 - {"CUDNN_SCALAR_SIZE_T_WORKSPACE_SIZE_IN_BYTES", {"HIPDNN_SCALAR_SIZE_T_WORKSPACE_SIZE_IN_BYTES", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 100 - {"CUDNN_SCALAR_INT64_T_BN_ACCUMULATION_COUNT", {"HIPDNN_SCALAR_INT64_T_BN_ACCUMULATION_COUNT", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 101 - {"CUDNN_SCALAR_DOUBLE_BN_EXP_AVG_FACTOR", {"HIPDNN_SCALAR_DOUBLE_BN_EXP_AVG_FACTOR", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 102 - {"CUDNN_SCALAR_DOUBLE_BN_EPSILON", {"HIPDNN_SCALAR_DOUBLE_BN_EPSILON", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 103 - - // cuDNN types - {"cudnnContext", {"hipdnnContext", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnHandle_t", {"hipdnnHandle_t", "", CONV_TYPE, API_DNN}}, - {"cudnnTensorStruct", {"hipdnnTensorStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnTensorDescriptor_t", {"hipdnnTensorDescriptor_t", "", CONV_TYPE, API_DNN}}, - {"cudnnConvolutionStruct", {"hipdnnConvolutionStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnConvolutionDescriptor_t", {"hipdnnConvolutionDescriptor_t", "", CONV_TYPE, API_DNN}}, - {"cudnnPoolingStruct", {"hipdnnPoolingStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnPoolingDescriptor_t", {"hipdnnPoolingDescriptor_t", "", CONV_TYPE, API_DNN}}, - {"cudnnFilterStruct", {"hipdnnFilterStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnFilterDescriptor_t", {"hipdnnFilterDescriptor_t", "", CONV_TYPE, API_DNN}}, - {"cudnnLRNStruct", {"hipdnnLRNStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnLRNDescriptor_t", {"hipdnnLRNDescriptor_t", "", CONV_TYPE, API_DNN}}, - {"cudnnActivationStruct", {"hipdnnActivationStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnActivationDescriptor_t", {"hipdnnActivationDescriptor_t", "", CONV_TYPE, API_DNN}}, - {"cudnnSpatialTransformerStruct", {"hipdnnSpatialTransformerStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSpatialTransformerDescriptor_t", {"hipdnnSpatialTransformerDescriptor_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnOpTensorStruct", {"hipdnnOpTensorStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnOpTensorDescriptor_t", {"hipdnnOpTensorDescriptor_t", "", CONV_TYPE, API_DNN}}, - {"cudnnReduceTensorStruct", {"hipdnnReduceTensorStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnReduceTensorDescriptor_t", {"hipdnnReduceTensorDescriptor_t", "", CONV_TYPE, API_DNN}}, - {"cudnnCTCLossStruct", {"hipdnnCTCLossStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnCTCLossDescriptor_t", {"hipdnnCTCLossDescriptor_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnTensorTransformStruct", {"hipdnnTensorTransformStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnTensorTransformDescriptor_t", {"hipdnnTensorTransformDescriptor_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnConvolutionFwdAlgoPerf_t", {"hipdnnConvolutionFwdAlgoPerf_t", "", CONV_TYPE, API_DNN}}, - {"cudnnConvolutionBwdFilterAlgoPerf_t", {"hipdnnConvolutionBwdFilterAlgoPerf_t", "", CONV_TYPE, API_DNN}}, - {"cudnnConvolutionBwdDataAlgoPerf_t", {"hipdnnConvolutionBwdDataAlgoPerf_t", "", CONV_TYPE, API_DNN}}, - {"cudnnDropoutStruct", {"hipdnnDropoutStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDropoutDescriptor_t", {"hipdnnDropoutDescriptor_t", "", CONV_TYPE, API_DNN}}, - {"cudnnAlgorithmStruct", {"hipdnnAlgorithmStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnAlgorithmDescriptor_t", {"hipdnnAlgorithmDescriptor_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnAlgorithmPerformanceStruct", {"hipdnnAlgorithmPerformanceStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnAlgorithmPerformance_t", {"hipdnnAlgorithmPerformance_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnRNNStruct", {"hipdnnRNNStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnRNNDescriptor_t", {"hipdnnRNNDescriptor_t", "", CONV_TYPE, API_DNN}}, - {"cudnnPersistentRNNPlan", {"hipdnnPersistentRNNPlan", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnPersistentRNNPlan_t", {"hipdnnPersistentRNNPlan_t", "", CONV_TYPE, API_DNN}}, - {"cudnnAlgorithm_t", {"hipdnnAlgorithm_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnDebug_t", {"hipdnnDebug_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnCallback_t", {"hipdnnCallback_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnRNNDataStruct", {"hipdnnRNNDataStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnRNNDataDescriptor_t", {"hipdnnRNNDataDescriptor_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSeqDataStruct", {"hipdnnSeqDataStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnSeqDataDescriptor_t", {"hipdnnSeqDataDescriptor_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnAttnStruct", {"hipdnnAttnStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnAttnDescriptor_t", {"hipdnnAttnDescriptor_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnFusedOpsConstParamStruct", {"hipdnnFusedOpsConstParamStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnFusedOpsConstParamPack_t", {"hipdnnFusedOpsConstParamPack_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnFusedOpsVariantParamStruct", {"hipdnnFusedOpsVariantParamStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnFusedOpsVariantParamPack_t", {"hipdnnFusedOpsVariantParamPack_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnFusedOpsPlanStruct", {"hipdnnFusedOpsPlanStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, - {"cudnnFusedOpsPlan_t", {"hipdnnFusedOpsPlan_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}}, -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_Device_functions.cpp b/hipamd/hipify-clang/src/CUDA2HIP_Device_functions.cpp deleted file mode 100644 index 87fe2ac86c..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_Device_functions.cpp +++ /dev/null @@ -1,616 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Maps CUDA header names to HIP header names -const std::map CUDA_DEVICE_FUNC_MAP{ - // math functions - {"abs", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"labs", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"llabs", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"fabs", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"fabsf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"min", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"fminf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"fmin", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"max", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"fmaxf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"fmax", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"sin", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"cos", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"sincos", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"sincosf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"tan", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"sqrt", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"rsqrt", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"rsqrtf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"log2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"exp2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"exp2f", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"exp10", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"exp10f", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"expm1", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"expm1f", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"log2f", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"log10", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"log", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"log1p", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"log1pf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"floor", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"exp", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"cosh", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"sinh", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"tanh", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"acosh", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"acoshf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"asinh", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"asinhf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"atanh", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"atanhf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"ldexp", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"ldexpf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"logb", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"logbf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"ilogb", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"ilogbf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"scalbn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"scalbnf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"scalbln", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"scalblnf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"frexp", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"frexpf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"round", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"roundf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"lround", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"lroundf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"llround", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"llroundf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"rint", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"rintf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"lrint", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"lrintf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"llrint", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"llrintf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"nearbyint", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"nearbyintf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"ceil", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"trunc", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"truncf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"fdim", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"fdimf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"atan2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"atan", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"acos", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"asin", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"hypot", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"rhypot", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"hypotf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"rhypotf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"norm3d", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"rnorm3d", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"norm4d", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"rnorm4d", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"norm", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"rnorm", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"rnormf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"normf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"norm3df", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"rnorm3df", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"norm4df", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"rnorm4df", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"cbrt", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"cbrtf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"rcbrt", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"rcbrtf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"sinpi", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"sinpif", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"cospi", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"cospif", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"sincospi", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"sincospif", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"pow", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"modf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"fmod", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"remainder", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"remainderf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"remquo", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"remquof", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"j0", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"j0f", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"j1", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"j1f", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"jn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"jnf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"y0", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"y0f", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"y1", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"y1f", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"yn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"ynf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"cyl_bessel_i0", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"cyl_bessel_i0f", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"cyl_bessel_i1", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"cyl_bessel_i1f", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"erf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"erff", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"erfinv", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"erfinvf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"erfc", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"erfcf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"lgamma", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"erfcinv", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"erfcinvf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"normcdfinv", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"normcdfinvf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"normcdf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"normcdff", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"erfcx", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"erfcxf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"lgammaf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"tgamma", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"tgammaf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"copysign", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"copysignf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"nextafter", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"nextafterf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"nan", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"nanf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"fma", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"fmaf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"acosf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"asinf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"atanf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"atan2f", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"cosf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"sinf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"tanf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"coshf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"sinhf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"tanhf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"expf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"logf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"log10f", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"modff", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"powf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"sqrtf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"ceilf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"floorf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"fmodf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"signbit", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"isfinite", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"isnan", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"isinf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"umin", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"llmin", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"ullmin", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"umax", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"llmax", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"ullmax", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__isinff", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__isnanf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__finite", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__finitef", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__signbit", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__isnan", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__isinf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__signbitf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__signbitl", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__finitel", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__isinfl", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__isnanl", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"_ldsign", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"_fdsign", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"_Pow_int", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - // static math functions declared in device-functions.h - {"mulhi", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"mul64hi", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"float_as_int", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"int_as_float", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"float_as_uint", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"uint_as_float", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"saturate", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"mul24", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"umul24", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"float2int", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"int2float", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"uint2float", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - // device functions - {"__mulhi", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__umulhi", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__mul64hi", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__umul64hi", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__int_as_float", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float_as_int", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__uint_as_float", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float_as_uint", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__syncthreads", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__threadfence", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__threadfence_block", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__saturatef", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__sad", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__usad", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__mul24", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__umul24", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"fdividef", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fdividef", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"fdivide", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__sinf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__cosf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__tanf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__sincosf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__expf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__exp10f", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__log2f", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__log10f", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__logf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__powf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2int_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2int_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2int_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2int_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2uint_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2uint_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2uint_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2uint_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__int2float_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__int2float_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__int2float_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__int2float_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__uint2float_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__uint2float_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__uint2float_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__uint2float_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2ll_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2ll_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2ll_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2ll_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2ull_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2ull_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2ull_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2ull_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ll2float_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ll2float_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ll2float_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ll2float_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ull2float_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ull2float_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ull2float_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ull2float_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fadd_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fadd_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fadd_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fadd_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fsub_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fsub_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fsub_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fsub_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fmul_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fmul_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fmul_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fmul_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fmaf_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fmaf_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fmaf_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fmaf_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__frcp_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__frcp_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__frcp_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__frcp_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fsqrt_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fsqrt_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fsqrt_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fsqrt_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__frsqrt_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fdiv_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fdiv_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fdiv_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__fdiv_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__clz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ffs", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__popc", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__brev", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__clzll", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ffsll", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__popcll", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__brevll", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__byte_perm", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hadd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__rhadd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__uhadd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__urhadd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__double2int_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__double2uint_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__double2ll_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__double2ull_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__prof_trigger", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__trap", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__brkpt", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__pm0", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__pm1", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__pm2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__pm3", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - // SIMD functions - {"__vabs2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vabsss2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vadd2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vaddss2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vaddus2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vavgs2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vavgu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vhaddu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmpeq2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmpges2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmpgeu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmpgts2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmpgtu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmples2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmplts2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmpltu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmpne2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vabsdiffu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vmaxs2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vmaxu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vmins2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vminu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vseteq2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsetges2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsetgeu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsetgts2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsetles2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsetleu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsetlts2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsetltu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsetne2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsadu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsub2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsubss2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsubus2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vneg2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vnegss2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vabsdiffs2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsads2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vabs4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vabsss4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vadd4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vaddss4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vaddus4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vavgs4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vavgu4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vhaddu4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmpeq4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmpges4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmpgeu4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmpgts4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmpgtu4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmples4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmpleu4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmplts4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmpltu4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vcmpne4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vabsdiffu4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vmaxs4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vmaxu4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vmins4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vminu4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vseteq4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsetles4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsetleu4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsetlts4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsetltu4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsetges4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsetgeu4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsetgts4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsetgtu4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsetne4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsadu4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsub4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsubss4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsubus4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vneg4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vnegss4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vabsdiffs4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__vsads4", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - // fp16 functions - {"__float2half", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2half_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2half_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2half_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2half_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2float", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float2half2_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__floats2half2_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__low2float", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__high2float", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__float22half2_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half22float2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2int_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2int_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2int_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2int_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__int2half_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__int2half_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__int2half_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2short_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2short_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2short_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2short_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__short2half_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__short2half_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__short2half_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__short2half_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2uint_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2uint_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2uint_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2uint_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__uint2half_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__uint2half_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__uint2half_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__uint2half_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2ushort_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2ushort_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2ushort_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2ushort_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ushort2half_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ushort2half_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ushort2half_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ushort2half_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2ull_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2ull_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2ull_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2ull_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ull2half_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ull2half_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ull2half_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ull2half_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2ll_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2ll_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2ll_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2ll_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ll2half_rn", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ll2half_rz", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ll2half_rd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ll2half_ru", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"htrunc", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"hceil", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"hfloor", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"hrint", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"h2trunc", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"h2ceil", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"h2floor", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"h2rint", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half2half2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__lowhigh2highlow", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__lows2half2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__highs2half2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__high2half", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__low2half", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hisinf", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__halves2half2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__low2half2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__high2half2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half_as_short", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__half_as_ushort", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__short_as_half", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ushort_as_half", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ldg", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ldcg", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ldca", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__ldcs", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__heq2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hne2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hle2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hge2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hlt2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hgt2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hequ2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hneu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hleu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hgeu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hltu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hgtu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hisnan2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hadd2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hsub2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hmul2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__h2div", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hadd2_sat", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hsub2_sat", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hmul2_sat", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hfma2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hfma2_sat", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hneg2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hsub", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hmul", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hdiv", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hadd_sat", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hsub_sat", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hmul_sat", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hfma", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hfma_sat", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hneg", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__habs2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__habs", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__hbeq2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hbne2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hble2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hbge2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hblt2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hbgt2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hbequ2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hbneu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hbleu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hbgeu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hbltu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hbgtu2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__heq", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hne", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hle", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hge", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hlt", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hgt", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hequ", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hneu", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hleu", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hgeu", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hltu", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hgtu", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__hisnan", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"hsqrt", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"hrsqrt", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"hrcp", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"hlog", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"hlog2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"hlog10", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"hexp", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"hexp2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"hexp10", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"hcos", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"hsin", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"h2sqrt", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"h2rsqrt", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"h2rcp", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"h2log", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"h2log2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"h2log10", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"h2exp", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"h2exp2", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"h2exp10", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"h2cos", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"h2sin", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"__shfl_sync", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__shfl_up_sync", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__shfl_down_sync", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - {"__shfl_xor_sync", {"", "", CONV_DEVICE_FUNC, API_RUNTIME, UNSUPPORTED}}, - // atomic functions - {"atomicAdd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"atomicSub", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"atomicExch", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"atomicMin", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"atomicMax", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"atomicInc", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"atomicDec", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"atomicAnd", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"atomicOr", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"atomicXor", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, - {"atomicCAS", {"", "", CONV_DEVICE_FUNC, API_RUNTIME}}, -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_Driver_API_functions.cpp b/hipamd/hipify-clang/src/CUDA2HIP_Driver_API_functions.cpp deleted file mode 100644 index 7be0fd0f3d..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_Driver_API_functions.cpp +++ /dev/null @@ -1,815 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Map of all CUDA Driver API functions -const std::map CUDA_DRIVER_FUNCTION_MAP{ - // 5.2. Error Handling - // no analogue - // NOTE: cudaGetErrorName and cuGetErrorName have different signatures - {"cuGetErrorName", {"hipGetErrorName_", "", CONV_ERROR, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: cudaGetErrorString and cuGetErrorString have different signatures - {"cuGetErrorString", {"hipGetErrorString_", "", CONV_ERROR, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.3. Initialization - // no analogue - {"cuInit", {"hipInit", "", CONV_INIT, API_DRIVER}}, - - // 5.4 Version Management - // cudaDriverGetVersion - {"cuDriverGetVersion", {"hipDriverGetVersion", "", CONV_VERSION, API_DRIVER}}, - - // 5.5. Device Management - // cudaGetDevice - // NOTE: cudaGetDevice has additional attr: int ordinal - {"cuDeviceGet", {"hipGetDevice", "", CONV_DEVICE, API_DRIVER}}, - // cudaDeviceGetAttribute - {"cuDeviceGetAttribute", {"hipDeviceGetAttribute", "", CONV_DEVICE, API_DRIVER}}, - // cudaGetDeviceCount - {"cuDeviceGetCount", {"hipGetDeviceCount", "", CONV_DEVICE, API_DRIVER}}, - // no analogue - {"cuDeviceGetLuid", {"hipDeviceGetLuid", "", CONV_DEVICE, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuDeviceGetName", {"hipDeviceGetName", "", CONV_DEVICE, API_DRIVER}}, - // cudaDeviceGetNvSciSyncAttributes - {"cuDeviceGetNvSciSyncAttributes", {"hipDeviceGetNvSciSyncAttributes", "", CONV_DEVICE, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuDeviceGetUuid", {"hipDeviceGetUuid", "", CONV_DEVICE, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuDeviceTotalMem", {"hipDeviceTotalMem", "", CONV_DEVICE, API_DRIVER}}, - {"cuDeviceTotalMem_v2", {"hipDeviceTotalMem", "", CONV_DEVICE, API_DRIVER}}, - - // 5.6. Device Management [DEPRECATED] - {"cuDeviceComputeCapability", {"hipDeviceComputeCapability", "", CONV_DEVICE, API_DRIVER}}, - // no analogue - // NOTE: Not equal to cudaGetDeviceProperties due to different attributes: cudaDeviceProp and CUdevprop - {"cuDeviceGetProperties", {"hipGetDeviceProperties_", "", CONV_DEVICE, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.7. Primary Context Management - // no analogues - {"cuDevicePrimaryCtxGetState", {"hipDevicePrimaryCtxGetState", "", CONV_CONTEXT, API_DRIVER}}, - {"cuDevicePrimaryCtxRelease", {"hipDevicePrimaryCtxRelease", "", CONV_CONTEXT, API_DRIVER}}, - {"cuDevicePrimaryCtxReset", {"hipDevicePrimaryCtxReset", "", CONV_CONTEXT, API_DRIVER}}, - {"cuDevicePrimaryCtxRetain", {"hipDevicePrimaryCtxRetain", "", CONV_CONTEXT, API_DRIVER}}, - {"cuDevicePrimaryCtxSetFlags", {"hipDevicePrimaryCtxSetFlags", "", CONV_CONTEXT, API_DRIVER}}, - - // 5.8. Context Management - // no analogues, except a few - {"cuCtxCreate", {"hipCtxCreate", "", CONV_CONTEXT, API_DRIVER}}, - {"cuCtxCreate_v2", {"hipCtxCreate", "", CONV_CONTEXT, API_DRIVER}}, - {"cuCtxDestroy", {"hipCtxDestroy", "", CONV_CONTEXT, API_DRIVER}}, - {"cuCtxDestroy_v2", {"hipCtxDestroy", "", CONV_CONTEXT, API_DRIVER}}, - {"cuCtxGetApiVersion", {"hipCtxGetApiVersion", "", CONV_CONTEXT, API_DRIVER}}, - {"cuCtxGetCacheConfig", {"hipCtxGetCacheConfig", "", CONV_CONTEXT, API_DRIVER}}, - {"cuCtxGetCurrent", {"hipCtxGetCurrent", "", CONV_CONTEXT, API_DRIVER}}, - {"cuCtxGetDevice", {"hipCtxGetDevice", "", CONV_CONTEXT, API_DRIVER}}, - // cudaGetDeviceFlags - // TODO: rename to hipGetDeviceFlags - {"cuCtxGetFlags", {"hipCtxGetFlags", "", CONV_CONTEXT, API_DRIVER}}, - // cudaDeviceGetLimit - {"cuCtxGetLimit", {"hipDeviceGetLimit", "", CONV_CONTEXT, API_DRIVER}}, - // cudaDeviceGetSharedMemConfig - // TODO: rename to hipDeviceGetSharedMemConfig - {"cuCtxGetSharedMemConfig", {"hipCtxGetSharedMemConfig", "", CONV_CONTEXT, API_DRIVER}}, - // cudaDeviceGetStreamPriorityRange - {"cuCtxGetStreamPriorityRange", {"hipDeviceGetStreamPriorityRange", "", CONV_CONTEXT, API_DRIVER}}, - {"cuCtxPopCurrent", {"hipCtxPopCurrent", "", CONV_CONTEXT, API_DRIVER}}, - {"cuCtxPopCurrent_v2", {"hipCtxPopCurrent", "", CONV_CONTEXT, API_DRIVER}}, - {"cuCtxPushCurrent", {"hipCtxPushCurrent", "", CONV_CONTEXT, API_DRIVER}}, - {"cuCtxPushCurrent_v2", {"hipCtxPushCurrent", "", CONV_CONTEXT, API_DRIVER}}, - {"cuCtxSetCacheConfig", {"hipCtxSetCacheConfig", "", CONV_CONTEXT, API_DRIVER}}, - {"cuCtxSetCurrent", {"hipCtxSetCurrent", "", CONV_CONTEXT, API_DRIVER}}, - // cudaDeviceSetLimit - {"cuCtxSetLimit", {"hipDeviceSetLimit", "", CONV_CONTEXT, API_DRIVER}}, - // cudaDeviceSetSharedMemConfig - // TODO: rename to hipDeviceSetSharedMemConfig - {"cuCtxSetSharedMemConfig", {"hipCtxSetSharedMemConfig", "", CONV_CONTEXT, API_DRIVER}}, - // cudaDeviceSynchronize - // TODO: rename to hipDeviceSynchronize - {"cuCtxSynchronize", {"hipCtxSynchronize", "", CONV_CONTEXT, API_DRIVER}}, - - // 5.9. Context Management [DEPRECATED] - // no analogues - {"cuCtxAttach", {"hipCtxAttach", "", CONV_CONTEXT, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuCtxDetach", {"hipCtxDetach", "", CONV_CONTEXT, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.10. Module Management - // no analogues - {"cuLinkAddData", {"hipLinkAddData", "", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuLinkAddData_v2", {"hipLinkAddData", "", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuLinkAddFile", {"hipLinkAddFile", "", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuLinkAddFile_v2", {"hipLinkAddFile", "", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuLinkComplete", {"hipLinkComplete", "", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuLinkCreate", {"hipLinkCreate", "", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuLinkCreate_v2", {"hipLinkCreate", "", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuLinkDestroy", {"hipLinkDestroy", "", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuModuleGetFunction", {"hipModuleGetFunction", "", CONV_MODULE, API_DRIVER}}, - {"cuModuleGetGlobal", {"hipModuleGetGlobal", "", CONV_MODULE, API_DRIVER}}, - {"cuModuleGetGlobal_v2", {"hipModuleGetGlobal", "", CONV_MODULE, API_DRIVER}}, - {"cuModuleGetSurfRef", {"hipModuleGetSurfRef", "", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuModuleGetTexRef", {"hipModuleGetTexRef", "", CONV_MODULE, API_DRIVER}}, - {"cuModuleLoad", {"hipModuleLoad", "", CONV_MODULE, API_DRIVER}}, - {"cuModuleLoadData", {"hipModuleLoadData", "", CONV_MODULE, API_DRIVER}}, - {"cuModuleLoadDataEx", {"hipModuleLoadDataEx", "", CONV_MODULE, API_DRIVER}}, - {"cuModuleLoadFatBinary", {"hipModuleLoadFatBinary", "", CONV_MODULE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuModuleUnload", {"hipModuleUnload", "", CONV_MODULE, API_DRIVER}}, - - // 5.11. Memory Management - // no analogue - {"cuArray3DCreate", {"hipArray3DCreate", "", CONV_MEMORY, API_DRIVER}}, - {"cuArray3DCreate_v2", {"hipArray3DCreate", "", CONV_MEMORY, API_DRIVER}}, - {"cuArray3DGetDescriptor", {"hipArray3DGetDescriptor", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuArray3DGetDescriptor_v2", {"hipArray3DGetDescriptor", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuArrayCreate", {"hipArrayCreate", "", CONV_MEMORY, API_DRIVER}}, - {"cuArrayCreate_v2", {"hipArrayCreate", "", CONV_MEMORY, API_DRIVER}}, - {"cuArrayDestroy", {"hipArrayDestroy", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuArrayGetDescriptor", {"hipArrayGetDescriptor", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuArrayGetDescriptor_v2", {"hipArrayGetDescriptor", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaDeviceGetByPCIBusId - {"cuDeviceGetByPCIBusId", {"hipDeviceGetByPCIBusId", "", CONV_MEMORY, API_DRIVER}}, - // cudaDeviceGetPCIBusId - {"cuDeviceGetPCIBusId", {"hipDeviceGetPCIBusId", "", CONV_MEMORY, API_DRIVER}}, - // cudaIpcCloseMemHandle - {"cuIpcCloseMemHandle", {"hipIpcCloseMemHandle", "", CONV_MEMORY, API_DRIVER}}, - // cudaIpcGetEventHandle - {"cuIpcGetEventHandle", {"hipIpcGetEventHandle", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaIpcGetMemHandle - {"cuIpcGetMemHandle", {"hipIpcGetMemHandle", "", CONV_MEMORY, API_DRIVER}}, - // cudaIpcOpenEventHandle - {"cuIpcOpenEventHandle", {"hipIpcOpenEventHandle", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaIpcOpenMemHandle - {"cuIpcOpenMemHandle", {"hipIpcOpenMemHandle", "", CONV_MEMORY, API_DRIVER}}, - // cudaMalloc - {"cuMemAlloc", {"hipMalloc", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemAlloc_v2", {"hipMalloc", "", CONV_MEMORY, API_DRIVER}}, - // cudaHostAlloc - {"cuMemAllocHost", {"hipHostMalloc", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemAllocHost_v2", {"hipHostMalloc", "", CONV_MEMORY, API_DRIVER}}, - // cudaMallocManaged - {"cuMemAllocManaged", {"hipMallocManaged", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - // NOTE: Not equal to cudaMallocPitch due to different signatures - {"cuMemAllocPitch", {"hipMemAllocPitch", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemAllocPitch_v2", {"hipMemAllocPitch", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - // NOTE: Not equal to cudaMemcpy due to different signatures - {"cuMemcpy", {"hipMemcpy_", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaMemcpy2D due to different signatures - {"cuMemcpy2D", {"hipMemcpyParam2D", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemcpy2D_v2", {"hipMemcpyParam2D", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - // NOTE: Not equal to cudaMemcpy2DAsync/hipMemcpy2DAsync due to different signatures - {"cuMemcpy2DAsync", {"hipMemcpyParam2DAsync", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemcpy2DAsync_v2", {"hipMemcpyParam2DAsync", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - {"cuMemcpy2DUnaligned", {"hipMemcpy2DUnaligned", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemcpy2DUnaligned_v2", {"hipMemcpy2DUnaligned", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaMemcpy3D due to different signatures - {"cuMemcpy3D", {"hipMemcpy3D_", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemcpy3D_v2", {"hipMemcpy3D_", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaMemcpy3DAsync due to different signatures - {"cuMemcpy3DAsync", {"hipMemcpy3DAsync_", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemcpy3DAsync_v2", {"hipMemcpy3DAsync_", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaMemcpy3DPeer due to different signatures - {"cuMemcpy3DPeer", {"hipMemcpy3DPeer_", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaMemcpy3DPeerAsync due to different signatures - {"cuMemcpy3DPeerAsync", {"hipMemcpy3DPeerAsync_", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaMemcpyAsync due to different signatures - {"cuMemcpyAsync", {"hipMemcpyAsync_", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaMemcpyArrayToArray due to different signatures - {"cuMemcpyAtoA", {"hipMemcpyAtoA", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemcpyAtoA_v2", {"hipMemcpyAtoA", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuMemcpyAtoD", {"hipMemcpyAtoD", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemcpyAtoD_v2", {"hipMemcpyAtoD", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuMemcpyAtoH", {"hipMemcpyAtoH", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemcpyAtoH_v2", {"hipMemcpyAtoH", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - {"cuMemcpyAtoHAsync", {"hipMemcpyAtoHAsync", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemcpyAtoHAsync_v2", {"hipMemcpyAtoHAsync", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuMemcpyDtoA", {"hipMemcpyDtoA", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemcpyDtoA_v2", {"hipMemcpyDtoA", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuMemcpyDtoD", {"hipMemcpyDtoD", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemcpyDtoD_v2", {"hipMemcpyDtoD", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - {"cuMemcpyDtoDAsync", {"hipMemcpyDtoDAsync", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemcpyDtoDAsync_v2", {"hipMemcpyDtoDAsync", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - {"cuMemcpyDtoH", {"hipMemcpyDtoH", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemcpyDtoH_v2", {"hipMemcpyDtoH", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - {"cuMemcpyDtoHAsync", {"hipMemcpyDtoHAsync", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemcpyDtoHAsync_v2", {"hipMemcpyDtoHAsync", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - {"cuMemcpyHtoA", {"hipMemcpyHtoA", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemcpyHtoA_v2", {"hipMemcpyHtoA", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - {"cuMemcpyHtoAAsync", {"hipMemcpyHtoAAsync", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemcpyHtoAAsync_v2", {"hipMemcpyHtoAAsync", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuMemcpyHtoD", {"hipMemcpyHtoD", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemcpyHtoD_v2", {"hipMemcpyHtoD", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - {"cuMemcpyHtoDAsync", {"hipMemcpyHtoDAsync", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemcpyHtoDAsync_v2", {"hipMemcpyHtoDAsync", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - // NOTE: Not equal to cudaMemcpyPeer due to different signatures - {"cuMemcpyPeer", {"hipMemcpyPeer_", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaMemcpyPeerAsync due to different signatures - {"cuMemcpyPeerAsync", {"hipMemcpyPeerAsync_", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaFree - {"cuMemFree", {"hipFree", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemFree_v2", {"hipFree", "", CONV_MEMORY, API_DRIVER}}, - // cudaFreeHost - {"cuMemFreeHost", {"hipHostFree", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - {"cuMemGetAddressRange", {"hipMemGetAddressRange", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemGetAddressRange_v2", {"hipMemGetAddressRange", "", CONV_MEMORY, API_DRIVER}}, - // cudaMemGetInfo - {"cuMemGetInfo", {"hipMemGetInfo", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemGetInfo_v2", {"hipMemGetInfo", "", CONV_MEMORY, API_DRIVER}}, - // cudaHostAlloc - {"cuMemHostAlloc", {"hipHostMalloc", "", CONV_MEMORY, API_DRIVER}}, - // cudaHostGetDevicePointer - {"cuMemHostGetDevicePointer", {"hipHostGetDevicePointer", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemHostGetDevicePointer_v2", {"hipHostGetDevicePointer", "", CONV_MEMORY, API_DRIVER}}, - // cudaHostGetFlags - {"cuMemHostGetFlags", {"hipHostGetFlags", "", CONV_MEMORY, API_DRIVER}}, - // cudaHostRegister - {"cuMemHostRegister", {"hipHostRegister", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemHostRegister_v2", {"hipHostRegister", "", CONV_MEMORY, API_DRIVER}}, - // cudaHostUnregister - {"cuMemHostUnregister", {"hipHostUnregister", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - {"cuMemsetD16", {"hipMemsetD16", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemsetD16_v2", {"hipMemsetD16", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - {"cuMemsetD16Async", {"hipMemsetD16Async", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - {"cuMemsetD2D16", {"hipMemsetD2D16", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemsetD2D16_v2", {"hipMemsetD2D16", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuMemsetD2D16Async", {"hipMemsetD2D16Async", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuMemsetD2D32", {"hipMemsetD2D32", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemsetD2D32_v2", {"hipMemsetD2D32", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuMemsetD2D32Async", {"hipMemsetD2D32Async", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuMemsetD2D8", {"hipMemsetD2D8", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemsetD2D8_v2", {"hipMemsetD2D8", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuMemsetD2D8Async", {"hipMemsetD2D8Async", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaMemset - {"cuMemsetD32", {"hipMemsetD32", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemsetD32_v2", {"hipMemsetD32", "", CONV_MEMORY, API_DRIVER}}, - // cudaMemsetAsync - {"cuMemsetD32Async", {"hipMemsetD32Async", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - {"cuMemsetD8", {"hipMemsetD8", "", CONV_MEMORY, API_DRIVER}}, - {"cuMemsetD8_v2", {"hipMemsetD8", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - {"cuMemsetD8Async", {"hipMemsetD8Async", "", CONV_MEMORY, API_DRIVER}}, - // no analogue - // NOTE: Not equal to cudaMallocMipmappedArray due to different signatures - {"cuMipmappedArrayCreate", {"hipMipmappedArrayCreate", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaFreeMipmappedArray due to different signatures - {"cuMipmappedArrayDestroy", {"hipMipmappedArrayDestroy", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaGetMipmappedArrayLevel due to different signatures - {"cuMipmappedArrayGetLevel", {"hipMipmappedArrayGetLevel", "", CONV_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.12. Virtual Memory Management - // no analogue - {"cuMemAddressFree", {"hipMemAddressFree", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemAddressReserve", {"hipMemAddressReserve", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemCreate", {"hipMemCreate", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemExportToShareableHandle", {"hipMemExportToShareableHandle", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemGetAccess", {"hipMemGetAccess", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemGetAllocationGranularity", {"hipMemGetAllocationGranularity", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemGetAllocationPropertiesFromHandle", {"hipMemGetAllocationPropertiesFromHandle", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemImportFromShareableHandle", {"hipMemImportFromShareableHandle", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemMap", {"hipMemMap", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemRelease", {"hipMemRelease", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemSetAccess", {"hipMemSetAccess", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuMemUnmap", {"hipMemUnmap", "", CONV_VIRTUAL_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.13. Unified Addressing - // cudaMemAdvise - {"cuMemAdvise", {"hipMemAdvise", "", CONV_ADDRESSING, API_DRIVER, HIP_UNSUPPORTED}}, - // TODO: double check cudaMemPrefetchAsync - {"cuMemPrefetchAsync", {"hipMemPrefetchAsync_", "", CONV_ADDRESSING, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaMemRangeGetAttribute - {"cuMemRangeGetAttribute", {"hipMemRangeGetAttribute", "", CONV_ADDRESSING, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaMemRangeGetAttributes - {"cuMemRangeGetAttributes", {"hipMemRangeGetAttributes", "", CONV_ADDRESSING, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuPointerGetAttribute", {"hipPointerGetAttribute", "", CONV_ADDRESSING, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaPointerGetAttributes due to different signatures - {"cuPointerGetAttributes", {"hipPointerGetAttributes_", "", CONV_ADDRESSING, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuPointerSetAttribute", {"hipPointerSetAttribute", "", CONV_ADDRESSING, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.14. Stream Management - // cudaStreamAddCallback - {"cuStreamAddCallback", {"hipStreamAddCallback", "", CONV_STREAM, API_DRIVER}}, - // cudaStreamAttachMemAsync - {"cuStreamAttachMemAsync", {"hipStreamAttachMemAsync", "", CONV_STREAM, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaStreamBeginCapture - {"cuStreamBeginCapture", {"hipStreamBeginCapture", "", CONV_STREAM, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuStreamBeginCapture_v2", {"hipStreamBeginCapture", "", CONV_STREAM, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuStreamBeginCapture_ptsz", {"hipStreamBeginCapture", "", CONV_STREAM, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaStreamCreateWithFlags - {"cuStreamCreate", {"hipStreamCreateWithFlags", "", CONV_STREAM, API_DRIVER}}, - // cudaStreamCreateWithPriority - {"cuStreamCreateWithPriority", {"hipStreamCreateWithPriority", "", CONV_STREAM, API_DRIVER}}, - // cudaStreamDestroy - {"cuStreamDestroy", {"hipStreamDestroy", "", CONV_STREAM, API_DRIVER}}, - {"cuStreamDestroy_v2", {"hipStreamDestroy", "", CONV_STREAM, API_DRIVER}}, - // cudaStreamEndCapture - {"cuStreamEndCapture", {"hipStreamEndCapture", "", CONV_STREAM, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaStreamGetCaptureInfo - {"cuStreamGetCaptureInfo", {"hipStreamGetCaptureInfo", "", CONV_STREAM, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuStreamGetCtx", {"hipStreamGetContext", "", CONV_STREAM, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaStreamGetFlags - {"cuStreamGetFlags", {"hipStreamGetFlags", "", CONV_STREAM, API_DRIVER}}, - // cudaStreamGetPriority - {"cuStreamGetPriority", {"hipStreamGetPriority", "", CONV_STREAM, API_DRIVER}}, - // cudaStreamIsCapturing - {"cuStreamIsCapturing", {"hipStreamIsCapturing", "", CONV_STREAM, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaStreamQuery - {"cuStreamQuery", {"hipStreamQuery", "", CONV_STREAM, API_DRIVER}}, - // cudaStreamSynchronize - {"cuStreamSynchronize", {"hipStreamSynchronize", "", CONV_STREAM, API_DRIVER}}, - // cudaStreamWaitEvent - {"cuStreamWaitEvent", {"hipStreamWaitEvent", "", CONV_STREAM, API_DRIVER}}, - // cudaThreadExchangeStreamCaptureMode - {"cuThreadExchangeStreamCaptureMode", {"hipThreadExchangeStreamCaptureMode", "", CONV_STREAM, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.15. Event Management - // cudaEventCreateWithFlags - {"cuEventCreate", {"hipEventCreateWithFlags", "", CONV_EVENT, API_DRIVER}}, - // cudaEventDestroy - {"cuEventDestroy", {"hipEventDestroy", "", CONV_EVENT, API_DRIVER}}, - {"cuEventDestroy_v2", {"hipEventDestroy", "", CONV_EVENT, API_DRIVER}}, - // cudaEventElapsedTime - {"cuEventElapsedTime", {"hipEventElapsedTime", "", CONV_EVENT, API_DRIVER}}, - // cudaEventQuery - {"cuEventQuery", {"hipEventQuery", "", CONV_EVENT, API_DRIVER}}, - // cudaEventRecord - {"cuEventRecord", {"hipEventRecord", "", CONV_EVENT, API_DRIVER}}, - // cudaEventSynchronize - {"cuEventSynchronize", {"hipEventSynchronize", "", CONV_EVENT, API_DRIVER}}, - - // 5.16. External Resource Interoperability - // cudaDestroyExternalMemory - {"cuDestroyExternalMemory", {"hipDestroyExternalMemory", "", CONV_EXT_RES, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaDestroyExternalSemaphore - {"cuDestroyExternalSemaphore", {"hipDestroyExternalSemaphore", "", CONV_EXT_RES, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaExternalMemoryGetMappedBuffer - {"cuExternalMemoryGetMappedBuffer", {"hipExternalMemoryGetMappedBuffer", "", CONV_EXT_RES, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaExternalMemoryGetMappedMipmappedArray - {"cuExternalMemoryGetMappedMipmappedArray", {"hipExternalMemoryGetMappedMipmappedArray", "", CONV_EXT_RES, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaImportExternalMemory - {"cuImportExternalMemory", {"hipImportExternalMemory", "", CONV_EXT_RES, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaImportExternalSemaphore - {"cuImportExternalSemaphore", {"hipImportExternalSemaphore", "", CONV_EXT_RES, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaSignalExternalSemaphoresAsync - {"cuSignalExternalSemaphoresAsync", {"hipSignalExternalSemaphoresAsync", "", CONV_EXT_RES, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaWaitExternalSemaphoresAsync - {"cuWaitExternalSemaphoresAsync", {"hipWaitExternalSemaphoresAsync", "", CONV_EXT_RES, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.17. Stream Memory Operations - // no analogues - {"cuStreamBatchMemOp", {"hipStreamBatchMemOp", "", CONV_STREAM_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuStreamWaitValue32", {"hipStreamWaitValue32", "", CONV_STREAM_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuStreamWaitValue64", {"hipStreamWaitValue64", "", CONV_STREAM_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuStreamWriteValue32", {"hipStreamWriteValue32", "", CONV_STREAM_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuStreamWriteValue64", {"hipStreamWriteValue64", "", CONV_STREAM_MEMORY, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.18.Execution Control - // no analogue - {"cuFuncGetAttribute", {"hipFuncGetAttribute", "", CONV_EXECUTION, API_DRIVER}}, - // no analogue - // NOTE: Not equal to cudaFuncSetAttribute due to different signatures - {"cuFuncSetAttribute", {"hipFuncSetAttribute", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaFuncSetCacheConfig due to different signatures - {"cuFuncSetCacheConfig", {"hipFuncSetCacheConfig", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaFuncSetSharedMemConfig due to different signatures - {"cuFuncSetSharedMemConfig", {"hipFuncSetSharedMemConfig", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaLaunchCooperativeKernel due to different signatures - {"cuLaunchCooperativeKernel", {"hipLaunchCooperativeKernel_", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaLaunchCooperativeKernelMultiDevice due to different signatures - {"cuLaunchCooperativeKernelMultiDevice", {"hipLaunchCooperativeKernelMultiDevice_", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaLaunchHostFunc - {"cuLaunchHostFunc", {"hipLaunchHostFunc", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaLaunchKernel due to different signatures - {"cuLaunchKernel", {"hipModuleLaunchKernel", "", CONV_EXECUTION, API_DRIVER}}, - - // 5.19.Execution Control [DEPRECATED] - // no analogue - {"cuFuncSetBlockShape", {"hipFuncSetBlockShape", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuFuncSetSharedSize", {"hipFuncSetSharedSize", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaLaunch due to different signatures - {"cuLaunch", {"hipLaunch", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuLaunchGrid", {"hipLaunchGrid", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuLaunchGridAsync", {"hipLaunchGridAsync", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuParamSetf", {"hipParamSetf", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuParamSeti", {"hipParamSeti", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuParamSetSize", {"hipParamSetSize", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuParamSetTexRef", {"hipParamSetTexRef", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuParamSetv", {"hipParamSetv", "", CONV_EXECUTION, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.20. Graph Management - // cudaGraphAddChildGraphNode - {"cuGraphAddChildGraphNode", {"hipGraphAddChildGraphNode", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphAddDependencies - {"cuGraphAddDependencies", {"hipGraphAddDependencies", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphAddEmptyNode - {"cuGraphAddEmptyNode", {"hipGraphAddEmptyNode", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphAddHostNode - {"cuGraphAddHostNode", {"hipGraphAddHostNode", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphAddKernelNode - {"cuGraphAddKernelNode", {"hipGraphAddKernelNode", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphAddMemcpyNode - {"cuGraphAddMemcpyNode", {"hipGraphAddMemcpyNode", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphAddMemsetNode - {"cuGraphAddMemsetNode", {"hipGraphAddMemsetNode", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphChildGraphNodeGetGraph - {"cuGraphChildGraphNodeGetGraph", {"hipGraphChildGraphNodeGetGraph", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphClone - {"cuGraphClone", {"hipGraphClone", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphCreate - {"cuGraphCreate", {"hipGraphCreate", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphDestroy - {"cuGraphDestroy", {"hipGraphDestroy", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphDestroyNode - {"cuGraphDestroyNode", {"hipGraphDestroyNode", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphExecDestroy - {"cuGraphExecDestroy", {"hipGraphExecDestroy", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphGetEdges - {"cuGraphGetEdges", {"hipGraphGetEdges", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphGetNodes - {"cuGraphGetNodes", {"hipGraphGetNodes", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphGetRootNodes - {"cuGraphGetRootNodes", {"hipGraphGetRootNodes", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphHostNodeGetParams - {"cuGraphHostNodeGetParams", {"hipGraphHostNodeGetParams", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphHostNodeSetParams - {"cuGraphHostNodeSetParams", {"hipGraphHostNodeSetParams", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphInstantiate - {"cuGraphInstantiate", {"hipGraphInstantiate", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphExecKernelNodeSetParams - {"cuGraphExecKernelNodeSetParams", {"hipGraphExecKernelNodeSetParams", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphKernelNodeGetParams - {"cuGraphKernelNodeGetParams", {"hipGraphKernelNodeGetParams", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphKernelNodeSetParams - {"cuGraphKernelNodeSetParams", {"hipGraphKernelNodeSetParams", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphLaunch - {"cuGraphLaunch", {"hipGraphLaunch", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphMemcpyNodeGetParams - {"cuGraphMemcpyNodeGetParams", {"hipGraphMemcpyNodeGetParams", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphMemcpyNodeSetParams - {"cuGraphMemcpyNodeSetParams", {"hipGraphMemcpyNodeSetParams", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphMemsetNodeGetParams - {"cuGraphMemsetNodeGetParams", {"hipGraphMemsetNodeGetParams", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphMemsetNodeSetParams - {"cuGraphMemsetNodeSetParams", {"hipGraphMemsetNodeSetParams", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphNodeFindInClone - {"cuGraphNodeFindInClone", {"hipGraphNodeFindInClone", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphNodeGetDependencies - {"cuGraphNodeGetDependencies", {"hipGraphNodeGetDependencies", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphNodeGetDependentNodes - {"cuGraphNodeGetDependentNodes", {"hipGraphNodeGetDependentNodes", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphNodeGetType - {"cuGraphNodeGetType", {"hipGraphNodeGetType", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphRemoveDependencies - {"cuGraphRemoveDependencies", {"hipGraphRemoveDependencies", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphExecMemcpyNodeSetParams - {"cuGraphExecMemcpyNodeSetParams", {"hipGraphExecMemcpyNodeSetParams", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphExecMemsetNodeSetParams - {"cuGraphExecMemsetNodeSetParams", {"hipGraphExecMemsetNodeSetParams", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphExecHostNodeSetParams - {"cuGraphExecHostNodeSetParams", {"hipGraphExecHostNodeSetParams", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphExecUpdate - {"cuGraphExecUpdate", {"hipGraphExecUpdate", "", CONV_GRAPH, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.21. Occupancy - // cudaOccupancyMaxActiveBlocksPerMultiprocessor - {"cuOccupancyMaxActiveBlocksPerMultiprocessor", {"hipDrvOccupancyMaxActiveBlocksPerMultiprocessor", "", CONV_OCCUPANCY, API_DRIVER}}, - // cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags - {"cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", {"hipDrvOccupancyMaxActiveBlocksPerMultiprocessorWithFlags","", CONV_OCCUPANCY, API_DRIVER}}, - // cudaOccupancyMaxPotentialBlockSize - {"cuOccupancyMaxPotentialBlockSize", {"hipOccupancyMaxPotentialBlockSize", "", CONV_OCCUPANCY, API_DRIVER}}, - // cudaOccupancyMaxPotentialBlockSizeWithFlags - {"cuOccupancyMaxPotentialBlockSizeWithFlags", {"hipOccupancyMaxPotentialBlockSizeWithFlags", "", CONV_OCCUPANCY, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.22. Texture Reference Management [DEPRECATED] - // no analogues - {"cuTexRefGetAddress", {"hipTexRefGetAddress", "", CONV_TEXTURE, API_DRIVER}}, - {"cuTexRefGetAddress_v2", {"hipTexRefGetAddress", "", CONV_TEXTURE, API_DRIVER}}, - {"cuTexRefGetAddressMode", {"hipTexRefGetAddressMode", "", CONV_TEXTURE, API_DRIVER}}, - {"cuTexRefGetArray", {"hipTexRefGetArray", "", CONV_TEXTURE, API_DRIVER}}, - {"cuTexRefGetBorderColor", {"hipTexRefGetBorderColor", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuTexRefGetFilterMode", {"hipTexRefGetFilterMode", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuTexRefGetFlags", {"hipTexRefGetFlags", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuTexRefGetFormat", {"hipTexRefGetFormat", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuTexRefGetMaxAnisotropy", {"hipTexRefGetMaxAnisotropy", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuTexRefGetMipmapFilterMode", {"hipTexRefGetMipmapFilterMode", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuTexRefGetMipmapLevelBias", {"hipTexRefGetMipmapLevelBias", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuTexRefGetMipmapLevelClamp", {"hipTexRefGetMipmapLevelClamp", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuTexRefGetMipmappedArray", {"hipTexRefGetMipmappedArray", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuTexRefSetAddress", {"hipTexRefSetAddress", "", CONV_TEXTURE, API_DRIVER}}, - {"cuTexRefSetAddress_v2", {"hipTexRefSetAddress", "", CONV_TEXTURE, API_DRIVER}}, - {"cuTexRefSetAddress2D", {"hipTexRefSetAddress2D", "", CONV_TEXTURE, API_DRIVER}}, - {"cuTexRefSetAddress2D_v2", {"hipTexRefSetAddress2D", "", CONV_TEXTURE, API_DRIVER}}, - {"cuTexRefSetAddress2D_v3", {"hipTexRefSetAddress2D", "", CONV_TEXTURE, API_DRIVER}}, - {"cuTexRefSetAddressMode", {"hipTexRefSetAddressMode", "", CONV_TEXTURE, API_DRIVER}}, - {"cuTexRefSetArray", {"hipTexRefSetArray", "", CONV_TEXTURE, API_DRIVER}}, - {"cuTexRefSetBorderColor", {"hipTexRefSetBorderColor", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuTexRefSetFilterMode", {"hipTexRefSetFilterMode", "", CONV_TEXTURE, API_DRIVER}}, - {"cuTexRefSetFlags", {"hipTexRefSetFlags", "", CONV_TEXTURE, API_DRIVER}}, - {"cuTexRefSetFormat", {"hipTexRefSetFormat", "", CONV_TEXTURE, API_DRIVER}}, - {"cuTexRefSetMaxAnisotropy", {"hipTexRefSetMaxAnisotropy", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuTexRefSetMipmapFilterMode", {"hipTexRefSetMipmapFilterMode", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuTexRefSetMipmapLevelBias", {"hipTexRefSetMipmapLevelBias", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuTexRefSetMipmapLevelClamp", {"hipTexRefSetMipmapLevelClamp", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuTexRefSetMipmappedArray", {"hipTexRefSetMipmappedArray", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuTexRefCreate", {"hipTexRefCreate", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuTexRefDestroy", {"hipTexRefDestroy", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.23. Surface Reference Management [DEPRECATED] - // no analogues - {"cuSurfRefGetArray", {"hipSurfRefGetArray", "", CONV_SURFACE, API_DRIVER, HIP_UNSUPPORTED}}, - {"cuSurfRefSetArray", {"hipSurfRefSetArray", "", CONV_SURFACE, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.24. Texture Object Management - // no analogue - // NOTE: Not equal to cudaCreateTextureObject due to different signatures - {"cuTexObjectCreate", {"hipTexObjectCreate", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaDestroyTextureObject - {"cuTexObjectDestroy", {"hipTexObjectDestroy", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaGetTextureObjectResourceDesc due to different signatures - {"cuTexObjectGetResourceDesc", {"hipTexObjectGetResourceDesc", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGetTextureObjectResourceViewDesc - {"cuTexObjectGetResourceViewDesc", {"hipTexObjectGetResourceViewDesc", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaGetTextureObjectTextureDesc due to different signatures - {"cuTexObjectGetTextureDesc", {"hipTexObjectGetTextureDesc", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.25. Surface Object Management - // no analogue - // NOTE: Not equal to cudaCreateSurfaceObject due to different signatures - {"cuSurfObjectCreate", {"hipSurfObjectCreate", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaDestroySurfaceObject - {"cuSurfObjectDestroy", {"hipSurfObjectDestroy", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaGetSurfaceObjectResourceDesc due to different signatures - {"cuSurfObjectGetResourceDesc", {"hipSurfObjectGetResourceDesc", "", CONV_TEXTURE, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.26. Peer Context Memory Access - // no analogue - // NOTE: Not equal to cudaDeviceEnablePeerAccess due to different signatures - {"cuCtxEnablePeerAccess", {"hipCtxEnablePeerAccess", "", CONV_PEER, API_DRIVER}}, - // no analogue - // NOTE: Not equal to cudaDeviceDisablePeerAccess due to different signatures - {"cuCtxDisablePeerAccess", {"hipCtxDisablePeerAccess", "", CONV_PEER, API_DRIVER}}, - // cudaDeviceCanAccessPeer - {"cuDeviceCanAccessPeer", {"hipDeviceCanAccessPeer", "", CONV_PEER, API_DRIVER}}, - // cudaDeviceGetP2PAttribute - {"cuDeviceGetP2PAttribute", {"hipDeviceGetP2PAttribute", "", CONV_PEER, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.27. Graphics Interoperability - // cudaGraphicsMapResources - {"cuGraphicsMapResources", {"hipGraphicsMapResources", "", CONV_GRAPHICS, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphicsResourceGetMappedMipmappedArray - {"cuGraphicsResourceGetMappedMipmappedArray", {"hipGraphicsResourceGetMappedMipmappedArray", "", CONV_GRAPHICS, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphicsResourceGetMappedPointer - {"cuGraphicsResourceGetMappedPointer", {"hipGraphicsResourceGetMappedPointer", "", CONV_GRAPHICS, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphicsResourceGetMappedPointer - {"cuGraphicsResourceGetMappedPointer_v2", {"hipGraphicsResourceGetMappedPointer", "", CONV_GRAPHICS, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphicsResourceSetMapFlags - {"cuGraphicsResourceSetMapFlags", {"hipGraphicsResourceSetMapFlags", "", CONV_GRAPHICS, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphicsResourceSetMapFlags - {"cuGraphicsResourceSetMapFlags_v2", {"hipGraphicsResourceSetMapFlags", "", CONV_GRAPHICS, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphicsSubResourceGetMappedArray - {"cuGraphicsSubResourceGetMappedArray", {"hipGraphicsSubResourceGetMappedArray", "", CONV_GRAPHICS, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphicsUnmapResources - {"cuGraphicsUnmapResources", {"hipGraphicsUnmapResources", "", CONV_GRAPHICS, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphicsUnregisterResource - {"cuGraphicsUnregisterResource", {"hipGraphicsUnregisterResource", "", CONV_GRAPHICS, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.28. Profiler Control - // cudaProfilerInitialize - {"cuProfilerInitialize", {"hipProfilerInitialize", "", CONV_PROFILER, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaProfilerStart - {"cuProfilerStart", {"hipProfilerStart", "", CONV_PROFILER, API_DRIVER}}, - // cudaProfilerStop - {"cuProfilerStop", {"hipProfilerStop", "", CONV_PROFILER, API_DRIVER}}, - - // 5.29. OpenGL Interoperability - // cudaGLGetDevices - {"cuGLGetDevices", {"hipGLGetDevices", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphicsGLRegisterBuffer - {"cuGraphicsGLRegisterBuffer", {"hipGraphicsGLRegisterBuffer", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphicsGLRegisterImage - {"cuGraphicsGLRegisterImage", {"hipGraphicsGLRegisterImage", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaWGLGetDevice - {"cuWGLGetDevice", {"hipWGLGetDevice", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.29. OpenGL Interoperability [DEPRECATED] - // no analogue - {"cuGLCtxCreate", {"hipGLCtxCreate", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuGLInit", {"hipGLInit", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaGLMapBufferObject due to different signatures - {"cuGLMapBufferObject", {"hipGLMapBufferObject_", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cudaGLMapBufferObjectAsync due to different signatures - {"cuGLMapBufferObjectAsync", {"hipGLMapBufferObjectAsync_", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGLRegisterBufferObject - {"cuGLRegisterBufferObject", {"hipGLRegisterBufferObject", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGLSetBufferObjectMapFlags - {"cuGLSetBufferObjectMapFlags", {"hipGLSetBufferObjectMapFlags", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGLUnmapBufferObject - {"cuGLUnmapBufferObject", {"hipGLUnmapBufferObject", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGLUnmapBufferObjectAsync - {"cuGLUnmapBufferObjectAsync", {"hipGLUnmapBufferObjectAsync", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGLUnregisterBufferObject - {"cuGLUnregisterBufferObject", {"hipGLUnregisterBufferObject", "", CONV_OPENGL, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.30.Direct3D 9 Interoperability - // no analogue - {"cuD3D9CtxCreate", {"hipD3D9CtxCreate", "", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuD3D9CtxCreateOnDevice", {"hipD3D9CtxCreateOnDevice", "", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D9GetDevice - {"cuD3D9GetDevice", {"hipD3D9GetDevice", "", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D9GetDevices - {"cuD3D9GetDevices", {"hipD3D9GetDevices", "", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D9GetDirect3DDevice - {"cuD3D9GetDirect3DDevice", {"hipD3D9GetDirect3DDevice", "", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphicsD3D9RegisterResource - {"cuGraphicsD3D9RegisterResource", {"hipGraphicsD3D9RegisterResource", "", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.30.Direct3D 9 Interoperability [DEPRECATED] - // cudaD3D9MapResources - {"cuD3D9MapResources", {"hipD3D9MapResources", "", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D9RegisterResource - {"cuD3D9RegisterResource", {"hipD3D9RegisterResource", "", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D9ResourceGetMappedArray - {"cuD3D9ResourceGetMappedArray", {"hipD3D9ResourceGetMappedArray", "", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D9ResourceGetMappedPitch - {"cuD3D9ResourceGetMappedPitch", {"hipD3D9ResourceGetMappedPitch", "", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D9ResourceGetMappedPointer - {"cuD3D9ResourceGetMappedPointer", {"hipD3D9ResourceGetMappedPointer", "", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D9ResourceGetMappedSize - {"cuD3D9ResourceGetMappedSize", {"hipD3D9ResourceGetMappedSize", "", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D9ResourceGetSurfaceDimensions - {"cuD3D9ResourceGetSurfaceDimensions", {"hipD3D9ResourceGetSurfaceDimensions", "", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D9ResourceSetMapFlags - {"cuD3D9ResourceSetMapFlags", {"hipD3D9ResourceSetMapFlags", "", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D9UnmapResources - {"cuD3D9UnmapResources", {"hipD3D9UnmapResources", "", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D9UnregisterResource - {"cuD3D9UnregisterResource", {"hipD3D9UnregisterResource", "", CONV_D3D9, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.31. Direct3D 10 Interoperability - // cudaD3D10GetDevice - {"cuD3D10GetDevice", {"hipD3D10GetDevice", "", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D10GetDevices - {"cuD3D10GetDevices", {"hipD3D10GetDevices", "", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphicsD3D10RegisterResource - {"cuGraphicsD3D10RegisterResource", {"hipGraphicsD3D10RegisterResource", "", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.31. Direct3D 10 Interoperability [DEPRECATED] - // no analogue - {"cuD3D10CtxCreate", {"hipD3D10CtxCreate", "", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuD3D10CtxCreateOnDevice", {"hipD3D10CtxCreateOnDevice", "", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D10GetDirect3DDevice - {"cuD3D10GetDirect3DDevice", {"hipD3D10GetDirect3DDevice", "", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D10MapResources - {"cuD3D10MapResources", {"hipD3D10MapResources", "", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D10RegisterResource - {"cuD3D10RegisterResource", {"hipD3D10RegisterResource", "", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D10ResourceGetMappedArray - {"cuD3D10ResourceGetMappedArray", {"hipD3D10ResourceGetMappedArray", "", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D10ResourceGetMappedPitch - {"cuD3D10ResourceGetMappedPitch", {"hipD3D10ResourceGetMappedPitch", "", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D10ResourceGetMappedPointer - {"cuD3D10ResourceGetMappedPointer", {"hipD3D10ResourceGetMappedPointer", "", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D10ResourceGetMappedSize - {"cuD3D10ResourceGetMappedSize", {"hipD3D10ResourceGetMappedSize", "", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D10ResourceGetSurfaceDimensions - {"cuD3D10ResourceGetSurfaceDimensions", {"hipD3D10ResourceGetSurfaceDimensions", "", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D10ResourceSetMapFlags - {"cuD310ResourceSetMapFlags", {"hipD3D10ResourceSetMapFlags", "", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D10UnmapResources - {"cuD3D10UnmapResources", {"hipD3D10UnmapResources", "", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D10UnregisterResource - {"cuD3D10UnregisterResource", {"hipD3D10UnregisterResource", "", CONV_D3D10, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.32. Direct3D 11 Interoperability - // cudaD3D11GetDevice - {"cuD3D11GetDevice", {"hipD3D11GetDevice", "", CONV_D3D11, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D11GetDevices - {"cuD3D11GetDevices", {"hipD3D11GetDevices", "", CONV_D3D11, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphicsD3D11RegisterResource - {"cuGraphicsD3D11RegisterResource", {"hipGraphicsD3D11RegisterResource", "", CONV_D3D11, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.32. Direct3D 11 Interoperability [DEPRECATED] - // no analogue - {"cuD3D11CtxCreate", {"hipD3D11CtxCreate", "", CONV_D3D11, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuD3D11CtxCreateOnDevice", {"hipD3D11CtxCreateOnDevice", "", CONV_D3D11, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaD3D11GetDirect3DDevice - {"cuD3D11GetDirect3DDevice", {"hipD3D11GetDirect3DDevice", "", CONV_D3D11, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.33. VDPAU Interoperability - // cudaGraphicsVDPAURegisterOutputSurface - {"cuGraphicsVDPAURegisterOutputSurface", {"hipGraphicsVDPAURegisterOutputSurface", "", CONV_VDPAU, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphicsVDPAURegisterVideoSurface - {"cuGraphicsVDPAURegisterVideoSurface", {"hipGraphicsVDPAURegisterVideoSurface", "", CONV_VDPAU, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaVDPAUGetDevice - {"cuVDPAUGetDevice", {"hipVDPAUGetDevice", "", CONV_VDPAU, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"cuVDPAUCtxCreate", {"hipVDPAUCtxCreate", "", CONV_VDPAU, API_DRIVER, HIP_UNSUPPORTED}}, - - // 5.34. EGL Interoperability - // cudaEGLStreamConsumerAcquireFrame - {"cuEGLStreamConsumerAcquireFrame", {"hipEGLStreamConsumerAcquireFrame", "", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaEGLStreamConsumerConnect - {"cuEGLStreamConsumerConnect", {"hipEGLStreamConsumerConnect", "", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaEGLStreamConsumerConnectWithFlags - {"cuEGLStreamConsumerConnectWithFlags", {"hipEGLStreamConsumerConnectWithFlags", "", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaEGLStreamConsumerDisconnect - {"cuEGLStreamConsumerDisconnect", {"hipEGLStreamConsumerDisconnect", "", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaEGLStreamConsumerReleaseFrame - {"cuEGLStreamConsumerReleaseFrame", {"hipEGLStreamConsumerReleaseFrame", "", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaEGLStreamProducerConnect - {"cuEGLStreamProducerConnect", {"hipEGLStreamProducerConnect", "", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaEGLStreamProducerDisconnect - {"cuEGLStreamProducerDisconnect", {"hipEGLStreamProducerDisconnect", "", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaEGLStreamProducerPresentFrame - {"cuEGLStreamProducerPresentFrame", {"hipEGLStreamProducerPresentFrame", "", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaEGLStreamProducerReturnFrame - {"cuEGLStreamProducerReturnFrame", {"hipEGLStreamProducerReturnFrame", "", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphicsEGLRegisterImage - {"cuGraphicsEGLRegisterImage", {"hipGraphicsEGLRegisterImage", "", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphicsResourceGetMappedEglFrame - {"cuGraphicsResourceGetMappedEglFrame", {"hipGraphicsResourceGetMappedEglFrame", "", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaEventCreateFromEGLSync - {"cuEventCreateFromEGLSync", {"hipEventCreateFromEGLSync", "", CONV_EGL, API_DRIVER, HIP_UNSUPPORTED}}, -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_Driver_API_types.cpp b/hipamd/hipify-clang/src/CUDA2HIP_Driver_API_types.cpp deleted file mode 100644 index 054de19800..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_Driver_API_types.cpp +++ /dev/null @@ -1,1617 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Maps the names of CUDA DRIVER API types to the corresponding HIP types -const std::map CUDA_DRIVER_TYPE_NAME_MAP{ - - // 1. Structs - - {"CUDA_ARRAY3D_DESCRIPTOR_st", {"HIP_ARRAY3D_DESCRIPTOR", "", CONV_TYPE, API_DRIVER}}, - {"CUDA_ARRAY3D_DESCRIPTOR", {"HIP_ARRAY3D_DESCRIPTOR", "", CONV_TYPE, API_DRIVER}}, - - {"CUDA_ARRAY_DESCRIPTOR_st", {"HIP_ARRAY_DESCRIPTOR", "", CONV_TYPE, API_DRIVER}}, - {"CUDA_ARRAY_DESCRIPTOR", {"HIP_ARRAY_DESCRIPTOR", "", CONV_TYPE, API_DRIVER}}, - - // cudaExternalMemoryBufferDesc - {"CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st", {"HIP_EXTERNAL_MEMORY_BUFFER_DESC", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUDA_EXTERNAL_MEMORY_BUFFER_DESC", {"HIP_EXTERNAL_MEMORY_BUFFER_DESC", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // cudaExternalMemoryHandleDesc - {"CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st", {"HIP_EXTERNAL_MEMORY_HANDLE_DESC", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUDA_EXTERNAL_MEMORY_HANDLE_DESC", {"HIP_EXTERNAL_MEMORY_HANDLE_DESC", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // cudaExternalMemoryMipmappedArrayDesc - {"CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st", {"HIP_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC", {"HIP_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // cudaExternalSemaphoreHandleDesc - {"CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st", {"HIP_EXTERNAL_SEMAPHORE_HANDLE_DESC", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC", {"HIP_EXTERNAL_SEMAPHORE_HANDLE_DESC", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // cudaExternalSemaphoreSignalParams - {"CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st", {"HIP_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS", {"HIP_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // cudaExternalSemaphoreWaitParams - {"CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st", {"HIP_EXTERNAL_SEMAPHORE_WAIT_PARAMS", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS", {"HIP_EXTERNAL_SEMAPHORE_WAIT_PARAMS", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // cudaHostNodeParams - {"CUDA_HOST_NODE_PARAMS_st", {"hipHostNodeParams", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUDA_HOST_NODE_PARAMS", {"hipHostNodeParams", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // cudaKernelNodeParams - {"CUDA_KERNEL_NODE_PARAMS_st", {"hipKernelNodeParams", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUDA_KERNEL_NODE_PARAMS", {"hipKernelNodeParams", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // no analogue - // NOTE: cudaLaunchParams struct differs - {"CUDA_LAUNCH_PARAMS_st", {"hipLaunchParams", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUDA_LAUNCH_PARAMS", {"hipLaunchParams", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - {"CUDA_MEMCPY2D_st", {"hip_Memcpy2D", "", CONV_TYPE, API_DRIVER}}, - {"CUDA_MEMCPY2D", {"hip_Memcpy2D", "", CONV_TYPE, API_DRIVER}}, - - // no analogue - {"CUDA_MEMCPY3D_st", {"hip_Memcpy3D", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUDA_MEMCPY3D", {"hip_Memcpy3D", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - {"CUDA_MEMCPY3D_PEER_st", {"hip_Memcpy3D_Peer", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUDA_MEMCPY3D_PEER", {"hip_Memcpy3D_Peer", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // cudaMemsetParams - {"CUDA_MEMSET_NODE_PARAMS_st", {"hipMemsetParams", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUDA_MEMSET_NODE_PARAMS", {"hipMemsetParams", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - {"CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st", {"HIP_POINTER_ATTRIBUTE_P2P_TOKENS", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUDA_POINTER_ATTRIBUTE_P2P_TOKENS", {"HIP_POINTER_ATTRIBUTE_P2P_TOKENS", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // no analogue - // NOTE: cudaResourceDesc struct differs - {"CUDA_RESOURCE_DESC_st", {"HIP_RESOURCE_DESC", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUDA_RESOURCE_DESC", {"HIP_RESOURCE_DESC", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // cudaResourceViewDesc - // NOTE: cudaResourceViewDesc hasn't reserved bytes in the end - {"CUDA_RESOURCE_VIEW_DESC_st", {"HIP_RESOURCE_VIEW_DESC", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUDA_RESOURCE_VIEW_DESC", {"HIP_RESOURCE_VIEW_DESC", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // no analogue - // NOTE: cudaTextureDesc differs - {"CUDA_TEXTURE_DESC_st", {"HIP_TEXTURE_DESC", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUDA_TEXTURE_DESC", {"HIP_TEXTURE_DESC", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // no analogue - // NOTE: cudaDeviceProp differs - {"CUdevprop_st", {"hipDeviceProp_t", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUdevprop", {"hipDeviceProp_t", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // cudaIpcEventHandle_st - {"CUipcEventHandle_st", {"ihipIpcEventHandle_t", "", CONV_TYPE, API_DRIVER}}, - // cudaIpcEventHandle_t - {"CUipcEventHandle", {"ihipIpcEventHandle_t", "", CONV_TYPE, API_DRIVER}}, - - // cudaIpcMemHandle_st - {"CUipcMemHandle_st", {"hipIpcMemHandle_st", "", CONV_TYPE, API_DRIVER}}, - // cudaIpcMemHandle_t - {"CUipcMemHandle", {"hipIpcMemHandle_t", "", CONV_TYPE, API_DRIVER}}, - - // CUDA: "The types CUarray and cudaArray * represent the same data type and may be used interchangeably by casting the two types between each other." - // cudaArray - {"CUarray_st", {"hipArray", "", CONV_TYPE, API_DRIVER}}, - // cudaArray_t - {"CUarray", {"hipArray *", "", CONV_TYPE, API_DRIVER}}, - - // no analogue - {"CUctx_st", {"ihipCtx_t", "", CONV_TYPE, API_DRIVER}}, - {"CUcontext", {"hipCtx_t", "", CONV_TYPE, API_DRIVER}}, - - // CUeglStreamConnection_st - {"CUeglStreamConnection_st", {"hipEglStreamConnection", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaEglStreamConnection - {"CUeglStreamConnection", {"hipEglStreamConnection *", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // the same - CUevent_st - {"CUevent_st", {"ihipEvent_t", "", CONV_TYPE, API_DRIVER}}, - // cudaEvent_t - {"CUevent", {"hipEvent_t", "", CONV_TYPE, API_DRIVER}}, - - // CUexternalMemory_st - {"CUextMemory_st", {"hipExtMemory_st", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaExternalMemory_t - {"CUexternalMemory", {"hipExternalMemory", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // CUexternalSemaphore_st - {"CUextSemaphore_st", {"hipExtSemaphore_st", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaExternalSemaphore_t - {"CUexternalSemaphore", {"hipExternalSemaphore", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // no analogue - {"CUfunc_st", {"ihipModuleSymbol_t", "", CONV_TYPE, API_DRIVER}}, - {"CUfunction", {"hipFunction_t", "", CONV_TYPE, API_DRIVER}}, - - // the same - CUgraph_st - {"CUgraph_st", {"hipGraph_st", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraph_t - {"CUgraph", {"hipGraph", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // the same -CUgraphExec_st - {"CUgraphExec_st", {"hipGraphExec_st", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphExec_t - {"CUgraphExec", {"hipGraphExec", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // cudaGraphicsResource - {"CUgraphicsResource_st", {"hipGraphicsResource_st", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphicsResource_t - {"CUgraphicsResource", {"hipGraphicsResource_t", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // the same - CUgraphNode_st - {"CUgraphNode_st", {"hipGraphNode_st", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphNode_t - {"CUgraphNode", {"hipGraphNode", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // cudaMipmappedArray - {"CUmipmappedArray_st", {"hipMipmappedArray_st", "", CONV_TYPE, API_DRIVER}}, - // cudaMipmappedArray_t - {"CUmipmappedArray", {"hipMipmappedArray_t", "", CONV_TYPE, API_DRIVER}}, - - // no analogue - {"CUmod_st", {"ihipModule_t", "", CONV_TYPE, API_DRIVER}}, - {"CUmodule", {"hipModule_t", "", CONV_TYPE, API_DRIVER}}, - - // the same - CUstream_st - {"CUstream_st", {"ihipStream_t", "", CONV_TYPE, API_DRIVER}}, - // cudaStream_t - {"CUstream", {"hipStream_t", "", CONV_TYPE, API_DRIVER}}, - - // NOTE: possibly surfaceReference is analogue - {"CUsurfref_st", {"ihipSurfaceReference_t", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUsurfref", {"hipSurfaceReference_t", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // textureReference - {"CUtexref_st", {"textureReference", "", CONV_TYPE, API_DRIVER}}, - {"CUtexref", {"hipTextureReference_t", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // CUuuid_st - // NOTE: the same struct and its name - {"CUuuid_st", {"hipUUID", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUuuid", {"hipUUID", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // no analogue - {"CUmemLocation_st", {"hipMemoryLocation", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUmemLocation", {"hipMemoryLocation", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // no analogue - {"CUmemAllocationProp_st", {"hipMemoryAllocationProperties", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUmemAllocationProp", {"hipMemoryAllocationProperties", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // no analogue - {"CUmemAccessDesc_st", {"hipMemoryAccessDescription", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUmemAccessDesc", {"hipMemoryAccessDescription", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // 2. Unions - - {"CUstreamBatchMemOpParams", {"hipStreamBatchMemOpParams", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUstreamBatchMemOpParams_union", {"hipStreamBatchMemOpParams", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // 3. Enums - {"CUaddress_mode", {"hipTextureAddressMode", "", CONV_TYPE, API_DRIVER}}, - {"CUaddress_mode_enum", {"hipTextureAddressMode", "", CONV_TYPE, API_DRIVER}}, - // CUaddress_mode enum values - {"CU_TR_ADDRESS_MODE_WRAP", {"hipAddressModeWrap", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0 - {"CU_TR_ADDRESS_MODE_CLAMP", {"hipAddressModeClamp", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 1 - {"CU_TR_ADDRESS_MODE_MIRROR", {"hipAddressModeMirror", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 2 - {"CU_TR_ADDRESS_MODE_BORDER", {"hipAddressModeBorder", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 3 - - {"CUarray_cubemap_face", {"hipGraphicsCubeFace", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUarray_cubemap_face_enum", {"hipGraphicsCubeFace", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUarray_cubemap_face enum values - // cudaGraphicsCubeFacePositiveX - {"CU_CUBEMAP_FACE_POSITIVE_X", {"hipGraphicsCubeFacePositiveX", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x00 - // cudaGraphicsCubeFaceNegativeX - {"CU_CUBEMAP_FACE_NEGATIVE_X", {"hipGraphicsCubeFaceNegativeX", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - // cudaGraphicsCubeFacePositiveY - {"CU_CUBEMAP_FACE_POSITIVE_Y", {"hipGraphicsCubeFacePositiveY", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x02 - // cudaGraphicsCubeFaceNegativeY - {"CU_CUBEMAP_FACE_NEGATIVE_Y", {"hipGraphicsCubeFaceNegativeY", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x03 - // cudaGraphicsCubeFacePositiveZ - {"CU_CUBEMAP_FACE_POSITIVE_Z", {"hipGraphicsCubeFacePositiveZ", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x04 - // cudaGraphicsCubeFaceNegativeZ - {"CU_CUBEMAP_FACE_NEGATIVE_Z", {"hipGraphicsCubeFaceNegativeZ", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x05 - - {"CUarray_format", {"hipArray_format", "", CONV_TYPE, API_DRIVER}}, - {"CUarray_format_enum", {"hipArray_format", "", CONV_TYPE, API_DRIVER}}, - // CUarray_format enum values - {"CU_AD_FORMAT_UNSIGNED_INT8", {"HIP_AD_FORMAT_UNSIGNED_INT8", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x01 - {"CU_AD_FORMAT_UNSIGNED_INT16", {"HIP_AD_FORMAT_UNSIGNED_INT16", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x02 - {"CU_AD_FORMAT_UNSIGNED_INT32", {"HIP_AD_FORMAT_UNSIGNED_INT32", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x03 - {"CU_AD_FORMAT_SIGNED_INT8", {"HIP_AD_FORMAT_SIGNED_INT8", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x08 - {"CU_AD_FORMAT_SIGNED_INT16", {"HIP_AD_FORMAT_SIGNED_INT16", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x09 - {"CU_AD_FORMAT_SIGNED_INT32", {"HIP_AD_FORMAT_SIGNED_INT32", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x0a - {"CU_AD_FORMAT_HALF", {"HIP_AD_FORMAT_HALF", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x10 - {"CU_AD_FORMAT_FLOAT", {"HIP_AD_FORMAT_FLOAT", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x20 - - // cudaComputeMode - {"CUcomputemode", {"hipComputeMode", "", CONV_TYPE, API_DRIVER}}, - {"CUcomputemode_enum", {"hipComputeMode", "", CONV_TYPE, API_DRIVER}}, - // CUcomputemode enum values - // cudaComputeModeDefault - {"CU_COMPUTEMODE_DEFAULT", {"hipComputeModeDefault", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0 - // cudaComputeModeExclusive - // NOTE: Deprecated since CUDA 10.0 - {"CU_COMPUTEMODE_EXCLUSIVE", {"hipComputeModeExclusive", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 1 - // cudaComputeModeProhibited - {"CU_COMPUTEMODE_PROHIBITED", {"hipComputeModeProhibited", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 2 - // cudaComputeModeExclusiveProcess - {"CU_COMPUTEMODE_EXCLUSIVE_PROCESS", {"hipComputeModeExclusiveProcess", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 3 - - {"CUctx_flags", {"hipCctx_flags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUctx_flags_enum", {"hipCctx_flags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUctx_flags enum values - // cudaDeviceScheduleAuto - {"CU_CTX_SCHED_AUTO", {"hipDeviceScheduleAuto", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x00 - // cudaDeviceScheduleSpin - {"CU_CTX_SCHED_SPIN", {"hipDeviceScheduleSpin", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x01 - // cudaDeviceScheduleYield - {"CU_CTX_SCHED_YIELD", {"hipDeviceScheduleYield", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x02 - // cudaDeviceScheduleBlockingSync - {"CU_CTX_SCHED_BLOCKING_SYNC", {"hipDeviceScheduleBlockingSync", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x04 - // cudaDeviceBlockingSync - // NOTE: Deprecated since CUDA 4.0 and replaced with CU_CTX_SCHED_BLOCKING_SYNC - {"CU_CTX_BLOCKING_SYNC", {"hipDeviceScheduleBlockingSync", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x04 - // cudaDeviceScheduleMask - {"CU_CTX_SCHED_MASK", {"hipDeviceScheduleMask", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x07 - // cudaDeviceMapHost - {"CU_CTX_MAP_HOST", {"hipDeviceMapHost", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x08 - // cudaDeviceLmemResizeToMax - {"CU_CTX_LMEM_RESIZE_TO_MAX", {"hipDeviceLmemResizeToMax", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x10 - // cudaDeviceMask - {"CU_CTX_FLAGS_MASK", {"hipDeviceMask", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x1f - - // cudaDeviceAttr - {"CUdevice_attribute", {"hipDeviceAttribute_t", "", CONV_TYPE, API_DRIVER}}, - {"CUdevice_attribute_enum", {"hipDeviceAttribute_t", "", CONV_TYPE, API_DRIVER}}, - // CUdevice_attribute enum values - // cudaDevAttrMaxThreadsPerBlock - {"CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK", {"hipDeviceAttributeMaxThreadsPerBlock", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 1 - // cudaDevAttrMaxBlockDimX - {"CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X", {"hipDeviceAttributeMaxBlockDimX", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 2 - // cudaDevAttrMaxBlockDimY - {"CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y", {"hipDeviceAttributeMaxBlockDimY", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 3 - // cudaDevAttrMaxBlockDimZ - {"CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z", {"hipDeviceAttributeMaxBlockDimZ", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 4 - // cudaDevAttrMaxGridDimX - {"CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X", {"hipDeviceAttributeMaxGridDimX", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 5 - // cudaDevAttrMaxGridDimY - {"CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y", {"hipDeviceAttributeMaxGridDimY", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 6 - // cudaDevAttrMaxGridDimZ - {"CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z", {"hipDeviceAttributeMaxGridDimZ", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 7 - // cudaDevAttrMaxSharedMemoryPerBlock - {"CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK", {"hipDeviceAttributeMaxSharedMemoryPerBlock", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 8 - // no analogue - // NOTE: Deprecated, use CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK - {"CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK", {"hipDeviceAttributeMaxSharedMemoryPerBlock", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 8 - // cudaDevAttrTotalConstantMemory - {"CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY", {"hipDeviceAttributeTotalConstantMemory", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 9 - // cudaDevAttrWarpSize - {"CU_DEVICE_ATTRIBUTE_WARP_SIZE", {"hipDeviceAttributeWarpSize", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 10 - // cudaDevAttrMaxPitch - {"CU_DEVICE_ATTRIBUTE_MAX_PITCH", {"hipDeviceAttributeMaxPitch", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 11 - // cudaDevAttrMaxRegistersPerBlock - {"CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK", {"hipDeviceAttributeMaxRegistersPerBlock", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 12 - // no analogue - {"CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK", {"hipDeviceAttributeMaxRegistersPerBlock", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 12 - // cudaDevAttrClockRate - {"CU_DEVICE_ATTRIBUTE_CLOCK_RATE", {"hipDeviceAttributeClockRate", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 13 - // cudaDevAttrTextureAlignment - {"CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT", {"hipDeviceAttributeTextureAlignment", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 14 - // cudaDevAttrGpuOverlap - // NOTE: Deprecated, use instead CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT - {"CU_DEVICE_ATTRIBUTE_GPU_OVERLAP", {"hipDeviceAttributeAsyncEngineCount", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 15 - // cudaDevAttrMultiProcessorCount - {"CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT", {"hipDeviceAttributeMultiprocessorCount", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 16 - // cudaDevAttrKernelExecTimeout - {"CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT", {"hipDeviceAttributeKernelExecTimeout", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 17 - // cudaDevAttrIntegrated - {"CU_DEVICE_ATTRIBUTE_INTEGRATED", {"hipDeviceAttributeIntegrated", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 18 - // cudaDevAttrCanMapHostMemory - {"CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY", {"hipDeviceAttributeCanMapHostMemory", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 19 - // cudaDevAttrComputeMode - {"CU_DEVICE_ATTRIBUTE_COMPUTE_MODE", {"hipDeviceAttributeComputeMode", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 20 - // cudaDevAttrMaxTexture1DWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH", {"hipDeviceAttributeMaxTexture1DWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 21 - // cudaDevAttrMaxTexture2DWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH", {"hipDeviceAttributeMaxTexture2DWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 22 - // cudaDevAttrMaxTexture2DHeight - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT", {"hipDeviceAttributeMaxTexture2DHeight", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 23 - // cudaDevAttrMaxTexture3DWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH", {"hipDeviceAttributeMaxTexture3DWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 24 - // cudaDevAttrMaxTexture3DHeight - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT", {"hipDeviceAttributeMaxTexture3DHeight", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 25 - // cudaDevAttrMaxTexture3DDepth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH", {"hipDeviceAttributeMaxTexture3DDepth", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 26 - // cudaDevAttrMaxTexture2DLayeredWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH", {"hipDeviceAttributeMaxTexture2DLayeredWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 27 - // cudaDevAttrMaxTexture2DLayeredHeight - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT", {"hipDeviceAttributeMaxTexture2DLayeredHeight", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 28 - // cudaDevAttrMaxTexture2DLayeredLayers - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS", {"hipDeviceAttributeMaxTexture2DLayeredLayers", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 29 - // cudaDevAttrMaxTexture2DLayeredWidth - // NOTE: Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH", {"hipDeviceAttributeMaxTexture2DLayeredWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 27 - // cudaDevAttrMaxTexture2DLayeredHeight - // NOTE: Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT", {"hipDeviceAttributeMaxTexture2DLayeredHeight", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 28 - // cudaDevAttrMaxTexture2DLayeredLayers - // NOTE: Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES", {"hipDeviceAttributeMaxTexture2DLayeredLayers", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 29 - // cudaDevAttrSurfaceAlignment - {"CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT", {"hipDeviceAttributeSurfaceAlignment", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 30 - // cudaDevAttrConcurrentKernels - {"CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS", {"hipDeviceAttributeConcurrentKernels", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 31 - // cudaDevAttrEccEnabled - {"CU_DEVICE_ATTRIBUTE_ECC_ENABLED", {"hipDeviceAttributeEccEnabled", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 32 - // cudaDevAttrPciBusId - {"CU_DEVICE_ATTRIBUTE_PCI_BUS_ID", {"hipDeviceAttributePciBusId", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 33 - // cudaDevAttrPciDeviceId - {"CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID", {"hipDeviceAttributePciDeviceId", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 34 - // cudaDevAttrTccDriver - {"CU_DEVICE_ATTRIBUTE_TCC_DRIVER", {"hipDeviceAttributeTccDriver", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 35 - // cudaDevAttrMemoryClockRate - {"CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE", {"hipDeviceAttributeMemoryClockRate", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 36 - // cudaDevAttrGlobalMemoryBusWidth - {"CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH", {"hipDeviceAttributeMemoryBusWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 37 - // cudaDevAttrL2CacheSize - {"CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE", {"hipDeviceAttributeL2CacheSize", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 38 - // cudaDevAttrMaxThreadsPerMultiProcessor - {"CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR", {"hipDeviceAttributeMaxThreadsPerMultiProcessor", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 39 - // cudaDevAttrAsyncEngineCount - {"CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT", {"hipDeviceAttributeAsyncEngineCount", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 40 - // cudaDevAttrUnifiedAddressing - {"CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING", {"hipDeviceAttributeUnifiedAddressing", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 41 - // cudaDevAttrMaxTexture1DLayeredWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH", {"hipDeviceAttributeMaxTexture1DLayeredWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 42 - // cudaDevAttrMaxTexture1DLayeredLayers - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS", {"hipDeviceAttributeMaxTexture1DLayeredLayers", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 43 - // no analogue - // NOTE: Deprecated, do not use - {"CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER", {"hipDeviceAttributeCanTex2DGather", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 44 - // cudaDevAttrMaxTexture2DGatherWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH", {"hipDeviceAttributeMaxTexture2DGatherWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 45 - // cudaDevAttrMaxTexture2DGatherHeight - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT", {"hipDeviceAttributeMaxTexture2DGatherHeight", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 46 - // cudaDevAttrMaxTexture3DWidthAlt - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE", {"hipDeviceAttributeMaxTexture3DWidthAlternate", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 47 - // cudaDevAttrMaxTexture3DHeightAlt - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE", {"hipDeviceAttributeMaxTexture3DHeightAlternate", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 48 - // cudaDevAttrMaxTexture3DDepthAlt - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE", {"hipDeviceAttributeMaxTexture3DDepthAlternate", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 49 - // cudaDevAttrPciDomainId - {"CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID", {"hipDeviceAttributePciDomainId", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 50 - // cudaDevAttrTexturePitchAlignment - {"CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT", {"hipDeviceAttributeTexturePitchAlignment", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 51 - // cudaDevAttrMaxTextureCubemapWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH", {"hipDeviceAttributeMaxTextureCubemapWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 52 - // cudaDevAttrMaxTextureCubemapLayeredWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH", {"hipDeviceAttributeMaxTextureCubemapLayeredWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 53 - // cudaDevAttrMaxTextureCubemapLayeredLayers - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS", {"hipDeviceAttributeMaxTextureCubemapLayeredLayers", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 54 - // cudaDevAttrMaxSurface1DWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH", {"hipDeviceAttributeMaxSurface1DWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 55 - // cudaDevAttrMaxSurface2DWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH", {"hipDeviceAttributeMaxSurface2DWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 56 - // cudaDevAttrMaxSurface2DHeight - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT", {"hipDeviceAttributeMaxSurface2DHeight", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 57 - // cudaDevAttrMaxSurface3DWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH", {"hipDeviceAttributeMaxSurface3DWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 58 - // cudaDevAttrMaxSurface3DHeight - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT", {"hipDeviceAttributeMaxSurface3DHeight", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 59 - // cudaDevAttrMaxSurface3DDepth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH", {"hipDeviceAttributeMaxSurface3DDepth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 60 - // cudaDevAttrMaxSurface1DLayeredWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH", {"hipDeviceAttributeMaxSurface1DLayeredWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 61 - // cudaDevAttrMaxSurface1DLayeredLayers - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS", {"hipDeviceAttributeMaxSurface1DLayeredLayers", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 62 - // cudaDevAttrMaxSurface2DLayeredWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH", {"hipDeviceAttributeMaxSurface2DLayeredWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 63 - // cudaDevAttrMaxSurface2DLayeredHeight - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT", {"hipDeviceAttributeMaxSurface2DLayeredHeight", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 64 - // cudaDevAttrMaxSurface2DLayeredLayers - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS", {"hipDeviceAttributeMaxSurface2DLayeredLayers", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 65 - // cudaDevAttrMaxSurfaceCubemapWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH", {"hipDeviceAttributeMaxSurfaceCubemapWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 66 - // cudaDevAttrMaxSurfaceCubemapLayeredWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH", {"hipDeviceAttributeMaxSurfaceCubemapLayeredWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 67 - // cudaDevAttrMaxSurfaceCubemapLayeredLayers - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS", {"hipDeviceAttributeMaxSurfaceCubemapLayeredLayers", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 68 - // cudaDevAttrMaxTexture1DLinearWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH", {"hipDeviceAttributeMaxTexture1DLinearWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 69 - // cudaDevAttrMaxTexture2DLinearWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH", {"hipDeviceAttributeMaxTexture2DLinearWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 70 - // cudaDevAttrMaxTexture2DLinearHeight - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT", {"hipDeviceAttributeMaxTexture2DLinearHeight", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 71 - // cudaDevAttrMaxTexture2DLinearPitch - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH", {"hipDeviceAttributeMaxTexture2DLinearPitch", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 72 - // cudaDevAttrMaxTexture2DMipmappedWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH", {"hipDeviceAttributeMaxTexture2DMipmappedWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 73 - // cudaDevAttrMaxTexture2DMipmappedHeight - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT", {"hipDeviceAttributeMaxTexture2DMipmappedHeight", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 74 - // cudaDevAttrComputeCapabilityMajor - {"CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR", {"hipDeviceAttributeComputeCapabilityMajor", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 75 - // cudaDevAttrComputeCapabilityMinor - {"CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR", {"hipDeviceAttributeComputeCapabilityMinor", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 76 - // cudaDevAttrMaxTexture1DMipmappedWidth - {"CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH", {"hipDeviceAttributeMaxTexture1DMipmappedWidth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 77 - // cudaDevAttrStreamPrioritiesSupported - {"CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED", {"hipDeviceAttributeStreamPrioritiesSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 78 - // cudaDevAttrGlobalL1CacheSupported - {"CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED", {"hipDeviceAttributeGlobalL1CacheSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 79 - // cudaDevAttrLocalL1CacheSupported - {"CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED", {"hipDeviceAttributeLocalL1CacheSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 80 - // cudaDevAttrMaxSharedMemoryPerMultiprocessor - {"CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR", {"hipDeviceAttributeMaxSharedMemoryPerMultiprocessor", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 81 - // cudaDevAttrMaxRegistersPerMultiprocessor - {"CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR", {"hipDeviceAttributeMaxRegistersPerMultiprocessor", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 82 - // cudaDevAttrManagedMemory - {"CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY", {"hipDeviceAttributeManagedMemory", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 83 - // cudaDevAttrIsMultiGpuBoard - {"CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD", {"hipDeviceAttributeIsMultiGpuBoard", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 84 - // cudaDevAttrMultiGpuBoardGroupID - {"CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID", {"hipDeviceAttributeMultiGpuBoardGroupId", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 85 - // cudaDevAttrHostNativeAtomicSupported - {"CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED", {"hipDeviceAttributeHostNativeAtomicSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 86 - // cudaDevAttrSingleToDoublePrecisionPerfRatio - {"CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO", {"hipDeviceAttributeSingleToDoublePrecisionPerfRatio", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 87 - // cudaDevAttrPageableMemoryAccess - {"CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS", {"hipDeviceAttributePageableMemoryAccess", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 88 - // cudaDevAttrConcurrentManagedAccess - {"CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS", {"hipDeviceAttributeConcurrentManagedAccess", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 89 - // cudaDevAttrComputePreemptionSupported - {"CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED", {"hipDeviceAttributeComputePreemptionSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 90 - // cudaDevAttrCanUseHostPointerForRegisteredMem - {"CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM", {"hipDeviceAttributeCanUseHostPointerForRegisteredMem", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 91 - // no analogue: cudaDevAttrReserved92 - {"CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS", {"hipDeviceAttributeCanUseStreamMemOps", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 92 - // no analogue: cudaDevAttrReserved93 - {"CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS", {"hipDeviceAttributeCanUse64BitStreamMemOps", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 93 - // no analogue: cudaDevAttrReserved94 - {"CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR", {"hipDeviceAttributeCanUseStreamWaitValueNor", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 94 - // cudaDevAttrCooperativeLaunch - {"CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH", {"hipDeviceAttributeCooperativeLaunch", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 95 - // cudaDevAttrCooperativeMultiDeviceLaunch - {"CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH", {"hipDeviceAttributeCooperativeMultiDeviceLaunch", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 96 - // cudaDevAttrMaxSharedMemoryPerBlockOptin - {"CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN", {"hipDeviceAttributeMaxSharedMemoryPerBlockOptin", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 97 - // cudaDevAttrCanFlushRemoteWrites - {"CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES", {"hipDeviceAttributeCanFlushRemoteWrites", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 98 - // cudaDevAttrHostRegisterSupported - {"CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED", {"hipDeviceAttributeHostRegisterSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 99 - // cudaDevAttrPageableMemoryAccessUsesHostPageTables - {"CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES", {"hipDeviceAttributePageableMemoryAccessUsesHostPageTables", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 100 - // cudaDevAttrDirectManagedMemAccessFromHost - {"CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST", {"hipDeviceAttributeDirectManagedMemAccessFromHost", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 101 - // no analogue - {"CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED", {"hipDeviceAttributeVirtualAddressManagementSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 102 - // no analogue - {"CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED", {"hipDeviceAttributeHandleTypePosixFileDescriptorSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 103 - // no analogue - {"CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED", {"hipDeviceAttributeHandleTypeWin32HandleSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 104 - // no analogue - {"CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED", {"hipDeviceAttributeHandleTypeWin32KmtHandleSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 105 - // no analogue - {"CU_DEVICE_ATTRIBUTE_MAX", {"hipDeviceAttributeMax", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 106 - - // cudaDeviceP2PAttr - {"CUdevice_P2PAttribute", {"hipDeviceP2PAttribute", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUdevice_P2PAttribute_enum", {"hipDeviceP2PAttribute", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUdevice_P2PAttribute enum values - // cudaDevP2PAttrPerformanceRank = 1 - {"CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK", {"hipDeviceP2PAttributePerformanceRank", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - // cudaDevP2PAttrAccessSupported = 2 - {"CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED", {"hipDeviceP2PAttributeAccessSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x02 - // cudaDevP2PAttrNativeAtomicSupported = 3 - {"CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED", {"hipDeviceP2PAttributeNativeAtomicSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x03 - // cudaDevP2PAttrCudaArrayAccessSupported = 4 - // NOTE" deprecated, use CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED instead - {"CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED", {"hipDevP2PAttributeCudaArrayAccessSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x04 - // NOTE" deprecated, use CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED instead - {"CU_DEVICE_P2P_ATTRIBUTE_ARRAY_ACCESS_ACCESS_SUPPORTED", {"hipDevP2PAttributeCudaArrayAccessSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x04 - // cudaDevP2PAttrCudaArrayAccessSupported = 4 - {"CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED", {"hipDevP2PAttributeCudaArrayAccessSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x04 - - // cudaEGL.h - presented only on Linux in nvidia-cuda-dev package - // cudaEglColorFormat - {"CUeglColorFormat", {"hipEglColorFormat", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUeglColorFormate_enum", {"hipEglColorFormat", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUeglColorFormat enum values - // cudaEglColorFormatYUV420Planar = 0 - {"CU_EGL_COLOR_FORMAT_YUV420_PLANAR", {"hipEglColorFormatYUV420Planar", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x00 - // cudaEglColorFormatYUV420SemiPlanar = 1 - {"CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR", {"hipEglColorFormatYUV420SemiPlanar", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - // cudaEglColorFormatYUV422Planar = 2 - {"CU_EGL_COLOR_FORMAT_YUV422_PLANAR", {"hipEglColorFormatYUV422Planar", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x02 - // cudaEglColorFormatYUV422SemiPlanar = 3 - {"CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR", {"hipEglColorFormatYUV422SemiPlanar", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x03 - // cudaEglColorFormatRGB = 4 - {"CU_EGL_COLOR_FORMAT_RGB", {"hipEglColorFormatRGB", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x04 - // cudaEglColorFormatBGR = 5 - {"CU_EGL_COLOR_FORMAT_BGR", {"hipEglColorFormatBGR", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x05 - // cudaEglColorFormatARGB = 6 - {"CU_EGL_COLOR_FORMAT_ARGB", {"hipEglColorFormatARGB", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x06 - // cudaEglColorFormatRGBA = 7 - {"CU_EGL_COLOR_FORMAT_RGBA", {"hipEglColorFormatRGBA", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x07 - // cudaEglColorFormatL = 8 - {"CU_EGL_COLOR_FORMAT_L", {"hipEglColorFormatL", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x08 - // cudaEglColorFormatR = 9 - {"CU_EGL_COLOR_FORMAT_R", {"hipEglColorFormatR", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x09 - // cudaEglColorFormatYUV444Planar = 10 - {"CU_EGL_COLOR_FORMAT_YUV444_PLANAR", {"hipEglColorFormatYUV444Planar", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x0A - // cudaEglColorFormatYUV444SemiPlanar = 11 - {"CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR", {"hipEglColorFormatYUV444SemiPlanar", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x0B - // cudaEglColorFormatYUYV422 = 12 - {"CU_EGL_COLOR_FORMAT_YUYV_422", {"hipEglColorFormatYUYV422", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x0C - // cudaEglColorFormatUYVY422 = 13 - {"CU_EGL_COLOR_FORMAT_UYVY_422", {"hipEglColorFormatUYVY422", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x0D - // cudaEglColorFormatABGR = 14 - {"CU_EGL_COLOR_FORMAT_ABGR", {"hipEglColorFormatABGR", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x0E - // cudaEglColorFormatBGRA = 15 - {"CU_EGL_COLOR_FORMAT_BGRA", {"hipEglColorFormatBGRA", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x0F - // cudaEglColorFormatA = 16 - {"CU_EGL_COLOR_FORMAT_A", {"hipEglColorFormatA", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x10 - // cudaEglColorFormatRG = 17 - {"CU_EGL_COLOR_FORMAT_RG", {"hipEglColorFormatRG", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x11 - // cudaEglColorFormatAYUV = 18 - {"CU_EGL_COLOR_FORMAT_AYUV", {"hipEglColorFormatAYUV", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x12 - // cudaEglColorFormatYVU444SemiPlanar = 19 - {"CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR", {"hipEglColorFormatYVU444SemiPlanar", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x13 - // cudaEglColorFormatYVU422SemiPlanar = 20 - {"CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR", {"hipEglColorFormatYVU422SemiPlanar", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x14 - // cudaEglColorFormatYVU420SemiPlanar = 21 - {"CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR", {"hipEglColorFormatYVU420SemiPlanar", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x15 - // cudaEglColorFormatYVU420SemiPlanar = 22 - {"CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR", {"hipEglColorFormatY10V10U10_444SemiPlanar", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x16 - // cudaEglColorFormatY10V10U10_420SemiPlanar = 23 - {"CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR", {"hipEglColorFormatY10V10U10_420SemiPlanar", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x17 - // cudaEglColorFormatY12V12U12_444SemiPlanar = 24 - {"CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR", {"hipEglColorFormatY12V12U12_444SemiPlanar", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x18 - // cudaEglColorFormatY12V12U12_420SemiPlanar = 25 - {"CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR", {"hipEglColorFormatY12V12U12_420SemiPlanar", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x19 - // cudaEglColorFormatVYUY_ER = 26 - {"CU_EGL_COLOR_FORMAT_VYUY_ER", {"hipEglColorFormatVYUY_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x1A - // cudaEglColorFormatUYVY_ER = 27 - {"CU_EGL_COLOR_FORMAT_UYVY_ER", {"hipEglColorFormatUYVY_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x1B - // cudaEglColorFormatYUYV_ER = 28 - {"CU_EGL_COLOR_FORMAT_YUYV_ER", {"hipEglColorFormatYUYV_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x1C - // cudaEglColorFormatYVYU_ER = 29 - {"CU_EGL_COLOR_FORMAT_YVYU_ER", {"hipEglColorFormatYVYU_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x1D - // cudaEglColorFormatYUV_ER = 30 - {"CU_EGL_COLOR_FORMAT_YUV_ER", {"hipEglColorFormatYUV_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x1E - // cudaEglColorFormatYUVA_ER = 31 - {"CU_EGL_COLOR_FORMAT_YUVA_ER", {"hipEglColorFormatYUVA_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x1F - // cudaEglColorFormatAYUV_ER = 32 - {"CU_EGL_COLOR_FORMAT_AYUV_ER", {"hipEglColorFormatAYUV_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x20 - // cudaEglColorFormatYUV444Planar_ER = 33 - {"CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER", {"hipEglColorFormatYUV444Planar_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x21 - // cudaEglColorFormatYUV422Planar_ER = 34 - {"CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER", {"hipEglColorFormatYUV422Planar_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x22 - // cudaEglColorFormatYUV420Planar_ER = 35 - {"CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER", {"hipEglColorFormatYUV420Planar_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x23 - // cudaEglColorFormatYUV444SemiPlanar_ER = 36 - {"CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER", {"hipEglColorFormatYUV444SemiPlanar_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x24 - // cudaEglColorFormatYUV422SemiPlanar_ER = 37 - {"CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER", {"hipEglColorFormatYUV422SemiPlanar_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x25 - // cudaEglColorFormatYUV420SemiPlanar_ER = 38 - {"CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER", {"hipEglColorFormatYUV420SemiPlanar_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x26 - // cudaEglColorFormatYVU444Planar_ER = 39 - {"CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER", {"hipEglColorFormatYVU444Planar_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x27 - // cudaEglColorFormatYVU422Planar_ER = 40 - {"CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER", {"hipEglColorFormatYVU422Planar_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x28 - // cudaEglColorFormatYVU420Planar_ER = 41 - {"CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER", {"hipEglColorFormatYVU420Planar_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x29 - // cudaEglColorFormatYVU444SemiPlanar_ER = 42 - {"CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER", {"hipEglColorFormatYVU444SemiPlanar_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x2A - // cudaEglColorFormatYVU422SemiPlanar_ER = 43 - {"CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER", {"hipEglColorFormatYVU422SemiPlanar_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x2B - // cudaEglColorFormatYVU420SemiPlanar_ER = 44 - {"CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER", {"hipEglColorFormatYVU420SemiPlanar_ER", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x2C - // cudaEglColorFormatBayerRGGB = 45 - {"CU_EGL_COLOR_FORMAT_BAYER_RGGB", {"hipEglColorFormatBayerRGGB", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x2D - // cudaEglColorFormatBayerBGGR = 46 - {"CU_EGL_COLOR_FORMAT_BAYER_BGGR", {"hipEglColorFormatBayerBGGR", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x2E - // cudaEglColorFormatBayerGRBG = 47 - {"CU_EGL_COLOR_FORMAT_BAYER_GRBG", {"hipEglColorFormatBayerGRBG", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x2F - // cudaEglColorFormatBayerGBRG = 48 - {"CU_EGL_COLOR_FORMAT_BAYER_GBRG", {"hipEglColorFormatBayerGBRG", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x30 - // cudaEglColorFormatBayer10RGGB = 49 - {"CU_EGL_COLOR_FORMAT_BAYER10_RGGB", {"hipEglColorFormatBayer10RGGB", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x31 - // cudaEglColorFormatBayer10BGGR = 50 - {"CU_EGL_COLOR_FORMAT_BAYER10_BGGR", {"hipEglColorFormatBayer10BGGR", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x32 - // cudaEglColorFormatBayer10GRBG = 51 - {"CU_EGL_COLOR_FORMAT_BAYER10_GRBG", {"hipEglColorFormatBayer10GRBG", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x33 - // cudaEglColorFormatBayer10GBRG = 52 - {"CU_EGL_COLOR_FORMAT_BAYER10_GBRG", {"hipEglColorFormatBayer10GBRG", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x34 - // cudaEglColorFormatBayer12RGGB = 53 - {"CU_EGL_COLOR_FORMAT_BAYER12_RGGB", {"hipEglColorFormatBayer12RGGB", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x35 - // cudaEglColorFormatBayer12BGGR = 54 - {"CU_EGL_COLOR_FORMAT_BAYER12_BGGR", {"hipEglColorFormatBayer12BGGR", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x36 - // cudaEglColorFormatBayer12GRBG = 55 - {"CU_EGL_COLOR_FORMAT_BAYER12_GRBG", {"hipEglColorFormatBayer12GRBG", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x37 - // cudaEglColorFormatBayer12GBRG = 56 - {"CU_EGL_COLOR_FORMAT_BAYER12_GBRG", {"hipEglColorFormatBayer12GBRG", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x38 - // cudaEglColorFormatBayer14RGGB = 57 - {"CU_EGL_COLOR_FORMAT_BAYER14_RGGB", {"hipEglColorFormatBayer14RGGB", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x39 - // cudaEglColorFormatBayer14BGGR = 58 - {"CU_EGL_COLOR_FORMAT_BAYER14_BGGR", {"hipEglColorFormatBayer14BGGR", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x3A - // cudaEglColorFormatBayer14GRBG = 59 - {"CU_EGL_COLOR_FORMAT_BAYER14_GRBG", {"hipEglColorFormatBayer14GRBG", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x3B - // cudaEglColorFormatBayer14GBRG = 60 - {"CU_EGL_COLOR_FORMAT_BAYER14_GBRG", {"hipEglColorFormatBayer14GBRG", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x3C - // cudaEglColorFormatBayer20RGGB = 61 - {"CU_EGL_COLOR_FORMAT_BAYER20_RGGB", {"hipEglColorFormatBayer20RGGB", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x3D - // cudaEglColorFormatBayer20BGGR = 62 - {"CU_EGL_COLOR_FORMAT_BAYER20_BGGR", {"hipEglColorFormatBayer20BGGR", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x3E - // cudaEglColorFormatBayer20GRBG = 63 - {"CU_EGL_COLOR_FORMAT_BAYER20_GRBG", {"hipEglColorFormatBayer20GRBG", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x3F - // cudaEglColorFormatBayer20GBRG = 64 - {"CU_EGL_COLOR_FORMAT_BAYER20_GBRG", {"hipEglColorFormatBayer20GBRG", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x40 - // cudaEglColorFormatYVU444Planar = 65 - {"CU_EGL_COLOR_FORMAT_YVU444_PLANAR", {"hipEglColorFormatYVU444Planar", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x41 - // cudaEglColorFormatYVU422Planar = 66 - {"CU_EGL_COLOR_FORMAT_YVU422_PLANAR", {"hipEglColorFormatYVU422Planar", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x42 - // cudaEglColorFormatYVU420Planar = 67 - {"CU_EGL_COLOR_FORMAT_YVU420_PLANAR", {"hipEglColorFormatYVU420Planar", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x43 - // cudaEglColorFormatBayerIspRGGB = 68 - {"CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB", {"hipEglColorFormatBayerIspRGGB", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x44 - // cudaEglColorFormatBayerIspBGGR = 69 - {"CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR", {"hipEglColorFormatBayerIspBGGR", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x45 - // cudaEglColorFormatBayerIspGRBG = 70 - {"CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG", {"hipEglColorFormatBayerIspGRBG", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x46 - // cudaEglColorFormatBayerIspGBRG = 71 - {"CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG", {"hipEglColorFormatBayerIspGBRG", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x47 - // no analogue - {"CU_EGL_COLOR_FORMAT_MAX", {"hipEglColorFormatMax", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x48 - - // cudaEglFrameType - {"CUeglFrameType", {"hipEglFrameType", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUeglFrameType_enum", {"hipEglFrameType", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUeglFrameType enum values - // cudaEglFrameTypeArray - {"CU_EGL_FRAME_TYPE_ARRAY", {"hipEglFrameTypeArray", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0 - // cudaEglFrameTypePitch - {"CU_EGL_FRAME_TYPE_PITCH", {"hipEglFrameTypePitch", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 1 - - // cudaEglResourceLocationFlags - {"CUeglResourceLocationFlags", {"hipEglResourceLocationFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUeglResourceLocationFlags_enum", {"hipEglResourceLocationFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUeglResourceLocationFlags enum values - // cudaEglResourceLocationSysmem - {"CU_EGL_RESOURCE_LOCATION_SYSMEM", {"hipEglResourceLocationSysmem", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x00 - // cudaEglResourceLocationVidmem - {"CU_EGL_RESOURCE_LOCATION_VIDMEM", {"hipEglResourceLocationVidmem", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - - // no analogue - {"CUevent_flags", {"hipEventFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUevent_flags_enum", {"hipEventFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUevent_flags enum values - // cudaEventDefault - {"CU_EVENT_DEFAULT", {"hipEventDefault", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x00 - // cudaEventBlockingSync - {"CU_EVENT_BLOCKING_SYNC", {"hipEventBlockingSync", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x01 - // cudaEventDisableTiming - {"CU_EVENT_DISABLE_TIMING", {"hipEventDisableTiming", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x02 - // cudaEventInterprocess - {"CU_EVENT_INTERPROCESS", {"hipEventInterprocess", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x04 - - // cudaExternalMemoryHandleType - {"CUexternalMemoryHandleType", {"hipExternalMemoryHandleType", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUexternalMemoryHandleType_enum", {"hipExternalMemoryHandleType", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUexternalMemoryHandleType enum values - // cudaExternalMemoryHandleTypeOpaqueFd - {"CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD", {"hipExternalMemoryHandleTypeOpaqueFD", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 1 - // cudaExternalMemoryHandleTypeOpaqueWin32 - {"CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32", {"hipExternalMemoryHandleTypeOpaqueWin32", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 2 - // cudaExternalMemoryHandleTypeOpaqueWin32Kmt - {"CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT", {"hipExternalMemoryHandleTypeOpaqueWin32KMT", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 3 - // cudaExternalMemoryHandleTypeD3D12Heap - {"CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP", {"hipExternalMemoryHandleTypeD3D12Heap", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 4 - // cudaExternalMemoryHandleTypeD3D12Resource - {"CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE", {"hipExternalMemoryHandleTypeD3D12Resource", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 5 - // cudaExternalMemoryHandleTypeD3D11Resource - {"CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE", {"hipExternalMemoryHandleTypeD3D11Resource", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 6 - // cudaExternalMemoryHandleTypeD3D11ResourceKmt - {"CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT", {"hipExternalMemoryHandleTypeD3D11ResourceKmt", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 7 - // cudaExternalMemoryHandleTypeNvSciBuf - {"CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF", {"hipExternalMemoryHandleTypeNvSciBuf", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 8 - - // cudaExternalSemaphoreHandleType - {"CUexternalSemaphoreHandleType", {"hipExternalSemaphoreHandleType", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUexternalSemaphoreHandleType_enum", {"hipExternalSemaphoreHandleType", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUexternalSemaphoreHandleType enum values - // cudaExternalSemaphoreHandleTypeOpaqueFd - {"CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD", {"hipExternalSemaphoreHandleTypeOpaqueFD", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 1 - // cudaExternalSemaphoreHandleTypeOpaqueWin32 - {"CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32", {"hipExternalSemaphoreHandleTypeOpaqueWin32", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 2 - // cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt - {"CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT", {"hipExternalSemaphoreHandleTypeOpaqueWin32KMT", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 3 - // cudaExternalSemaphoreHandleTypeD3D12Fence - {"CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE", {"hipExternalSemaphoreHandleTypeD3D12Fence", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 4 - - // cudaExternalSemaphoreHandleTypeD3D11Fence - {"CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE", {"hipExternalSemaphoreHandleTypeD3D11Fence", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 5 - // cudaExternalSemaphoreHandleTypeNvSciSync - {"CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC", {"hipExternalSemaphoreHandleTypeNvSciSync", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 6 - // cudaExternalSemaphoreHandleTypeKeyedMutex - {"CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX", {"hipExternalSemaphoreHandleTypeKeyedMutex", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 7 - // cudaExternalSemaphoreHandleTypeKeyedMutexKmt - {"CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT", {"hipExternalSemaphoreHandleTypeKeyedMutexKmt", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 8 - - // cudaTextureFilterMode - {"CUfilter_mode", {"hipTextureFilterMode", "", CONV_TYPE, API_DRIVER}}, - {"CUfilter_mode_enum", {"hipTextureFilterMode", "", CONV_TYPE, API_DRIVER}}, - // CUfilter_mode enum values - // cudaFilterModePoint - {"CU_TR_FILTER_MODE_POINT", {"hipFilterModePoint", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0 - // cudaFilterModeLinear - {"CU_TR_FILTER_MODE_LINEAR", {"hipFilterModeLinear", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 1 - - // cudaFuncCache - {"CUfunc_cache", {"hipFuncCache_t", "", CONV_TYPE, API_DRIVER}}, - {"CUfunc_cache_enum", {"hipFuncCache_t", "", CONV_TYPE, API_DRIVER}}, - // CUfunc_cache enum values - // cudaFilterModePoint = 0 - {"CU_FUNC_CACHE_PREFER_NONE", {"hipFuncCachePreferNone", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x00 - // cudaFuncCachePreferShared = 1 - {"CU_FUNC_CACHE_PREFER_SHARED", {"hipFuncCachePreferShared", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x01 - // cudaFuncCachePreferL1 = 2 - {"CU_FUNC_CACHE_PREFER_L1", {"hipFuncCachePreferL1", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x02 - // cudaFuncCachePreferEqual = 3 - {"CU_FUNC_CACHE_PREFER_EQUAL", {"hipFuncCachePreferEqual", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x03 - - // cudaFuncAttribute - {"CUfunction_attribute", {"hipFunction_attribute", "", CONV_TYPE, API_DRIVER}}, - {"CUfunction_attribute_enum", {"hipFunction_attribute", "", CONV_TYPE, API_DRIVER}}, - // CUfunction_attribute enum values - // no analogue - {"CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK", {"HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0 - // no analogue - {"CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES", {"HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 1 - // no analogue - {"CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES", {"HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 2 - // no analogue - {"CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES", {"HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 3 - // no analogue - {"CU_FUNC_ATTRIBUTE_NUM_REGS", {"HIP_FUNC_ATTRIBUTE_NUM_REGS", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 4 - // no analogue - {"CU_FUNC_ATTRIBUTE_PTX_VERSION", {"HIP_FUNC_ATTRIBUTE_PTX_VERSION", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 5 - // no analogue - {"CU_FUNC_ATTRIBUTE_BINARY_VERSION", {"HIP_FUNC_ATTRIBUTE_BINARY_VERSION", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 6 - // no analogue - {"CU_FUNC_ATTRIBUTE_CACHE_MODE_CA", {"HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 7 - // cudaFuncAttributeMaxDynamicSharedMemorySize - {"CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES", {"HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 8 - // cudaFuncAttributePreferredSharedMemoryCarveout - {"CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT", {"HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 9 - // cudaFuncAttributeMax - {"CU_FUNC_ATTRIBUTE_MAX", {"HIP_FUNC_ATTRIBUTE_MAX", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 10 - - //cudaGraphicsMapFlags - {"CUgraphicsMapResourceFlags", {"hipGraphicsMapFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUgraphicsMapResourceFlags_enum", {"hipGraphicsMapFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUgraphicsMapResourceFlags enum values - // cudaGraphicsMapFlagsNone = 0 - {"CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE", {"hipGraphicsMapFlagsNone", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x00 - // cudaGraphicsMapFlagsReadOnly = 1 - {"CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY", {"hipGraphicsMapFlagsReadOnly", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - // cudaGraphicsMapFlagsWriteDiscard = 2 - {"CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD", {"hipGraphicsMapFlagsWriteDiscard", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x02 - - // cudaGraphicsRegisterFlags - {"CUgraphicsRegisterFlags", {"hipGraphicsRegisterFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUgraphicsRegisterFlags_enum", {"hipGraphicsRegisterFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphicsRegisterFlags enum values - //cudaGraphicsRegisterFlagsNone = 0 - {"CU_GRAPHICS_REGISTER_FLAGS_NONE", {"hipGraphicsRegisterFlagsNone", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x00 - // cudaGraphicsRegisterFlagsReadOnly = 1 - {"CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY", {"hipGraphicsRegisterFlagsReadOnly", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - //cudaGraphicsRegisterFlagsWriteDiscard = 2 - {"CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD", {"hipGraphicsRegisterFlagsWriteDiscard", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x02 - // cudaGraphicsRegisterFlagsSurfaceLoadStore = 4 - {"CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST", {"hipGraphicsRegisterFlagsSurfaceLoadStore", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x04 - // cudaGraphicsRegisterFlagsTextureGather = 8 - {"CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER", {"hipGraphicsRegisterFlagsTextureGather", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x08 - - // cudaGraphNodeType - {"CUgraphNodeType", {"hipGraphNodeType", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUgraphNodeType_enum", {"hipGraphNodeType", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaGraphNodeType enum values - // cudaGraphNodeTypeKernel = 0x00 - {"CU_GRAPH_NODE_TYPE_KERNEL", {"hipGraphNodeTypeKernel", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0 - // cudaGraphNodeTypeMemcpy = 0x01 - {"CU_GRAPH_NODE_TYPE_MEMCPY", {"hipGraphNodeTypeMemcpy", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 1 - // cudaGraphNodeTypeMemset = 0x02 - {"CU_GRAPH_NODE_TYPE_MEMSET", {"hipGraphNodeTypeMemset", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 2 - // cudaGraphNodeTypeHost = 0x03 - {"CU_GRAPH_NODE_TYPE_HOST", {"hipGraphNodeTypeHost", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 3 - // cudaGraphNodeTypeGraph = 0x04 - {"CU_GRAPH_NODE_TYPE_GRAPH", {"hipGraphNodeTypeGraph", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 4 - // cudaGraphNodeTypeEmpty = 0x05 - {"CU_GRAPH_NODE_TYPE_EMPTY", {"hipGraphNodeTypeEmpty", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 5 - // cudaGraphNodeTypeCount - {"CU_GRAPH_NODE_TYPE_COUNT", {"hipGraphNodeTypeCount", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 6 - - // cudaGraphExecUpdateResult - {"CUgraphExecUpdateResult", {"hipGraphExecUpdateResult", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUgraphExecUpdateResult_enum", {"hipGraphExecUpdateResult", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUgraphExecUpdateResult enum values - // cudaGraphExecUpdateSuccess - {"CU_GRAPH_EXEC_UPDATE_SUCCESS", {"hipGraphExecUpdateSuccess", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x0 - // cudaGraphExecUpdateError - {"CU_GRAPH_EXEC_UPDATE_ERROR", {"hipGraphExecUpdateError", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x1 - // cudaGraphExecUpdateErrorTopologyChanged - {"CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED", {"hipGraphExecUpdateErrorTopologyChanged", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x2 - // cudaGraphExecUpdateErrorNodeTypeChanged - {"CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED", {"hipGraphExecUpdateErrorNodeTypeChanged", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x3 - // cudaGraphExecUpdateErrorFunctionChanged - {"CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED", {"hipGraphExecUpdateErrorFunctionChanged", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x4 - // cudaGraphExecUpdateErrorParametersChanged - {"CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED", {"hipGraphExecUpdateErrorParametersChanged", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x5 - // cudaGraphExecUpdateErrorNotSupported - {"CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED", {"hipGraphExecUpdateErrorNotSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x6 - - // no analogue - {"CUipcMem_flags", {"hipIpcMemFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUipcMem_flags_enum", {"hipIpcMemFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUipcMem_flags enum values - // cudaIpcMemLazyEnablePeerAccess - {"CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS", {"hipIpcMemLazyEnablePeerAccess", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x1 - - // no analogue - {"CUjit_cacheMode", {"hipJitCacheMode", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUjit_cacheMode_enum", {"hipJitCacheMode", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUjit_cacheMode enum values - // no analogue - {"CU_JIT_CACHE_OPTION_NONE", {"hipJitCacheModeOptionNone", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0 - // no analogue - {"CU_JIT_CACHE_OPTION_CG", {"hipJitCacheModeOptionCG", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, - // no analogue - {"CU_JIT_CACHE_OPTION_CA", {"hipJitCacheModeOptionCA", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, - - // no analogue - {"CUjit_fallback", {"hipJitFallback", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUjit_fallback_enum", {"hipJitFallback", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUjit_fallback enum values - {"CU_PREFER_PTX", {"hipJitFallbackPreferPtx", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0 - {"CU_PREFER_BINARY", {"hipJitFallbackPreferBinary", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, - - // no analogue - // NOTE: is not used by HIP, as it has no JIT, thus just a dummy enum - {"CUjit_option", {"hipJitOption", "", CONV_TYPE, API_DRIVER}}, - {"CUjit_option_enum", {"hipJitOption", "", CONV_TYPE, API_DRIVER}}, - // CUjit_option enum values - {"CU_JIT_MAX_REGISTERS", {"hipJitOptionMaxRegisters", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0 - {"CU_JIT_THREADS_PER_BLOCK", {"hipJitOptionThreadsPerBlock", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_WALL_TIME", {"hipJitOptionWallTime", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_INFO_LOG_BUFFER", {"hipJitOptionInfoLogBuffer", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES", {"hipJitOptionInfoLogBufferSizeBytes", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_ERROR_LOG_BUFFER", {"hipJitOptionErrorLogBuffer", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES", {"hipJitOptionErrorLogBufferSizeBytes", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_OPTIMIZATION_LEVEL", {"hipJitOptionOptimizationLevel", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_TARGET_FROM_CUCONTEXT", {"hipJitOptionTargetFromContext", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_TARGET", {"hipJitOptionTarget", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_FALLBACK_STRATEGY", {"hipJitOptionFallbackStrategy", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_GENERATE_DEBUG_INFO", {"hipJitOptionGenerateDebugInfo", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_LOG_VERBOSE", {"hipJitOptionLogVerbose", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_GENERATE_LINE_INFO", {"hipJitOptionGenerateLineInfo", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_CACHE_MODE", {"hipJitOptionCacheMode", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_NEW_SM3X_OPT", {"hipJitOptionSm3xOpt", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_FAST_COMPILE", {"hipJitOptionFastCompile", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_GLOBAL_SYMBOL_NAMES", {"hipJitGlobalSymbolNames", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_GLOBAL_SYMBOL_ADDRESSES", {"hipJitGlobalSymbolAddresses", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_GLOBAL_SYMBOL_COUNT", {"hipJitGlobalSymbolCount", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - {"CU_JIT_NUM_OPTIONS", {"hipJitOptionNumOptions", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, - - // no analogue - {"CUjit_target", {"hipJitTarget", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUjit_target_enum", {"hipJitTarget", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUjit_target enum values - // NOTE: Deprecated - {"CU_TARGET_COMPUTE_10", {"hipJitTargetCompute10", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 10 - // NOTE: Deprecated - {"CU_TARGET_COMPUTE_11", {"hipJitTargetCompute11", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 11 - // NOTE: Deprecated - {"CU_TARGET_COMPUTE_12", {"hipJitTargetCompute12", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 12 - // NOTE: Deprecated - {"CU_TARGET_COMPUTE_13", {"hipJitTargetCompute13", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 13 - {"CU_TARGET_COMPUTE_20", {"hipJitTargetCompute20", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 20 - {"CU_TARGET_COMPUTE_21", {"hipJitTargetCompute21", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 21 - {"CU_TARGET_COMPUTE_30", {"hipJitTargetCompute30", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 20 - {"CU_TARGET_COMPUTE_32", {"hipJitTargetCompute32", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 32 - {"CU_TARGET_COMPUTE_35", {"hipJitTargetCompute35", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 35 - {"CU_TARGET_COMPUTE_37", {"hipJitTargetCompute37", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 37 - {"CU_TARGET_COMPUTE_50", {"hipJitTargetCompute50", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 50 - {"CU_TARGET_COMPUTE_52", {"hipJitTargetCompute52", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 52 - {"CU_TARGET_COMPUTE_53", {"hipJitTargetCompute53", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 53 - {"CU_TARGET_COMPUTE_60", {"hipJitTargetCompute60", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 60 - {"CU_TARGET_COMPUTE_61", {"hipJitTargetCompute61", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 61 - {"CU_TARGET_COMPUTE_62", {"hipJitTargetCompute62", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 62 - {"CU_TARGET_COMPUTE_70", {"hipJitTargetCompute70", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 70 - {"CU_TARGET_COMPUTE_72", {"hipJitTargetCompute72", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 70 - // NOTE: Deprecated - {"CU_TARGET_COMPUTE_73", {"hipJitTargetCompute73", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 73 - {"CU_TARGET_COMPUTE_75", {"hipJitTargetCompute75", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 75 - - // no analogue - {"CUjitInputType", {"hipJitInputType", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUjitInputType_enum", {"hipJitInputType", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUjitInputType enum values - {"CU_JIT_INPUT_CUBIN", {"hipJitInputTypeBin", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0 - {"CU_JIT_INPUT_PTX", {"hipJitInputTypePtx", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, - {"CU_JIT_INPUT_FATBINARY", {"hipJitInputTypeFatBinary", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, - {"CU_JIT_INPUT_OBJECT", {"hipJitInputTypeObject", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, - {"CU_JIT_INPUT_LIBRARY", {"hipJitInputTypeLibrary", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, - {"CU_JIT_NUM_INPUT_TYPES", {"hipJitInputTypeNumInputTypes", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, - - // cudaLimit - {"CUlimit", {"hipLimit_t", "", CONV_TYPE, API_DRIVER}}, - {"CUlimit_enum", {"hipLimit_t", "", CONV_TYPE, API_DRIVER}}, - // CUlimit enum values - // cudaLimitStackSize - {"CU_LIMIT_STACK_SIZE", {"hipLimitStackSize", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x00 - //cudaLimitPrintfFifoSize - {"CU_LIMIT_PRINTF_FIFO_SIZE", {"hipLimitPrintfFifoSize", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - //cudaLimitMallocHeapSize - {"CU_LIMIT_MALLOC_HEAP_SIZE", {"hipLimitMallocHeapSize", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x02 - // cudaLimitDevRuntimeSyncDepth - {"CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH", {"hipLimitDevRuntimeSyncDepth", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x03 - // cudaLimitDevRuntimePendingLaunchCount - {"CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT", {"hipLimitDevRuntimePendingLaunchCount", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x04 - // cudaLimitMaxL2FetchGranularity - {"CU_LIMIT_MAX_L2_FETCH_GRANULARITY", {"hipLimitMaxL2FetchGranularity", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x05 - // no analogue - {"CU_LIMIT_MAX", {"hipLimitMax", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, - - // cudaMemoryAdvise - {"CUmem_advise", {"hipMemAdvise", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUmem_advise_enum", {"hipMemAdvise", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUmem_advise enum values - // cudaMemAdviseSetReadMostly - {"CU_MEM_ADVISE_SET_READ_MOSTLY", {"hipMemAdviseSetReadMostly", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 1 - // cudaMemAdviseUnsetReadMostly - {"CU_MEM_ADVISE_UNSET_READ_MOSTLY", {"hipMemAdviseUnsetReadMostly", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 2 - // cudaMemAdviseSetPreferredLocation - {"CU_MEM_ADVISE_SET_PREFERRED_LOCATION", {"hipMemAdviseSetPreferredLocation", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 3 - // cudaMemAdviseUnsetPreferredLocation - {"CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION", {"hipMemAdviseUnsetPreferredLocation", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 4 - // cudaMemAdviseSetAccessedBy - {"CU_MEM_ADVISE_SET_ACCESSED_BY", {"hipMemAdviseSetAccessedBy", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 5 - // cudaMemAdviseUnsetAccessedBy - {"CU_MEM_ADVISE_UNSET_ACCESSED_BY", {"hipMemAdviseUnsetAccessedBy", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 6 - - // no analogue - {"CUmemAttach_flags", {"hipMemAttachFlags_t", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUmemAttach_flags_enum", {"hipMemAttachFlags_t", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUmemAttach_flags enum values - // cudaMemAttachGlobal - {"CU_MEM_ATTACH_GLOBAL", {"hipMemAttachGlobal", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x1 - // cudaMemAttachHost - {"CU_MEM_ATTACH_HOST", {"hipMemAttachHost", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x2 - // cudaMemAttachSingle - {"CU_MEM_ATTACH_SINGLE", {"hipMemAttachSingle", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x4 - - // no analogue - // NOTE: cudaMemoryType is partial analogue - {"CUmemorytype", {"hipMemoryType", "", CONV_TYPE, API_DRIVER}}, - {"CUmemorytype_enum", {"hipMemoryType", "", CONV_TYPE, API_DRIVER}}, - // CUmemorytype enum values - {"CU_MEMORYTYPE_HOST", {"hipMemoryTypeHost", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x01 - {"CU_MEMORYTYPE_DEVICE", {"hipMemoryTypeDevice", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x02 - {"CU_MEMORYTYPE_ARRAY", {"hipMemoryTypeArray", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x03 - {"CU_MEMORYTYPE_UNIFIED", {"hipMemoryTypeUnified", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x04 - - // cudaMemRangeAttribute - {"CUmem_range_attribute", {"hipMemRangeAttribute", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUmem_range_attribute_enum", {"hipMemRangeAttribute", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUmem_range_attribute enum values - // cudaMemRangeAttributeReadMostly - {"CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY", {"hipMemRangeAttributeReadMostly", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 1 - // cudaMemRangeAttributePreferredLocation - {"CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION", {"hipMemRangeAttributePreferredLocation", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 2 - // cudaMemRangeAttributeAccessedBy - {"CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY", {"hipMemRangeAttributeAccessedBy", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 3 - // cudaMemRangeAttributeLastPrefetchLocation - {"CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION", {"hipMemRangeAttributeLastPrefetchLocation", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 4 - - //no analogue - {"CUoccupancy_flags", {"hipOccupancyFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUoccupancy_flags_enum", {"hipOccupancyFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUoccupancy_flags enum values - // cudaOccupancyDefault - {"CU_OCCUPANCY_DEFAULT", {"hipOccupancyDefault", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x00 - // cudaOccupancyDisableCachingOverride - {"CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE", {"hipOccupancyDisableCachingOverride", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - - //no analogue - // TODO: Analogous enum is needed in HIP. Couldn't map enum to struct hipPointerAttribute_t. - // TODO: Do the same for Pointer Attributes as for Device Attributes. - {"CUpointer_attribute", {"hipPointerAttribute", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUpointer_attribute_enum", {"hipPointerAttribute", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUpointer_attribute enum values - {"CU_POINTER_ATTRIBUTE_CONTEXT", {"hipPointerAttributeContext", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 1 - {"CU_POINTER_ATTRIBUTE_MEMORY_TYPE", {"hipPointerAttributeMemoryType", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 2 - {"CU_POINTER_ATTRIBUTE_DEVICE_POINTER", {"hipPointerAttributeDevicePointer", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 3 - {"CU_POINTER_ATTRIBUTE_HOST_POINTER", {"hipPointerAttributeHostPointer", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 4 - {"CU_POINTER_ATTRIBUTE_P2P_TOKENS", {"hipPointerAttributeP2pTokens", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 5 - {"CU_POINTER_ATTRIBUTE_SYNC_MEMOPS", {"hipPointerAttributeSyncMemops", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 6 - {"CU_POINTER_ATTRIBUTE_BUFFER_ID", {"hipPointerAttributeBufferId", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 7 - {"CU_POINTER_ATTRIBUTE_IS_MANAGED", {"hipPointerAttributeIsManaged", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 8 - {"CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL", {"hipPointerAttributeDeviceOrdinal", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 9 - {"CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE", {"hipPointerAttributeIsLegacyCudaIpcCapable", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 10 - {"CU_POINTER_ATTRIBUTE_RANGE_START_ADDR", {"hipPointerAttributeRangeStartAddress", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 11 - {"CU_POINTER_ATTRIBUTE_RANGE_SIZE", {"hipPointerAttributeRangeSize", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 12 - {"CU_POINTER_ATTRIBUTE_MAPPED", {"hipPointerAttributeMapped", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 13 - {"CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES", {"hipPointerAttributeAllowedHandleTypes", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 14 - - // cudaResourceType - {"CUresourcetype", {"hipResourceType", "", CONV_TYPE, API_DRIVER}}, - {"CUresourcetype_enum", {"hipResourceType", "", CONV_TYPE, API_DRIVER}}, - // CUresourcetype enum values - // cudaResourceTypeArray - {"CU_RESOURCE_TYPE_ARRAY", {"hipResourceTypeArray", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x00 - //cudaResourceTypeMipmappedArray - {"CU_RESOURCE_TYPE_MIPMAPPED_ARRAY", {"hipResourceTypeMipmappedArray", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x01 - //cudaResourceTypeLinear - {"CU_RESOURCE_TYPE_LINEAR", {"hipResourceTypeLinear", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x02 - //cudaResourceTypePitch2D - {"CU_RESOURCE_TYPE_PITCH2D", {"hipResourceTypePitch2D", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x03 - - // cudaResourceViewFormat - {"CUresourceViewFormat", {"hipResourceViewFormat", "", CONV_TYPE, API_DRIVER}}, - {"CUresourceViewFormat_enum", {"hipResourceViewFormat", "", CONV_TYPE, API_DRIVER}}, - // CUresourceViewFormat enum values - // cudaResViewFormatNone - {"CU_RES_VIEW_FORMAT_NONE", {"hipResViewFormatNone", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x00 - // cudaResViewFormatUnsignedChar1 - {"CU_RES_VIEW_FORMAT_UINT_1X8", {"hipResViewFormatUnsignedChar1", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x01 - // cudaResViewFormatUnsignedChar2 - {"CU_RES_VIEW_FORMAT_UINT_2X8", {"hipResViewFormatUnsignedChar2", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x02 - // cudaResViewFormatUnsignedChar4 - {"CU_RES_VIEW_FORMAT_UINT_4X8", {"hipResViewFormatUnsignedChar4", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x03 - // cudaResViewFormatSignedChar1 - {"CU_RES_VIEW_FORMAT_SINT_1X8", {"hipResViewFormatSignedChar1", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x04 - // cudaResViewFormatSignedChar2 - {"CU_RES_VIEW_FORMAT_SINT_2X8", {"hipResViewFormatSignedChar2", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x05 - // cudaResViewFormatSignedChar4 - {"CU_RES_VIEW_FORMAT_SINT_4X8", {"hipResViewFormatSignedChar4", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x06 - // cudaResViewFormatUnsignedShort1 - {"CU_RES_VIEW_FORMAT_UINT_1X16", {"hipResViewFormatUnsignedShort1", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x07 - // cudaResViewFormatUnsignedShort2 - {"CU_RES_VIEW_FORMAT_UINT_2X16", {"hipResViewFormatUnsignedShort2", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x08 - // cudaResViewFormatUnsignedShort4 - {"CU_RES_VIEW_FORMAT_UINT_4X16", {"hipResViewFormatUnsignedShort4", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x09 - // cudaResViewFormatSignedShort1 - {"CU_RES_VIEW_FORMAT_SINT_1X16", {"hipResViewFormatSignedShort1", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x0a - // cudaResViewFormatSignedShort2 - {"CU_RES_VIEW_FORMAT_SINT_2X16", {"hipResViewFormatSignedShort2", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x0b - // cudaResViewFormatSignedShort4 - {"CU_RES_VIEW_FORMAT_SINT_4X16", {"hipResViewFormatSignedShort4", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x0c - // cudaResViewFormatUnsignedInt1 - {"CU_RES_VIEW_FORMAT_UINT_1X32", {"hipResViewFormatUnsignedInt1", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x0d - // cudaResViewFormatUnsignedInt2 - {"CU_RES_VIEW_FORMAT_UINT_2X32", {"hipResViewFormatUnsignedInt2", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x0e - // cudaResViewFormatUnsignedInt4 - {"CU_RES_VIEW_FORMAT_UINT_4X32", {"hipResViewFormatUnsignedInt4", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x0f - // cudaResViewFormatSignedInt1 - {"CU_RES_VIEW_FORMAT_SINT_1X32", {"hipResViewFormatSignedInt1", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x10 - // cudaResViewFormatSignedInt2 - {"CU_RES_VIEW_FORMAT_SINT_2X32", {"hipResViewFormatSignedInt2", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x11 - // cudaResViewFormatSignedInt4 - {"CU_RES_VIEW_FORMAT_SINT_4X32", {"hipResViewFormatSignedInt4", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x12 - // cudaResViewFormatHalf1 - {"CU_RES_VIEW_FORMAT_FLOAT_1X16", {"hipResViewFormatHalf1", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x13 - // cudaResViewFormatHalf2 - {"CU_RES_VIEW_FORMAT_FLOAT_2X16", {"hipResViewFormatHalf2", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x14 - // cudaResViewFormatHalf4 - {"CU_RES_VIEW_FORMAT_FLOAT_4X16", {"hipResViewFormatHalf4", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x15 - // cudaResViewFormatFloat1 - {"CU_RES_VIEW_FORMAT_FLOAT_1X32", {"hipResViewFormatFloat1", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x16 - // cudaResViewFormatFloat2 - {"CU_RES_VIEW_FORMAT_FLOAT_2X32", {"hipResViewFormatFloat2", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x17 - // cudaResViewFormatFloat4 - {"CU_RES_VIEW_FORMAT_FLOAT_4X32", {"hipResViewFormatFloat4", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x18 - // cudaResViewFormatUnsignedBlockCompressed1 - {"CU_RES_VIEW_FORMAT_UNSIGNED_BC1", {"hipResViewFormatUnsignedBlockCompressed1", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x19 - // cudaResViewFormatUnsignedBlockCompressed2 - {"CU_RES_VIEW_FORMAT_UNSIGNED_BC2", {"hipResViewFormatUnsignedBlockCompressed2", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x1a - // cudaResViewFormatUnsignedBlockCompressed3 - {"CU_RES_VIEW_FORMAT_UNSIGNED_BC3", {"hipResViewFormatUnsignedBlockCompressed3", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x1b - // cudaResViewFormatUnsignedBlockCompressed4 - {"CU_RES_VIEW_FORMAT_UNSIGNED_BC4", {"hipResViewFormatUnsignedBlockCompressed4", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x1c - // cudaResViewFormatSignedBlockCompressed4 - {"CU_RES_VIEW_FORMAT_SIGNED_BC4", {"hipResViewFormatSignedBlockCompressed4", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x1d - // cudaResViewFormatUnsignedBlockCompressed5 - {"CU_RES_VIEW_FORMAT_UNSIGNED_BC5", {"hipResViewFormatUnsignedBlockCompressed5", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x1e - // cudaResViewFormatSignedBlockCompressed5 - {"CU_RES_VIEW_FORMAT_SIGNED_BC5", {"hipResViewFormatSignedBlockCompressed5", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x1f - // cudaResViewFormatUnsignedBlockCompressed6H - {"CU_RES_VIEW_FORMAT_UNSIGNED_BC6H", {"hipResViewFormatUnsignedBlockCompressed6H", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x20 - // cudaResViewFormatSignedBlockCompressed6H - {"CU_RES_VIEW_FORMAT_SIGNED_BC6H", {"hipResViewFormatSignedBlockCompressed6H", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x21 - // cudaResViewFormatUnsignedBlockCompressed7 - {"CU_RES_VIEW_FORMAT_UNSIGNED_BC7", {"hipResViewFormatUnsignedBlockCompressed7", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x22 - - // cudaError - {"CUresult", {"hipError_t", "", CONV_TYPE, API_DRIVER}}, - {"cudaError_enum", {"hipError_t", "", CONV_TYPE, API_DRIVER}}, - // CUresult enum values - // cudaSuccess - {"CUDA_SUCCESS", {"hipSuccess", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0 - // cudaErrorInvalidValue - {"CUDA_ERROR_INVALID_VALUE", {"hipErrorInvalidValue", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 1 - // cudaErrorMemoryAllocation - {"CUDA_ERROR_OUT_OF_MEMORY", {"hipErrorOutOfMemory", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 2 - // cudaErrorInitializationError - {"CUDA_ERROR_NOT_INITIALIZED", {"hipErrorNotInitialized", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 3 - // cudaErrorCudartUnloading - {"CUDA_ERROR_DEINITIALIZED", {"hipErrorDeinitialized", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 4 - // cudaErrorProfilerDisabled - {"CUDA_ERROR_PROFILER_DISABLED", {"hipErrorProfilerDisabled", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 5 - // cudaErrorProfilerNotInitialized - // NOTE: Deprecated since CUDA 5.0 - {"CUDA_ERROR_PROFILER_NOT_INITIALIZED", {"hipErrorProfilerNotInitialized", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 6 - // NOTE: Deprecated since CUDA 5.0 - // cudaErrorProfilerAlreadyStarted - {"CUDA_ERROR_PROFILER_ALREADY_STARTED", {"hipErrorProfilerAlreadyStarted", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 7 - // cudaErrorProfilerAlreadyStopped - // NOTE: Deprecated since CUDA 5.0 - {"CUDA_ERROR_PROFILER_ALREADY_STOPPED", {"hipErrorProfilerAlreadyStopped", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 8 - // cudaErrorNoDevice - {"CUDA_ERROR_NO_DEVICE", {"hipErrorNoDevice", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 100 - // cudaErrorInvalidDevice - {"CUDA_ERROR_INVALID_DEVICE", {"hipErrorInvalidDevice", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 101 - // cudaErrorInvalidKernelImage - {"CUDA_ERROR_INVALID_IMAGE", {"hipErrorInvalidImage", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 200 - // cudaErrorDeviceUninitilialized - {"CUDA_ERROR_INVALID_CONTEXT", {"hipErrorInvalidContext", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 201 - // no analogue - // NOTE: Deprecated since CUDA 3.2 - {"CUDA_ERROR_CONTEXT_ALREADY_CURRENT", {"hipErrorContextAlreadyCurrent", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 202 - // cudaErrorMapBufferObjectFailed - {"CUDA_ERROR_MAP_FAILED", {"hipErrorMapFailed", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 205 - // cudaErrorUnmapBufferObjectFailed - {"CUDA_ERROR_UNMAP_FAILED", {"hipErrorUnmapFailed", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 206 - // cudaErrorArrayIsMapped - {"CUDA_ERROR_ARRAY_IS_MAPPED", {"hipErrorArrayIsMapped", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 207 - // cudaErrorAlreadyMapped - {"CUDA_ERROR_ALREADY_MAPPED", {"hipErrorAlreadyMapped", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 208 - // cudaErrorNoKernelImageForDevice - {"CUDA_ERROR_NO_BINARY_FOR_GPU", {"hipErrorNoBinaryForGpu", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 209 - // cudaErrorAlreadyAcquired - {"CUDA_ERROR_ALREADY_ACQUIRED", {"hipErrorAlreadyAcquired", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 210 - // cudaErrorNotMapped - {"CUDA_ERROR_NOT_MAPPED", {"hipErrorNotMapped", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 211 - // cudaErrorNotMappedAsArray - {"CUDA_ERROR_NOT_MAPPED_AS_ARRAY", {"hipErrorNotMappedAsArray", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 212 - // cudaErrorNotMappedAsPointer - {"CUDA_ERROR_NOT_MAPPED_AS_POINTER", {"hipErrorNotMappedAsPointer", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 213 - // cudaErrorECCUncorrectable - {"CUDA_ERROR_ECC_UNCORRECTABLE", {"hipErrorECCNotCorrectable", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 214 - // cudaErrorUnsupportedLimit - {"CUDA_ERROR_UNSUPPORTED_LIMIT", {"hipErrorUnsupportedLimit", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 215 - // cudaErrorDeviceAlreadyInUse - {"CUDA_ERROR_CONTEXT_ALREADY_IN_USE", {"hipErrorContextAlreadyInUse", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 216 - // cudaErrorPeerAccessUnsupported - {"CUDA_ERROR_PEER_ACCESS_UNSUPPORTED", {"hipErrorPeerAccessUnsupported", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 217 - // cudaErrorInvalidPtx - {"CUDA_ERROR_INVALID_PTX", {"hipErrorInvalidKernelFile", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 218 - // cudaErrorInvalidGraphicsContext - {"CUDA_ERROR_INVALID_GRAPHICS_CONTEXT", {"hipErrorInvalidGraphicsContext", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 219 - // cudaErrorNvlinkUncorrectable - {"CUDA_ERROR_NVLINK_UNCORRECTABLE", {"hipErrorNvlinkUncorrectable", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 220 - // cudaErrorJitCompilerNotFound - {"CUDA_ERROR_JIT_COMPILER_NOT_FOUND", {"hipErrorJitCompilerNotFound", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 221 - // cudaErrorInvalidSource - {"CUDA_ERROR_INVALID_SOURCE", {"hipErrorInvalidSource", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 300 - // cudaErrorFileNotFound - {"CUDA_ERROR_FILE_NOT_FOUND", {"hipErrorFileNotFound", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 301 - // cudaErrorSharedObjectSymbolNotFound - {"CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND", {"hipErrorSharedObjectSymbolNotFound", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 302 - // cudaErrorSharedObjectInitFailed - {"CUDA_ERROR_SHARED_OBJECT_INIT_FAILED", {"hipErrorSharedObjectInitFailed", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 303 - // cudaErrorOperatingSystem - {"CUDA_ERROR_OPERATING_SYSTEM", {"hipErrorOperatingSystem", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 304 - // cudaErrorInvalidResourceHandle - {"CUDA_ERROR_INVALID_HANDLE", {"hipErrorInvalidHandle", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 400 - // cudaErrorIllegalState - {"CUDA_ERROR_ILLEGAL_STATE", {"hipErrorIllegalState", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 401 - // cudaErrorSymbolNotFound - {"CUDA_ERROR_NOT_FOUND", {"hipErrorNotFound", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 500 - // cudaErrorNotReady - {"CUDA_ERROR_NOT_READY", {"hipErrorNotReady", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 600 - // cudaErrorIllegalAddress - {"CUDA_ERROR_ILLEGAL_ADDRESS", {"hipErrorIllegalAddress", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 700 - // cudaErrorLaunchOutOfResources - {"CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES", {"hipErrorLaunchOutOfResources", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 701 - // cudaErrorLaunchTimeout - {"CUDA_ERROR_LAUNCH_TIMEOUT", {"hipErrorLaunchTimeOut", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 702 - // cudaErrorLaunchIncompatibleTexturing - {"CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING", {"hipErrorLaunchIncompatibleTexturing", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 703 - // cudaErrorPeerAccessAlreadyEnabled - {"CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED", {"hipErrorPeerAccessAlreadyEnabled", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 704 - // cudaErrorPeerAccessNotEnabled - {"CUDA_ERROR_PEER_ACCESS_NOT_ENABLED", {"hipErrorPeerAccessNotEnabled", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 705 - // cudaErrorSetOnActiveProcess - {"CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE", {"hipErrorSetOnActiveProcess", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 708 - // cudaErrorContextIsDestroyed - {"CUDA_ERROR_CONTEXT_IS_DESTROYED", {"hipErrorContextIsDestroyed", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 709 - // cudaErrorAssert - {"CUDA_ERROR_ASSERT", {"hipErrorAssert", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 710 - // cudaErrorTooManyPeers - {"CUDA_ERROR_TOO_MANY_PEERS", {"hipErrorTooManyPeers", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 711 - // cudaErrorHostMemoryAlreadyRegistered - {"CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED", {"hipErrorHostMemoryAlreadyRegistered", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 712 - // cudaErrorHostMemoryNotRegistered - {"CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED", {"hipErrorHostMemoryNotRegistered", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 713 - // cudaErrorHardwareStackError - {"CUDA_ERROR_HARDWARE_STACK_ERROR", {"hipErrorHardwareStackError", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 714 - // cudaErrorIllegalInstruction - {"CUDA_ERROR_ILLEGAL_INSTRUCTION", {"hipErrorIllegalInstruction", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 715 - // cudaErrorMisalignedAddress - {"CUDA_ERROR_MISALIGNED_ADDRESS", {"hipErrorMisalignedAddress", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 716 - // cudaErrorInvalidAddressSpace - {"CUDA_ERROR_INVALID_ADDRESS_SPACE", {"hipErrorInvalidAddressSpace", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 717 - // cudaErrorInvalidPc - {"CUDA_ERROR_INVALID_PC", {"hipErrorInvalidPc", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 718 - // cudaErrorLaunchFailure - {"CUDA_ERROR_LAUNCH_FAILED", {"hipErrorLaunchFailure", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 719 - // cudaErrorCooperativeLaunchTooLarge - {"CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE", {"hipErrorCooperativeLaunchTooLarge", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 720 - // cudaErrorNotPermitted - {"CUDA_ERROR_NOT_PERMITTED", {"hipErrorNotPermitted", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 800 - // cudaErrorNotSupported - {"CUDA_ERROR_NOT_SUPPORTED", {"hipErrorNotSupported", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 801 - // cudaErrorSystemNotReady - {"CUDA_ERROR_SYSTEM_NOT_READY", {"hipErrorSystemNotReady", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 802 - // cudaErrorSystemDriverMismatch - {"CUDA_ERROR_SYSTEM_DRIVER_MISMATCH", {"hipErrorSystemDriverMismatch", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 803 - // cudaErrorCompatNotSupportedOnDevice - {"CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE", {"hipErrorCompatNotSupportedOnDevice", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 804 - // cudaErrorStreamCaptureUnsupported - {"CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED", {"hipErrorStreamCaptureUnsupported", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 900 - // cudaErrorStreamCaptureInvalidated - {"CUDA_ERROR_STREAM_CAPTURE_INVALIDATED", {"hipErrorStreamCaptureInvalidated", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 901 - // cudaErrorStreamCaptureMerge - {"CUDA_ERROR_STREAM_CAPTURE_MERGE", {"hipErrorStreamCaptureMerge", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 902 - // cudaErrorStreamCaptureUnmatched - {"CUDA_ERROR_STREAM_CAPTURE_UNMATCHED", {"hipErrorStreamCaptureUnmatched", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 903 - // cudaErrorStreamCaptureUnjoined - {"CUDA_ERROR_STREAM_CAPTURE_UNJOINED", {"hipErrorStreamCaptureUnjoined", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 904 - // cudaErrorStreamCaptureIsolation - {"CUDA_ERROR_STREAM_CAPTURE_ISOLATION", {"hipErrorStreamCaptureIsolation", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 905 - // cudaErrorStreamCaptureImplicit - {"CUDA_ERROR_STREAM_CAPTURE_IMPLICIT", {"hipErrorStreamCaptureImplicit", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 906 - // cudaErrorCapturedEvent - {"CUDA_ERROR_CAPTURED_EVENT", {"hipErrorCapturedEvent", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 907 - // cudaErrorStreamCaptureWrongThread - {"CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD", {"hipErrorStreamCaptureWrongThread", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 908 - // cudaErrorTimeout - {"CUDA_ERROR_TIMEOUT", {"hipErrorTimeout", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 909 - // cudaErrorGraphExecUpdateFailure - {"CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE", {"hipErrorGraphExecUpdateFailure", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 910 - // cudaErrorUnknown - {"CUDA_ERROR_UNKNOWN", {"hipErrorUnknown", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 999 - - // cudaSharedMemConfig - {"CUsharedconfig", {"hipSharedMemConfig", "", CONV_TYPE, API_DRIVER}}, - {"CUsharedconfig_enum", {"hipSharedMemConfig", "", CONV_TYPE, API_DRIVER}}, - // CUsharedconfig enum values - // cudaSharedMemBankSizeDefault = 0 - {"CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE", {"hipSharedMemBankSizeDefault", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x00 - // cudaSharedMemBankSizeFourByte = 1 - {"CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE", {"hipSharedMemBankSizeFourByte", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x01 - // cudaSharedMemBankSizeEightByte = 2 - {"CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE", {"hipSharedMemBankSizeEightByte", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x02 - - // cudaSharedCarveout - {"CUshared_carveout", {"hipSharedCarveout", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUshared_carveout_enum", {"hipSharedCarveout", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUshared_carveout enum values - // cudaSharedmemCarveoutDefault - {"CU_SHAREDMEM_CARVEOUT_DEFAULT", {"hipSharedmemCarveoutDefault", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // -1 - // cudaSharedmemCarveoutMaxShared - {"CU_SHAREDMEM_CARVEOUT_MAX_SHARED", {"hipSharedmemCarveoutMaxShared", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 100 - // cudaSharedmemCarveoutMaxShared - {"CU_SHAREDMEM_CARVEOUT_MAX_L1", {"hipSharedmemCarveoutMaxL1", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0 - - // no analogue - {"CUstream_flags", {"hipStreamFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUstream_flags_enum", {"hipStreamFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUstream_flags enum values - // cudaStreamDefault = 0x00 - {"CU_STREAM_DEFAULT", {"hipStreamDefault", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x0 - // cudaStreamNonBlocking = 0x01 - {"CU_STREAM_NON_BLOCKING", {"hipStreamNonBlocking", "", CONV_NUMERIC_LITERAL, API_DRIVER}}, // 0x1 - - // no analogue - {"CUstreamBatchMemOpType", {"hipStreamBatchMemOpType", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUstreamBatchMemOpType_enum", {"hipStreamBatchMemOpType", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUstreamBatchMemOpType enum values - {"CU_STREAM_MEM_OP_WAIT_VALUE_32", {"hipStreamBatchMemOpWaitValue32", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 1 - {"CU_STREAM_MEM_OP_WRITE_VALUE_32", {"hipStreamBatchMemOpWriteValue32", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 2 - {"CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES", {"hipStreamBatchMemOpFlushRemoteWrites", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 3 - {"CU_STREAM_MEM_OP_WAIT_VALUE_64", {"hipStreamBatchMemOpWaitValue64", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 4 - {"CU_STREAM_MEM_OP_WRITE_VALUE_64", {"hipStreamBatchMemOpWriteValue64", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 5 - - // cudaStreamCaptureStatus - {"CUstreamCaptureStatus", {"hipStreamCaptureStatus", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUstreamCaptureStatus_enum", {"hipStreamCaptureStatus", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUstreamCaptureStatus enum values - // cudaStreamCaptureStatusNone - {"CU_STREAM_CAPTURE_STATUS_NONE", {"hipStreamCaptureStatusNone", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0 - // cudaStreamCaptureStatusActive - {"CU_STREAM_CAPTURE_STATUS_ACTIVE", {"hipStreamCaptureStatusActive", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 1 - // cudaStreamCaptureStatusInvalidated - {"CU_STREAM_CAPTURE_STATUS_INVALIDATED", {"hipStreamCaptureStatusInvalidated", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 2 - - // cudaStreamCaptureMode - {"CUstreamCaptureMode", {"hipStreamCaptureMode", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUstreamCaptureMode_enum", {"hipStreamCaptureMode", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUstreamCaptureMode enum values - // cudaStreamCaptureModeGlobal - {"CU_STREAM_CAPTURE_MODE_GLOBAL", {"hipStreamCaptureModeGlobal", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0 - // cudaStreamCaptureModeThreadLocal - {"CU_STREAM_CAPTURE_MODE_THREAD_LOCAL", {"hipStreamCaptureModeThreadLocal", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 1 - // cudaStreamCaptureModeRelaxed - {"CU_STREAM_CAPTURE_MODE_RELAXED", {"hipStreamCaptureModeRelaxed", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 2 - - // no analogue - {"CUstreamWaitValue_flags", {"hipStreamWaitValueFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUstreamWaitValue_flags_enum", {"hipStreamWaitValueFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUstreamWaitValue_flags enum values - {"CU_STREAM_WAIT_VALUE_GEQ", {"hipStreamWaitValueGeq", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x0 - {"CU_STREAM_WAIT_VALUE_EQ", {"hipStreamWaitValueEq", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x1 - {"CU_STREAM_WAIT_VALUE_AND", {"hipStreamWaitValueAnd", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x2 - {"CU_STREAM_WAIT_VALUE_FLUSH", {"hipStreamWaitValueFlush", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 1<<30 - - // no analogue - {"CUstreamWriteValue_flags", {"hipStreamWriteValueFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUstreamWriteValue_flags_enum", {"hipStreamWriteValueFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUstreamWriteValue_flags enum values - {"CU_STREAM_WRITE_VALUE_DEFAULT", {"hipStreamWriteValueDefault", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x0 - {"CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER", {"hipStreamWriteValueNoMemoryBarrier", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x1 - - // cudaGLDeviceList - {"CUGLDeviceList", {"hipGLDeviceList", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUGLDeviceList_enum", {"hipGLDeviceList", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUGLDeviceList enum values - // cudaGLDeviceListAll = 1 - {"CU_GL_DEVICE_LIST_ALL", {"hipGLDeviceListAll", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - // cudaGLDeviceListCurrentFrame = 2 - {"CU_GL_DEVICE_LIST_CURRENT_FRAME", {"hipGLDeviceListCurrentFrame", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x02 - // cudaGLDeviceListNextFrame = 3 - {"CU_GL_DEVICE_LIST_NEXT_FRAME", {"hipGLDeviceListNextFrame", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x03 - - // cudaGLMapFlags - {"CUGLmap_flags", {"hipGLMapFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUGLmap_flags_enum", {"hipGLMapFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUGLmap_flags enum values - // cudaGLMapFlagsNone = 0 - {"CU_GL_MAP_RESOURCE_FLAGS_NONE", {"hipGLMapFlagsNone", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x00 - // cudaGLMapFlagsReadOnly = 1 - {"CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY", {"hipGLMapFlagsReadOnly", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - // cudaGLMapFlagsWriteDiscard = 2 - {"CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD", {"hipGLMapFlagsWriteDiscard", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x02 - - // cudaD3D9DeviceList - {"CUd3d9DeviceList", {"hipD3D9DeviceList", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUd3d9DeviceList_enum", {"hipD3D9DeviceList", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUd3d9DeviceList enum values - // cudaD3D9DeviceListAll = 1 - {"CU_D3D9_DEVICE_LIST_ALL", {"HIP_D3D9_DEVICE_LIST_ALL", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - // cudaD3D9DeviceListCurrentFrame = 2 - {"CU_D3D9_DEVICE_LIST_CURRENT_FRAME", {"HIP_D3D9_DEVICE_LIST_CURRENT_FRAME", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x02 - // cudaD3D9DeviceListNextFrame = 3 - {"CU_D3D9_DEVICE_LIST_NEXT_FRAME", {"HIP_D3D9_DEVICE_LIST_NEXT_FRAME", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x03 - - // cudaD3D9MapFlags - // NOTE: Deprecated - {"CUd3d9map_flags", {"hipD3D9MapFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUd3d9map_flags_enum", {"hipD3D9MapFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUd3d9map_flags enum values - // cudaD3D9MapFlagsNone = 0 - {"CU_D3D9_MAPRESOURCE_FLAGS_NONE", {"HIP_D3D9_MAPRESOURCE_FLAGS_NONE", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x00 - // cudaD3D9MapFlagsReadOnly = 1 - {"CU_D3D9_MAPRESOURCE_FLAGS_READONLY", {"HIP_D3D9_MAPRESOURCE_FLAGS_READONLY", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - // cudaD3D9MapFlagsWriteDiscard = 2 - {"CU_D3D9_MAPRESOURCE_FLAGS_WRITEDISCARD", {"HIP_D3D9_MAPRESOURCE_FLAGS_WRITEDISCARD", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x02 - - // cudaD3D9RegisterFlags - {"CUd3d9register_flags", {"hipD3D9RegisterFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUd3d9register_flags_enum", {"hipD3D9RegisterFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUd3d9register_flags enum values - // cudaD3D9RegisterFlagsNone = 0 - {"CU_D3D9_REGISTER_FLAGS_NONE", {"HIP_D3D9_REGISTER_FLAGS_NONE", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x00 - // cudaD3D9RegisterFlagsArray = 1 - {"CU_D3D9_REGISTER_FLAGS_ARRAY", {"HIP_D3D9_REGISTER_FLAGS_ARRAY", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - - // cudaD3D10DeviceList - {"CUd3d10DeviceList", {"hipd3d10DeviceList", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUd3d10DeviceList_enum", {"hipD3D10DeviceList", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUd3d10DeviceList enum values - // cudaD3D10DeviceListAll = 1 - {"CU_D3D10_DEVICE_LIST_ALL", {"HIP_D3D10_DEVICE_LIST_ALL", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - // cudaD3D10DeviceListCurrentFrame = 2 - {"CU_D3D10_DEVICE_LIST_CURRENT_FRAME", {"HIP_D3D10_DEVICE_LIST_CURRENT_FRAME", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x02 - // cudaD3D10DeviceListNextFrame = 3 - {"CU_D3D10_DEVICE_LIST_NEXT_FRAME", {"HIP_D3D10_DEVICE_LIST_NEXT_FRAME", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x03 - - // cudaD3D10MapFlags - {"CUd3d10map_flags", {"hipD3D10MapFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUd3d10map_flags_enum", {"hipD3D10MapFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUd3d10map_flags enum values - // cudaD3D10MapFlagsNone = 0 - {"CU_D3D10_MAPRESOURCE_FLAGS_NONE", {"HIP_D3D10_MAPRESOURCE_FLAGS_NONE", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x00 - // cudaD3D10MapFlagsReadOnly = 1 - {"CU_D3D10_MAPRESOURCE_FLAGS_READONLY", {"HIP_D3D10_MAPRESOURCE_FLAGS_READONLY", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - // cudaD3D10MapFlagsWriteDiscard = 2 - {"CU_D3D10_MAPRESOURCE_FLAGS_WRITEDISCARD", {"HIP_D3D10_MAPRESOURCE_FLAGS_WRITEDISCARD", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x02 - - // cudaD3D10RegisterFlags - {"CUd3d10register_flags", {"hipD3D10RegisterFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUd3d10register_flags_enum", {"hipD3D10RegisterFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUd3d10register_flags enum values - // cudaD3D10RegisterFlagsNone = 0 - {"CU_D3D10_REGISTER_FLAGS_NONE", {"HIP_D3D10_REGISTER_FLAGS_NONE", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x00 - // cudaD3D10RegisterFlagsArray = 1 - {"CU_D3D10_REGISTER_FLAGS_ARRAY", {"HIP_D3D10_REGISTER_FLAGS_ARRAY", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - - // cudaD3D11DeviceList - {"CUd3d11DeviceList", {"hipd3d11DeviceList", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUd3d11DeviceList_enum", {"hipD3D11DeviceList", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUd3d11DeviceList enum values - // cudaD3D11DeviceListAll = 1 - {"CU_D3D11_DEVICE_LIST_ALL", {"HIP_D3D11_DEVICE_LIST_ALL", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - // cudaD3D11DeviceListCurrentFrame = 2 - {"CU_D3D11_DEVICE_LIST_CURRENT_FRAME", {"HIP_D3D11_DEVICE_LIST_CURRENT_FRAME", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x02 - // cudaD3D11DeviceListNextFrame = 3 - {"CU_D3D11_DEVICE_LIST_NEXT_FRAME", {"HIP_D3D11_DEVICE_LIST_NEXT_FRAME", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x03 - - // no analogue - {"CUmemAllocationHandleType", {"hipMemoryAllocationHandleType", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUmemAllocationHandleType_enum", {"hipMemoryAllocationHandleType", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUmemAllocationHandleType enum values - {"CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR", {"HIP_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x1 - {"CU_MEM_HANDLE_TYPE_WIN32", {"HIP_MEM_HANDLE_TYPE_WIN32", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x2 - {"CU_MEM_HANDLE_TYPE_WIN32_KMT", {"HIP_MEM_HANDLE_TYPE_WIN32_KMT", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x4 - {"CU_MEM_HANDLE_TYPE_MAX", {"HIP_MEM_HANDLE_TYPE_MAX", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0xFFFFFFFF - - // no analogue - {"CUmemAccess_flags", {"hipMemoryAccessFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUmemAccess_flags_enum", {"hipMemoryAccessFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUmemAccess_flags enum values - {"CU_MEM_ACCESS_FLAGS_PROT_NONE", {"HIP_MEM_ACCESS_FLAGS_PROT_NONE", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x1 - {"CU_MEM_ACCESS_FLAGS_PROT_READ", {"HIP_MEM_ACCESS_FLAGS_PROT_READ", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x2 - {"CU_MEM_ACCESS_FLAGS_PROT_READWRITE", {"HIP_MEM_ACCESS_FLAGS_PROT_READWRITE", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x3 - {"CU_MEM_ACCESS_FLAGS_PROT_MAX", {"HIP_MEM_ACCESS_FLAGS_PROT_MAX", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0xFFFFFFFF - - // no analogue - {"CUmemLocationType", {"hipMemoryLocationType", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUmemLocationType_enum", {"hipMemoryLocationType", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUmemLocationType enum values - {"CU_MEM_LOCATION_TYPE_INVALID", {"HIP_MEM_LOCATION_TYPE_INVALID", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x0 - {"CU_MEM_LOCATION_TYPE_DEVICE", {"HIP_MEM_LOCATION_TYPE_DEVICE", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x1 - {"CU_MEM_LOCATION_TYPE_MAX", {"HIP_MEM_LOCATION_TYPE_MAX", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0xFFFFFFFF - - // no analogue - {"CUmemAllocationGranularity_flags", {"hipMemoryAllocationGranularityFlags", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - {"CUmemAllocationGranularity_flags_enum", {"hipMemoryLocationType", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - // CUmemAllocationGranularity_flags enum values - {"CU_MEM_ALLOC_GRANULARITY_MINIMUM", {"HIP_MEM_ALLOC_GRANULARITY_MINIMUM", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x0 - {"CU_MEM_ALLOC_GRANULARITY_RECOMMENDED", {"HIP_MEM_ALLOC_GRANULARITY_RECOMMENDED", "", CONV_NUMERIC_LITERAL, API_DRIVER, HIP_UNSUPPORTED}}, // 0x1 - - // 4. Typedefs - - // no analogue - {"CUdevice", {"hipDevice_t", "", CONV_TYPE, API_DRIVER}}, - {"CUdeviceptr", {"hipDeviceptr_t", "", CONV_TYPE, API_DRIVER}}, - - // cudaHostFn_t - {"CUhostFn", {"hipHostFn", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // no analogue - {"CUoccupancyB2DSize", {"hipOccupancyB2DSize", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // cudaStreamCallback_t - {"CUstreamCallback", {"hipStreamCallback_t", "", CONV_TYPE, API_DRIVER}}, - - // cudaSurfaceObject_t - {"CUsurfObject", {"hipSurfaceObject", "", CONV_TYPE, API_DRIVER, HIP_UNSUPPORTED}}, - - // cudaTextureObject_t - {"CUtexObject", {"hipTextureObject_t", "", CONV_TYPE, API_DRIVER}}, - - // 5. Defines - - {"__CUDACC__", {"__HIPCC__", "", CONV_DEFINE, API_DRIVER}}, - {"CUDA_CB", {"HIP_CB", "", CONV_DEFINE, API_DRIVER, HIP_UNSUPPORTED}}, - // cudaCpuDeviceId ((int)-1) - {"CU_DEVICE_CPU", {"hipCpuDeviceId", "", CONV_DEFINE, API_DRIVER, HIP_UNSUPPORTED}}, // ((CUdevice)-1) - // cudaInvalidDeviceId ((int)-1) - {"CU_DEVICE_INVALID", {"hipInvalidDeviceId", "", CONV_DEFINE, API_DRIVER, HIP_UNSUPPORTED}}, // ((CUdevice)-2) - // CUDA_IPC_HANDLE_SIZE - {"CU_IPC_HANDLE_SIZE", {"HIP_IPC_HANDLE_SIZE", "", CONV_DEFINE, API_DRIVER, HIP_UNSUPPORTED}}, // 64 - {"CU_LAUNCH_PARAM_BUFFER_POINTER", {"HIP_LAUNCH_PARAM_BUFFER_POINTER", "", CONV_DEFINE, API_DRIVER}}, // ((void*)0x01) - {"CU_LAUNCH_PARAM_BUFFER_SIZE", {"HIP_LAUNCH_PARAM_BUFFER_SIZE", "", CONV_DEFINE, API_DRIVER}}, // ((void*)0x02) - {"CU_LAUNCH_PARAM_END", {"HIP_LAUNCH_PARAM_END", "", CONV_DEFINE, API_DRIVER}}, // ((void*)0x00) - // cudaHostAllocPortable - {"CU_MEMHOSTALLOC_PORTABLE", {"hipHostMallocPortable", "", CONV_DEFINE, API_DRIVER}}, // 0x01 - // cudaHostAllocMapped - {"CU_MEMHOSTALLOC_DEVICEMAP", {"hipHostMallocMapped", "", CONV_DEFINE, API_DRIVER}}, // 0x02 - // cudaHostAllocWriteCombined - {"CU_MEMHOSTALLOC_WRITECOMBINED", {"hipHostMallocWriteCombined", "", CONV_DEFINE, API_DRIVER}}, // 0x04 - // cudaHostRegisterPortable - {"CU_MEMHOSTREGISTER_PORTABLE", {"hipHostRegisterPortable", "", CONV_DEFINE, API_DRIVER}}, // 0x01 - // cudaHostRegisterMapped - {"CU_MEMHOSTREGISTER_DEVICEMAP", {"hipHostRegisterMapped", "", CONV_DEFINE, API_DRIVER}}, // 0x02 - // cudaHostRegisterIoMemory - {"CU_MEMHOSTREGISTER_IOMEMORY", {"hipHostRegisterIoMemory", "", CONV_DEFINE, API_DRIVER}}, // 0x04 - {"CU_PARAM_TR_DEFAULT", {"HIP_PARAM_TR_DEFAULT", "", CONV_DEFINE, API_DRIVER, HIP_UNSUPPORTED}}, // -1 - // cudaStreamLegacy ((cudaStream_t)0x1) - {"CU_STREAM_LEGACY", {"hipStreamLegacy", "", CONV_DEFINE, API_DRIVER, HIP_UNSUPPORTED}}, // ((CUstream)0x1) - // cudaStreamPerThread ((cudaStream_t)0x2) - {"CU_STREAM_PER_THREAD", {"hipStreamPerThread", "", CONV_DEFINE, API_DRIVER, HIP_UNSUPPORTED}}, // ((CUstream)0x2) - {"CU_TRSA_OVERRIDE_FORMAT", {"HIP_TRSA_OVERRIDE_FORMAT", "", CONV_DEFINE, API_DRIVER}}, // 0x01 - {"CU_TRSF_NORMALIZED_COORDINATES", {"HIP_TRSF_NORMALIZED_COORDINATES", "", CONV_DEFINE, API_DRIVER}}, // 0x02 - {"CU_TRSF_READ_AS_INTEGER", {"HIP_TRSF_READ_AS_INTEGER", "", CONV_DEFINE, API_DRIVER}}, // 0x01 - {"CU_TRSF_SRGB", {"HIP_TRSF_SRGB", "", CONV_DEFINE, API_DRIVER, HIP_UNSUPPORTED}}, // 0x10 - // no analogue - // NOTE: Deprecated, use CUDA_ARRAY3D_LAYERED - {"CUDA_ARRAY3D_2DARRAY", {"HIP_ARRAY3D_2DARRAY", "", CONV_DEFINE, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - // cudaArrayLayered - {"CUDA_ARRAY3D_LAYERED", {"hipArrayLayered", "", CONV_DEFINE, API_DRIVER}}, // 0x01 - // cudaArraySurfaceLoadStore - {"CUDA_ARRAY3D_SURFACE_LDST", {"hipArraySurfaceLoadStore", "", CONV_DEFINE, API_DRIVER}}, // 0x02 - // cudaArrayCubemap - {"CUDA_ARRAY3D_CUBEMAP", {"hipArrayCubemap", "", CONV_DEFINE, API_DRIVER}}, // 0x04 - // cudaArrayTextureGather - {"CUDA_ARRAY3D_TEXTURE_GATHER", {"hipArrayTextureGather", "", CONV_DEFINE, API_DRIVER}}, // 0x08 - // no analogue - {"CUDA_ARRAY3D_DEPTH_TEXTURE", {"hipArrayDepthTexture", "", CONV_DEFINE, API_DRIVER, HIP_UNSUPPORTED}}, // 0x10 - // cudaArrayColorAttachment - {"CUDA_ARRAY3D_COLOR_ATTACHMENT", {"hipArrayColorAttachment", "", CONV_DEFINE, API_DRIVER, HIP_UNSUPPORTED}}, // 0x20 - // cudaCooperativeLaunchMultiDeviceNoPreSync - {"CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC", {"hipCooperativeLaunchMultiDeviceNoPreSync", "", CONV_DEFINE, API_DRIVER}}, // 0x01 - // cudaCooperativeLaunchMultiDeviceNoPostSync - {"CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC", {"hipCooperativeLaunchMultiDeviceNoPostSync", "", CONV_DEFINE, API_DRIVER}}, // 0x02 - // cudaExternalMemoryDedicated - {"CUDA_EXTERNAL_MEMORY_DEDICATED", {"hipExternalMemoryDedicated", "", CONV_DEFINE, API_DRIVER, HIP_UNSUPPORTED}}, // 0x1 - // cudaExternalSemaphoreSignalSkipNvSciBufMemSync - {"CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC", {"hipExternalSemaphoreSignalSkipNvSciBufMemSync", "", CONV_DEFINE, API_DRIVER, HIP_UNSUPPORTED}}, // 0x01 - // cudaExternalSemaphoreWaitSkipNvSciBufMemSync - {"CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC", {"hipExternalSemaphoreWaitSkipNvSciBufMemSync", "", CONV_DEFINE, API_DRIVER, HIP_UNSUPPORTED}}, // 0x02 - // cudaNvSciSyncAttrSignal - {"CUDA_NVSCISYNC_ATTR_SIGNAL", {"hipNvSciSyncAttrSignal", "", CONV_DEFINE, API_DRIVER, HIP_UNSUPPORTED}}, // 0x1 - // cudaNvSciSyncAttrWait - {"CUDA_NVSCISYNC_ATTR_WAIT", {"hipNvSciSyncAttrWait", "", CONV_DEFINE, API_DRIVER, HIP_UNSUPPORTED}}, // 0x1 - {"CUDA_VERSION", {"HIP_VERSION", "", CONV_DEFINE, API_DRIVER, HIP_UNSUPPORTED}}, // 10000 -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_FFT_API_functions.cpp b/hipamd/hipify-clang/src/CUDA2HIP_FFT_API_functions.cpp deleted file mode 100644 index 29e51f9b5c..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_FFT_API_functions.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Map of all functions -const std::map CUDA_FFT_FUNCTION_MAP{ - {"cufftPlan1d", {"hipfftPlan1d", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftPlan2d", {"hipfftPlan2d", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftPlan3d", {"hipfftPlan3d", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftPlanMany", {"hipfftPlanMany", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftMakePlan1d", {"hipfftMakePlan1d", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftMakePlan2d", {"hipfftMakePlan2d", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftMakePlan3d", {"hipfftMakePlan3d", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftMakePlanMany", {"hipfftMakePlanMany", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftMakePlanMany64", {"hipfftMakePlanMany64", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftGetSizeMany64", {"hipfftGetSizeMany64", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftEstimate1d", {"hipfftEstimate1d", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftEstimate2d", {"hipfftEstimate2d", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftEstimate3d", {"hipfftEstimate3d", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftEstimateMany", {"hipfftEstimateMany", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftCreate", {"hipfftCreate", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftGetSize1d", {"hipfftGetSize1d", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftGetSize2d", {"hipfftGetSize2d", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftGetSize3d", {"hipfftGetSize3d", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftGetSizeMany", {"hipfftGetSizeMany", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftGetSize", {"hipfftGetSize", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftSetWorkArea", {"hipfftSetWorkArea", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftSetAutoAllocation", {"hipfftSetAutoAllocation", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftExecC2C", {"hipfftExecC2C", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftExecR2C", {"hipfftExecR2C", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftExecC2R", {"hipfftExecC2R", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftExecZ2Z", {"hipfftExecZ2Z", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftExecD2Z", {"hipfftExecD2Z", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftExecZ2D", {"hipfftExecZ2D", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftSetStream", {"hipfftSetStream", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftDestroy", {"hipfftDestroy", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftGetVersion", {"hipfftGetVersion", "", CONV_LIB_FUNC, API_FFT}}, - {"cufftGetProperty", {"hipfftGetProperty", "", CONV_LIB_FUNC, API_FFT, HIP_UNSUPPORTED}}, -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_FFT_API_types.cpp b/hipamd/hipify-clang/src/CUDA2HIP_FFT_API_types.cpp deleted file mode 100644 index 499afe7695..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_FFT_API_types.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Map of all functions -const std::map CUDA_FFT_TYPE_NAME_MAP{ - - // cuFFT defines - {"CUFFT_FORWARD", {"HIPFFT_FORWARD", "", CONV_NUMERIC_LITERAL, API_DNN}}, // -1 - {"CUFFT_INVERSE", {"HIPFFT_BACKWARD", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1 - {"CUFFT_COMPATIBILITY_DEFAULT", {"HIPFFT_COMPATIBILITY_DEFAULT", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // CUFFT_COMPATIBILITY_FFTW_PADDING - - // cuFFT enums - {"cufftResult_t", {"hipfftResult_t", "", CONV_TYPE, API_FFT}}, - {"cufftResult", {"hipfftResult", "", CONV_TYPE, API_FFT}}, - {"CUFFT_SUCCESS", {"HIPFFT_SUCCESS", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0x0 0 - {"CUFFT_INVALID_PLAN", {"HIPFFT_INVALID_PLAN", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0x1 1 - {"CUFFT_ALLOC_FAILED", {"HIPFFT_ALLOC_FAILED", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0x2 2 - {"CUFFT_INVALID_TYPE", {"HIPFFT_INVALID_TYPE", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0x3 3 - {"CUFFT_INVALID_VALUE", {"HIPFFT_INVALID_VALUE", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0x4 4 - {"CUFFT_INTERNAL_ERROR", {"HIPFFT_INTERNAL_ERROR", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0x5 5 - {"CUFFT_EXEC_FAILED", {"HIPFFT_EXEC_FAILED", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0x6 6 - {"CUFFT_SETUP_FAILED", {"HIPFFT_SETUP_FAILED", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0x7 7 - {"CUFFT_INVALID_SIZE", {"HIPFFT_INVALID_SIZE", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0x8 8 - {"CUFFT_UNALIGNED_DATA", {"HIPFFT_UNALIGNED_DATA", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0x9 9 - {"CUFFT_INCOMPLETE_PARAMETER_LIST", {"HIPFFT_INCOMPLETE_PARAMETER_LIST", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0xA 10 - {"CUFFT_INVALID_DEVICE", {"HIPFFT_INVALID_DEVICE", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0xB 11 - {"CUFFT_PARSE_ERROR", {"HIPFFT_PARSE_ERROR", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0xC 12 - {"CUFFT_NO_WORKSPACE", {"HIPFFT_NO_WORKSPACE", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0xD 13 - {"CUFFT_NOT_IMPLEMENTED", {"HIPFFT_NOT_IMPLEMENTED", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0xE 14 - {"CUFFT_LICENSE_ERROR", {"HIPFFT_LICENSE_ERROR", "", CONV_NUMERIC_LITERAL, API_FFT, HIP_UNSUPPORTED}}, - {"CUFFT_NOT_SUPPORTED", {"HIPFFT_NOT_SUPPORTED", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0x10 16 - {"cufftType_t", {"hipfftType_t", "", CONV_TYPE, API_FFT}}, - {"cufftType", {"hipfftType", "", CONV_TYPE, API_FFT}}, - {"CUFFT_R2C", {"HIPFFT_R2C", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0x2a - {"CUFFT_C2R", {"HIPFFT_C2R", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0x2c - {"CUFFT_C2C", {"HIPFFT_C2C", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0x29 - {"CUFFT_D2Z", {"HIPFFT_D2Z", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0x6a - {"CUFFT_Z2D", {"HIPFFT_Z2D", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0x6c - {"CUFFT_Z2Z", {"HIPFFT_Z2Z", "", CONV_NUMERIC_LITERAL, API_FFT}}, // 0x69 - {"cufftCompatibility_t", {"hipfftCompatibility_t", "", CONV_TYPE, API_FFT, HIP_UNSUPPORTED}}, - {"cufftCompatibility", {"hipfftCompatibility", "", CONV_TYPE, API_FFT, HIP_UNSUPPORTED}}, - {"CUFFT_COMPATIBILITY_FFTW_PADDING", {"HIPFFT_COMPATIBILITY_FFTW_PADDING", "", CONV_NUMERIC_LITERAL, API_FFT, HIP_UNSUPPORTED}}, // 0x01 - - // cuFFT types - {"cufftReal", {"hipfftReal", "", CONV_TYPE, API_FFT}}, - {"cufftDoubleReal", {"hipfftDoubleReal", "", CONV_TYPE, API_FFT}}, - {"cufftComplex", {"hipfftComplex", "", CONV_TYPE, API_FFT}}, - {"cufftDoubleComplex", {"hipfftDoubleComplex", "", CONV_TYPE, API_FFT}}, - {"cufftHandle", {"hipfftHandle", "", CONV_TYPE, API_FFT}}, -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_Perl.cpp b/hipamd/hipify-clang/src/CUDA2HIP_Perl.cpp deleted file mode 100644 index d74ba70f21..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_Perl.cpp +++ /dev/null @@ -1,488 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include -#include -#include "llvm/ADT/StringRef.h" -#include "llvm/ADT/SmallString.h" -#include "llvm/Support/Path.h" -#include "CUDA2HIP.h" -#include "CUDA2HIP_Scripting.h" -#include "ArgParse.h" -#include "StringUtils.h" -#include "LLVMCompat.h" -#include "Statistics.h" - -namespace perl { - - using namespace std; - using namespace llvm; - - const string sCopyright = - "##\n" - "# Copyright (c) 2015-present Advanced Micro Devices, Inc. All rights reserved.\n" - "#\n" - "# Permission is hereby granted, free of charge, to any person obtaining a copy\n" - "# of this software and associated documentation files (the \"Software\"), to deal\n" - "# in the Software without restriction, including without limitation the rights\n" - "# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n" - "# copies of the Software, and to permit persons to whom the Software is\n" - "# furnished to do so, subject to the following conditions:\n" - "#\n" - "# The above copyright notice and this permission notice shall be included in\n" - "# all copies or substantial portions of the Software.\n" - "#\n" - "# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n" - "# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n" - "# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n" - "# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n" - "# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n" - "# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n" - "# THE SOFTWARE.\n" - "##\n"; - - const string sImportant = "# IMPORTANT: Do not change this file manually: it is generated by hipify-clang --perl"; - const string tab = " "; - const string tab_2 = tab + tab; - const string tab_3 = tab_2 + tab; - const string tab_4 = tab_3 + tab; - const string tab_5 = tab_4 + tab; - const string tab_6 = tab_5 + tab; - const string endl_2 = "\n\n"; - const string endl_tab = "\n" + tab; - const string endl_tab_2 = "\n" + tab_2; - const string endl_tab_3 = "\n" + tab_3; - const string endl_tab_4 = "\n" + tab_4; - const string endl_tab_5 = "\n" + tab_5; - const string sub = "sub "; - const string my = "my "; - const string my_k = my + "$k = 0;"; - const string return_0 = "return 0;\n"; - const string return_k = "return $k;\n"; - const string while_ = "while "; - const string unless_ = "unless "; - const string foreach = "foreach "; - const string foreach_func = foreach + "$func (\n"; - const string print = "print STDERR "; - const string printf = "printf STDERR "; - const string no_warns = "no warnings qw/uninitialized/;"; - const string hipify_perl = "hipify-perl"; - - const string sCudaDevice = "cudaDevice"; - const string sCudaDeviceId = "cudaDeviceId"; - const string sCudaDevices = "cudaDevices"; - const string sCudaDevice_t = "cudaDevice_t"; - const string sCudaIDs = "cudaIDs"; - const string sCudaGridDim = "cudaGridDim"; - const string sCudaDimGrid = "cudaDimGrid"; - const string sCudaDimBlock = "cudaDimBlock"; - const string sCudaGradInput = "cudaGradInput"; - const string sCudaGradOutput = "cudaGradOutput"; - const string sCudaInput = "cudaInput"; - const string sCudaOutput = "cudaOutput"; - const string sCudaIndices = "cudaIndices"; - const string sCudaGaugeField = "cudaGaugeField"; - const string sCudaMom = "cudaMom"; - const string sCudaGauge = "cudaGauge"; - const string sCudaInGauge = "cudaInGauge"; - const string sCudaColorSpinorField = "cudaColorSpinorField"; - const string sCudaSiteLink = "cudaSiteLink"; - const string sCudaFatLink = "cudaFatLink"; - const string sCudaStaple = "cudaStaple"; - const string sCudaCloverField = "cudaCloverField"; - const string sCudaParam = "cudaParam"; - - const set Whitelist{ - {sCudaDevice}, {sCudaDevice_t}, {sCudaIDs}, {sCudaGridDim}, {sCudaDimGrid}, {sCudaDimBlock}, {sCudaDeviceId}, {sCudaDevices}, - {sCudaGradInput}, {sCudaGradOutput}, {sCudaInput}, {sCudaOutput}, {sCudaIndices}, {sCudaGaugeField}, {sCudaMom}, {sCudaGauge}, - {sCudaInGauge}, {sCudaColorSpinorField}, {sCudaSiteLink}, {sCudaFatLink}, {sCudaStaple}, {sCudaCloverField}, {sCudaParam} - }; - - void generateHeader(unique_ptr &streamPtr) { - *streamPtr.get() << "#!/usr/bin/perl -w" << endl_2; - *streamPtr.get() << sCopyright << endl; - *streamPtr.get() << sImportant << endl_2; - *streamPtr.get() << "#usage " << hipify_perl << " [OPTIONS] INPUT_FILE" << endl_2; - *streamPtr.get() << "use Getopt::Long;" << endl; - *streamPtr.get() << my << "$whitelist = \"\";" << endl; - *streamPtr.get() << my << "$fileName = \"\";" << endl; - *streamPtr.get() << my << "%ft;" << endl; - *streamPtr.get() << my << "%Tkernels;" << endl_2; - *streamPtr.get() << "GetOptions(" << endl; - *streamPtr.get() << tab << " \"examine\" => \\$examine # Combines -no-output and -print-stats options." << endl; - *streamPtr.get() << tab << ", \"inplace\" => \\$inplace # Modify input file inplace, replacing input with hipified output, save backup in .prehip file." << endl; - *streamPtr.get() << tab << ", \"no-output\" => \\$no_output # Don't write any translated output to stdout." << endl; - *streamPtr.get() << tab << ", \"print-stats\" => \\$print_stats # Print translation statistics." << endl; - *streamPtr.get() << tab << ", \"quiet-warnings\" => \\$quiet_warnings # Don't print warnings on unknown CUDA functions." << endl; - *streamPtr.get() << tab << ", \"whitelist=s\" => \\$whitelist # TODO: test it beforehand" << endl; - *streamPtr.get() << ");" << endl_2; - *streamPtr.get() << "$print_stats = 1 if $examine;" << endl; - *streamPtr.get() << "$no_output = 1 if $examine;" << endl_2; - *streamPtr.get() << "# Whitelist of cuda[A-Z] identifiers, which are commonly used in CUDA sources but don't map to any CUDA API:" << endl; - *streamPtr.get() << "@whitelist = ("; - unsigned int num = 0; - for (const string &m : Whitelist) { - *streamPtr.get() << endl_tab << (num ? ", " : " ") << "\"" << m << "\""; - ++num; - } - *streamPtr.get() << endl << ");" << endl_2; - *streamPtr.get() << "push(@whitelist, split(',', $whitelist));" << endl_2; - } - - void generateStatFunctions(unique_ptr &streamPtr) { - *streamPtr.get() << endl << sub << "totalStats" << " {" << endl; - *streamPtr.get() << tab << my << "%count = %{ shift() };" << endl; - *streamPtr.get() << tab << my << "$total = 0;" << endl; - *streamPtr.get() << tab << foreach << "$key (keys %count) {" << endl; - *streamPtr.get() << tab_2 << "$total += $count{$key};" << endl_tab << "}" << endl; - *streamPtr.get() << tab << "return $total;" << endl << "};" << endl; - *streamPtr.get() << endl << sub << "printStats" << " {" << endl; - *streamPtr.get() << tab << my << "$label = shift();" << endl; - *streamPtr.get() << tab << my << "@statNames = @{ shift() };" << endl; - *streamPtr.get() << tab << my << "%counts = %{ shift() };" << endl; - *streamPtr.get() << tab << my << "$warnings = shift();" << endl; - *streamPtr.get() << tab << my << "$loc = shift();" << endl; - *streamPtr.get() << tab << my << "$total = totalStats(\\%counts);" << endl; - *streamPtr.get() << tab << printf << "\"%s %d CUDA->HIP refs ( \", $label, $total;" << endl; - *streamPtr.get() << tab << foreach << "$stat (@statNames) {" << endl; - *streamPtr.get() << tab_2 << printf << "\"%s:%d \", $stat, $counts{$stat};" << endl_tab << "}" << endl; - *streamPtr.get() << tab << printf << "\")\\n warn:%d LOC:%d\", $warnings, $loc;" << endl << "}" << endl; - for (int i = 0; i < 2; ++i) { - *streamPtr.get() << endl << sub << (i ? "clearStats" : "addStats") << " {" << endl; - *streamPtr.get() << tab << my << "$dest_ref = shift();" << endl; - *streamPtr.get() << tab << my << (i ? "@statNames = @{ shift() };" : "%adder = %{ shift() };") << endl; - *streamPtr.get() << tab << foreach << (i ? "$stat(@statNames)" : "$key (keys %adder)") << " {" << endl; - *streamPtr.get() << tab_2 << "$dest_ref->" << (i ? "{$stat} = 0;" : "{$key} += $adder{$key};") << endl_tab << "}" << endl << "}" << endl; - } - } - - void generateSimpleSubstitutions(unique_ptr &streamPtr) { - *streamPtr.get() << endl << sub << "simpleSubstitutions" << " {" << endl; - for (int i = 0; i < NUM_CONV_TYPES; ++i) { - if (i == CONV_INCLUDE_CUDA_MAIN_H || i == CONV_INCLUDE) { - for (auto &ma : CUDA_INCLUDE_MAP) { - if (Statistics::isUnsupported(ma.second)) continue; - if (i == ma.second.type) { - string sCUDA = ma.first.str(); - string sHIP = ma.second.hipName.str(); - sCUDA = regex_replace(sCUDA, regex("/"), "\\/"); - sHIP = regex_replace(sHIP, regex("/"), "\\/"); - *streamPtr.get() << tab << "$ft{'" << counterNames[ma.second.type] << "'} += s/\\b" << sCUDA << "\\b/" << sHIP << "/g;" << endl; - } - } - } else { - for (auto &ma : CUDA_RENAMES_MAP()) { - if (Statistics::isUnsupported(ma.second)) continue; - if (i == ma.second.type) { - *streamPtr.get() << tab << "$ft{'" << counterNames[ma.second.type] << "'} += s/\\b" << ma.first.str() << "\\b/" << ma.second.hipName.str() << "/g;" << endl; - } - } - } - } - *streamPtr.get() << "}" << endl; - } - - void generateExternShared(unique_ptr &streamPtr) { - *streamPtr.get() << endl << "# CUDA extern __shared__ syntax replace with HIP_DYNAMIC_SHARED() macro" << endl; - *streamPtr.get() << sub << "transformExternShared" << " {" << endl; - *streamPtr.get() << tab << no_warns << endl; - *streamPtr.get() << tab << my_k << endl; - *streamPtr.get() << tab << "$k += s/extern\\s+([\\w\\(\\)]+)?\\s*__shared__\\s+([\\w:<>\\s]+)\\s+(\\w+)\\s*\\[\\s*\\]\\s*;/HIP_DYNAMIC_SHARED($1 $2, $3)/g;" << endl; - *streamPtr.get() << tab << "$ft{'extern_shared'} += $k;" << endl << "}" << endl; - } - - void generateKernelLaunch(unique_ptr &streamPtr) { - *streamPtr.get() << endl << "# CUDA Kernel Launch Syntax" << endl << sub << "transformKernelLaunch" << " {" << endl; - *streamPtr.get() << tab << no_warns << endl; - *streamPtr.get() << tab << my_k << endl_2; - - string s_k = "$k += s/([:|\\w]+)\\s*"; - *streamPtr.get() << tab << "# Handle the kern<...><<>>() syntax with empty args:" << endl; - *streamPtr.get() << tab << s_k << "<(.+)>\\s*<<<\\s*(.+)\\s*,\\s*(.+)\\s*,\\s*(.+)\\s*,\\s*(.+)\\s*>>>(\\s*)\\((\\s*)\\)/hipLaunchKernelGGL(HIP_KERNEL_NAME($1<$2>), dim3($3), dim3($4), $5, $6)/g;" << endl; - *streamPtr.get() << tab << "# Handle the kern<<>>() syntax with empty args:" << endl; - *streamPtr.get() << tab << s_k << "<<<\\s*(.+)\\s*,\\s*(.+)\\s*,\\s*(.+)\\s*,\\s*(.+)\\s*>>>(\\s*)\\((\\s*)\\)/hipLaunchKernelGGL($1, dim3($2), dim3($3), $4, $5)/g;" << endl_2; - - *streamPtr.get() << tab << "# Handle the kern<...><<>>(...) syntax with non-empty args:" << endl; - *streamPtr.get() << tab << s_k << "<(.+)>\\s*<<<\\s*(.+)\\s*,\\s*(.+)\\s*,\\s*(.+)\\s*,\\s*(.+)\\s*>>>(\\s*)\\(/hipLaunchKernelGGL(HIP_KERNEL_NAME($1<$2>), dim3($3), dim3($4), $5, $6, /g;" << endl; - *streamPtr.get() << tab << "# Handle the kern<<>>(...) syntax with non-empty args:" << endl; - *streamPtr.get() << tab << s_k << "<<<\\s*(.+)\\s*,\\s*(.+)\\s*,\\s*(.+)\\s*,\\s*(.+)\\s*>>>(\\s*)\\(/hipLaunchKernelGGL($1, dim3($2), dim3($3), $4, $5, /g;" << endl_2; - - *streamPtr.get() << tab << "# Handle the kern<...><<>>() syntax with empty args:" << endl; - *streamPtr.get() << tab << s_k << "<(.+)>\\s*<<<\\s*(.+)\\s*,\\s*(.+)\\s*,\\s*(.+)\\s*>>>(\\s*)\\((\\s*)\\)/hipLaunchKernelGGL(HIP_KERNEL_NAME($1<$2>), dim3($3), dim3($4), $5, 0)/g;" << endl; - *streamPtr.get() << tab << "# Handle the kern<<>>() syntax with empty args:" << endl; - *streamPtr.get() << tab << s_k << "<<<\\s*(.+)\\s*,\\s*(.+)\\s*,\\s*(.+)\\s*>>>(\\s*)\\((\\s*)\\)/hipLaunchKernelGGL($1, dim3($2), dim3($3), $4, 0)/g;" << endl_2; - - *streamPtr.get() << tab << "# Handle the kern<...><>>(...) syntax with non-empty args:" << endl; - *streamPtr.get() << tab << s_k << "<(.+)>\\s*<<<\\s*(.+)\\s*,\\s*(.+)\\s*,\\s*(.+)\\s*>>>(\\s*)\\(/hipLaunchKernelGGL(HIP_KERNEL_NAME($1<$2>), dim3($3), dim3($4), $5, 0, /g;" << endl; - *streamPtr.get() << tab << "# Handle the kern<<>>(...) syntax with non-empty args:" << endl; - *streamPtr.get() << tab << s_k << "<<<\\s*(.+)\\s*,\\s*(.+)\\s*,\\s*(.+)\\s*>>>(\\s*)\\(/hipLaunchKernelGGL($1, dim3($2), dim3($3), $4, 0, /g;" << endl_2; - - *streamPtr.get() << tab << "# Handle the kern<...><<>>() syntax with empty args:" << endl; - *streamPtr.get() << tab << s_k << "<(.+)>\\s*<<<\\s*(.+)\\s*,\\s*(.+)\\s*>>>(\\s*)\\((\\s*)\\)/hipLaunchKernelGGL(HIP_KERNEL_NAME($1<$2>), dim3($3), dim3($4), 0, 0)/g;" << endl; - *streamPtr.get() << tab << "# Handle the kern<<>>() syntax with empty args:" << endl; - *streamPtr.get() << tab << s_k << "<<<\\s*(.+)\\s*,\\s*(.+)\\s*>>>(\\s*)\\((\\s*)\\)/hipLaunchKernelGGL($1, dim3($2), dim3($3), 0, 0)/g;" << endl_2; - - *streamPtr.get() << tab << "# Handle the kern<...><<>>(...) syntax with non-empty args:" << endl; - *streamPtr.get() << tab << s_k << "<(.+)>\\s*<<<\\s*(.+)\\s*,\\s*(.+)\\s*>>>(\\s*)\\(/hipLaunchKernelGGL(HIP_KERNEL_NAME($1<$2>), dim3($3), dim3($4), 0, 0, /g;" << endl; - *streamPtr.get() << tab << "# Handle the kern<<>>(...) syntax with non-empty args:" << endl; - *streamPtr.get() << tab << s_k << "<<<\\s*(.+)\\s*,\\s*(.+)\\s*>>>(\\s*)\\(/hipLaunchKernelGGL($1, dim3($2), dim3($3), 0, 0, /g;" << endl_2; - - *streamPtr.get() << tab << "if ($k) {" << endl; - *streamPtr.get() << tab_2 << "$ft{'kernel_launch'} += $k;" << endl; - *streamPtr.get() << tab_2 << "$Tkernels{$1}++;" << endl_tab << "}" << endl << "}" << endl; - } - - void generateCubNamespace(unique_ptr &streamPtr) { - *streamPtr.get() << endl << sub << "transformCubNamespace" << " {" << endl_tab << my_k << endl; - *streamPtr.get() << tab << "$k += s/using\\s*namespace\\s*cub/using namespace hipcub/g;" << endl; - *streamPtr.get() << tab << "$k += s/\\bcub::\\b/hipcub::/g;" << endl << tab << return_k << "}" << endl; - } - - void generateHostFunctions(unique_ptr &streamPtr) { - *streamPtr.get() << endl << sub << "transformHostFunctions" << " {" << endl_tab << my_k << endl; - set &funcSet = DeviceSymbolFunctions0; - const string s0 = "$k += s/(?second.hipName.str() << "\""; - count++; - } - } - *streamPtr.get() << endl_tab << ")" << endl_tab << "{" << endl_tab_2; - switch (i) { - case 0: - default: *streamPtr.get() << s0 << sHIP_SYMBOL << "\\($2\\),/g" << endl; break; - case 1: *streamPtr.get() << s1 << sHIP_SYMBOL << "\\($3\\)$4/g;" << endl; break; - case 2: *streamPtr.get() << s0 << s_reinterpret_cast << "\\($2\\),/g" << endl; break; - case 3: *streamPtr.get() << s1 << s_reinterpret_cast << "\\($3\\)$4/g;" << endl; break; - } - *streamPtr.get() << tab << "}" << endl; - } - *streamPtr.get() << tab << return_k << "}" << endl; - } - - void generateDeviceFunctions(unique_ptr &streamPtr) { - unsigned int countUnsupported = 0; - unsigned int countSupported = 0; - stringstream sSupported; - stringstream sUnsupported; - for (auto &ma : CUDA_DEVICE_FUNC_MAP) { - bool isUnsupported = Statistics::isUnsupported(ma.second); - (isUnsupported ? sUnsupported : sSupported) << ((isUnsupported && countUnsupported) || (!isUnsupported && countSupported) ? ",\n" : "") << tab_2 << "\"" << ma.first.str() << "\""; - if (isUnsupported) countUnsupported++; - else countSupported++; - } - stringstream subCountSupported; - stringstream subWarnUnsupported; - stringstream subCommon; - string sCommon = tab + my_k + "\n" + tab + foreach_func; - subCountSupported << endl << sub << "countSupportedDeviceFunctions" << " {" << endl << (countSupported ? sCommon : tab + return_0); - subWarnUnsupported << endl << sub << "warnUnsupportedDeviceFunctions" << " {" << endl << (countUnsupported ? tab + my + "$line_num = shift;\n" + sCommon : tab + return_0); - if (countSupported) subCountSupported << sSupported.str() << endl_tab << ")" << endl; - if (countUnsupported) subWarnUnsupported << sUnsupported.str() << endl_tab << ")" << endl; - if (countSupported || countUnsupported) { - subCommon << tab << "{" << endl; - subCommon << tab_2 << "# match device function from the list, except those, which have a namespace prefix (aka somenamespace::umin(...));" << endl; - subCommon << tab_2 << "# function with only global namespace qualifier '::' (aka ::umin(...)) should be treated as a device function (and warned as well as without such qualifier);" << endl; - subCommon << tab_2 << my << "$mt_namespace = m/(\\w+)::($func)\\s*\\(\\s*.*\\s*\\)/g;" << endl; - subCommon << tab_2 << my << "$mt = m/($func)\\s*\\(\\s*.*\\s*\\)/g;" << endl; - subCommon << tab_2 << "if ($mt && !$mt_namespace) {" << endl; - subCommon << tab_3 << "$k += $mt;" << endl; - } - if (countSupported) subCountSupported << subCommon.str(); - if (countUnsupported) { - subWarnUnsupported << subCommon.str(); - subWarnUnsupported << tab_3 << print << "\" warning: $fileName:$line_num: unsupported device function \\\"$func\\\": $_\\n\";" << endl; - } - if (countSupported || countUnsupported) sCommon = tab_2 + "}\n" + tab + "}\n" + tab + return_k; - if (countSupported) subCountSupported << sCommon; - if (countUnsupported) subWarnUnsupported << sCommon; - subCountSupported << "}" << endl; - subWarnUnsupported << "}" << endl; - *streamPtr.get() << subCountSupported.str(); - *streamPtr.get() << subWarnUnsupported.str(); - } - - bool generate(bool Generate) { - if (!Generate) return true; - string dstHipifyPerl = hipify_perl, dstHipifyPerlDir = OutputHipifyPerlDir; - error_code EC; - if (!dstHipifyPerlDir.empty()) { - string sOutputHipifyPerlDirAbsPath = getAbsoluteDirectoryPath(OutputHipifyPerlDir, EC, "output " + hipify_perl); - if (EC) return false; - dstHipifyPerl = sOutputHipifyPerlDirAbsPath + "/" + dstHipifyPerl; - } - SmallString<128> tmpFile; - EC = sys::fs::createTemporaryFile(dstHipifyPerl, hipify_perl, tmpFile); - if (EC) { - llvm::errs() << "\n" << sHipify << sError << EC.message() << ": " << tmpFile << "\n"; - return false; - } - unique_ptr streamPtr = unique_ptr(new ofstream(tmpFile.c_str(), ios_base::trunc)); - generateHeader(streamPtr); - string sConv = my + "$apiCalls = "; - unsigned int exclude[3] = { CONV_DEVICE_FUNC, CONV_EXTERN_SHARED, CONV_KERNEL_LAUNCH }; - *streamPtr.get() << "@statNames = ("; - for (unsigned int i = 0; i < NUM_CONV_TYPES - 1; ++i) { - *streamPtr.get() << "\"" << counterNames[i] << "\", "; - if (any_of(exclude, exclude + 3, [&i](unsigned int x) { return x == i; })) continue; - sConv += "$ft{'" + string(counterNames[i]) + "'}" + (i < NUM_CONV_TYPES - 2 ? " + " : ";"); - } - if (sConv.back() == ' ') sConv = sConv.substr(0, sConv.size() - 3) + ";"; - *streamPtr.get() << "\"" << counterNames[NUM_CONV_TYPES - 1] << "\");" << endl; - generateStatFunctions(streamPtr); - generateSimpleSubstitutions(streamPtr); - generateExternShared(streamPtr); - generateKernelLaunch(streamPtr); - generateCubNamespace(streamPtr); - generateHostFunctions(streamPtr); - generateDeviceFunctions(streamPtr); - *streamPtr.get() << endl << "# Count of transforms in all files" << endl; - *streamPtr.get() << my << "%tt;" << endl; - *streamPtr.get() << "clearStats(\\%tt, \\@statNames);" << endl; - *streamPtr.get() << "$Twarnings = 0;" << endl; - *streamPtr.get() << "$TlineCount = 0;" << endl; - *streamPtr.get() << my << "%TwarningTags;" << endl; - *streamPtr.get() << my << "$fileCount = @ARGV;" << endl_2; - *streamPtr.get() << while_ << "(@ARGV) {" << endl; - *streamPtr.get() << tab << "$fileName=shift (@ARGV);" << endl; - *streamPtr.get() << tab << "if ($inplace) {" << endl; - *streamPtr.get() << tab_2 << my << "$file_prehip = \"$fileName\" . \".prehip\";" << endl; - *streamPtr.get() << tab_2 << my << "$infile;" << endl; - *streamPtr.get() << tab_2 << my << "$outfile;" << endl; - *streamPtr.get() << tab_2 << "if (-e $file_prehip) {" << endl; - *streamPtr.get() << tab_3 << "$infile = $file_prehip;" << endl; - *streamPtr.get() << tab_3 << "$outfile = $fileName;" << endl; - *streamPtr.get() << tab_2 << "} else {" << endl; - *streamPtr.get() << tab_3 << "system (\"cp $fileName $file_prehip\");" << endl; - *streamPtr.get() << tab_3 << "$infile = $file_prehip;" << endl; - *streamPtr.get() << tab_3 << "$outfile = $fileName;" << endl_tab_2 << "}" << endl; - *streamPtr.get() << tab_2 << "open(INFILE,\"<\", $infile) or die \"error: could not open $infile\";" << endl; - *streamPtr.get() << tab_2 << "open(OUTFILE,\">\", $outfile) or die \"error: could not open $outfile\";" << endl; - *streamPtr.get() << tab_2 << "$OUTFILE = OUTFILE;" << endl; - *streamPtr.get() << tab << "} else {" << endl; - *streamPtr.get() << tab_2 << "open(INFILE,\"<\", $fileName) or die \"error: could not open $fileName\";" << endl; - *streamPtr.get() << tab_2 << "$OUTFILE = STDOUT;" << endl_tab << "}" << endl; - *streamPtr.get() << tab << "# Count of transforms in this file" << endl; - *streamPtr.get() << tab << "clearStats(\\%ft, \\@statNames);" << endl; - *streamPtr.get() << tab << my << "$countIncludes = 0;" << endl; - *streamPtr.get() << tab << my << "$countKeywords = 0;" << endl; - *streamPtr.get() << tab << my << "$warnings = 0;" << endl; - *streamPtr.get() << tab << my << "%warningTags;" << endl; - *streamPtr.get() << tab << my << "$lineCount = 0;" << endl; - *streamPtr.get() << tab << "undef $/;" << endl; - *streamPtr.get() << tab << "# Read whole file at once, so we can match newlines" << endl; - *streamPtr.get() << tab << while_ << "() {" << endl; - *streamPtr.get() << tab_2 << "$countKeywords += m/__global__/;" << endl; - *streamPtr.get() << tab_2 << "$countKeywords += m/__shared__/;" << endl; - *streamPtr.get() << tab_2 << "simpleSubstitutions();" << endl; - *streamPtr.get() << tab_2 << "transformExternShared();" << endl; - *streamPtr.get() << tab_2 << "transformKernelLaunch();" << endl; - *streamPtr.get() << tab_2 << "transformCubNamespace();" << endl; - *streamPtr.get() << tab_2 << "if ($print_stats) {" << endl; - *streamPtr.get() << tab_3 << while_ << "(/(\\b(hip|HIP)([A-Z]|_)\\w+\\b)/g) {" << endl; - *streamPtr.get() << tab_4 << "$convertedTags{$1}++;" << endl_tab_3 << "}" << endl_tab_2 << "}" << endl; - *streamPtr.get() << tab_2 << my << "$hasDeviceCode = $countKeywords + $ft{'device_function'};" << endl; - *streamPtr.get() << tab_2 << unless_ << "($quiet_warnings) {" << endl; - *streamPtr.get() << tab_3 << "# Copy into array of lines, process line-by-line to show warnings" << endl; - *streamPtr.get() << tab_3 << "if ($hasDeviceCode or (/\\bcu|CU/) or (/<<<.*>>>/)) {" << endl; - *streamPtr.get() << tab_4 << my << "@lines = split /\\n/, $_;" << endl; - *streamPtr.get() << tab_4 << "# Copy the whole file" << endl; - *streamPtr.get() << tab_4 << my << "$tmp = $_;" << endl; - *streamPtr.get() << tab_4 << my << "$line_num = 0;" << endl; - *streamPtr.get() << tab_4 << foreach << "(@lines) {" << endl; - *streamPtr.get() << tab_5 << "$line_num++;" << endl; - *streamPtr.get() << tab_5 << "# Remove any whitelisted words" << endl; - *streamPtr.get() << tab_5 << foreach << "$w (@whitelist) {" << endl; - *streamPtr.get() << tab_6 << "s/\\b$w\\b/ZAP/" << endl_tab_5 << "}" << endl; - *streamPtr.get() << tab_5 << my << "$tag;" << endl; - *streamPtr.get() << tab_5 << "if ((/(\\bcuda[A-Z]\\w+)/) or (/<<<.*>>>/)) {" << endl; - *streamPtr.get() << tab_6 << "# Flag any remaining code that look like cuda API calls: may want to add these to hipify" << endl; - *streamPtr.get() << tab_6 << "$tag = (defined $1) ? $1 : \"Launch\";" << endl_tab_5 << "}" << endl; - *streamPtr.get() << tab_5 << "if (defined $tag) {" << endl; - *streamPtr.get() << tab_6 << "$warnings++;" << endl; - *streamPtr.get() << tab_6 << "$warningTags{$tag}++;" << endl; - *streamPtr.get() << tab_6 << print << "\" warning: $fileName:#$line_num : $_\\n\";" << endl_tab_5 << "}" << endl; - *streamPtr.get() << tab_5 << "$s = warnUnsupportedDeviceFunctions($line_num);" << endl; - *streamPtr.get() << tab_5 << "$warnings += $s;" << endl_tab_4 << "}" << endl; - *streamPtr.get() << tab_4 << "$_ = $tmp;" << endl_tab_3 << "}" << endl_tab_2 << "}" << endl; - *streamPtr.get() << tab_2 << "if ($hasDeviceCode > 0) {" << endl; - *streamPtr.get() << tab_3 << "$ft{'device_function'} += countSupportedDeviceFunctions();" << endl_tab_2 << "}" << endl; - *streamPtr.get() << tab_2 << "transformHostFunctions();" << endl; - *streamPtr.get() << tab_2 << "# TODO: would like to move this code outside loop but it uses $_ which contains the whole file" << endl; - *streamPtr.get() << tab_2 << unless_ << "($no_output) {" << endl; - *streamPtr.get() << tab_3 << sConv << endl; - *streamPtr.get() << tab_3 << my << "$kernStuff = $hasDeviceCode + $ft{'" << counterNames[CONV_KERNEL_LAUNCH] << "'} + $ft{'" << counterNames[CONV_DEVICE_FUNC] << "'};" << endl; - *streamPtr.get() << tab_3 << my << "$totalCalls = $apiCalls + $kernStuff;" << endl; - *streamPtr.get() << tab_3 << "$is_dos = m/\\r\\n$/;" << endl; - *streamPtr.get() << tab_3 << "if ($totalCalls and ($countIncludes == 0) and ($kernStuff != 0)) {" << endl; - *streamPtr.get() << tab_4 << "# TODO: implement hipify-clang's logic with header files AMAP" << endl; - *streamPtr.get() << tab_4 << "print $OUTFILE '#include \"hip/hip_runtime.h\"' . ($is_dos ? \"\\r\\n\" : \"\\n\");" << endl_tab_3 << "}" << endl; - *streamPtr.get() << tab_3 << "print $OUTFILE \"$_\";" << endl_tab_2 << "}" << endl; - *streamPtr.get() << tab_2 << "$lineCount = $_ =~ tr/\\n//;" << endl_tab << "}" << endl; - *streamPtr.get() << tab << my << "$totalConverted = totalStats(\\%ft);" << endl; - *streamPtr.get() << tab << "if (($totalConverted+$warnings) and $print_stats) {" << endl; - *streamPtr.get() << tab_2 << "printStats(\" info: converted\", \\@statNames, \\%ft, $warnings, $lineCount);" << endl; - *streamPtr.get() << tab_2 << print << "\" in '$fileName'\\n\";" << endl_tab << "}" << endl; - *streamPtr.get() << tab << "# Update totals for all files" << endl; - *streamPtr.get() << tab << "addStats(\\%tt, \\%ft);" << endl; - *streamPtr.get() << tab << "$Twarnings += $warnings;" << endl; - *streamPtr.get() << tab << "$TlineCount += $lineCount;" << endl; - *streamPtr.get() << tab << foreach << "$key (keys %warningTags) {" << endl; - *streamPtr.get() << tab_2 << "$TwarningTags{$key} += $warningTags{$key};" << endl_tab << "}" << endl << "}" << endl; - *streamPtr.get() << "# Print total stats for all files processed:" << endl; - *streamPtr.get() << "if ($print_stats and ($fileCount > 1)) {" << endl; - *streamPtr.get() << tab << print << "\"\\n\";" << endl; - *streamPtr.get() << tab << "printStats(\" info: TOTAL-converted\", \\@statNames, \\%tt, $Twarnings, $TlineCount);" << endl; - *streamPtr.get() << tab << print << "\"\\n\";" << endl; - *streamPtr.get() << tab << foreach << "my $key (sort { $TwarningTags{$b} <=> $TwarningTags{$a} } keys %TwarningTags) {" << endl; - *streamPtr.get() << tab_2 << printf << "\" warning: unconverted %s : %d\\n\", $key, $TwarningTags{$key};" << endl_tab << "}" << endl; - *streamPtr.get() << tab << my << "$kernelCnt = keys %Tkernels;" << endl; - *streamPtr.get() << tab << printf << "\" kernels (%d total) : \", $kernelCnt;" << endl; - *streamPtr.get() << tab << foreach << "my $key (sort { $Tkernels{$b} <=> $Tkernels{$a} } keys %Tkernels) {" << endl; - *streamPtr.get() << tab_2 << printf << "\" %s(%d)\", $key, $Tkernels{$key};" << endl_tab << "}" << endl; - *streamPtr.get() << tab << print << "\"\\n\\n\";" << endl << "}" << endl; - *streamPtr.get() << "if ($print_stats) {" << endl; - *streamPtr.get() << tab << foreach << "my $key (sort { $convertedTags{$b} <=> $convertedTags{$a} } keys %convertedTags) {" << endl; - *streamPtr.get() << tab_2 << printf << "\" %s %d\\n\", $key, $convertedTags{$key};" << endl_tab << "}" << endl << "}" << endl; - streamPtr.get()->flush(); - bool ret = true; - EC = sys::fs::copy_file(tmpFile, dstHipifyPerl); - if (EC) { - llvm::errs() << "\n" << sHipify << sError << EC.message() << ": while copying " << tmpFile << " to " << dstHipifyPerl << "\n"; - ret = false; - } - if (!SaveTemps) sys::fs::remove(tmpFile); - return ret; - } -} diff --git a/hipamd/hipify-clang/src/CUDA2HIP_Python.cpp b/hipamd/hipify-clang/src/CUDA2HIP_Python.cpp deleted file mode 100644 index fec138915d..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_Python.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include -#include "llvm/ADT/StringRef.h" -#include "llvm/ADT/SmallString.h" -#include "llvm/Support/Path.h" -#include "CUDA2HIP.h" -#include "CUDA2HIP_Scripting.h" -#include "ArgParse.h" -#include "StringUtils.h" -#include "LLVMCompat.h" -#include "Statistics.h" - -using namespace llvm; - -namespace python { - - bool generate(bool Generate) { - if (!Generate) { - return true; - } - std::string dstPythonMap = "cuda_to_hip_mappings.py", dstPythonMapDir = OutputPythonMapDir; - std::error_code EC; - if (!dstPythonMapDir.empty()) { - std::string sOutputPythonMapDirAbsPath = getAbsoluteDirectoryPath(OutputPythonMapDir, EC, "output hipify-python map"); - if (EC) { - return false; - } - dstPythonMap = sOutputPythonMapDirAbsPath + "/" + dstPythonMap; - } - SmallString<128> tmpFile; - StringRef ext = "hipify-tmp"; - EC = sys::fs::createTemporaryFile(dstPythonMap, ext, tmpFile); - if (EC) { - llvm::errs() << "\n" << sHipify << sError << EC.message() << ": " << tmpFile << "\n"; - return false; - } - std::unique_ptr pythonStreamPtr = std::unique_ptr(new std::ofstream(tmpFile.c_str(), std::ios_base::trunc)); - *pythonStreamPtr.get() << "import collections\n\n"; - *pythonStreamPtr.get() << "from pyHIPIFY.constants import *\n\n"; - *pythonStreamPtr.get() << "CUDA_RENAMES_MAP = collections.OrderedDict([\n"; - const std::string sHIP_UNS = ", HIP_UNSUPPORTED"; - for (int i = 0; i < NUM_CONV_TYPES; ++i) { - if (i == CONV_INCLUDE_CUDA_MAIN_H || i == CONV_INCLUDE) { - for (auto &ma : CUDA_INCLUDE_MAP) { - if (i == ma.second.type) { - std::string sUnsupported; - if (Statistics::isUnsupported(ma.second)) { - sUnsupported = sHIP_UNS; - } - StringRef repName = Statistics::isToRoc(ma.second) ? ma.second.rocName : ma.second.hipName; - *pythonStreamPtr.get() << " (\"" << ma.first.str() << "\", (\"" << repName.str() << "\", " << counterTypes[i] << ", " << apiTypes[ma.second.apiType] << sUnsupported << ")),\n"; - } - } - } - else { - for (auto &ma : CUDA_RENAMES_MAP()) { - if (i == ma.second.type) { - std::string sUnsupported; - if (Statistics::isUnsupported(ma.second)) { - sUnsupported = sHIP_UNS; - } - StringRef repName = Statistics::isToRoc(ma.second) ? ma.second.rocName : ma.second.hipName; - *pythonStreamPtr.get() << " (\"" << ma.first.str() << "\", (\"" << repName.str() << "\", " << counterTypes[i] << ", " << apiTypes[ma.second.apiType] << sUnsupported << ")),\n"; - } - } - } - } - *pythonStreamPtr.get() << "])\n\n"; - *pythonStreamPtr.get() << "CUDA_TO_HIP_MAPPINGS = [CUDA_RENAMES_MAP, C10_MAPPINGS, PYTORCH_SPECIFIC_MAPPINGS]\n"; - pythonStreamPtr.get()->flush(); - bool ret = true; - EC = sys::fs::copy_file(tmpFile, dstPythonMap); - if (EC) { - llvm::errs() << "\n" << sHipify << sError << EC.message() << ": while copying " << tmpFile << " to " << dstPythonMap << "\n"; - ret = false; - } - if (!SaveTemps) { - sys::fs::remove(tmpFile); - } - return true; - } -} diff --git a/hipamd/hipify-clang/src/CUDA2HIP_RAND_API_functions.cpp b/hipamd/hipify-clang/src/CUDA2HIP_RAND_API_functions.cpp deleted file mode 100644 index 525aa1e5f3..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_RAND_API_functions.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Map of all functions -const std::map CUDA_RAND_FUNCTION_MAP{ - // RAND Host functions - {"curandCreateGenerator", {"hiprandCreateGenerator", "", CONV_LIB_FUNC, API_RAND}}, - {"curandCreateGeneratorHost", {"hiprandCreateGeneratorHost", "", CONV_LIB_FUNC, API_RAND}}, - {"curandCreatePoissonDistribution", {"hiprandCreatePoissonDistribution", "", CONV_LIB_FUNC, API_RAND}}, - {"curandDestroyDistribution", {"hiprandDestroyDistribution", "", CONV_LIB_FUNC, API_RAND}}, - {"curandDestroyGenerator", {"hiprandDestroyGenerator", "", CONV_LIB_FUNC, API_RAND}}, - {"curandGenerate", {"hiprandGenerate", "", CONV_LIB_FUNC, API_RAND}}, - {"curandGenerateLogNormal", {"hiprandGenerateLogNormal", "", CONV_LIB_FUNC, API_RAND}}, - {"curandGenerateLogNormalDouble", {"hiprandGenerateLogNormalDouble", "", CONV_LIB_FUNC, API_RAND}}, - {"curandGenerateLongLong", {"hiprandGenerateLongLong", "", CONV_LIB_FUNC, API_RAND, HIP_UNSUPPORTED}}, - {"curandGenerateNormal", {"hiprandGenerateNormal", "", CONV_LIB_FUNC, API_RAND}}, - {"curandGenerateNormalDouble", {"hiprandGenerateNormalDouble", "", CONV_LIB_FUNC, API_RAND}}, - {"curandGeneratePoisson", {"hiprandGeneratePoisson", "", CONV_LIB_FUNC, API_RAND}}, - {"curandGenerateSeeds", {"hiprandGenerateSeeds", "", CONV_LIB_FUNC, API_RAND}}, - {"curandGenerateUniform", {"hiprandGenerateUniform", "", CONV_LIB_FUNC, API_RAND}}, - {"curandGenerateUniformDouble", {"hiprandGenerateUniformDouble", "", CONV_LIB_FUNC, API_RAND}}, - {"curandGetDirectionVectors32", {"hiprandGetDirectionVectors32", "", CONV_LIB_FUNC, API_RAND, HIP_UNSUPPORTED}}, - {"curandGetDirectionVectors64", {"hiprandGetDirectionVectors64", "", CONV_LIB_FUNC, API_RAND, HIP_UNSUPPORTED}}, - {"curandGetProperty", {"hiprandGetProperty", "", CONV_LIB_FUNC, API_RAND, HIP_UNSUPPORTED}}, - {"curandGetScrambleConstants32", {"hiprandGetScrambleConstants32", "", CONV_LIB_FUNC, API_RAND, HIP_UNSUPPORTED}}, - {"curandGetScrambleConstants64", {"hiprandGetScrambleConstants64", "", CONV_LIB_FUNC, API_RAND, HIP_UNSUPPORTED}}, - {"curandGetVersion", {"hiprandGetVersion", "", CONV_LIB_FUNC, API_RAND}}, - {"curandSetGeneratorOffset", {"hiprandSetGeneratorOffset", "", CONV_LIB_FUNC, API_RAND}}, - {"curandSetGeneratorOrdering", {"hiprandSetGeneratorOrdering", "", CONV_LIB_FUNC, API_RAND, HIP_UNSUPPORTED}}, - {"curandSetPseudoRandomGeneratorSeed", {"hiprandSetPseudoRandomGeneratorSeed", "", CONV_LIB_FUNC, API_RAND}}, - {"curandSetQuasiRandomGeneratorDimensions", {"hiprandSetQuasiRandomGeneratorDimensions", "", CONV_LIB_FUNC, API_RAND}}, - {"curandSetStream", {"hiprandSetStream", "", CONV_LIB_FUNC, API_RAND}}, - {"curandMakeMTGP32Constants", {"hiprandMakeMTGP32Constants", "", CONV_LIB_FUNC, API_RAND}}, - {"curandMakeMTGP32KernelState", {"hiprandMakeMTGP32KernelState", "", CONV_LIB_FUNC, API_RAND}}, - - // RAND Device functions - {"curand", {"hiprand", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_init", {"hiprand_init", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_log_normal", {"hiprand_log_normal", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_log_normal_double", {"hiprand_log_normal_double", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_log_normal2", {"hiprand_log_normal2", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_log_normal2_double", {"hiprand_log_normal2_double", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_log_normal4", {"hiprand_log_normal4", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_log_normal4_double", {"hiprand_log_normal4_double", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_mtgp32_single", {"hiprand_mtgp32_single", "", CONV_LIB_DEVICE_FUNC, API_RAND, HIP_UNSUPPORTED}}, - {"curand_mtgp32_single_specific", {"hiprand_mtgp32_single_specific", "", CONV_LIB_DEVICE_FUNC, API_RAND, HIP_UNSUPPORTED}}, - {"curand_mtgp32_specific", {"hiprand_mtgp32_specific", "", CONV_LIB_DEVICE_FUNC, API_RAND, HIP_UNSUPPORTED}}, - {"curand_normal", {"hiprand_normal", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_normal_double", {"hiprand_normal_double", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_normal2", {"hiprand_normal2", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_normal2_double", {"hiprand_normal2_double", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_normal4", {"hiprand_normal4", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_normal4_double", {"hiprand_normal4_double", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_uniform", {"hiprand_uniform", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_uniform_double", {"hiprand_uniform_double", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_uniform2_double", {"hiprand_uniform2_double", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_uniform4", {"hiprand_uniform4", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_uniform4_double", {"hiprand_uniform4_double", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_discrete", {"hiprand_discrete", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_discrete4", {"hiprand_discrete4", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_poisson", {"hiprand_poisson", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_poisson4", {"hiprand_poisson4", "", CONV_LIB_DEVICE_FUNC, API_RAND}}, - {"curand_Philox4x32_10", {"hiprand_Philox4x32_10", "", CONV_LIB_DEVICE_FUNC, API_RAND, HIP_UNSUPPORTED}}, - // unchanged function names: skipahead, skipahead_sequence, skipahead_subsequence -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_RAND_API_types.cpp b/hipamd/hipify-clang/src/CUDA2HIP_RAND_API_types.cpp deleted file mode 100644 index 67ecc93504..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_RAND_API_types.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Map of all functions -const std::map CUDA_RAND_TYPE_NAME_MAP{ - // RAND defines - {"CURAND_VER_MAJOR", {"HIPRAND_VER_MAJOR", "", CONV_DEFINE, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_VER_MINOR", {"HIPRAND_VER_MINOR", "", CONV_DEFINE, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_VER_PATCH", {"HIPRAND_VER_PATCH", "", CONV_DEFINE, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_VER_BUILD", {"HIPRAND_VER_BUILD", "", CONV_DEFINE, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_VERSION", {"HIPRAND_VERSION", "", CONV_DEFINE, API_RAND, HIP_UNSUPPORTED}}, - - // RAND Host types - {"curandStatus", {"hiprandStatus_t", "", CONV_TYPE, API_RAND}}, - {"curandStatus_t", {"hiprandStatus_t", "", CONV_TYPE, API_RAND}}, - {"curandRngType", {"hiprandRngType_t", "", CONV_TYPE, API_RAND}}, - {"curandRngType_t", {"hiprandRngType_t", "", CONV_TYPE, API_RAND}}, - {"curandGenerator_st", {"hiprandGenerator_st", "", CONV_TYPE, API_RAND}}, - {"curandGenerator_t", {"hiprandGenerator_t", "", CONV_TYPE, API_RAND}}, - {"curandDirectionVectorSet", {"hiprandDirectionVectorSet_t", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandDirectionVectorSet_t", {"hiprandDirectionVectorSet_t", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandOrdering", {"hiprandOrdering_t", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandOrdering_t", {"hiprandOrdering_t", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandDistribution_st", {"hiprandDistribution_st", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandHistogramM2V_st", {"hiprandDistribution_st", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandDistribution_t", {"hiprandDistribution_t", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandHistogramM2V_t", {"hiprandDistribution_t", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandDistributionShift_st", {"hiprandDistributionShift_st", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandDistributionShift_t", {"hiprandDistributionShift_t", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandDistributionM2Shift_st", {"hiprandDistributionM2Shift_st", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandDistributionM2Shift_t", {"hiprandDistributionM2Shift_t", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandHistogramM2_st", {"hiprandHistogramM2_st", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandHistogramM2_t", {"hiprandHistogramM2_t", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandHistogramM2K_st", {"hiprandHistogramM2K_st", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandHistogramM2K_t", {"hiprandHistogramM2K_t", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandDiscreteDistribution_st", {"hiprandDiscreteDistribution_st", "", CONV_TYPE, API_RAND}}, - {"curandDiscreteDistribution_t", {"hiprandDiscreteDistribution_t", "", CONV_TYPE, API_RAND}}, - {"curandMethod", {"hiprandMethod_t", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandMethod_t", {"hiprandMethod_t", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandDirectionVectors32_t", {"hiprandDirectionVectors32_t", "", CONV_TYPE, API_RAND}}, - {"curandDirectionVectors64_t", {"hiprandDirectionVectors64_t", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - - // RAND types for Device functions - {"curandStateMtgp32", {"hiprandStateMtgp32", "", CONV_TYPE, API_RAND}}, - {"curandStateMtgp32_t", {"hiprandStateMtgp32_t", "", CONV_TYPE, API_RAND}}, - {"curandStateScrambledSobol64", {"hiprandStateScrambledSobol64", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandStateScrambledSobol64_t", {"hiprandStateScrambledSobol64_t", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandStateSobol64", {"hiprandStateSobol64", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandStateSobol64_t", {"hiprandStateSobol64_t", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandStateScrambledSobol32", {"hiprandStateScrambledSobol32", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandStateScrambledSobol32_t", {"hiprandStateScrambledSobol32_t", "", CONV_TYPE, API_RAND, HIP_UNSUPPORTED}}, - {"curandStateSobol32", {"hiprandStateSobol32", "", CONV_TYPE, API_RAND}}, - {"curandStateSobol32_t", {"hiprandStateSobol32_t", "", CONV_TYPE, API_RAND}}, - {"curandStateMRG32k3a", {"hiprandStateMRG32k3a", "", CONV_TYPE, API_RAND}}, - {"curandStateMRG32k3a_t", {"hiprandStateMRG32k3a_t", "", CONV_TYPE, API_RAND}}, - {"curandStatePhilox4_32_10", {"hiprandStatePhilox4_32_10", "", CONV_TYPE, API_RAND}}, - {"curandStatePhilox4_32_10_t", {"hiprandStatePhilox4_32_10_t", "", CONV_TYPE, API_RAND}}, - {"curandStateXORWOW", {"hiprandStateXORWOW", "", CONV_TYPE, API_RAND}}, - {"curandStateXORWOW_t", {"hiprandStateXORWOW_t", "", CONV_TYPE, API_RAND}}, - {"curandState", {"hiprandState", "", CONV_TYPE, API_RAND}}, - {"curandState_t", {"hiprandState_t", "", CONV_TYPE, API_RAND}}, - - // RAND function call status types (enum curandStatus) - {"CURAND_STATUS_SUCCESS", {"HIPRAND_STATUS_SUCCESS", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_STATUS_VERSION_MISMATCH", {"HIPRAND_STATUS_VERSION_MISMATCH", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_STATUS_NOT_INITIALIZED", {"HIPRAND_STATUS_NOT_INITIALIZED", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_STATUS_ALLOCATION_FAILED", {"HIPRAND_STATUS_ALLOCATION_FAILED", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_STATUS_TYPE_ERROR", {"HIPRAND_STATUS_TYPE_ERROR", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_STATUS_OUT_OF_RANGE", {"HIPRAND_STATUS_OUT_OF_RANGE", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_STATUS_LENGTH_NOT_MULTIPLE", {"HIPRAND_STATUS_LENGTH_NOT_MULTIPLE", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_STATUS_DOUBLE_PRECISION_REQUIRED", {"HIPRAND_STATUS_DOUBLE_PRECISION_REQUIRED", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_STATUS_LAUNCH_FAILURE", {"HIPRAND_STATUS_LAUNCH_FAILURE", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_STATUS_PREEXISTING_FAILURE", {"HIPRAND_STATUS_PREEXISTING_FAILURE", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_STATUS_INITIALIZATION_FAILED", {"HIPRAND_STATUS_INITIALIZATION_FAILED", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_STATUS_ARCH_MISMATCH", {"HIPRAND_STATUS_ARCH_MISMATCH", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_STATUS_INTERNAL_ERROR", {"HIPRAND_STATUS_INTERNAL_ERROR", "", CONV_NUMERIC_LITERAL, API_RAND}}, - - // RAND generator types (enum curandRngType) - {"CURAND_RNG_TEST", {"HIPRAND_RNG_TEST", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_RNG_PSEUDO_DEFAULT", {"HIPRAND_RNG_PSEUDO_DEFAULT", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_RNG_PSEUDO_XORWOW", {"HIPRAND_RNG_PSEUDO_XORWOW", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_RNG_PSEUDO_MRG32K3A", {"HIPRAND_RNG_PSEUDO_MRG32K3A", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_RNG_PSEUDO_MTGP32", {"HIPRAND_RNG_PSEUDO_MTGP32", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_RNG_PSEUDO_MT19937", {"HIPRAND_RNG_PSEUDO_MT19937", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_RNG_PSEUDO_PHILOX4_32_10", {"HIPRAND_RNG_PSEUDO_PHILOX4_32_10", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_RNG_QUASI_DEFAULT", {"HIPRAND_RNG_QUASI_DEFAULT", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_RNG_QUASI_SOBOL32", {"HIPRAND_RNG_QUASI_SOBOL32", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_RNG_QUASI_SCRAMBLED_SOBOL32", {"HIPRAND_RNG_QUASI_SCRAMBLED_SOBOL32", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_RNG_QUASI_SOBOL64", {"HIPRAND_RNG_QUASI_SOBOL64", "", CONV_NUMERIC_LITERAL, API_RAND}}, - {"CURAND_RNG_QUASI_SCRAMBLED_SOBOL64", {"HIPRAND_RNG_QUASI_SCRAMBLED_SOBOL64", "", CONV_NUMERIC_LITERAL, API_RAND}}, - - // RAND ordering of results in memory (enum curandOrdering) - {"CURAND_ORDERING_PSEUDO_BEST", {"HIPRAND_ORDERING_PSEUDO_BEST", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_ORDERING_PSEUDO_DEFAULT", {"HIPRAND_ORDERING_PSEUDO_DEFAULT", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_ORDERING_PSEUDO_SEEDED", {"HIPRAND_ORDERING_PSEUDO_SEEDED", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_ORDERING_QUASI_DEFAULT", {"HIPRAND_ORDERING_QUASI_DEFAULT", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - - // RAND choice of direction vector set (enum curandDirectionVectorSet) - {"CURAND_DIRECTION_VECTORS_32_JOEKUO6", {"HIPRAND_DIRECTION_VECTORS_32_JOEKUO6", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_SCRAMBLED_DIRECTION_VECTORS_32_JOEKUO6", {"HIPRAND_SCRAMBLED_DIRECTION_VECTORS_32_JOEKUO6", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_DIRECTION_VECTORS_64_JOEKUO6", {"HIPRAND_DIRECTION_VECTORS_64_JOEKUO6", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_SCRAMBLED_DIRECTION_VECTORS_64_JOEKUO6", {"HIPRAND_SCRAMBLED_DIRECTION_VECTORS_64_JOEKUO6", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - - // RAND method (enum curandMethod) - {"CURAND_CHOOSE_BEST", {"HIPRAND_CHOOSE_BEST", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_ITR", {"HIPRAND_ITR", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_KNUTH", {"HIPRAND_KNUTH", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_HITR", {"HIPRAND_HITR", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_M1", {"HIPRAND_M1", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_M2", {"HIPRAND_M2", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_BINARY_SEARCH", {"HIPRAND_BINARY_SEARCH", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_DISCRETE_GAUSS", {"HIPRAND_DISCRETE_GAUSS", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_REJECTION", {"HIPRAND_REJECTION", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_DEVICE_API", {"HIPRAND_DEVICE_API", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_FAST_REJECTION", {"HIPRAND_FAST_REJECTION", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_3RD", {"HIPRAND_3RD", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_DEFINITION", {"HIPRAND_DEFINITION", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, - {"CURAND_POISSON", {"HIPRAND_POISSON", "", CONV_NUMERIC_LITERAL, API_RAND, HIP_UNSUPPORTED}}, -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_Runtime_API_functions.cpp b/hipamd/hipify-clang/src/CUDA2HIP_Runtime_API_functions.cpp deleted file mode 100644 index 25fb930905..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_Runtime_API_functions.cpp +++ /dev/null @@ -1,693 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Map of all CUDA Runtime API functions -const std::map CUDA_RUNTIME_FUNCTION_MAP{ - // 5.1. Device Management - // no analogue - {"cudaChooseDevice", {"hipChooseDevice", "", CONV_DEVICE, API_RUNTIME}}, - // cuDeviceGetAttribute - {"cudaDeviceGetAttribute", {"hipDeviceGetAttribute", "", CONV_DEVICE, API_RUNTIME}}, - // cuDeviceGetByPCIBusId - {"cudaDeviceGetByPCIBusId", {"hipDeviceGetByPCIBusId", "", CONV_DEVICE, API_RUNTIME}}, - // no analogue - {"cudaDeviceGetCacheConfig", {"hipDeviceGetCacheConfig", "", CONV_DEVICE, API_RUNTIME}}, - // cuCtxGetLimit - {"cudaDeviceGetLimit", {"hipDeviceGetLimit", "", CONV_DEVICE, API_RUNTIME}}, - // cuDeviceGetNvSciSyncAttributes - {"cudaDeviceGetNvSciSyncAttributes", {"hipDeviceGetNvSciSyncAttributes", "", CONV_DEVICE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuDeviceGetP2PAttribute - {"cudaDeviceGetP2PAttribute", {"hipDeviceGetP2PAttribute", "", CONV_DEVICE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuDeviceGetPCIBusId - {"cudaDeviceGetPCIBusId", {"hipDeviceGetPCIBusId", "", CONV_DEVICE, API_RUNTIME}}, - // cuCtxGetSharedMemConfig - {"cudaDeviceGetSharedMemConfig", {"hipDeviceGetSharedMemConfig", "", CONV_DEVICE, API_RUNTIME}}, - // cuCtxGetStreamPriorityRange - {"cudaDeviceGetStreamPriorityRange", {"hipDeviceGetStreamPriorityRange", "", CONV_DEVICE, API_RUNTIME}}, - // no analogue - {"cudaDeviceReset", {"hipDeviceReset", "", CONV_DEVICE, API_RUNTIME}}, - // no analogue - {"cudaDeviceSetCacheConfig", {"hipDeviceSetCacheConfig", "", CONV_DEVICE, API_RUNTIME}}, - // cuCtxSetLimit - {"cudaDeviceSetLimit", {"hipDeviceSetLimit", "", CONV_DEVICE, API_RUNTIME}}, - // cuCtxSetSharedMemConfig - {"cudaDeviceSetSharedMemConfig", {"hipDeviceSetSharedMemConfig", "", CONV_DEVICE, API_RUNTIME}}, - // cuCtxSynchronize - {"cudaDeviceSynchronize", {"hipDeviceSynchronize", "", CONV_DEVICE, API_RUNTIME}}, - // cuDeviceGet - // NOTE: cuDeviceGet has no attr: int ordinal - {"cudaGetDevice", {"hipGetDevice", "", CONV_DEVICE, API_RUNTIME}}, - // cuDeviceGetCount - {"cudaGetDeviceCount", {"hipGetDeviceCount", "", CONV_DEVICE, API_RUNTIME}}, - // cuCtxGetFlags - // TODO: rename to hipGetDeviceFlags - {"cudaGetDeviceFlags", {"hipCtxGetFlags", "", CONV_DEVICE, API_RUNTIME}}, - // no analogue - // NOTE: Not equal to cuDeviceGetProperties due to different attributes: CUdevprop and cudaDeviceProp - {"cudaGetDeviceProperties", {"hipGetDeviceProperties", "", CONV_DEVICE, API_RUNTIME}}, - // cuIpcCloseMemHandle - {"cudaIpcCloseMemHandle", {"hipIpcCloseMemHandle", "", CONV_DEVICE, API_RUNTIME}}, - // cuIpcGetEventHandle - {"cudaIpcGetEventHandle", {"hipIpcGetEventHandle", "", CONV_DEVICE, API_RUNTIME}}, - // cuIpcGetMemHandle - {"cudaIpcGetMemHandle", {"hipIpcGetMemHandle", "", CONV_DEVICE, API_RUNTIME}}, - // cuIpcOpenEventHandle - {"cudaIpcOpenEventHandle", {"hipIpcOpenEventHandle", "", CONV_DEVICE, API_RUNTIME}}, - // cuIpcOpenMemHandle - {"cudaIpcOpenMemHandle", {"hipIpcOpenMemHandle", "", CONV_DEVICE, API_RUNTIME}}, - // no analogue - {"cudaSetDevice", {"hipSetDevice", "", CONV_DEVICE, API_RUNTIME}}, - // cuCtxGetFlags - {"cudaSetDeviceFlags", {"hipSetDeviceFlags", "", CONV_DEVICE, API_RUNTIME}}, - // no analogue - {"cudaSetValidDevices", {"hipSetValidDevices", "", CONV_DEVICE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5.2. Thread Management [DEPRECATED] - // no analogue - {"cudaThreadExit", {"hipDeviceReset", "", CONV_THREAD, API_RUNTIME}}, - // no analogue - {"cudaThreadGetCacheConfig", {"hipDeviceGetCacheConfig", "", CONV_THREAD, API_RUNTIME}}, - // no analogue - {"cudaThreadGetLimit", {"hipThreadGetLimit", "", CONV_THREAD, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - {"cudaThreadSetCacheConfig", {"hipDeviceSetCacheConfig", "", CONV_THREAD, API_RUNTIME}}, - // no analogue - {"cudaThreadSetLimit", {"hipThreadSetLimit", "", CONV_THREAD, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuCtxSynchronize - {"cudaThreadSynchronize", {"hipDeviceSynchronize", "", CONV_THREAD, API_RUNTIME}}, - - // 5.3. Error Handling - // no analogue - // NOTE: cudaGetErrorName and cuGetErrorName have different signatures - {"cudaGetErrorName", {"hipGetErrorName", "", CONV_ERROR, API_RUNTIME}}, - // no analogue - // NOTE: cudaGetErrorString and cuGetErrorString have different signatures - {"cudaGetErrorString", {"hipGetErrorString", "", CONV_ERROR, API_RUNTIME}}, - // no analogue - {"cudaGetLastError", {"hipGetLastError", "", CONV_ERROR, API_RUNTIME}}, - // no analogue - {"cudaPeekAtLastError", {"hipPeekAtLastError", "", CONV_ERROR, API_RUNTIME}}, - - // 5.4. Stream Management - // cuStreamAddCallback - {"cudaStreamAddCallback", {"hipStreamAddCallback", "", CONV_STREAM, API_RUNTIME}}, - // cuStreamAttachMemAsync - {"cudaStreamAttachMemAsync", {"hipStreamAttachMemAsync", "", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuStreamBeginCapture - {"cudaStreamBeginCapture", {"hipStreamBeginCapture", "", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cuStreamCreate due to different signatures - {"cudaStreamCreate", {"hipStreamCreate", "", CONV_STREAM, API_RUNTIME}}, - // cuStreamCreate - {"cudaStreamCreateWithFlags", {"hipStreamCreateWithFlags", "", CONV_STREAM, API_RUNTIME}}, - // cuStreamCreateWithPriority - {"cudaStreamCreateWithPriority", {"hipStreamCreateWithPriority", "", CONV_STREAM, API_RUNTIME}}, - // cuStreamDestroy - {"cudaStreamDestroy", {"hipStreamDestroy", "", CONV_STREAM, API_RUNTIME}}, - // cuStreamEndCapture - {"cudaStreamEndCapture", {"hipStreamEndCapture", "", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuStreamGetFlags - {"cudaStreamGetFlags", {"hipStreamGetFlags", "", CONV_STREAM, API_RUNTIME}}, - // cuStreamGetPriority - {"cudaStreamGetPriority", {"hipStreamGetPriority", "", CONV_STREAM, API_RUNTIME}}, - // cuStreamIsCapturing - {"cudaStreamIsCapturing", {"hipStreamIsCapturing", "", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuStreamGetCaptureInfo - {"cudaStreamGetCaptureInfo", {"hipStreamGetCaptureInfo", "", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuStreamQuery - {"cudaStreamQuery", {"hipStreamQuery", "", CONV_STREAM, API_RUNTIME}}, - // cuStreamSynchronize - {"cudaStreamSynchronize", {"hipStreamSynchronize", "", CONV_STREAM, API_RUNTIME}}, - // cuStreamWaitEvent - {"cudaStreamWaitEvent", {"hipStreamWaitEvent", "", CONV_STREAM, API_RUNTIME}}, - // cuThreadExchangeStreamCaptureMode - {"cudaThreadExchangeStreamCaptureMode", {"hipThreadExchangeStreamCaptureMode", "", CONV_STREAM, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5.5.Event Management - // no analogue - // NOTE: Not equal to cuEventCreate due to different signatures - {"cudaEventCreate", {"hipEventCreate", "", CONV_EVENT, API_RUNTIME}}, - // cuEventCreate - {"cudaEventCreateWithFlags", {"hipEventCreateWithFlags", "", CONV_EVENT, API_RUNTIME}}, - // cuEventDestroy - {"cudaEventDestroy", {"hipEventDestroy", "", CONV_EVENT, API_RUNTIME}}, - // cuEventElapsedTime - {"cudaEventElapsedTime", {"hipEventElapsedTime", "", CONV_EVENT, API_RUNTIME}}, - // cuEventQuery - {"cudaEventQuery", {"hipEventQuery", "", CONV_EVENT, API_RUNTIME}}, - // cuEventRecord - {"cudaEventRecord", {"hipEventRecord", "", CONV_EVENT, API_RUNTIME}}, - // cuEventSynchronize - {"cudaEventSynchronize", {"hipEventSynchronize", "", CONV_EVENT, API_RUNTIME}}, - - // 5.6. External Resource Interoperability - // cuDestroyExternalMemory - {"cudaDestroyExternalMemory", {"hipDestroyExternalMemory", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuDestroyExternalSemaphore - {"cudaDestroyExternalSemaphore", {"hipDestroyExternalSemaphore", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuExternalMemoryGetMappedBuffer - {"cudaExternalMemoryGetMappedBuffer", {"hipExternalMemoryGetMappedBuffer", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuExternalMemoryGetMappedMipmappedArray - {"cudaExternalMemoryGetMappedMipmappedArray", {"hipExternalMemoryGetMappedMipmappedArray", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuImportExternalMemory - {"cudaImportExternalMemory", {"hipImportExternalMemory", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuImportExternalSemaphore - {"cudaImportExternalSemaphore", {"hipImportExternalSemaphore", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuSignalExternalSemaphoresAsync - {"cudaSignalExternalSemaphoresAsync", {"hipSignalExternalSemaphoresAsync", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuWaitExternalSemaphoresAsync - {"cudaWaitExternalSemaphoresAsync", {"hipWaitExternalSemaphoresAsync", "", CONV_EXT_RES, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5.7. Execution Control - // no analogue - {"cudaFuncGetAttributes", {"hipFuncGetAttributes", "", CONV_EXECUTION, API_RUNTIME}}, - // no analogue - {"cudaFuncSetAttribute", {"hipFuncSetAttribute", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cuFuncSetCacheConfig due to different signatures - {"cudaFuncSetCacheConfig", {"hipFuncSetCacheConfig", "", CONV_DEVICE, API_RUNTIME}}, - // no analogue - // NOTE: Not equal to cuFuncSetSharedMemConfig due to different signatures - {"cudaFuncSetSharedMemConfig", {"hipFuncSetSharedMemConfig", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - {"cudaGetParameterBuffer", {"hipGetParameterBuffer", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - {"cudaGetParameterBufferV2", {"hipGetParameterBufferV2", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cuLaunchCooperativeKernel due to different signatures - {"cudaLaunchCooperativeKernel", {"hipLaunchCooperativeKernel", "", CONV_EXECUTION, API_RUNTIME}}, - // no analogue - // NOTE: Not equal to cuLaunchCooperativeKernelMultiDevice due to different signatures - {"cudaLaunchCooperativeKernelMultiDevice", {"hipLaunchCooperativeKernelMultiDevice", "", CONV_EXECUTION, API_RUNTIME}}, - // cuLaunchHostFunc - {"cudaLaunchHostFunc", {"hipLaunchHostFunc", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cuLaunchKernel due to different signatures - {"cudaLaunchKernel", {"hipLaunchKernel", "", CONV_EXECUTION, API_RUNTIME}}, - // no analogue - {"cudaSetDoubleForDevice", {"hipSetDoubleForDevice", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - {"cudaSetDoubleForHost", {"hipSetDoubleForHost", "", CONV_EXECUTION, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5.8. Occupancy - // cuOccupancyMaxActiveBlocksPerMultiprocessor - {"cudaOccupancyMaxActiveBlocksPerMultiprocessor", {"hipOccupancyMaxActiveBlocksPerMultiprocessor", "", CONV_OCCUPANCY, API_RUNTIME}}, - // cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags - {"cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", {"hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", "", CONV_OCCUPANCY, API_RUNTIME}}, - // cuOccupancyMaxPotentialBlockSize - {"cudaOccupancyMaxPotentialBlockSize", {"hipOccupancyMaxPotentialBlockSize", "", CONV_OCCUPANCY, API_RUNTIME}}, - // cuOccupancyMaxPotentialBlockSizeWithFlags - {"cudaOccupancyMaxPotentialBlockSizeWithFlags", {"hipOccupancyMaxPotentialBlockSizeWithFlags", "", CONV_OCCUPANCY, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - {"cudaOccupancyMaxPotentialBlockSizeVariableSMem", {"hipOccupancyMaxPotentialBlockSizeVariableSMem", "", CONV_OCCUPANCY, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - {"cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags", {"hipOccupancyMaxPotentialBlockSizeVariableSMemWithFlags", "", CONV_OCCUPANCY, API_RUNTIME, HIP_UNSUPPORTED}}, - - // Former 5.9. Execution Control [DEPRECATED] - // NOTE: Removed in CUDA 10.1 - // no analogue - {"cudaConfigureCall", {"hipConfigureCall", "", CONV_EXECUTION, API_RUNTIME}}, - // no analogue - // NOTE: Not equal to cudaLaunch due to different signatures - {"cudaLaunch", {"hipLaunchByPtr", "", CONV_EXECUTION, API_RUNTIME}}, - // no analogue - {"cudaSetupArgument", {"hipSetupArgument", "", CONV_EXECUTION, API_RUNTIME}}, - - // 5.9. Memory Management - // no analogue - {"cudaArrayGetInfo", {"hipArrayGetInfo", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuMemFree - {"cudaFree", {"hipFree", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaFreeArray", {"hipFreeArray", "", CONV_MEMORY, API_RUNTIME}}, - // cuMemFreeHost - {"cudaFreeHost", {"hipHostFree", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - // NOTE: Not equal to cuMipmappedArrayDestroy due to different signatures - {"cudaFreeMipmappedArray", {"hipFreeMipmappedArray", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cuMipmappedArrayGetLevel due to different signatures - {"cudaGetMipmappedArrayLevel", {"hipGetMipmappedArrayLevel", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - {"cudaGetSymbolAddress", {"hipGetSymbolAddress", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaGetSymbolSize", {"hipGetSymbolSize", "", CONV_MEMORY, API_RUNTIME}}, - // cuMemHostAlloc - {"cudaHostAlloc", {"hipHostMalloc", "", CONV_MEMORY, API_RUNTIME}}, - // cuMemHostGetDevicePointer - {"cudaHostGetDevicePointer", {"hipHostGetDevicePointer", "", CONV_MEMORY, API_RUNTIME}}, - // cuMemHostGetFlags - {"cudaHostGetFlags", {"hipHostGetFlags", "", CONV_MEMORY, API_RUNTIME}}, - // cuMemHostRegister - {"cudaHostRegister", {"hipHostRegister", "", CONV_MEMORY, API_RUNTIME}}, - // cuMemHostUnregister - {"cudaHostUnregister", {"hipHostUnregister", "", CONV_MEMORY, API_RUNTIME}}, - // cuMemAlloc - {"cudaMalloc", {"hipMalloc", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaMalloc3D", {"hipMalloc3D", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaMalloc3DArray", {"hipMalloc3DArray", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaMallocArray", {"hipMallocArray", "", CONV_MEMORY, API_RUNTIME}}, - // cuMemHostAlloc - {"cudaMallocHost", {"hipHostMalloc", "", CONV_MEMORY, API_RUNTIME}}, - // cuMemAllocManaged - {"cudaMallocManaged", {"hipMallocManaged", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - // NOTE: Not equal to cuMipmappedArrayCreate due to different signatures - {"cudaMallocMipmappedArray", {"hipMallocMipmappedArray", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cuMemAllocPitch due to different signatures - {"cudaMallocPitch", {"hipMallocPitch", "", CONV_MEMORY, API_RUNTIME}}, - // cuMemAdvise - {"cudaMemAdvise", {"hipMemAdvise", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cuMemcpy due to different signatures - {"cudaMemcpy", {"hipMemcpy", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - // NOTE: Not equal to cuMemcpy2D due to different signatures - {"cudaMemcpy2D", {"hipMemcpy2D", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaMemcpy2DArrayToArray", {"hipMemcpy2DArrayToArray", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cuMemcpy2DAsync due to different signatures - {"cudaMemcpy2DAsync", {"hipMemcpy2DAsync", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaMemcpy2DFromArray", {"hipMemcpy2DFromArray", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaMemcpy2DFromArrayAsync", {"hipMemcpy2DFromArrayAsync", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaMemcpy2DToArray", {"hipMemcpy2DToArray", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaMemcpy2DToArrayAsync", {"hipMemcpy2DToArrayAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cuMemcpy3D due to different signatures - {"cudaMemcpy3D", {"hipMemcpy3D", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - // NOTE: Not equal to cuMemcpy3DAsync due to different signatures - {"cudaMemcpy3DAsync", {"hipMemcpy3DAsync", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - // NOTE: Not equal to cuMemcpy3DPeer due to different signatures - {"cudaMemcpy3DPeer", {"hipMemcpy3DPeer", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cuMemcpy3DPeerAsync due to different signatures - {"cudaMemcpy3DPeerAsync", {"hipMemcpy3DPeerAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cuMemcpyAsync due to different signatures - {"cudaMemcpyAsync", {"hipMemcpyAsync", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaMemcpyFromSymbol", {"hipMemcpyFromSymbol", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaMemcpyFromSymbolAsync", {"hipMemcpyFromSymbolAsync", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - // NOTE: Not equal to cuMemcpyPeer due to different signatures - {"cudaMemcpyPeer", {"hipMemcpyPeer", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - // NOTE: Not equal to cuMemcpyPeerAsync due to different signatures - {"cudaMemcpyPeerAsync", {"hipMemcpyPeerAsync", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaMemcpyToSymbol", {"hipMemcpyToSymbol", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaMemcpyToSymbolAsync", {"hipMemcpyToSymbolAsync", "", CONV_MEMORY, API_RUNTIME}}, - // cuMemGetInfo - {"cudaMemGetInfo", {"hipMemGetInfo", "", CONV_MEMORY, API_RUNTIME}}, - // TODO: double check cuMemPrefetchAsync - {"cudaMemPrefetchAsync", {"hipMemPrefetchAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuMemRangeGetAttribute - {"cudaMemRangeGetAttribute", {"hipMemRangeGetAttribute", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuMemRangeGetAttributes - {"cudaMemRangeGetAttributes", {"hipMemRangeGetAttributes", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuMemsetD32 - hipMemsetD32 - {"cudaMemset", {"hipMemset", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaMemset2D", {"hipMemset2D", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaMemset2DAsync", {"hipMemset2DAsync", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaMemset3D", {"hipMemset3D", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaMemset3DAsync", {"hipMemset3DAsync", "", CONV_MEMORY, API_RUNTIME}}, - // cuMemsetD32Async - {"cudaMemsetAsync", {"hipMemsetAsync", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"make_cudaExtent", {"make_hipExtent", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"make_cudaPitchedPtr", {"make_hipPitchedPtr", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"make_cudaPos", {"make_hipPos", "", CONV_MEMORY, API_RUNTIME}}, - - // 5.10. Memory Management [DEPRECATED] - // no analogue - // NOTE: Not equal to cuMemcpyAtoA due to different signatures - {"cudaMemcpyArrayToArray", {"hipMemcpyArrayToArray", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - {"cudaMemcpyFromArray", {"hipMemcpyFromArray", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaMemcpyFromArrayAsync", {"hipMemcpyFromArrayAsync", "", CONV_MEMORY, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - {"cudaMemcpyToArray", {"hipMemcpyToArray", "", CONV_MEMORY, API_RUNTIME}}, - // no analogue - {"cudaMemcpyToArrayAsync", {"hipMemcpyToArrayAsync", "", CONV_MEMORY, API_RUNTIME}}, - - // 5.11.Unified Addressing - // no analogue - // NOTE: Not equal to cuPointerGetAttributes due to different signatures - {"cudaPointerGetAttributes", {"hipPointerGetAttributes", "", CONV_ADDRESSING, API_RUNTIME}}, - - // 5.12. Peer Device Memory Access - // cuDeviceCanAccessPeer - {"cudaDeviceCanAccessPeer", {"hipDeviceCanAccessPeer", "", CONV_PEER, API_RUNTIME}}, - // no analogue - // NOTE: Not equal to cuCtxDisablePeerAccess due to different signatures - {"cudaDeviceDisablePeerAccess", {"hipDeviceDisablePeerAccess", "", CONV_PEER, API_RUNTIME}}, - // no analogue - // NOTE: Not equal to cuCtxEnablePeerAccess due to different signatures - {"cudaDeviceEnablePeerAccess", {"hipDeviceEnablePeerAccess", "", CONV_PEER, API_RUNTIME}}, - - // 5.13. OpenGL Interoperability - // cuGLGetDevices - {"cudaGLGetDevices", {"hipGLGetDevices", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphicsGLRegisterBuffer - {"cudaGraphicsGLRegisterBuffer", {"hipGraphicsGLRegisterBuffer", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphicsGLRegisterImage - {"cudaGraphicsGLRegisterImage", {"hipGraphicsGLRegisterImage", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuWGLGetDevice - {"cudaWGLGetDevice", {"hipWGLGetDevice", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5.14. OpenGL Interoperability [DEPRECATED] - // no analogue - // NOTE: Not equal to cuGLMapBufferObject due to different signatures - {"cudaGLMapBufferObject", {"hipGLMapBufferObject", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - // NOTE: Not equal to cuGLMapBufferObjectAsync due to different signatures - {"cudaGLMapBufferObjectAsync", {"hipGLMapBufferObjectAsync", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGLRegisterBufferObject - {"cudaGLRegisterBufferObject", {"hipGLRegisterBufferObject", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGLSetBufferObjectMapFlags - {"cudaGLSetBufferObjectMapFlags", {"hipGLSetBufferObjectMapFlags", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - {"cudaGLSetGLDevice", {"hipGLSetGLDevice", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGLUnmapBufferObject - {"cudaGLUnmapBufferObject", {"hipGLUnmapBufferObject", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGLUnmapBufferObjectAsync - {"cudaGLUnmapBufferObjectAsync", {"hipGLUnmapBufferObjectAsync", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGLUnregisterBufferObject - {"cudaGLUnregisterBufferObject", {"hipGLUnregisterBufferObject", "", CONV_OPENGL, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5.15. Direct3D 9 Interoperability - // cuD3D9GetDevice - {"cudaD3D9GetDevice", {"hipD3D9GetDevice", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D9GetDevices - {"cudaD3D9GetDevices", {"hipD3D9GetDevices", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D9GetDirect3DDevice - {"cudaD3D9GetDirect3DDevice", {"hipD3D9GetDirect3DDevice", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - {"cudaD3D9SetDirect3DDevice", {"hipD3D9SetDirect3DDevice", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphicsD3D9RegisterResource - {"cudaGraphicsD3D9RegisterResource", {"hipGraphicsD3D9RegisterResource", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5.16.Direct3D 9 Interoperability[DEPRECATED] - // cuD3D9MapResources - {"cudaD3D9MapResources", {"hipD3D9MapResources", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D9RegisterResource - {"cudaD3D9RegisterResource", {"hipD3D9RegisterResource", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D9ResourceGetMappedArray - {"cudaD3D9ResourceGetMappedArray", {"hipD3D9ResourceGetMappedArray", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaD3D9ResourceGetMappedPitch - {"cudaD3D9ResourceGetMappedPitch", {"hipD3D9ResourceGetMappedPitch", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D9ResourceGetMappedPointer - {"cudaD3D9ResourceGetMappedPointer", {"hipD3D9ResourceGetMappedPointer", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D9ResourceGetMappedSize - {"cudaD3D9ResourceGetMappedSize", {"hipD3D9ResourceGetMappedSize", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D9ResourceGetSurfaceDimensions - {"cudaD3D9ResourceGetSurfaceDimensions", {"hipD3D9ResourceGetSurfaceDimensions", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D9ResourceSetMapFlags - {"cudaD3D9ResourceSetMapFlags", {"hipD3D9ResourceSetMapFlags", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D9UnmapResources - {"cudaD3D9UnmapResources", {"hipD3D9UnmapResources", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D9UnregisterResource - {"cudaD3D9UnregisterResource", {"hipD3D9UnregisterResource", "", CONV_D3D9, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5.17. Direct3D 10 Interoperability - // cuD3D10GetDevice - {"cudaD3D10GetDevice", {"hipD3D10GetDevice", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D10GetDevices - {"cudaD3D10GetDevices", {"hipD3D10GetDevices", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphicsD3D10RegisterResource - {"cudaGraphicsD3D10RegisterResource", {"hipGraphicsD3D10RegisterResource", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5.18. Direct3D 10 Interoperability [DEPRECATED] - // cudaD3D10GetDirect3DDevice - {"cudaD3D10GetDirect3DDevice", {"hipD3D10GetDirect3DDevice", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D10MapResources - {"cudaD3D10MapResources", {"hipD3D10MapResources", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D10RegisterResource - {"cudaD3D10RegisterResource", {"hipD3D10RegisterResource", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D10ResourceGetMappedArray - {"cudaD3D10ResourceGetMappedArray", {"hipD3D10ResourceGetMappedArray", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaD3D10ResourceGetMappedPitch - {"cudaD3D10ResourceGetMappedPitch", {"hipD3D10ResourceGetMappedPitch", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D10ResourceGetMappedPointer - {"cudaD3D10ResourceGetMappedPointer", {"hipD3D10ResourceGetMappedPointer", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D10ResourceGetMappedSize - {"cudaD3D10ResourceGetMappedSize", {"hipD3D10ResourceGetMappedSize", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D10ResourceGetSurfaceDimensions - {"cudaD3D10ResourceGetSurfaceDimensions", {"hipD3D10ResourceGetSurfaceDimensions", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D10ResourceSetMapFlags - {"cudaD3D10ResourceSetMapFlags", {"hipD3D10ResourceSetMapFlags", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - {"cudaD3D10SetDirect3DDevice", {"hipD3D10SetDirect3DDevice", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D10UnmapResources - {"cudaD3D10UnmapResources", {"hipD3D10UnmapResources", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D10UnregisterResource - {"cudaD3D10UnregisterResource", {"hipD3D10UnregisterResource", "", CONV_D3D10, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5.19. Direct3D 11 Interoperability - // cuD3D11GetDevice - {"cudaD3D11GetDevice", {"hipD3D11GetDevice", "", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuD3D11GetDevices - {"cudaD3D11GetDevices", {"hipD3D11GetDevices", "", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphicsD3D11RegisterResource - {"cudaGraphicsD3D11RegisterResource", {"hipGraphicsD3D11RegisterResource", "", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5.20. Direct3D 11 Interoperability [DEPRECATED] - // cuD3D11GetDirect3DDevice - {"cudaD3D11GetDirect3DDevice", {"hipD3D11GetDirect3DDevice", "", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - {"cudaD3D11SetDirect3DDevice", {"hipD3D11SetDirect3DDevice", "", CONV_D3D11, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5.21. VDPAU Interoperability - // cuGraphicsVDPAURegisterOutputSurface - {"cudaGraphicsVDPAURegisterOutputSurface", {"hipGraphicsVDPAURegisterOutputSurface", "", CONV_VDPAU, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphicsVDPAURegisterVideoSurface - {"cudaGraphicsVDPAURegisterVideoSurface", {"hipGraphicsVDPAURegisterVideoSurface", "", CONV_VDPAU, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuVDPAUGetDevice - {"cudaVDPAUGetDevice", {"hipVDPAUGetDevice", "", CONV_VDPAU, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - {"cudaVDPAUSetVDPAUDevice", {"hipVDPAUSetDevice", "", CONV_VDPAU, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5.22. EGL Interoperability - // cuEGLStreamConsumerAcquireFrame - {"cudaEGLStreamConsumerAcquireFrame", {"hipEGLStreamConsumerAcquireFrame", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuEGLStreamConsumerConnect - {"cudaEGLStreamConsumerConnect", {"hipEGLStreamConsumerConnect", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuEGLStreamConsumerConnectWithFlags - {"cudaEGLStreamConsumerConnectWithFlags", {"hipEGLStreamConsumerConnectWithFlags", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuEGLStreamConsumerDisconnect - {"cudaEGLStreamConsumerDisconnect", {"hipEGLStreamConsumerDisconnect", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuEGLStreamConsumerReleaseFrame - {"cudaEGLStreamConsumerReleaseFrame", {"hipEGLStreamConsumerReleaseFrame", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuEGLStreamProducerConnect - {"cudaEGLStreamProducerConnect", {"hipEGLStreamProducerConnect", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuEGLStreamProducerDisconnect - {"cudaEGLStreamProducerDisconnect", {"hipEGLStreamProducerDisconnect", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuEGLStreamProducerPresentFrame - {"cudaEGLStreamProducerPresentFrame", {"hipEGLStreamProducerPresentFrame", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuEGLStreamProducerReturnFrame - {"cudaEGLStreamProducerReturnFrame", {"hipEGLStreamProducerReturnFrame", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuEventCreateFromEGLSync - {"cudaEventCreateFromEGLSync", {"hipEventCreateFromEGLSync", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphicsEGLRegisterImage - {"cudaGraphicsEGLRegisterImage", {"hipGraphicsEGLRegisterImage", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphicsResourceGetMappedEglFrame - {"cudaGraphicsResourceGetMappedEglFrame", {"hipGraphicsResourceGetMappedEglFrame", "", CONV_EGL, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5.23. Graphics Interoperability - // cuGraphicsMapResources - {"cudaGraphicsMapResources", {"hipGraphicsMapResources", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphicsResourceGetMappedMipmappedArray - {"cudaGraphicsResourceGetMappedMipmappedArray", {"hipGraphicsResourceGetMappedMipmappedArray", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphicsResourceGetMappedPointer - {"cudaGraphicsResourceGetMappedPointer", {"hipGraphicsResourceGetMappedPointer", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphicsResourceSetMapFlags - {"cudaGraphicsResourceSetMapFlags", {"hipGraphicsResourceSetMapFlags", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphicsSubResourceGetMappedArray - {"cudaGraphicsSubResourceGetMappedArray", {"hipGraphicsSubResourceGetMappedArray", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphicsUnmapResources - {"cudaGraphicsUnmapResources", {"hipGraphicsUnmapResources", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphicsUnregisterResource - {"cudaGraphicsUnregisterResource", {"hipGraphicsUnregisterResource", "", CONV_GRAPHICS, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5.24. Texture Reference Management [DEPRECATED] - // no analogue - {"cudaBindTexture", {"hipBindTexture", "", CONV_TEXTURE, API_RUNTIME}}, - // no analogue - {"cudaBindTexture2D", {"hipBindTexture2D", "", CONV_TEXTURE, API_RUNTIME}}, - // no analogue - {"cudaBindTextureToArray", {"hipBindTextureToArray", "", CONV_TEXTURE, API_RUNTIME}}, - // no analogue - // NOTE: Unsupported yet on NVCC path - {"cudaBindTextureToMipmappedArray", {"hipBindTextureToMipmappedArray", "", CONV_TEXTURE, API_RUNTIME}}, - // no analogue - {"cudaCreateChannelDesc", {"hipCreateChannelDesc", "", CONV_TEXTURE, API_RUNTIME}}, - // no analogue - {"cudaGetChannelDesc", {"hipGetChannelDesc", "", CONV_TEXTURE, API_RUNTIME}}, - // no analogue - {"cudaGetTextureAlignmentOffset", {"hipGetTextureAlignmentOffset", "", CONV_TEXTURE, API_RUNTIME}}, - // TODO: double check cuModuleGetTexRef - // NOTE: Unsupported yet on NVCC path - {"cudaGetTextureReference", {"hipGetTextureReference", "", CONV_TEXTURE, API_RUNTIME}}, - // no analogue - {"cudaUnbindTexture", {"hipUnbindTexture", "", CONV_TEXTURE, API_RUNTIME}}, - - // 5.25. Surface Reference Management [DEPRECATED] - // no analogue - {"cudaBindSurfaceToArray", {"hipBindSurfaceToArray", "", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED}}, - // TODO: double check cuModuleGetSurfRef - {"cudaGetSurfaceReference", {"hipGetSurfaceReference", "", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5.26. Texture Object Management - // no analogue - // NOTE: Not equal to cuTexObjectCreate due to different signatures - {"cudaCreateTextureObject", {"hipCreateTextureObject", "", CONV_TEXTURE, API_RUNTIME}}, - // cuTexObjectDestroy - {"cudaDestroyTextureObject", {"hipDestroyTextureObject", "", CONV_TEXTURE, API_RUNTIME}}, - // no analogue - // NOTE: Not equal to cuTexObjectGetResourceDesc due to different signatures - {"cudaGetTextureObjectResourceDesc", {"hipGetTextureObjectResourceDesc", "", CONV_TEXTURE, API_RUNTIME}}, - // cuTexObjectGetResourceViewDesc - {"cudaGetTextureObjectResourceViewDesc", {"hipGetTextureObjectResourceViewDesc", "", CONV_TEXTURE, API_RUNTIME}}, - // no analogue - // NOTE: Not equal to cudaGetTextureObjectTextureDesc due to different signatures - {"cuTexObjectGetTextureDesc", {"hipGetTextureObjectTextureDesc", "", CONV_TEXTURE, API_RUNTIME}}, - - // 5.27. Surface Object Management - // no analogue - // NOTE: Not equal to cuSurfObjectCreate due to different signatures - {"cudaCreateSurfaceObject", {"hipCreateSurfaceObject", "", CONV_SURFACE, API_RUNTIME}}, - // cuSurfObjectDestroy - {"cudaDestroySurfaceObject", {"hipDestroySurfaceObject", "", CONV_SURFACE, API_RUNTIME}}, - // no analogue - // NOTE: Not equal to cuSurfObjectGetResourceDesc due to different signatures - {"cudaGetSurfaceObjectResourceDesc", {"hipGetSurfaceObjectResourceDesc", "", CONV_SURFACE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5.28.Version Management - // cuDriverGetVersion - {"cudaDriverGetVersion", {"hipDriverGetVersion", "", CONV_VERSION, API_RUNTIME}}, - // no analogue - {"cudaRuntimeGetVersion", {"hipRuntimeGetVersion", "", CONV_VERSION, API_RUNTIME}}, - - // 5.29. Graph Management - // cuGraphAddChildGraphNode - {"cudaGraphAddChildGraphNode", {"hipGraphAddChildGraphNode", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphAddDependencies - {"cudaGraphAddDependencies", {"hipGraphAddDependencies", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphAddEmptyNode - {"cudaGraphAddEmptyNode", {"hipGraphAddEmptyNode", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphAddHostNode - {"cudaGraphAddHostNode", {"hipGraphAddHostNode", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphAddKernelNode - {"cudaGraphAddKernelNode", {"hipGraphAddKernelNode", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphAddMemcpyNode - {"cudaGraphAddMemcpyNode", {"hipGraphAddMemcpyNode", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphAddMemsetNode - {"cudaGraphAddMemsetNode", {"hipGraphAddMemsetNode", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphChildGraphNodeGetGraph - {"cudaGraphChildGraphNodeGetGraph", {"hipGraphChildGraphNodeGetGraph", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphClone - {"cudaGraphClone", {"hipGraphClone", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphCreate - {"cudaGraphCreate", {"hipGraphCreate", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphDestroy - {"cudaGraphDestroy", {"hipGraphDestroy", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphDestroyNode - {"cudaGraphDestroyNode", {"hipGraphDestroyNode", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphExecDestroy - {"cudaGraphExecDestroy", {"hipGraphExecDestroy", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphGetEdges - {"cudaGraphGetEdges", {"hipGraphGetEdges", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphGetNodes - {"cudaGraphGetNodes", {"hipGraphGetNodes", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphGetRootNodes - {"cudaGraphGetRootNodes", {"hipGraphGetRootNodes", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphHostNodeGetParams - {"cudaGraphHostNodeGetParams", {"hipGraphHostNodeGetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphHostNodeSetParams - {"cudaGraphHostNodeSetParams", {"hipGraphHostNodeSetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphInstantiate - {"cudaGraphInstantiate", {"hipGraphInstantiate", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphExecKernelNodeSetParams - {"cudaGraphExecKernelNodeSetParams", {"hipGraphExecKernelNodeSetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphExecMemcpyNodeSetParams - {"cudaGraphExecMemcpyNodeSetParams", {"hipGraphExecMemcpyNodeSetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphExecMemsetNodeSetParams - {"cudaGraphExecMemsetNodeSetParams", {"hipGraphExecMemsetNodeSetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphExecHostNodeSetParams - {"cudaGraphExecHostNodeSetParams", {"hipGraphExecHostNodeSetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphExecUpdate - {"cudaGraphExecUpdate", {"hipGraphExecUpdate", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphKernelNodeGetParams - {"cudaGraphKernelNodeGetParams", {"hipGraphKernelNodeGetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphKernelNodeSetParams - {"cudaGraphKernelNodeSetParams", {"hipGraphKernelNodeSetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphLaunch - {"cudaGraphLaunch", {"hipGraphLaunch", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphMemcpyNodeGetParams - {"cudaGraphMemcpyNodeGetParams", {"hipGraphMemcpyNodeGetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphMemcpyNodeSetParams - {"cudaGraphMemcpyNodeSetParams", {"hipGraphMemcpyNodeSetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphMemsetNodeGetParams - {"cudaGraphMemsetNodeGetParams", {"hipGraphMemsetNodeGetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphMemsetNodeSetParams - {"cudaGraphMemsetNodeSetParams", {"hipGraphMemsetNodeSetParams", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphNodeFindInClone - {"cudaGraphNodeFindInClone", {"hipGraphNodeFindInClone", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphNodeGetDependencies - {"cudaGraphNodeGetDependencies", {"hipGraphNodeGetDependencies", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphNodeGetDependentNodes - {"cudaGraphNodeGetDependentNodes", {"hipGraphNodeGetDependentNodes", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphNodeGetType - {"cudaGraphNodeGetType", {"hipGraphNodeGetType", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuGraphRemoveDependencies - {"cudaGraphRemoveDependencies", {"hipGraphRemoveDependencies", "", CONV_GRAPH, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5.32. Profiler Control - // cuProfilerInitialize - {"cudaProfilerInitialize", {"hipProfilerInitialize", "", CONV_PROFILER, API_RUNTIME, HIP_UNSUPPORTED}}, - // cuProfilerStart - {"cudaProfilerStart", {"hipProfilerStart", "", CONV_PROFILER, API_RUNTIME}}, - // cuProfilerStop - {"cudaProfilerStop", {"hipProfilerStop", "", CONV_PROFILER, API_RUNTIME}}, -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_Runtime_API_types.cpp b/hipamd/hipify-clang/src/CUDA2HIP_Runtime_API_types.cpp deleted file mode 100644 index 6eb9bfb2be..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_Runtime_API_types.cpp +++ /dev/null @@ -1,1426 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Maps the names of CUDA RUNTIME API types to the corresponding HIP types -const std::map CUDA_RUNTIME_TYPE_NAME_MAP { - - // 1. Structs - - // no analogue - {"cudaChannelFormatDesc", {"hipChannelFormatDesc", "", CONV_TYPE, API_RUNTIME}}, - // no analogue - {"cudaDeviceProp", {"hipDeviceProp_t", "", CONV_TYPE, API_RUNTIME}}, - - // no analogue - {"cudaEglFrame", {"hipEglFrame", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaEglFrame_st", {"hipEglFrame", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // no analogue - {"cudaEglPlaneDesc", {"hipEglPlaneDesc", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaEglPlaneDesc_st", {"hipEglPlaneDesc", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // no analogue - {"cudaExtent", {"hipExtent", "", CONV_TYPE, API_RUNTIME}}, - - // CUDA_EXTERNAL_MEMORY_BUFFER_DESC - {"cudaExternalMemoryBufferDesc", {"HIP_EXTERNAL_MEMORY_BUFFER_DESC", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // CUDA_EXTERNAL_MEMORY_HANDLE_DESC - {"cudaExternalMemoryHandleDesc", {"HIP_EXTERNAL_MEMORY_HANDLE_DESC", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC - {"cudaExternalMemoryMipmappedArrayDesc", {"HIP_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC - {"cudaExternalSemaphoreHandleDesc", {"HIP_EXTERNAL_SEMAPHORE_HANDLE_DESC", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS - {"cudaExternalSemaphoreSignalParams", {"HIP_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS - {"cudaExternalSemaphoreWaitParams", {"HIP_EXTERNAL_SEMAPHORE_WAIT_PARAMS", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // no analogue - {"cudaFuncAttributes", {"hipFuncAttributes", "", CONV_TYPE, API_RUNTIME}}, - - // CUDA_HOST_NODE_PARAMS - {"cudaHostNodeParams", {"HIP_HOST_NODE_PARAMS", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // CUipcEventHandle - {"cudaIpcEventHandle_t", {"ihipIpcEventHandle_t", "", CONV_TYPE, API_RUNTIME}}, - // CUipcEventHandle_st - {"cudaIpcEventHandle_st", {"ihipIpcEventHandle_t", "", CONV_TYPE, API_RUNTIME}}, - - // CUipcMemHandle - {"cudaIpcMemHandle_t", {"hipIpcMemHandle_t", "", CONV_TYPE, API_RUNTIME}}, - // CUipcMemHandle_st - {"cudaIpcMemHandle_st", {"hipIpcMemHandle_st", "", CONV_TYPE, API_RUNTIME}}, - - // CUDA_KERNEL_NODE_PARAMS - {"cudaKernelNodeParams", {"hipKernelNodeParams", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // no analogue - // CUDA_LAUNCH_PARAMS struct differs - {"cudaLaunchParams", {"hipLaunchParams", "", CONV_TYPE, API_RUNTIME}}, - - // no analogue - // NOTE: HIP struct is bigger and contains cudaMemcpy3DParms only in the beginning - {"cudaMemcpy3DParms", {"hipMemcpy3DParms", "", CONV_TYPE, API_RUNTIME}}, - - // no analogue - {"cudaMemcpy3DPeerParms", {"hipMemcpy3DPeerParms", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // CUDA_MEMSET_NODE_PARAMS - {"cudaMemsetParams", {"hipMemsetParams", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // no analogue - {"cudaPitchedPtr", {"hipPitchedPtr", "", CONV_TYPE, API_RUNTIME}}, - - // no analogue - {"cudaPointerAttributes", {"hipPointerAttribute_t", "", CONV_TYPE, API_RUNTIME}}, - - // no analogue - {"cudaPos", {"hipPos", "", CONV_TYPE, API_RUNTIME}}, - - // no analogue - // NOTE: CUDA_RESOURCE_DESC struct differs - {"cudaResourceDesc", {"hipResourceDesc", "", CONV_TYPE, API_RUNTIME}}, - - // NOTE: CUDA_RESOURCE_VIEW_DESC has reserved bytes in the end - {"cudaResourceViewDesc", {"hipResourceViewDesc", "", CONV_TYPE, API_RUNTIME}}, - - // no analogue - // NOTE: CUDA_TEXTURE_DESC differs - {"cudaTextureDesc", {"hipTextureDesc", "", CONV_TYPE, API_RUNTIME}}, - - // NOTE: the same struct and its name - {"CUuuid_st", {"hipUUID", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // NOTE: possibly CUsurfref is analogue - {"surfaceReference", {"hipSurfaceReference", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // the same - CUevent_st - {"CUevent_st", {"ihipEvent_t", "", CONV_TYPE, API_RUNTIME}}, - // CUevent - {"cudaEvent_t", {"hipEvent_t", "", CONV_TYPE, API_RUNTIME}}, - - // CUextMemory_st - {"CUexternalMemory_st", {"hipExtMemory_st", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // CUexternalMemory - {"cudaExternalMemory_t", {"hipExternalMemory", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // CUextSemaphore_st - {"CUexternalSemaphore_st", {"hipExtSemaphore_st", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // CUexternalSemaphore - {"cudaExternalSemaphore_t", {"hipExternalSemaphore", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // the same - CUgraph_st - {"CUgraph_st", {"hipGraph_st", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // CUgraph - {"cudaGraph_t", {"hipGraph", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // the same -CUgraphExec_st - {"CUgraphExec_st", {"hipGraphExec_st", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // CUgraphExec - {"cudaGraphExec_t", {"hipGraphExec", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // CUgraphicsResource_st - {"cudaGraphicsResource", {"hipGraphicsResource_st", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // CUgraphicsResource - {"cudaGraphicsResource_t", {"hipGraphicsResource_t", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // the same - CUgraphNode_st - {"CUgraphNode_st", {"hipGraphNode_st", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // CUgraphNode - {"cudaGraphNode_t", {"hipGraphNode", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // CUeglStreamConnection_st - {"CUeglStreamConnection_st", {"hipEglStreamConnection", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // CUeglStreamConnection - {"cudaEglStreamConnection", {"hipEglStreamConnection", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // CUarray_st - {"cudaArray", {"hipArray", "", CONV_TYPE, API_RUNTIME}}, - // CUarray - {"cudaArray_t", {"hipArray_t", "", CONV_TYPE, API_RUNTIME}}, - // no analogue - {"cudaArray_const_t", {"hipArray_const_t", "", CONV_TYPE, API_RUNTIME}}, - - // CUmipmappedArray_st - {"cudaMipmappedArray", {"hipMipmappedArray", "", CONV_TYPE, API_RUNTIME}}, - // CUmipmappedArray - {"cudaMipmappedArray_t", {"hipMipmappedArray_t", "", CONV_TYPE, API_RUNTIME}}, - // no analogue - {"cudaMipmappedArray_const_t", {"hipMipmappedArray_const_t", "", CONV_TYPE, API_RUNTIME}}, - - // the same - CUstream_st - {"CUstream_st", {"ihipStream_t", "", CONV_TYPE, API_RUNTIME}}, - // CUstream - {"cudaStream_t", {"hipStream_t", "", CONV_TYPE, API_RUNTIME}}, - - // 3. Enums - - // no analogue - {"cudaCGScope", {"hipCGScope", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaCGScope enum values - {"cudaCGScopeInvalid", {"hipCGScopeInvalid", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0 - {"cudaCGScopeGrid", {"hipCGScopeGrid", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - {"cudaCGScopeMultiGrid", {"hipCGScopeMultiGrid", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - - // no analogue - {"cudaChannelFormatKind", {"hipChannelFormatKind", "", CONV_TYPE, API_RUNTIME}}, - // cudaChannelFormatKind enum values - {"cudaChannelFormatKindSigned", {"hipChannelFormatKindSigned", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0 - {"cudaChannelFormatKindUnsigned", {"hipChannelFormatKindUnsigned", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 1 - {"cudaChannelFormatKindFloat", {"hipChannelFormatKindFloat", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 2 - {"cudaChannelFormatKindNone", {"hipChannelFormatKindNone", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 3 - - // CUcomputemode - {"cudaComputeMode", {"hipComputeMode", "", CONV_TYPE, API_RUNTIME}}, - // cudaComputeMode enum values - // CU_COMPUTEMODE_DEFAULT - {"cudaComputeModeDefault", {"hipComputeModeDefault", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0 - // CU_COMPUTEMODE_EXCLUSIVE - {"cudaComputeModeExclusive", {"hipComputeModeExclusive", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 1 - // CU_COMPUTEMODE_PROHIBITED - {"cudaComputeModeProhibited", {"hipComputeModeProhibited", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 2 - // CU_COMPUTEMODE_EXCLUSIVE_PROCESS - {"cudaComputeModeExclusiveProcess", {"hipComputeModeExclusiveProcess", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 3 - - // CUdevice_attribute - {"cudaDeviceAttr", {"hipDeviceAttribute_t", "", CONV_TYPE, API_RUNTIME}}, - // cudaDeviceAttr enum values - // CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK - {"cudaDevAttrMaxThreadsPerBlock", {"hipDeviceAttributeMaxThreadsPerBlock", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 1 - // CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X - {"cudaDevAttrMaxBlockDimX", {"hipDeviceAttributeMaxBlockDimX", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 2 - // CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y - {"cudaDevAttrMaxBlockDimY", {"hipDeviceAttributeMaxBlockDimY", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 3 - // CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z - {"cudaDevAttrMaxBlockDimZ", {"hipDeviceAttributeMaxBlockDimZ", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 4 - // CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X - {"cudaDevAttrMaxGridDimX", {"hipDeviceAttributeMaxGridDimX", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 5 - // CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y - {"cudaDevAttrMaxGridDimY", {"hipDeviceAttributeMaxGridDimY", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 6 - // CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z - {"cudaDevAttrMaxGridDimZ", {"hipDeviceAttributeMaxGridDimZ", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 7 - // CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK - {"cudaDevAttrMaxSharedMemoryPerBlock", {"hipDeviceAttributeMaxSharedMemoryPerBlock", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 8 - // CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY - {"cudaDevAttrTotalConstantMemory", {"hipDeviceAttributeTotalConstantMemory", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 9 - // CU_DEVICE_ATTRIBUTE_WARP_SIZE - {"cudaDevAttrWarpSize", {"hipDeviceAttributeWarpSize", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 10 - // CU_DEVICE_ATTRIBUTE_MAX_PITCH - {"cudaDevAttrMaxPitch", {"hipDeviceAttributeMaxPitch", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 11 - // CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK - {"cudaDevAttrMaxRegistersPerBlock", {"hipDeviceAttributeMaxRegistersPerBlock", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 12 - // CU_DEVICE_ATTRIBUTE_CLOCK_RATE - {"cudaDevAttrClockRate", {"hipDeviceAttributeClockRate", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 13 - // CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT - {"cudaDevAttrTextureAlignment", {"hipDeviceAttributeTextureAlignment", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 14 - // CU_DEVICE_ATTRIBUTE_GPU_OVERLAP - // NOTE: Is not deprecated as CUDA Driver's API analogue CU_DEVICE_ATTRIBUTE_GPU_OVERLAP - {"cudaDevAttrGpuOverlap", {"hipDeviceAttributeGpuOverlap", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 15 - // CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT - {"cudaDevAttrMultiProcessorCount", {"hipDeviceAttributeMultiprocessorCount", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 16 - // CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT - {"cudaDevAttrKernelExecTimeout", {"hipDeviceAttributeKernelExecTimeout", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 17 - // CU_DEVICE_ATTRIBUTE_INTEGRATED - {"cudaDevAttrIntegrated", {"hipDeviceAttributeIntegrated", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 18 - // CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY - {"cudaDevAttrCanMapHostMemory", {"hipDeviceAttributeCanMapHostMemory", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 19 - // CU_DEVICE_ATTRIBUTE_COMPUTE_MODE - {"cudaDevAttrComputeMode", {"hipDeviceAttributeComputeMode", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 20 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH - {"cudaDevAttrMaxTexture1DWidth", {"hipDeviceAttributeMaxTexture1DWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 21 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH - {"cudaDevAttrMaxTexture2DWidth", {"hipDeviceAttributeMaxTexture2DWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 22 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT - {"cudaDevAttrMaxTexture2DHeight", {"hipDeviceAttributeMaxTexture2DHeight", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 23 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH - {"cudaDevAttrMaxTexture3DWidth", {"hipDeviceAttributeMaxTexture3DWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 24 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT - {"cudaDevAttrMaxTexture3DHeight", {"hipDeviceAttributeMaxTexture3DHeight", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 25 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH - {"cudaDevAttrMaxTexture3DDepth", {"hipDeviceAttributeMaxTexture3DDepth", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 26 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH - {"cudaDevAttrMaxTexture2DLayeredWidth", {"hipDeviceAttributeMaxTexture2DLayeredWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 27 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT - {"cudaDevAttrMaxTexture2DLayeredHeight", {"hipDeviceAttributeMaxTexture2DLayeredHeight", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 28 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS - {"cudaDevAttrMaxTexture2DLayeredLayers", {"hipDeviceAttributeMaxTexture2DLayeredLayers", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 29 - // CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT - {"cudaDevAttrSurfaceAlignment", {"hipDeviceAttributeSurfaceAlignment", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 30 - // CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS - {"cudaDevAttrConcurrentKernels", {"hipDeviceAttributeConcurrentKernels", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 31 - // CU_DEVICE_ATTRIBUTE_ECC_ENABLED - {"cudaDevAttrEccEnabled", {"hipDeviceAttributeEccEnabled", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 32 - // CU_DEVICE_ATTRIBUTE_PCI_BUS_ID - {"cudaDevAttrPciBusId", {"hipDeviceAttributePciBusId", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 33 - // CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID - {"cudaDevAttrPciDeviceId", {"hipDeviceAttributePciDeviceId", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 34 - // CU_DEVICE_ATTRIBUTE_TCC_DRIVER - {"cudaDevAttrTccDriver", {"hipDeviceAttributeTccDriver", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 35 - // CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE - {"cudaDevAttrMemoryClockRate", {"hipDeviceAttributeMemoryClockRate", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 36 - // CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH - {"cudaDevAttrGlobalMemoryBusWidth", {"hipDeviceAttributeMemoryBusWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 37 - // CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE - {"cudaDevAttrL2CacheSize", {"hipDeviceAttributeL2CacheSize", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 38 - // CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR - {"cudaDevAttrMaxThreadsPerMultiProcessor", {"hipDeviceAttributeMaxThreadsPerMultiProcessor", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 39 - // CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT - {"cudaDevAttrAsyncEngineCount", {"hipDeviceAttributeAsyncEngineCount", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 40 - // CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING - {"cudaDevAttrUnifiedAddressing", {"hipDeviceAttributeUnifiedAddressing", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 41 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH - {"cudaDevAttrMaxTexture1DLayeredWidth", {"hipDeviceAttributeMaxTexture1DLayeredWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 42 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS - {"cudaDevAttrMaxTexture1DLayeredLayers", {"hipDeviceAttributeMaxTexture1DLayeredLayers", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 43 - // 44 - no - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH - {"cudaDevAttrMaxTexture2DGatherWidth", {"hipDeviceAttributeMaxTexture2DGatherWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 45 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT - {"cudaDevAttrMaxTexture2DGatherHeight", {"hipDeviceAttributeMaxTexture2DGatherHeight", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 46 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE - {"cudaDevAttrMaxTexture3DWidthAlt", {"hipDeviceAttributeMaxTexture3DWidthAlternate", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 47 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE - {"cudaDevAttrMaxTexture3DHeightAlt", {"hipDeviceAttributeMaxTexture3DHeightAlternate", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 48 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE - {"cudaDevAttrMaxTexture3DDepthAlt", {"hipDeviceAttributeMaxTexture3DDepthAlternate", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 49 - // CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID - {"cudaDevAttrPciDomainId", {"hipDeviceAttributePciDomainId", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 50 - // CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT - {"cudaDevAttrTexturePitchAlignment", {"hipDeviceAttributeTexturePitchAlignment", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 51 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH - {"cudaDevAttrMaxTextureCubemapWidth", {"hipDeviceAttributeMaxTextureCubemapWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 52 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH - {"cudaDevAttrMaxTextureCubemapLayeredWidth", {"hipDeviceAttributeMaxTextureCubemapLayeredWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 53 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS - {"cudaDevAttrMaxTextureCubemapLayeredLayers", {"hipDeviceAttributeMaxTextureCubemapLayeredLayers", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 54 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH - {"cudaDevAttrMaxSurface1DWidth", {"hipDeviceAttributeMaxSurface1DWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 55 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH - {"cudaDevAttrMaxSurface2DWidth", {"hipDeviceAttributeMaxSurface2DWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 56 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT - {"cudaDevAttrMaxSurface2DHeight", {"hipDeviceAttributeMaxSurface2DHeight", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 57 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH - {"cudaDevAttrMaxSurface3DWidth", {"hipDeviceAttributeMaxSurface3DWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 58 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT - {"cudaDevAttrMaxSurface3DHeight", {"hipDeviceAttributeMaxSurface3DHeight", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 59 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH - {"cudaDevAttrMaxSurface3DDepth", {"hipDeviceAttributeMaxSurface3DDepth", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 60 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH - {"cudaDevAttrMaxSurface1DLayeredWidth", {"hipDeviceAttributeMaxSurface1DLayeredWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 61 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS - {"cudaDevAttrMaxSurface1DLayeredLayers", {"hipDeviceAttributeMaxSurface1DLayeredLayers", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 62 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH - {"cudaDevAttrMaxSurface2DLayeredWidth", {"hipDeviceAttributeMaxSurface2DLayeredWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 63 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT - {"cudaDevAttrMaxSurface2DLayeredHeight", {"hipDeviceAttributeMaxSurface2DLayeredHeight", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 64 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LA YERS - {"cudaDevAttrMaxSurface2DLayeredLayers", {"hipDeviceAttributeMaxSurface2DLayeredLayers", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 65 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH - {"cudaDevAttrMaxSurfaceCubemapWidth", {"hipDeviceAttributeMaxSurfaceCubemapWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 66 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH - {"cudaDevAttrMaxSurfaceCubemapLayeredWidth", {"hipDeviceAttributeMaxSurfaceCubemapLayeredWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 67 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS - {"cudaDevAttrMaxSurfaceCubemapLayeredLayers", {"hipDeviceAttributeMaxSurfaceCubemapLayeredLayers", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 68 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH - {"cudaDevAttrMaxTexture1DLinearWidth", {"hipDeviceAttributeMaxTexture1DLinearWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 69 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH - {"cudaDevAttrMaxTexture2DLinearWidth", {"hipDeviceAttributeMaxTexture2DLinearWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 70 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT - {"cudaDevAttrMaxTexture2DLinearHeight", {"hipDeviceAttributeMaxTexture2DLinearHeight", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 71 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH - {"cudaDevAttrMaxTexture2DLinearPitch", {"hipDeviceAttributeMaxTexture2DLinearPitch", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 72 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH - {"cudaDevAttrMaxTexture2DMipmappedWidth", {"hipDeviceAttributeMaxTexture2DMipmappedWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 73 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT - {"cudaDevAttrMaxTexture2DMipmappedHeight", {"hipDeviceAttributeMaxTexture2DMipmappedHeight", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 74 - // CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR - {"cudaDevAttrComputeCapabilityMajor", {"hipDeviceAttributeComputeCapabilityMajor", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 75 - // CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR - {"cudaDevAttrComputeCapabilityMinor", {"hipDeviceAttributeComputeCapabilityMinor", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 76 - // CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH - {"cudaDevAttrMaxTexture1DMipmappedWidth", {"hipDeviceAttributeMaxTexture1DMipmappedWidth", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 77 - // CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED - {"cudaDevAttrStreamPrioritiesSupported", {"hipDeviceAttributeStreamPrioritiesSupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 78 - // CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED - {"cudaDevAttrGlobalL1CacheSupported", {"hipDeviceAttributeGlobalL1CacheSupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 79 - // CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED - {"cudaDevAttrLocalL1CacheSupported", {"hipDeviceAttributeLocalL1CacheSupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 80 - // CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR - {"cudaDevAttrMaxSharedMemoryPerMultiprocessor", {"hipDeviceAttributeMaxSharedMemoryPerMultiprocessor", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 81 - // CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR - {"cudaDevAttrMaxRegistersPerMultiprocessor", {"hipDeviceAttributeMaxRegistersPerMultiprocessor", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 82 - // CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY - {"cudaDevAttrManagedMemory", {"hipDeviceAttributeManagedMemory", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 83 - // CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD - {"cudaDevAttrIsMultiGpuBoard", {"hipDeviceAttributeIsMultiGpuBoard", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 84 - // CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID - {"cudaDevAttrMultiGpuBoardGroupID", {"hipDeviceAttributeMultiGpuBoardGroupID", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 85 - // CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED - {"cudaDevAttrHostNativeAtomicSupported", {"hipDeviceAttributeHostNativeAtomicSupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 86 - // CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO - {"cudaDevAttrSingleToDoublePrecisionPerfRatio", {"hipDeviceAttributeSingleToDoublePrecisionPerfRatio", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 87 - // CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS - {"cudaDevAttrPageableMemoryAccess", {"hipDeviceAttributePageableMemoryAccess", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 88 - // CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS - {"cudaDevAttrConcurrentManagedAccess", {"hipDeviceAttributeConcurrentManagedAccess", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 89 - // CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED - {"cudaDevAttrComputePreemptionSupported", {"hipDeviceAttributeComputePreemptionSupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 90 - // CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM - {"cudaDevAttrCanUseHostPointerForRegisteredMem", {"hipDeviceAttributeCanUseHostPointerForRegisteredMem", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 91 - // CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS - {"cudaDevAttrReserved92", {"hipDeviceAttributeCanUseStreamMemOps", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 92 - // CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS - {"cudaDevAttrReserved93", {"hipDeviceAttributeCanUse64BitStreamMemOps", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 93 - // CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR - {"cudaDevAttrReserved94", {"hipDeviceAttributeCanUseStreamWaitValueNor", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 94 - // CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH - {"cudaDevAttrCooperativeLaunch", {"hipDeviceAttributeCooperativeLaunch", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 95 - // CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH - {"cudaDevAttrCooperativeMultiDeviceLaunch", {"hipDeviceAttributeCooperativeMultiDeviceLaunch", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 96 - // CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN - {"cudaDevAttrMaxSharedMemoryPerBlockOptin", {"hipDeviceAttributeMaxSharedMemoryPerBlockOptin", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 97 - // CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES - {"cudaDevAttrCanFlushRemoteWrites", {"hipDeviceAttributeCanFlushRemoteWrites", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 98 - // CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED - {"cudaDevAttrHostRegisterSupported", {"hipDeviceAttributeHostRegisterSupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 99 - // CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES - {"cudaDevAttrPageableMemoryAccessUsesHostPageTables", {"hipDeviceAttributePageableMemoryAccessUsesHostPageTables", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 100 - // CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST - {"cudaDevAttrDirectManagedMemAccessFromHost", {"hipDeviceAttributeDirectManagedMemAccessFromHost", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 101 - - // CUdevice_P2PAttribute - {"cudaDeviceP2PAttr", {"hipDeviceP2PAttribute", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaDeviceP2PAttr enum values - // CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = 0x01 - {"cudaDevP2PAttrPerformanceRank", {"hipDeviceP2PAttributePerformanceRank", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - // CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = 0x02 - {"cudaDevP2PAttrAccessSupported", {"hipDeviceP2PAttributeAccessSupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - // CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED = 0x03 - {"cudaDevP2PAttrNativeAtomicSupported", {"hipDeviceP2PAttributeNativeAtomicSupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 3 - // CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = 0x04 - {"cudaDevP2PAttrCudaArrayAccessSupported", {"hipDevP2PAttributeCudaArrayAccessSupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 4 - - // cudaEGL.h - presented only on Linux in nvidia-cuda-dev package - // CUeglColorFormat - {"cudaEglColorFormat", {"hipEglColorFormat", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaEglColorFormat enum values - // CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0x00 - {"cudaEglColorFormatYUV420Planar", {"hipEglColorFormatYUV420Planar", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0 - // CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR= 0x01 - {"cudaEglColorFormatYUV420SemiPlanar ", {"hipEglColorFormatYUV420SemiPlanar", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - // CU_EGL_COLOR_FORMAT_YUV422_PLANAR = 0x02 - {"cudaEglColorFormatYUV422Planar", {"hipEglColorFormatYUV422Planar", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - // CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR = 0x03 - {"cudaEglColorFormatYUV422SemiPlanar", {"hipEglColorFormatYUV422SemiPlanar", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 3 - // CU_EGL_COLOR_FORMAT_RGB = 0x04 - {"cudaEglColorFormatRGB", {"hipEglColorFormatRGB", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 4 - // CU_EGL_COLOR_FORMAT_BGR = 0x05 - {"cudaEglColorFormatBGR", {"hipEglColorFormatBGR", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 5 - // CU_EGL_COLOR_FORMAT_ARGB = 0x06 - {"cudaEglColorFormatARGB", {"hipEglColorFormatARGB", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 6 - // CU_EGL_COLOR_FORMAT_RGBA = 0x07 - {"cudaEglColorFormatRGBA", {"hipEglColorFormatRGBA", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 7 - // CU_EGL_COLOR_FORMAT_L = 0x08 - {"cudaEglColorFormatL", {"hipEglColorFormatL", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 8 - // CU_EGL_COLOR_FORMAT_R = 0x09 - {"cudaEglColorFormatR", {"hipEglColorFormatR", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 9 - // CU_EGL_COLOR_FORMAT_YUV444_PLANAR = 0x0A - {"cudaEglColorFormatYUV444Planar", {"hipEglColorFormatYUV444Planar", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 10 - // CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR = 0x0B - {"cudaEglColorFormatYUV444SemiPlanar", {"hipEglColorFormatYUV444SemiPlanar", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 11 - // CU_EGL_COLOR_FORMAT_YUYV_422 = 0x0C - {"cudaEglColorFormatYUYV422", {"hipEglColorFormatYUYV422", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 12 - // CU_EGL_COLOR_FORMAT_UYVY_422 = 0x0D - {"cudaEglColorFormatUYVY422", {"hipEglColorFormatUYVY422", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 13 - // CU_EGL_COLOR_FORMAT_ABGR = 0x0E - {"cudaEglColorFormatABGR", {"hipEglColorFormatABGR", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 14 - // CU_EGL_COLOR_FORMAT_BGRA = 0x0F - {"cudaEglColorFormatBGRA", {"hipEglColorFormatBGRA", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 15 - // CU_EGL_COLOR_FORMAT_A = 0x10 - {"cudaEglColorFormatA", {"hipEglColorFormatA", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 16 - // CU_EGL_COLOR_FORMAT_RG = 0x11 - {"cudaEglColorFormatRG", {"hipEglColorFormatRG", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 17 - // CU_EGL_COLOR_FORMAT_AYUV = 0x12 - {"cudaEglColorFormatAYUV", {"hipEglColorFormatAYUV", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 18 - // CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR = 0x13 - {"cudaEglColorFormatYVU444SemiPlanar", {"hipEglColorFormatYVU444SemiPlanar", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 19 - // CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR = 0x14 - {"cudaEglColorFormatYVU422SemiPlanar", {"hipEglColorFormatYVU422SemiPlanar", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 20 - // CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR = 0x15 - {"cudaEglColorFormatYVU420SemiPlanar", {"hipEglColorFormatYVU420SemiPlanar", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 21 - // CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR = 0x16 - {"cudaEglColorFormatY10V10U10_444SemiPlanar", {"hipEglColorFormatY10V10U10_444SemiPlanar", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 22 - // CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR = 0x17 - {"cudaEglColorFormatY10V10U10_420SemiPlanar", {"hipEglColorFormatY10V10U10_420SemiPlanar", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 23 - // CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR = 0x18 - {"cudaEglColorFormatY12V12U12_444SemiPlanar", {"hipEglColorFormatY12V12U12_444SemiPlanar", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 24 - // CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR = 0x19 - {"cudaEglColorFormatY12V12U12_420SemiPlanar", {"hipEglColorFormatY12V12U12_420SemiPlanar", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 25 - // CU_EGL_COLOR_FORMAT_VYUY_ER = 0x1A - {"cudaEglColorFormatVYUY_ER", {"hipEglColorFormatVYUY_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 26 - // CU_EGL_COLOR_FORMAT_UYVY_ER = 0x1B - {"cudaEglColorFormatUYVY_ER", {"hipEglColorFormatUYVY_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 27 - // CU_EGL_COLOR_FORMAT_YUYV_ER = 0x1C - {"cudaEglColorFormatYUYV_ER", {"hipEglColorFormatYUYV_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 28 - // CU_EGL_COLOR_FORMAT_YVYU_ER = 0x1D - {"cudaEglColorFormatYVYU_ER", {"hipEglColorFormatYVYU_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 29 - // CU_EGL_COLOR_FORMAT_YUV_ER = 0x1E - {"cudaEglColorFormatYUV_ER", {"hipEglColorFormatYUV_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 30 - // CU_EGL_COLOR_FORMAT_YUVA_ER = 0x1F - {"cudaEglColorFormatYUVA_ER", {"hipEglColorFormatYUVA_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 31 - // CU_EGL_COLOR_FORMAT_AYUV_ER = 0x20 - {"cudaEglColorFormatAYUV_ER", {"hipEglColorFormatAYUV_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 32 - // CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER = 0x21 - {"cudaEglColorFormatYUV444Planar_ER", {"hipEglColorFormatYUV444Planar_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 33 - // CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER = 0x22 - {"cudaEglColorFormatYUV422Planar_ER", {"hipEglColorFormatYUV422Planar_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 34 - // CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER = 0x23 - {"cudaEglColorFormatYUV420Planar_ER", {"hipEglColorFormatYUV420Planar_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 35 - // CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER = 0x24 - {"cudaEglColorFormatYUV444SemiPlanar_ER", {"hipEglColorFormatYUV444SemiPlanar_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 36 - // CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER = 0x25 - {"cudaEglColorFormatYUV422SemiPlanar_ER", {"hipEglColorFormatYUV422SemiPlanar_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 37 - // CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER = 0x26 - {"cudaEglColorFormatYUV420SemiPlanar_ER", {"hipEglColorFormatYUV420SemiPlanar_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 38 - // CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER = 0x27 - {"cudaEglColorFormatYVU444Planar_ER", {"hipEglColorFormatYVU444Planar_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 39 - // CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER = 0x28 - {"cudaEglColorFormatYVU422Planar_ER", {"hipEglColorFormatYVU422Planar_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 40 - // CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER = 0x29 - {"cudaEglColorFormatYVU420Planar_ER", {"hipEglColorFormatYVU420Planar_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 41 - // CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER = 0x2A - {"cudaEglColorFormatYVU444SemiPlanar_ER", {"hipEglColorFormatYVU444SemiPlanar_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 42 - // CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER = 0x2B - {"cudaEglColorFormatYVU422SemiPlanar_ER", {"hipEglColorFormatYVU422SemiPlanar_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 43 - // CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER = 0x2C - {"cudaEglColorFormatYVU420SemiPlanar_ER", {"hipEglColorFormatYVU420SemiPlanar_ER", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 44 - // CU_EGL_COLOR_FORMAT_BAYER_RGGB = 0x2D - {"cudaEglColorFormatBayerRGGB", {"hipEglColorFormatBayerRGGB", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 45 - // CU_EGL_COLOR_FORMAT_BAYER_BGGR = 0x2E - {"cudaEglColorFormatBayerBGGR", {"hipEglColorFormatBayerBGGR", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 46 - // CU_EGL_COLOR_FORMAT_BAYER_GRBG = 0x2F - {"cudaEglColorFormatBayerGRBG", {"hipEglColorFormatBayerGRBG", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 47 - // CU_EGL_COLOR_FORMAT_BAYER_GBRG = 0x30 - {"cudaEglColorFormatBayerGBRG", {"hipEglColorFormatBayerGBRG", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 48 - // CU_EGL_COLOR_FORMAT_BAYER10_RGGB = 0x31 - {"cudaEglColorFormatBayer10RGGB", {"hipEglColorFormatBayer10RGGB", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 49 - // CU_EGL_COLOR_FORMAT_BAYER10_BGGR = 0x32 - {"cudaEglColorFormatBayer10BGGR", {"hipEglColorFormatBayer10BGGR", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 50 - // CU_EGL_COLOR_FORMAT_BAYER10_GRBG = 0x33 - {"cudaEglColorFormatBayer10GRBG", {"hipEglColorFormatBayer10GRBG", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 51 - // CU_EGL_COLOR_FORMAT_BAYER10_GBRG = 0x34 - {"cudaEglColorFormatBayer10GBRG", {"hipEglColorFormatBayer10GBRG", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 52 - // CU_EGL_COLOR_FORMAT_BAYER12_RGGB = 0x35 - {"cudaEglColorFormatBayer12RGGB", {"hipEglColorFormatBayer12RGGB", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 53 - // CU_EGL_COLOR_FORMAT_BAYER12_BGGR = 0x36 - {"cudaEglColorFormatBayer12BGGR", {"hipEglColorFormatBayer12BGGR", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 54 - // CU_EGL_COLOR_FORMAT_BAYER12_GRBG = 0x37 - {"cudaEglColorFormatBayer12GRBG", {"hipEglColorFormatBayer12GRBG", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 55 - // CU_EGL_COLOR_FORMAT_BAYER12_GBRG = 0x38 - {"cudaEglColorFormatBayer12GBRG", {"hipEglColorFormatBayer12GBRG", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 56 - // CU_EGL_COLOR_FORMAT_BAYER14_RGGB = 0x39 - {"cudaEglColorFormatBayer14RGGB", {"hipEglColorFormatBayer14RGGB", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 57 - // CU_EGL_COLOR_FORMAT_BAYER14_BGGR = 0x3A - {"cudaEglColorFormatBayer14BGGR", {"hipEglColorFormatBayer14BGGR", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 58 - // CU_EGL_COLOR_FORMAT_BAYER14_GRBG = 0x3B - {"cudaEglColorFormatBayer14GRBG", {"hipEglColorFormatBayer14GRBG", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 59 - // CU_EGL_COLOR_FORMAT_BAYER14_GBRG = 0x3C - {"cudaEglColorFormatBayer14GBRG", {"hipEglColorFormatBayer14GBRG", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 60 - // CU_EGL_COLOR_FORMAT_BAYER20_RGGB = 0x3D - {"cudaEglColorFormatBayer20RGGB", {"hipEglColorFormatBayer20RGGB", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 61 - // CU_EGL_COLOR_FORMAT_BAYER20_BGGR = 0x3E - {"cudaEglColorFormatBayer20BGGR", {"hipEglColorFormatBayer20BGGR", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 62 - // CU_EGL_COLOR_FORMAT_BAYER20_GRBG = 0x3F - {"cudaEglColorFormatBayer20GRBG", {"hipEglColorFormatBayer20GRBG", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 63 - // CU_EGL_COLOR_FORMAT_BAYER20_GBRG = 0x40 - {"cudaEglColorFormatBayer20GBRG", {"hipEglColorFormatBayer20GBRG", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 64 - // CU_EGL_COLOR_FORMAT_YVU444_PLANAR = 0x41 - {"cudaEglColorFormatYVU444Planar", {"hipEglColorFormatYVU444Planar", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 65 - // CU_EGL_COLOR_FORMAT_YVU422_PLANAR = 0x42 - {"cudaEglColorFormatYVU422Planar", {"hipEglColorFormatYVU422Planar", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 66 - // CU_EGL_COLOR_FORMAT_YVU420_PLANAR = 0x43 - {"cudaEglColorFormatYVU420Planar", {"hipEglColorFormatYVU420Planar", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 67 - // CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB = 0x44 - {"cudaEglColorFormatBayerIspRGGB", {"hipEglColorFormatBayerIspRGGB", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 68 - // CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR = 0x45 - {"cudaEglColorFormatBayerIspBGGR", {"hipEglColorFormatBayerIspBGGR", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 69 - // CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG = 0x46 - {"cudaEglColorFormatBayerIspGRBG", {"hipEglColorFormatBayerIspGRBG", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 70 - // CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG = 0x47 - {"cudaEglColorFormatBayerIspGBRG", {"hipEglColorFormatBayerIspGBRG", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 71 - - // CUeglFrameType - {"cudaEglFrameType", {"hipEglFrameType", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaEglFrameType enum values - // CU_EGL_FRAME_TYPE_ARRAY - {"cudaEglFrameTypeArray", {"hipEglFrameTypeArray", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0 - // CU_EGL_FRAME_TYPE_PITCH - {"cudaEglFrameTypePitch", {"hipEglFrameTypePitch", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - - // CUeglResourceLocationFlags - {"cudaEglResourceLocationFlags", {"hipEglResourceLocationFlags", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaEglResourceLocationFlagss enum values - // CU_EGL_RESOURCE_LOCATION_SYSMEM - {"cudaEglResourceLocationSysmem", {"hipEglResourceLocationSysmem", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x00 - // CU_EGL_RESOURCE_LOCATION_VIDMEM - {"cudaEglResourceLocationVidmem", {"hipEglResourceLocationVidmem", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x01 - - // CUresult - {"cudaError", {"hipError_t", "", CONV_TYPE, API_RUNTIME}}, - {"cudaError_t", {"hipError_t", "", CONV_TYPE, API_RUNTIME}}, - // cudaError enum values - // CUDA_SUCCESS - {"cudaSuccess", {"hipSuccess", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0 - // CUDA_ERROR_INVALID_VALUE - {"cudaErrorInvalidValue", {"hipErrorInvalidValue", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 1 - // CUDA_ERROR_OUT_OF_MEMORY - {"cudaErrorMemoryAllocation", {"hipErrorOutOfMemory", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 2 - // CUDA_ERROR_NOT_INITIALIZED - {"cudaErrorInitializationError", {"hipErrorNotInitialized", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 3 - // CUDA_ERROR_DEINITIALIZED - {"cudaErrorCudartUnloading", {"hipErrorDeinitialized", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 4 - // CUDA_ERROR_PROFILER_DISABLED - {"cudaErrorProfilerDisabled", {"hipErrorProfilerDisabled", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 5 - // Deprecated since CUDA 5.0 - // CUDA_ERROR_PROFILER_NOT_INITIALIZED - {"cudaErrorProfilerNotInitialized", {"hipErrorProfilerNotInitialized", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 6 - // Deprecated since CUDA 5.0 - // CUDA_ERROR_PROFILER_ALREADY_STARTED - {"cudaErrorProfilerAlreadyStarted", {"hipErrorProfilerAlreadyStarted", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 7 - // Deprecated since CUDA 5.0 - // CUDA_ERROR_PROFILER_ALREADY_STOPPED - {"cudaErrorProfilerAlreadyStopped", {"hipErrorProfilerAlreadyStopped", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 8 - // no analogue - {"cudaErrorInvalidConfiguration", {"hipErrorInvalidConfiguration", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 9 - // no analogue - {"cudaErrorInvalidPitchValue", {"hipErrorInvalidPitchValue", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 12 - // no analogue - {"cudaErrorInvalidSymbol", {"hipErrorInvalidSymbol", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 13 - // Deprecated since CUDA 10.1 - // no analogue - {"cudaErrorInvalidHostPointer", {"hipErrorInvalidHostPointer", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 16 - // Deprecated since CUDA 10.1 - // no analogue - {"cudaErrorInvalidDevicePointer", {"hipErrorInvalidDevicePointer", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 17 - // no analogue - {"cudaErrorInvalidTexture", {"hipErrorInvalidTexture", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 18 - // no analogue - {"cudaErrorInvalidTextureBinding", {"hipErrorInvalidTextureBinding", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 19 - // no analogue - {"cudaErrorInvalidChannelDescriptor", {"hipErrorInvalidChannelDescriptor", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 20 - // no analogue - {"cudaErrorInvalidMemcpyDirection", {"hipErrorInvalidMemcpyDirection", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 21 - // no analogue - {"cudaErrorAddressOfConstant", {"hipErrorAddressOfConstant", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 22 - // no analogue - {"cudaErrorTextureFetchFailed", {"hipErrorTextureFetchFailed", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 23 - // no analogue - {"cudaErrorTextureNotBound", {"hipErrorTextureNotBound", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 24 - // no analogue - {"cudaErrorSynchronizationError", {"hipErrorSynchronizationError", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 25 - // no analogue - {"cudaErrorInvalidFilterSetting", {"hipErrorInvalidFilterSetting", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 26 - // no analogue - {"cudaErrorInvalidNormSetting", {"hipErrorInvalidNormSetting", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 27 - // no analogue - {"cudaErrorMixedDeviceExecution", {"hipErrorMixedDeviceExecution", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 28 - // Deprecated since CUDA 4.1 - // no analogue - {"cudaErrorNotYetImplemented", {"hipErrorNotYetImplemented", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 31 - // Deprecated since CUDA 3.1 - // no analogue - {"cudaErrorMemoryValueTooLarge", {"hipErrorMemoryValueTooLarge", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 32 - // no analogue - {"cudaErrorInsufficientDriver", {"hipErrorInsufficientDriver", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 35 - // no analogue - {"cudaErrorInvalidSurface", {"hipErrorInvalidSurface", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 37 - // no analogue - {"cudaErrorDuplicateVariableName", {"hipErrorDuplicateVariableName", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 43 - // no analogue - {"cudaErrorDuplicateTextureName", {"hipErrorDuplicateTextureName", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 44 - // no analogue - {"cudaErrorDuplicateSurfaceName", {"hipErrorDuplicateSurfaceName", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 45 - // no analogue - {"cudaErrorDevicesUnavailable", {"hipErrorDevicesUnavailable", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 46 - // no analogue - {"cudaErrorIncompatibleDriverContext", {"hipErrorIncompatibleDriverContext", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 49 - // no analogue - {"cudaErrorMissingConfiguration", {"hipErrorMissingConfiguration", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 52 - // no analogue - {"cudaErrorPriorLaunchFailure", {"hipErrorPriorLaunchFailure", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 53 - // no analogue - {"cudaErrorLaunchMaxDepthExceeded", {"hipErrorLaunchMaxDepthExceeded", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 65 - // no analogue - {"cudaErrorLaunchFileScopedTex", {"hipErrorLaunchFileScopedTex", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 66 - // no analogue - {"cudaErrorLaunchFileScopedSurf", {"hipErrorLaunchFileScopedSurf", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 67 - // no analogue - {"cudaErrorSyncDepthExceeded", {"hipErrorSyncDepthExceeded", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 68 - // no analogue - {"cudaErrorLaunchPendingCountExceeded", {"hipErrorLaunchPendingCountExceeded", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 69 - // no analogue - {"cudaErrorInvalidDeviceFunction", {"hipErrorInvalidDeviceFunction", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 98 - // CUDA_ERROR_NO_DEVICE - {"cudaErrorNoDevice", {"hipErrorNoDevice", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 100 - // CUDA_ERROR_INVALID_DEVICE - {"cudaErrorInvalidDevice", {"hipErrorInvalidDevice", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 101 - // no analogue - {"cudaErrorStartupFailure", {"hipErrorStartupFailure", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 127 - // CUDA_ERROR_INVALID_IMAGE - {"cudaErrorInvalidKernelImage", {"hipErrorInvalidImage", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 200 - // CUDA_ERROR_INVALID_CONTEXT - {"cudaErrorDeviceUninitialized", {"hipErrorInvalidContext", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 201 - // Typo fixed in 10.2 - // CUDA_ERROR_INVALID_CONTEXT - {"cudaErrorDeviceUninitilialized", {"hipErrorInvalidContext", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 201 - // CUDA_ERROR_MAP_FAILED - {"cudaErrorMapBufferObjectFailed", {"hipErrorMapFailed", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 205 - // CUDA_ERROR_UNMAP_FAILED - {"cudaErrorUnmapBufferObjectFailed", {"hipErrorUnmapFailed", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 206 - // CUDA_ERROR_ARRAY_IS_MAPPED - {"cudaErrorArrayIsMapped", {"hipErrorArrayIsMapped", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 207 - // CUDA_ERROR_ALREADY_MAPPED - {"cudaErrorAlreadyMapped", {"hipErrorAlreadyMapped", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 208 - // CUDA_ERROR_NO_BINARY_FOR_GPU - {"cudaErrorNoKernelImageForDevice", {"hipErrorNoBinaryForGpu", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 209 - // CUDA_ERROR_ALREADY_ACQUIRED - {"cudaErrorAlreadyAcquired", {"hipErrorAlreadyAcquired", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 210 - // CUDA_ERROR_NOT_MAPPED - {"cudaErrorNotMapped", {"hipErrorNotMapped", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 211 - // CUDA_ERROR_NOT_MAPPED_AS_ARRAY - {"cudaErrorNotMappedAsArray", {"hipErrorNotMappedAsArray", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 212 - // CUDA_ERROR_NOT_MAPPED_AS_POINTER - {"cudaErrorNotMappedAsPointer", {"hipErrorNotMappedAsPointer", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 213 - // CUDA_ERROR_ECC_UNCORRECTABLE - {"cudaErrorECCUncorrectable", {"hipErrorECCNotCorrectable", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 214 - // CUDA_ERROR_UNSUPPORTED_LIMIT - {"cudaErrorUnsupportedLimit", {"hipErrorUnsupportedLimit", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 215 - // CUDA_ERROR_CONTEXT_ALREADY_IN_USE - {"cudaErrorDeviceAlreadyInUse", {"hipErrorContextAlreadyInUse", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 216 - // CUDA_ERROR_PEER_ACCESS_UNSUPPORTED - {"cudaErrorPeerAccessUnsupported", {"hipErrorPeerAccessUnsupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 217 - // CUDA_ERROR_INVALID_PTX - {"cudaErrorInvalidPtx", {"hipErrorInvalidKernelFile", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 218 - // CUDA_ERROR_INVALID_GRAPHICS_CONTEXT - {"cudaErrorInvalidGraphicsContext", {"hipErrorInvalidGraphicsContext", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 219 - // CUDA_ERROR_NVLINK_UNCORRECTABLE - {"cudaErrorNvlinkUncorrectable", {"hipErrorNvlinkUncorrectable", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 220 - // CUDA_ERROR_JIT_COMPILER_NOT_FOUND - {"cudaErrorJitCompilerNotFound", {"hipErrorJitCompilerNotFound", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 221 - // CUDA_ERROR_INVALID_SOURCE - {"cudaErrorInvalidSource", {"hipErrorInvalidSource", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 300 - // CUDA_ERROR_FILE_NOT_FOUND - {"cudaErrorFileNotFound", {"hipErrorFileNotFound", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 301 - // CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND - {"cudaErrorSharedObjectSymbolNotFound", {"hipErrorSharedObjectSymbolNotFound", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 302 - // CUDA_ERROR_SHARED_OBJECT_INIT_FAILED - {"cudaErrorSharedObjectInitFailed", {"hipErrorSharedObjectInitFailed", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 303 - // CUDA_ERROR_OPERATING_SYSTEM - {"cudaErrorOperatingSystem", {"hipErrorOperatingSystem", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 304 - // CUDA_ERROR_INVALID_HANDLE - {"cudaErrorInvalidResourceHandle", {"hipErrorInvalidHandle", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 400 - // CUDA_ERROR_ILLEGAL_STATE - {"cudaErrorIllegalState", {"hipErrorIllegalState", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 401 - // CUDA_ERROR_NOT_FOUND - {"cudaErrorSymbolNotFound", {"hipErrorNotFound", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 500 - // CUDA_ERROR_NOT_READY - {"cudaErrorNotReady", {"hipErrorNotReady", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 600 - // CUDA_ERROR_ILLEGAL_ADDRESS - {"cudaErrorIllegalAddress", {"hipErrorIllegalAddress", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 700 - // CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES - {"cudaErrorLaunchOutOfResources", {"hipErrorLaunchOutOfResources", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 701 - // CUDA_ERROR_LAUNCH_TIMEOUT - {"cudaErrorLaunchTimeout", {"hipErrorLaunchTimeOut", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 702 - // CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING - {"cudaErrorLaunchIncompatibleTexturing", {"hipErrorLaunchIncompatibleTexturing", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 703 - // CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED - {"cudaErrorPeerAccessAlreadyEnabled", {"hipErrorPeerAccessAlreadyEnabled", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 704 - // CUDA_ERROR_PEER_ACCESS_NOT_ENABLED - {"cudaErrorPeerAccessNotEnabled", {"hipErrorPeerAccessNotEnabled", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 705 - // CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE - {"cudaErrorSetOnActiveProcess", {"hipErrorSetOnActiveProcess", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 708 - // CUDA_ERROR_CONTEXT_IS_DESTROYED - {"cudaErrorContextIsDestroyed", {"hipErrorContextIsDestroyed", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 709 - // CUDA_ERROR_ASSERT - {"cudaErrorAssert", {"hipErrorAssert", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 710 - // CUDA_ERROR_TOO_MANY_PEERS - {"cudaErrorTooManyPeers", {"hipErrorTooManyPeers", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 711 - // CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED - {"cudaErrorHostMemoryAlreadyRegistered", {"hipErrorHostMemoryAlreadyRegistered", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 712 - // CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED - {"cudaErrorHostMemoryNotRegistered", {"hipErrorHostMemoryNotRegistered", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 713 - // CUDA_ERROR_HARDWARE_STACK_ERROR - {"cudaErrorHardwareStackError", {"hipErrorHardwareStackError", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 714 - // CUDA_ERROR_ILLEGAL_INSTRUCTION - {"cudaErrorIllegalInstruction", {"hipErrorIllegalInstruction", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 715 - // CUDA_ERROR_MISALIGNED_ADDRESS - {"cudaErrorMisalignedAddress", {"hipErrorMisalignedAddress", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 716 - // CUDA_ERROR_INVALID_ADDRESS_SPACE - {"cudaErrorInvalidAddressSpace", {"hipErrorInvalidAddressSpace", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 717 - // CUDA_ERROR_INVALID_PC - {"cudaErrorInvalidPc", {"hipErrorInvalidPc", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 718 - // CUDA_ERROR_LAUNCH_FAILED - {"cudaErrorLaunchFailure", {"hipErrorLaunchFailure", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 719 - // CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE - {"cudaErrorCooperativeLaunchTooLarge", {"hipErrorCooperativeLaunchTooLarge", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 720 - // CUDA_ERROR_NOT_PERMITTED - {"cudaErrorNotPermitted", {"hipErrorNotPermitted", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 800 - // CUDA_ERROR_NOT_SUPPORTED - {"cudaErrorNotSupported", {"hipErrorNotSupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 801 - // CUDA_ERROR_SYSTEM_NOT_READY - {"cudaErrorSystemNotReady", {"hipErrorSystemNotReady", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 802 - // CUDA_ERROR_SYSTEM_DRIVER_MISMATCH - {"cudaErrorSystemDriverMismatch", {"hipErrorSystemDriverMismatch", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 803 - // CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE - {"cudaErrorCompatNotSupportedOnDevice", {"hipErrorCompatNotSupportedOnDevice", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 804 - // CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED - {"cudaErrorStreamCaptureUnsupported", {"hipErrorStreamCaptureUnsupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 900 - // CUDA_ERROR_STREAM_CAPTURE_INVALIDATED - {"cudaErrorStreamCaptureInvalidated", {"hipErrorStreamCaptureInvalidated", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 901 - // CUDA_ERROR_STREAM_CAPTURE_MERGE - {"cudaErrorStreamCaptureMerge", {"hipErrorStreamCaptureMerge", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 902 - // CUDA_ERROR_STREAM_CAPTURE_UNMATCHED - {"cudaErrorStreamCaptureUnmatched", {"hipErrorStreamCaptureUnmatched", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 903 - // CUDA_ERROR_STREAM_CAPTURE_UNJOINED - {"cudaErrorStreamCaptureUnjoined", {"hipErrorStreamCaptureUnjoined", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 904 - // CUDA_ERROR_STREAM_CAPTURE_ISOLATION - {"cudaErrorStreamCaptureIsolation", {"hipErrorStreamCaptureIsolation", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 905 - // CUDA_ERROR_STREAM_CAPTURE_IMPLICIT - {"cudaErrorStreamCaptureImplicit", {"hipErrorStreamCaptureImplicit", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 906 - // CUDA_ERROR_CAPTURED_EVENT - {"cudaErrorCapturedEvent", {"hipErrorCapturedEvent", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 907 - // CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD - {"cudaErrorStreamCaptureWrongThread", {"hipErrorStreamCaptureWrongThread", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 908 - // CUDA_ERROR_TIMEOUT - {"cudaErrorTimeout", {"hipErrorTimeout", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 909 - // CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE - {"cudaErrorGraphExecUpdateFailure", {"hipErrorGraphExecUpdateFailure", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 910 - // CUDA_ERROR_UNKNOWN - {"cudaErrorUnknown", {"hipErrorUnknown", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 999 - // Deprecated since CUDA 4.1 - {"cudaErrorApiFailureBase", {"hipErrorApiFailureBase", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 10000 - - // CUexternalMemoryHandleType - {"cudaExternalMemoryHandleType", {"hipExternalMemoryHandleType", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaExternalMemoryHandleType enum values - // CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD - {"cudaExternalMemoryHandleTypeOpaqueFd", {"hipExternalMemoryHandleTypeOpaqueFD", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - // CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 - {"cudaExternalMemoryHandleTypeOpaqueWin32", {"hipExternalMemoryHandleTypeOpaqueWin32", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - // CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT - {"cudaExternalMemoryHandleTypeOpaqueWin32Kmt", {"hipExternalMemoryHandleTypeOpaqueWin32KMT", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 3 - // CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP - {"cudaExternalMemoryHandleTypeD3D12Heap", {"hipExternalMemoryHandleTypeD3D12Heap", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 4 - // CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE - {"cudaExternalMemoryHandleTypeD3D12Resource", {"hipExternalMemoryHandleTypeD3D12Resource", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 5 - // CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE - {"cudaExternalMemoryHandleTypeD3D11Resource", {"hipExternalMemoryHandleTypeD3D11Resource", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 6 - // CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT - {"cudaExternalMemoryHandleTypeD3D11ResourceKmt", {"hipExternalMemoryHandleTypeD3D11ResourceKmt", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 7 - // CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF - {"cudaExternalMemoryHandleTypeNvSciBuf", {"hipExternalMemoryHandleTypeNvSciBuf", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 8 - - // CUexternalSemaphoreHandleType - {"cudaExternalSemaphoreHandleType", {"hipExternalSemaphoreHandleType", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaExternalSemaphoreHandleType enum values - // CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD - {"cudaExternalSemaphoreHandleTypeOpaqueFd", {"hipExternalSemaphoreHandleTypeOpaqueFD", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - // CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 - {"cudaExternalSemaphoreHandleTypeOpaqueWin32", {"hipExternalSemaphoreHandleTypeOpaqueWin32", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - // CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT - {"cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt", {"hipExternalSemaphoreHandleTypeOpaqueWin32KMT", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 3 - // CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE - {"cudaExternalSemaphoreHandleTypeD3D12Fence", {"hipExternalSemaphoreHandleTypeD3D12Fence", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 4 - // CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE - {"cudaExternalSemaphoreHandleTypeD3D11Fence", {"hipExternalSemaphoreHandleTypeD3D11Fence", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 5 - // CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC - {"cudaExternalSemaphoreHandleTypeNvSciSync", {"hipExternalSemaphoreHandleTypeNvSciSync", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 6 - // CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX - {"cudaExternalSemaphoreHandleTypeKeyedMutex", {"hipExternalSemaphoreHandleTypeKeyedMutex", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 7 - // CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT - {"cudaExternalSemaphoreHandleTypeKeyedMutexKmt", {"hipExternalSemaphoreHandleTypeKeyedMutexKmt", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 8 - - // CUfunction_attribute - // NOTE: only last, starting from 8, values are presented and are equal to Driver's ones - {"cudaFuncAttribute", {"hipFuncAttribute", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaFuncAttribute enum values - // CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES - {"cudaFuncAttributeMaxDynamicSharedMemorySize", {"hipFuncAttributeMaxDynamicSharedMemorySize", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 8 - // CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT - {"cudaFuncAttributePreferredSharedMemoryCarveout", {"hipFuncAttributePreferredSharedMemoryCarveout", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 9 - // CU_FUNC_ATTRIBUTE_MAX - {"cudaFuncAttributeMax", {"hipFuncAttributeMax", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 10 - - // CUfunc_cache - {"cudaFuncCache", {"hipFuncCache_t", "", CONV_TYPE, API_RUNTIME}}, - // cudaFuncCache enum values - // CU_FUNC_CACHE_PREFER_NONE = 0x00 - {"cudaFuncCachePreferNone", {"hipFuncCachePreferNone", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0 - // CU_FUNC_CACHE_PREFER_SHARED = 0x01 - {"cudaFuncCachePreferShared", {"hipFuncCachePreferShared", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 1 - // CU_FUNC_CACHE_PREFER_L1 = 0x02 - {"cudaFuncCachePreferL1", {"hipFuncCachePreferL1", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 2 - // CU_FUNC_CACHE_PREFER_EQUAL = 0x03 - {"cudaFuncCachePreferEqual", {"hipFuncCachePreferEqual", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 3 - - // CUarray_cubemap_face - {"cudaGraphicsCubeFace", {"hipGraphicsCubeFace", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaGraphicsCubeFace enum values - // CU_CUBEMAP_FACE_POSITIVE_X - {"cudaGraphicsCubeFacePositiveX", {"hipGraphicsCubeFacePositiveX", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x00 - // CU_CUBEMAP_FACE_NEGATIVE_X - {"cudaGraphicsCubeFaceNegativeX", {"hipGraphicsCubeFaceNegativeX", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x01 - // CU_CUBEMAP_FACE_POSITIVE_Y - {"cudaGraphicsCubeFacePositiveY", {"hipGraphicsCubeFacePositiveY", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x02 - // CU_CUBEMAP_FACE_NEGATIVE_Y - {"cudaGraphicsCubeFaceNegativeY", {"hipGraphicsCubeFaceNegativeY", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x03 - // CU_CUBEMAP_FACE_POSITIVE_Z - {"cudaGraphicsCubeFacePositiveZ", {"hipGraphicsCubeFacePositiveZ", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x04 - // CU_CUBEMAP_FACE_NEGATIVE_Z - {"cudaGraphicsCubeFaceNegativeZ", {"hipGraphicsCubeFaceNegativeZ", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x05 - - // CUgraphicsMapResourceFlags - {"cudaGraphicsMapFlags", {"hipGraphicsMapFlags", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaGraphicsMapFlags enum values - // CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE = 0x00 - {"cudaGraphicsMapFlagsNone", {"hipGraphicsMapFlagsNone", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0 - // CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY = 0x01 - {"cudaGraphicsMapFlagsReadOnly", {"hipGraphicsMapFlagsReadOnly", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - // CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 0x02 - {"cudaGraphicsMapFlagsWriteDiscard", {"hipGraphicsMapFlagsWriteDiscard", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - - // CUgraphicsRegisterFlags - {"cudaGraphicsRegisterFlags", {"hipGraphicsRegisterFlags", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaGraphicsRegisterFlags enum values - // CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE = 0x00 - {"cudaGraphicsRegisterFlagsNone", {"hipGraphicsRegisterFlagsNone", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0 - // CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY = 0x01 - {"cudaGraphicsRegisterFlagsReadOnly", {"hipGraphicsRegisterFlagsReadOnly", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - // CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD = 0x02 - {"cudaGraphicsRegisterFlagsWriteDiscard", {"hipGraphicsRegisterFlagsWriteDiscard", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - // CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST = 0x04 - {"cudaGraphicsRegisterFlagsSurfaceLoadStore", {"hipGraphicsRegisterFlagsSurfaceLoadStore", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 4 - // CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = 0x08 - {"cudaGraphicsRegisterFlagsTextureGather", {"hipGraphicsRegisterFlagsTextureGather", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 8 - - // CUgraphNodeType - {"cudaGraphNodeType", {"hipGraphNodeType", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaGraphNodeType enum values - // CU_GRAPH_NODE_TYPE_KERNEL = 0 - {"cudaGraphNodeTypeKernel", {"hipGraphNodeTypeKernel", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x00 - // CU_GRAPH_NODE_TYPE_MEMCPY = 1 - {"cudaGraphNodeTypeMemcpy", {"hipGraphNodeTypeMemcpy", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x01 - // CU_GRAPH_NODE_TYPE_MEMSET = 2 - {"cudaGraphNodeTypeMemset", {"hipGraphNodeTypeMemset", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x02 - // CU_GRAPH_NODE_TYPE_HOST = 3 - {"cudaGraphNodeTypeHost", {"hipGraphNodeTypeHost", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x03 - // CU_GRAPH_NODE_TYPE_GRAPH = 4 - {"cudaGraphNodeTypeGraph", {"hipGraphNodeTypeGraph", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x04 - // CU_GRAPH_NODE_TYPE_EMPTY = 5 - {"cudaGraphNodeTypeEmpty", {"hipGraphNodeTypeEmpty", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x05 - // CU_GRAPH_NODE_TYPE_COUNT - {"cudaGraphNodeTypeCount", {"hipGraphNodeTypeCount", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, - - // CUgraphExecUpdateResult - {"cudaGraphExecUpdateResult", {"hipGraphExecUpdateResult", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaGraphExecUpdateResult enum values - // CU_GRAPH_EXEC_UPDATE_SUCCESS - {"cudaGraphExecUpdateSuccess", {"hipGraphExecUpdateSuccess", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x0 - // CU_GRAPH_EXEC_UPDATE_ERROR - {"cudaGraphExecUpdateError", {"hipGraphExecUpdateError", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x1 - // CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED - {"cudaGraphExecUpdateErrorTopologyChanged", {"hipGraphExecUpdateErrorTopologyChanged", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x2 - // CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED - {"cudaGraphExecUpdateErrorNodeTypeChanged", {"hipGraphExecUpdateErrorNodeTypeChanged", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x3 - // CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED - {"cudaGraphExecUpdateErrorFunctionChanged", {"hipGraphExecUpdateErrorFunctionChanged", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x4 - // CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED - {"cudaGraphExecUpdateErrorParametersChanged", {"hipGraphExecUpdateErrorParametersChanged", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x5 - // CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED - {"cudaGraphExecUpdateErrorNotSupported", {"hipGraphExecUpdateErrorNotSupported", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x6 - - // CUlimit - {"cudaLimit", {"hipLimit_t", "", CONV_TYPE, API_RUNTIME}}, - // cudaLimit enum values - // CU_LIMIT_STACK_SIZE - {"cudaLimitStackSize", {"hipLimitStackSize", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x00 - // CU_LIMIT_PRINTF_FIFO_SIZE - {"cudaLimitPrintfFifoSize", {"hipLimitPrintfFifoSize", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x01 - // CU_LIMIT_MALLOC_HEAP_SIZE - {"cudaLimitMallocHeapSize", {"hipLimitMallocHeapSize", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x02 - // CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH - {"cudaLimitDevRuntimeSyncDepth", {"hipLimitDevRuntimeSyncDepth", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x03 - // CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT - {"cudaLimitDevRuntimePendingLaunchCount", {"hipLimitDevRuntimePendingLaunchCount", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x04 - // CU_LIMIT_MAX_L2_FETCH_GRANULARITY - {"cudaLimitMaxL2FetchGranularity", {"hipLimitMaxL2FetchGranularity", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x05 - - // no analogue - {"cudaMemcpyKind", {"hipMemcpyKind", "", CONV_TYPE, API_RUNTIME}}, - // cudaMemcpyKind enum values - {"cudaMemcpyHostToHost", {"hipMemcpyHostToHost", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0 - {"cudaMemcpyHostToDevice", {"hipMemcpyHostToDevice", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 1 - {"cudaMemcpyDeviceToHost", {"hipMemcpyDeviceToHost", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 2 - {"cudaMemcpyDeviceToDevice", {"hipMemcpyDeviceToDevice", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 3 - {"cudaMemcpyDefault", {"hipMemcpyDefault", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 4 - - // CUmem_advise - {"cudaMemoryAdvise", {"hipMemAdvise", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaMemoryAdvise enum values - // CU_MEM_ADVISE_SET_READ_MOSTLY - {"cudaMemAdviseSetReadMostly", {"hipMemAdviseSetReadMostly", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - // CU_MEM_ADVISE_UNSET_READ_MOSTLY - {"cudaMemAdviseUnsetReadMostly", {"hipMemAdviseUnsetReadMostly", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - // CU_MEM_ADVISE_SET_PREFERRED_LOCATION - {"cudaMemAdviseSetPreferredLocation", {"hipMemAdviseSetPreferredLocation", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 3 - // CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION - {"cudaMemAdviseUnsetPreferredLocation", {"hipMemAdviseUnsetPreferredLocation", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 4 - // CU_MEM_ADVISE_SET_ACCESSED_BY - {"cudaMemAdviseSetAccessedBy", {"hipMemAdviseSetAccessedBy", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 5 - // CU_MEM_ADVISE_UNSET_ACCESSED_BY - {"cudaMemAdviseUnsetAccessedBy", {"hipMemAdviseUnsetAccessedBy", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 6 - - // no analogue - // NOTE: CUmemorytype is partial analogue - {"cudaMemoryType", {"hipMemoryType_t", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaMemoryType enum values - {"cudaMemoryTypeUnregistered", {"hipMemoryTypeUnregistered", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0 - {"cudaMemoryTypeHost", {"hipMemoryTypeHost", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - {"cudaMemoryTypeDevice", {"hipMemoryTypeDevice", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - {"cudaMemoryTypeManaged", {"hipMemoryTypeManaged", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 3 - - // CUmem_range_attribute - {"cudaMemRangeAttribute", {"hipMemRangeAttribute", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaMemRangeAttribute enum values - // CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY - {"cudaMemRangeAttributeReadMostly", {"hipMemRangeAttributeReadMostly", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - // CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION - {"cudaMemRangeAttributePreferredLocation", {"hipMemRangeAttributePreferredLocation", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - // CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY - {"cudaMemRangeAttributeAccessedBy", {"hipMemRangeAttributeAccessedBy", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 3 - // CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION - {"cudaMemRangeAttributeLastPrefetchLocation", {"hipMemRangeAttributeLastPrefetchLocation", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 4 - - // no analogue - {"cudaOutputMode", {"hipOutputMode", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - {"cudaOutputMode_t", {"hipOutputMode", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaOutputMode enum values - {"cudaKeyValuePair", {"hipKeyValuePair", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x00 - {"cudaCSV", {"hipCSV", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x01 - - // CUresourcetype - {"cudaResourceType", {"hipResourceType", "", CONV_TYPE, API_RUNTIME}}, - // cudaResourceType enum values - // CU_RESOURCE_TYPE_ARRAY - {"cudaResourceTypeArray", {"hipResourceTypeArray", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x00 - // CU_RESOURCE_TYPE_MIPMAPPED_ARRAY - {"cudaResourceTypeMipmappedArray", {"hipResourceTypeMipmappedArray", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x01 - // CU_RESOURCE_TYPE_LINEAR - {"cudaResourceTypeLinear", {"hipResourceTypeLinear", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x02 - // CU_RESOURCE_TYPE_PITCH2D - {"cudaResourceTypePitch2D", {"hipResourceTypePitch2D", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x03 - - // CUresourceViewFormat - {"cudaResourceViewFormat", {"hipResourceViewFormat", "", CONV_TYPE, API_RUNTIME}}, - // enum cudaResourceViewFormat - // CU_RES_VIEW_FORMAT_NONE - {"cudaResViewFormatNone", {"hipResViewFormatNone", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x00 - // CU_RES_VIEW_FORMAT_UINT_1X8 - {"cudaResViewFormatUnsignedChar1", {"hipResViewFormatUnsignedChar1", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x01 - // CU_RES_VIEW_FORMAT_UINT_2X8 - {"cudaResViewFormatUnsignedChar2", {"hipResViewFormatUnsignedChar2", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x02 - // CU_RES_VIEW_FORMAT_UINT_4X8 - {"cudaResViewFormatUnsignedChar4", {"hipResViewFormatUnsignedChar4", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x03 - // CU_RES_VIEW_FORMAT_SINT_1X8 - {"cudaResViewFormatSignedChar1", {"hipResViewFormatSignedChar1", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x04 - // CU_RES_VIEW_FORMAT_SINT_2X8 - {"cudaResViewFormatSignedChar2", {"hipResViewFormatSignedChar2", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x05 - // CU_RES_VIEW_FORMAT_SINT_4X8 - {"cudaResViewFormatSignedChar4", {"hipResViewFormatSignedChar4", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x06 - // CU_RES_VIEW_FORMAT_UINT_1X16 - {"cudaResViewFormatUnsignedShort1", {"hipResViewFormatUnsignedShort1", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x07 - // CU_RES_VIEW_FORMAT_UINT_2X16 - {"cudaResViewFormatUnsignedShort2", {"hipResViewFormatUnsignedShort2", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x08 - // CU_RES_VIEW_FORMAT_UINT_4X16 - {"cudaResViewFormatUnsignedShort4", {"hipResViewFormatUnsignedShort4", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x09 - // CU_RES_VIEW_FORMAT_SINT_1X16 - {"cudaResViewFormatSignedShort1", {"hipResViewFormatSignedShort1", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x0a - // CU_RES_VIEW_FORMAT_SINT_2X16 - {"cudaResViewFormatSignedShort2", {"hipResViewFormatSignedShort2", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x0b - // CU_RES_VIEW_FORMAT_SINT_4X16 - {"cudaResViewFormatSignedShort4", {"hipResViewFormatSignedShort4", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x0c - // CU_RES_VIEW_FORMAT_UINT_1X32 - {"cudaResViewFormatUnsignedInt1", {"hipResViewFormatUnsignedInt1", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x0d - // CU_RES_VIEW_FORMAT_UINT_2X32 - {"cudaResViewFormatUnsignedInt2", {"hipResViewFormatUnsignedInt2", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x0e - // CU_RES_VIEW_FORMAT_UINT_4X32 - {"cudaResViewFormatUnsignedInt4", {"hipResViewFormatUnsignedInt4", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x0f - // CU_RES_VIEW_FORMAT_SINT_1X32 - {"cudaResViewFormatSignedInt1", {"hipResViewFormatSignedInt1", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x10 - // CU_RES_VIEW_FORMAT_SINT_2X32 - {"cudaResViewFormatSignedInt2", {"hipResViewFormatSignedInt2", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x11 - // CU_RES_VIEW_FORMAT_SINT_4X32 - {"cudaResViewFormatSignedInt4", {"hipResViewFormatSignedInt4", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x12 - // CU_RES_VIEW_FORMAT_FLOAT_1X16 - {"cudaResViewFormatHalf1", {"hipResViewFormatHalf1", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x13 - // CU_RES_VIEW_FORMAT_FLOAT_2X16 - {"cudaResViewFormatHalf2", {"hipResViewFormatHalf2", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x14 - // CU_RES_VIEW_FORMAT_FLOAT_4X16 - {"cudaResViewFormatHalf4", {"hipResViewFormatHalf4", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x15 - // CU_RES_VIEW_FORMAT_FLOAT_1X32 - {"cudaResViewFormatFloat1", {"hipResViewFormatFloat1", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x16 - // CU_RES_VIEW_FORMAT_FLOAT_2X32 - {"cudaResViewFormatFloat2", {"hipResViewFormatFloat2", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x17 - // CU_RES_VIEW_FORMAT_FLOAT_4X32 - {"cudaResViewFormatFloat4", {"hipResViewFormatFloat4", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x18 - // CU_RES_VIEW_FORMAT_UNSIGNED_BC1 - {"cudaResViewFormatUnsignedBlockCompressed1", {"hipResViewFormatUnsignedBlockCompressed1", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x19 - // CU_RES_VIEW_FORMAT_UNSIGNED_BC2 - {"cudaResViewFormatUnsignedBlockCompressed2", {"hipResViewFormatUnsignedBlockCompressed2", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x1a - // CU_RES_VIEW_FORMAT_UNSIGNED_BC3 - {"cudaResViewFormatUnsignedBlockCompressed3", {"hipResViewFormatUnsignedBlockCompressed3", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x1b - // CU_RES_VIEW_FORMAT_UNSIGNED_BC4 - {"cudaResViewFormatUnsignedBlockCompressed4", {"hipResViewFormatUnsignedBlockCompressed4", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x1c - // CU_RES_VIEW_FORMAT_SIGNED_BC4 - {"cudaResViewFormatSignedBlockCompressed4", {"hipResViewFormatSignedBlockCompressed4", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x1d - // CU_RES_VIEW_FORMAT_UNSIGNED_BC5 - {"cudaResViewFormatUnsignedBlockCompressed5", {"hipResViewFormatUnsignedBlockCompressed5", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x1e - // CU_RES_VIEW_FORMAT_SIGNED_BC5 - {"cudaResViewFormatSignedBlockCompressed5", {"hipResViewFormatSignedBlockCompressed5", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x1f - // CU_RES_VIEW_FORMAT_UNSIGNED_BC6H - {"cudaResViewFormatUnsignedBlockCompressed6H", {"hipResViewFormatUnsignedBlockCompressed6H", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x20 - // CU_RES_VIEW_FORMAT_SIGNED_BC6H - {"cudaResViewFormatSignedBlockCompressed6H", {"hipResViewFormatSignedBlockCompressed6H", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x21 - // CU_RES_VIEW_FORMAT_UNSIGNED_BC7 - {"cudaResViewFormatUnsignedBlockCompressed7", {"hipResViewFormatUnsignedBlockCompressed7", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0x22 - - // CUshared_carveout - {"cudaSharedCarveout", {"hipSharedCarveout", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaSharedCarveout enum values - // CU_SHAREDMEM_CARVEOUT_DEFAULT - {"cudaSharedmemCarveoutDefault", {"hipSharedmemCarveoutDefault", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // -1 - // CU_SHAREDMEM_CARVEOUT_MAX_SHARED - {"cudaSharedmemCarveoutMaxShared", {"hipSharedmemCarveoutMaxShared", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 100 - // CU_SHAREDMEM_CARVEOUT_MAX_L1 - {"cudaSharedmemCarveoutMaxL1", {"hipSharedmemCarveoutMaxL1", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0 - - // CUsharedconfig - {"cudaSharedMemConfig", {"hipSharedMemConfig", "", CONV_TYPE, API_RUNTIME}}, - // cudaSharedMemConfig enum values - // CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE = 0x00 - {"cudaSharedMemBankSizeDefault", {"hipSharedMemBankSizeDefault", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0 - // CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE = 0x01 - {"cudaSharedMemBankSizeFourByte", {"hipSharedMemBankSizeFourByte", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 1 - // CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE = 0x02 - {"cudaSharedMemBankSizeEightByte", {"hipSharedMemBankSizeEightByte", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 2 - - // CUstreamCaptureStatus - {"cudaStreamCaptureStatus", {"hipStreamCaptureStatus", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaStreamCaptureStatus enum values - // CU_STREAM_CAPTURE_STATUS_NONE - {"cudaStreamCaptureStatusNone", {"hipStreamCaptureStatusNone", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0 - // CU_STREAM_CAPTURE_STATUS_ACTIVE - {"cudaStreamCaptureStatusActive", {"hipStreamCaptureStatusActive", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - // CU_STREAM_CAPTURE_STATUS_INVALIDATED - {"cudaStreamCaptureStatusInvalidated", {"hipStreamCaptureStatusInvalidated", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - - // CUstreamCaptureMode - {"cudaStreamCaptureMode", {"hipStreamCaptureMode", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaStreamCaptureMode enum values - // CU_STREAM_CAPTURE_MODE_GLOBAL - {"cudaStreamCaptureModeGlobal", {"hipStreamCaptureModeGlobal", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0 - // CU_STREAM_CAPTURE_MODE_THREAD_LOCAL - {"cudaStreamCaptureModeThreadLocal", {"hipStreamCaptureModeThreadLocal", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - // CU_STREAM_CAPTURE_MODE_RELAXED - {"cudaStreamCaptureModeRelaxed", {"hipStreamCaptureModeRelaxed", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - - // no analogue - {"cudaSurfaceBoundaryMode", {"hipSurfaceBoundaryMode", "", CONV_TYPE, API_RUNTIME}}, - // cudaSurfaceBoundaryMode enum values - {"cudaBoundaryModeZero", {"hipBoundaryModeZero", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0 - {"cudaBoundaryModeClamp", {"hipBoundaryModeClamp", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 1 - {"cudaBoundaryModeTrap", {"hipBoundaryModeTrap", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 2 - - // no analogue - {"cudaSurfaceFormatMode", {"hipSurfaceFormatMode", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // enum cudaSurfaceFormatMode - {"cudaFormatModeForced", {"hipFormatModeForced", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0 - {"cudaFormatModeAuto", {"hipFormatModeAuto", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - - // no analogue - {"cudaTextureAddressMode", {"hipTextureAddressMode", "", CONV_TYPE, API_RUNTIME}}, - // cudaTextureAddressMode enum values - {"cudaAddressModeWrap", {"hipAddressModeWrap", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0 - {"cudaAddressModeClamp", {"hipAddressModeClamp", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 1 - {"cudaAddressModeMirror", {"hipAddressModeMirror", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 2 - {"cudaAddressModeBorder", {"hipAddressModeBorder", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 3 - - // CUfilter_mode - {"cudaTextureFilterMode", {"hipTextureFilterMode", "", CONV_TYPE, API_RUNTIME}}, - // cudaTextureFilterMode enum values - // CU_TR_FILTER_MODE_POINT - {"cudaFilterModePoint", {"hipFilterModePoint", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0 - // CU_TR_FILTER_MODE_LINEAR - {"cudaFilterModeLinear", {"hipFilterModeLinear", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 1 - - // no analogue - {"cudaTextureReadMode", {"hipTextureReadMode", "", CONV_TYPE, API_RUNTIME}}, - // cudaTextureReadMode enum values - {"cudaReadModeElementType", {"hipReadModeElementType", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 0 - {"cudaReadModeNormalizedFloat", {"hipReadModeNormalizedFloat", "", CONV_NUMERIC_LITERAL, API_RUNTIME}}, // 1 - - // CUGLDeviceList - {"cudaGLDeviceList", {"hipGLDeviceList", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaGLDeviceList enum values - // CU_GL_DEVICE_LIST_ALL = 0x01 - {"cudaGLDeviceListAll", {"hipGLDeviceListAll", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - // CU_GL_DEVICE_LIST_CURRENT_FRAME = 0x02 - {"cudaGLDeviceListCurrentFrame", {"hipGLDeviceListCurrentFrame", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - // CU_GL_DEVICE_LIST_NEXT_FRAME = 0x03 - {"cudaGLDeviceListNextFrame", {"hipGLDeviceListNextFrame", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 3 - - // CUGLmap_flags - {"cudaGLMapFlags", {"hipGLMapFlags", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaGLMapFlags enum values - // CU_GL_MAP_RESOURCE_FLAGS_NONE = 0x00 - {"cudaGLMapFlagsNone", {"hipGLMapFlagsNone", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0 - // CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 0x01 - {"cudaGLMapFlagsReadOnly", {"hipGLMapFlagsReadOnly", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - // CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 0x02 - {"cudaGLMapFlagsWriteDiscard", {"hipGLMapFlagsWriteDiscard", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - - // CUd3d9DeviceList - {"cudaD3D9DeviceList", {"hipD3D9DeviceList", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // CUd3d9DeviceList enum values - // CU_D3D9_DEVICE_LIST_ALL = 0x01 - {"cudaD3D9DeviceListAll", {"HIP_D3D9_DEVICE_LIST_ALL", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - // CU_D3D9_DEVICE_LIST_CURRENT_FRAME = 0x02 - {"cudaD3D9DeviceListCurrentFrame", {"HIP_D3D9_DEVICE_LIST_CURRENT_FRAME", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - // CU_D3D9_DEVICE_LIST_NEXT_FRAME = 0x03 - {"cudaD3D9DeviceListNextFrame", {"HIP_D3D9_DEVICE_LIST_NEXT_FRAME", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 3 - - // CUd3d9map_flags - {"cudaD3D9MapFlags", {"hipD3D9MapFlags", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaD3D9MapFlags enum values - // CU_D3D9_MAPRESOURCE_FLAGS_NONE = 0x00 - {"cudaD3D9MapFlagsNone", {"HIP_D3D9_MAPRESOURCE_FLAGS_NONE", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0 - // CU_D3D9_MAPRESOURCE_FLAGS_READONLY = 0x01 - {"cudaD3D9MapFlagsReadOnly", {"HIP_D3D9_MAPRESOURCE_FLAGS_READONLY", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - // CU_D3D9_MAPRESOURCE_FLAGS_WRITEDISCARD = 0x02 - {"cudaD3D9MapFlagsWriteDiscard", {"HIP_D3D9_MAPRESOURCE_FLAGS_WRITEDISCARD", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - - // CUd3d9Register_flags - {"cudaD3D9RegisterFlags", {"hipD3D9RegisterFlags", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaD3D9RegisterFlags enum values - // CU_D3D9_REGISTER_FLAGS_NONE = 0x00 - {"cudaD3D9RegisterFlagsNone", {"HIP_D3D9_REGISTER_FLAGS_NONE", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0 - // CU_D3D9_REGISTER_FLAGS_ARRAY = 0x01 - {"cudaD3D9RegisterFlagsArray", {"HIP_D3D9_REGISTER_FLAGS_ARRAY", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - - // CUd3d10DeviceList - {"cudaD3D10DeviceList", {"hipd3d10DeviceList", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaD3D10DeviceList enum values - // CU_D3D10_DEVICE_LIST_ALL = 0x01 - {"cudaD3D10DeviceListAll", {"HIP_D3D10_DEVICE_LIST_ALL", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - // CU_D3D10_DEVICE_LIST_CURRENT_FRAME = 0x02 - {"cudaD3D10DeviceListCurrentFrame", {"HIP_D3D10_DEVICE_LIST_CURRENT_FRAME", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - // CU_D3D10_DEVICE_LIST_NEXT_FRAME = 0x03 - {"cudaD3D10DeviceListNextFrame", {"HIP_D3D10_DEVICE_LIST_NEXT_FRAME", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 3 - - // CUd3d10map_flags - {"cudaD3D10MapFlags", {"hipD3D10MapFlags", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaD3D10MapFlags enum values - // CU_D3D10_MAPRESOURCE_FLAGS_NONE = 0x00 - {"cudaD3D10MapFlagsNone", {"HIP_D3D10_MAPRESOURCE_FLAGS_NONE", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0 - // CU_D3D10_MAPRESOURCE_FLAGS_READONLY = 0x01 - {"cudaD3D10MapFlagsReadOnly", {"HIP_D3D10_MAPRESOURCE_FLAGS_READONLY", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - // CU_D3D10_MAPRESOURCE_FLAGS_WRITEDISCARD = 0x02 - {"cudaD3D10MapFlagsWriteDiscard", {"HIP_D3D10_MAPRESOURCE_FLAGS_WRITEDISCARD", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - - // CUd3d10Register_flags - {"cudaD3D10RegisterFlags", {"hipD3D10RegisterFlags", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaD3D10RegisterFlags enum values - // CU_D3D10_REGISTER_FLAGS_NONE = 0x00 - {"cudaD3D10RegisterFlagsNone", {"HIP_D3D10_REGISTER_FLAGS_NONE", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 0 - // CU_D3D10_REGISTER_FLAGS_ARRAY = 0x01 - {"cudaD3D10RegisterFlagsArray", {"HIP_D3D10_REGISTER_FLAGS_ARRAY", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - - // CUd3d11DeviceList - {"cudaD3D11DeviceList", {"hipd3d11DeviceList", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // cudaD3D11DeviceList enum values - // CU_D3D11_DEVICE_LIST_ALL = 0x01 - {"cudaD3D11DeviceListAll", {"HIP_D3D11_DEVICE_LIST_ALL", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 1 - // CU_D3D11_DEVICE_LIST_CURRENT_FRAME = 0x02 - {"cudaD3D11DeviceListCurrentFrame", {"HIP_D3D11_DEVICE_LIST_CURRENT_FRAME", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 2 - // CU_D3D11_DEVICE_LIST_NEXT_FRAME = 0x03 - {"cudaD3D11DeviceListNextFrame", {"HIP_D3D11_DEVICE_LIST_NEXT_FRAME", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, // 3 - - // no analogue - {"libraryPropertyType", {"hipLibraryPropertyType_t", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - {"libraryPropertyType_t", {"hipLibraryPropertyType_t", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - {"MAJOR_VERSION", {"hipLibraryMajorVersion", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - {"MINOR_VERSION", {"hipLibraryMinorVersion", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, - // no analogue - {"PATCH_LEVEL", {"hipLibraryPatchVersion", "", CONV_NUMERIC_LITERAL, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 4. Typedefs - - // CUhostFn - {"cudaHostFn_t", {"hipHostFn", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // CUstreamCallback - {"cudaStreamCallback_t", {"hipStreamCallback_t", "", CONV_TYPE, API_RUNTIME}}, - - // CUsurfObject - {"cudaSurfaceObject_t", {"hipSurfaceObject_t", "", CONV_TYPE, API_RUNTIME}}, - - // CUtexObject - {"cudaTextureObject_t", {"hipTextureObject_t", "", CONV_TYPE, API_RUNTIME}}, - - // CUuuid - {"cudaUUID_t", {"hipUUID_t", "", CONV_TYPE, API_RUNTIME, HIP_UNSUPPORTED}}, - - // 5. Defines - - // no analogue - {"CUDA_EGL_MAX_PLANES", {"HIP_EGL_MAX_PLANES", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, // 3 - // CU_IPC_HANDLE_SIZE - {"CUDA_IPC_HANDLE_SIZE", {"HIP_IPC_HANDLE_SIZE", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, // 64 - // no analogue - {"cudaArrayDefault", {"hipArrayDefault", "", CONV_DEFINE, API_RUNTIME}}, // 0x00 - // CUDA_ARRAY3D_LAYERED - {"cudaArrayLayered", {"hipArrayLayered", "", CONV_DEFINE, API_RUNTIME}}, // 0x01 - // CUDA_ARRAY3D_SURFACE_LDST - {"cudaArraySurfaceLoadStore", {"hipArraySurfaceLoadStore", "", CONV_DEFINE, API_RUNTIME}}, // 0x02 - // CUDA_ARRAY3D_CUBEMAP - {"cudaArrayCubemap", {"hipArrayCubemap", "", CONV_DEFINE, API_RUNTIME}}, // 0x04 - // CUDA_ARRAY3D_TEXTURE_GATHER - {"cudaArrayTextureGather", {"hipArrayTextureGather", "", CONV_DEFINE, API_RUNTIME}}, // 0x08 - // CUDA_ARRAY3D_COLOR_ATTACHMENT - {"cudaArrayColorAttachment", {"hipArrayColorAttachment", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x20 - // CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC - {"cudaCooperativeLaunchMultiDeviceNoPreSync", {"hipCooperativeLaunchMultiDeviceNoPreSync", "", CONV_DEFINE, API_RUNTIME}}, // 0x01 - // CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC - {"cudaCooperativeLaunchMultiDeviceNoPostSync", {"hipCooperativeLaunchMultiDeviceNoPostSync", "", CONV_DEFINE, API_RUNTIME}}, // 0x02 - // CU_DEVICE_CPU ((CUdevice)-1) - {"cudaCpuDeviceId", {"hipCpuDeviceId", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, // ((int)-1) - // CU_DEVICE_INVALID ((CUdevice)-2) - {"cudaInvalidDeviceId", {"hipInvalidDeviceId", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, // ((int)-2) - // CU_CTX_BLOCKING_SYNC - // NOTE: Deprecated since CUDA 4.0 and replaced with cudaDeviceScheduleBlockingSync - {"cudaDeviceBlockingSync", {"hipDeviceScheduleBlockingSync", "", CONV_DEFINE, API_RUNTIME}}, // 0x04 - // CU_CTX_LMEM_RESIZE_TO_MAX - {"cudaDeviceLmemResizeToMax", {"hipDeviceLmemResizeToMax", "", CONV_DEFINE, API_RUNTIME}}, // 0x10 - // CU_CTX_MAP_HOST - {"cudaDeviceMapHost", {"hipDeviceMapHost", "", CONV_DEFINE, API_RUNTIME}}, // 0x08 - // CU_CTX_FLAGS_MASK - {"cudaDeviceMask", {"hipDeviceMask", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x1f - // no analogue - {"cudaDevicePropDontCare", {"hipDevicePropDontCare", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, - // CU_CTX_SCHED_AUTO - {"cudaDeviceScheduleAuto", {"hipDeviceScheduleAuto", "", CONV_DEFINE, API_RUNTIME}}, // 0x00 - // CU_CTX_SCHED_SPIN - {"cudaDeviceScheduleSpin", {"hipDeviceScheduleSpin", "", CONV_DEFINE, API_RUNTIME}}, // 0x01 - // CU_CTX_SCHED_YIELD - {"cudaDeviceScheduleYield", {"hipDeviceScheduleYield", "", CONV_DEFINE, API_RUNTIME}}, // 0x02 - // CU_CTX_SCHED_BLOCKING_SYNC - {"cudaDeviceScheduleBlockingSync", {"hipDeviceScheduleBlockingSync", "", CONV_DEFINE, API_RUNTIME}}, // 0x04 - // CU_CTX_SCHED_MASK - {"cudaDeviceScheduleMask", {"hipDeviceScheduleMask", "", CONV_DEFINE, API_RUNTIME}}, // 0x07 - // CU_EVENT_DEFAULT - {"cudaEventDefault", {"hipEventDefault", "", CONV_DEFINE, API_RUNTIME}}, // 0x00 - // CU_EVENT_BLOCKING_SYNC - {"cudaEventBlockingSync", {"hipEventBlockingSync", "", CONV_DEFINE, API_RUNTIME}}, // 0x01 - // CU_EVENT_DISABLE_TIMING - {"cudaEventDisableTiming", {"hipEventDisableTiming", "", CONV_DEFINE, API_RUNTIME}}, // 0x02 - // CU_EVENT_INTERPROCESS - {"cudaEventInterprocess", {"hipEventInterprocess", "", CONV_DEFINE, API_RUNTIME}}, // 0x04 - // CUDA_EXTERNAL_MEMORY_DEDICATED - {"cudaExternalMemoryDedicated", {"hipExternalMemoryDedicated", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x1 - // CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC - {"cudaExternalSemaphoreSignalSkipNvSciBufMemSync", {"hipExternalSemaphoreSignalSkipNvSciBufMemSync", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x01 - // CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC - {"cudaExternalSemaphoreWaitSkipNvSciBufMemSync", {"hipExternalSemaphoreWaitSkipNvSciBufMemSync", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x02 - // CUDA_NVSCISYNC_ATTR_SIGNAL - {"cudaNvSciSyncAttrSignal", {"hipNvSciSyncAttrSignal", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x1 - // CUDA_NVSCISYNC_ATTR_WAIT - {"cudaNvSciSyncAttrWait", {"hipNvSciSyncAttrWait", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x2 - // no analogue - {"cudaHostAllocDefault", {"hipHostMallocDefault", "", CONV_DEFINE, API_RUNTIME}}, // 0x00 - // CU_MEMHOSTALLOC_PORTABLE - {"cudaHostAllocPortable", {"hipHostMallocPortable", "", CONV_DEFINE, API_RUNTIME}}, // 0x01 - // CU_MEMHOSTALLOC_DEVICEMAP - {"cudaHostAllocMapped", {"hipHostMallocMapped", "", CONV_DEFINE, API_RUNTIME}}, // 0x02 - // CU_MEMHOSTALLOC_WRITECOMBINED - {"cudaHostAllocWriteCombined", {"hipHostMallocWriteCombined", "", CONV_DEFINE, API_RUNTIME}}, // 0x04 - // no analogue - {"cudaHostRegisterDefault", {"hipHostRegisterDefault", "", CONV_DEFINE, API_RUNTIME}}, // 0x00 - // CU_MEMHOSTREGISTER_PORTABLE - {"cudaHostRegisterPortable", {"hipHostRegisterPortable", "", CONV_DEFINE, API_RUNTIME}}, // 0x01 - // CU_MEMHOSTREGISTER_DEVICEMAP - {"cudaHostRegisterMapped", {"hipHostRegisterMapped", "", CONV_DEFINE, API_RUNTIME}}, // 0x02 - // CU_MEMHOSTREGISTER_IOMEMORY - {"cudaHostRegisterIoMemory", {"hipHostRegisterIoMemory", "", CONV_DEFINE, API_RUNTIME}}, // 0x04 - // CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS - {"cudaIpcMemLazyEnablePeerAccess", {"hipIpcMemLazyEnablePeerAccess", "", CONV_DEFINE, API_RUNTIME}}, // 0x01 - // CU_MEM_ATTACH_GLOBAL - {"cudaMemAttachGlobal", {"hipMemAttachGlobal", "", CONV_DEFINE, API_RUNTIME}}, // 0x01 - // CU_MEM_ATTACH_HOST - {"cudaMemAttachHost", {"hipMemAttachHost", "", CONV_DEFINE, API_RUNTIME}}, // 0x02 - // CU_MEM_ATTACH_SINGLE - {"cudaMemAttachSingle", {"hipMemAttachSingle", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x04 - // no analogue - {"cudaTextureType1D", {"hipTextureType1D", "", CONV_DEFINE, API_RUNTIME}}, // 0x01 - // no analogue - {"cudaTextureType2D", {"hipTextureType2D", "", CONV_DEFINE, API_RUNTIME}}, // 0x02 - // no analogue - {"cudaTextureType3D", {"hipTextureType3D", "", CONV_DEFINE, API_RUNTIME}}, // 0x03 - // no analogue - {"cudaTextureTypeCubemap", {"hipTextureTypeCubemap", "", CONV_DEFINE, API_RUNTIME}}, // 0x0C - // no analogue - {"cudaTextureType1DLayered", {"hipTextureType1DLayered", "", CONV_DEFINE, API_RUNTIME}}, // 0xF1 - // no analogue - {"cudaTextureType2DLayered", {"hipTextureType2DLayered", "", CONV_DEFINE, API_RUNTIME}}, // 0xF2 - // no analogue - {"cudaTextureTypeCubemapLayered", {"hipTextureTypeCubemapLayered", "", CONV_DEFINE, API_RUNTIME}}, // 0xFC - // CU_OCCUPANCY_DEFAULT - {"cudaOccupancyDefault", {"hipOccupancyDefault", "", CONV_DEFINE, API_RUNTIME}}, // 0x00 - // CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE - {"cudaOccupancyDisableCachingOverride", {"hipOccupancyDisableCachingOverride", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, // 0x01 - // CU_STREAM_DEFAULT - {"cudaStreamDefault", {"hipStreamDefault", "", CONV_DEFINE, API_RUNTIME}}, // 0x00 - // CU_STREAM_NON_BLOCKING - {"cudaStreamNonBlocking", {"hipStreamNonBlocking", "", CONV_DEFINE, API_RUNTIME}}, // 0x01 - // CU_STREAM_LEGACY ((CUstream)0x1) - {"cudaStreamLegacy", {"hipStreamLegacy", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, // ((cudaStream_t)0x1) - // CU_STREAM_PER_THREAD ((CUstream)0x2) - {"cudaStreamPerThread", {"hipStreamPerThread", "", CONV_DEFINE, API_RUNTIME, HIP_UNSUPPORTED}}, // ((cudaStream_t)0x2) -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_SPARSE_API_functions.cpp b/hipamd/hipify-clang/src/CUDA2HIP_SPARSE_API_functions.cpp deleted file mode 100644 index 0f3997145e..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_SPARSE_API_functions.cpp +++ /dev/null @@ -1,758 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Maps the names of CUDA SPARSE API functions to the corresponding HIP functions -const std::map CUDA_SPARSE_FUNCTION_MAP{ - // 5. cuSPARSE Helper Function Reference - {"cusparseCreate", {"hipsparseCreate", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCreateSolveAnalysisInfo", {"hipsparseCreateSolveAnalysisInfo", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCreateHybMat", {"hipsparseCreateHybMat", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCreateMatDescr", {"hipsparseCreateMatDescr", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDestroy", {"hipsparseDestroy", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDestroySolveAnalysisInfo", {"hipsparseDestroySolveAnalysisInfo", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDestroyHybMat", {"hipsparseDestroyHybMat", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDestroyMatDescr", {"hipsparseDestroyMatDescr", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseGetLevelInfo", {"hipsparseGetLevelInfo", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseGetMatDiagType", {"hipsparseGetMatDiagType", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseGetMatFillMode", {"hipsparseGetMatFillMode", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseGetMatIndexBase", {"hipsparseGetMatIndexBase", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseGetMatType", {"hipsparseGetMatType", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseGetPointerMode", {"hipsparseGetPointerMode", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseGetVersion", {"hipsparseGetVersion", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseSetMatDiagType", {"hipsparseSetMatDiagType", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseSetMatFillMode", {"hipsparseSetMatFillMode", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseSetMatIndexBase", {"hipsparseSetMatIndexBase", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseSetMatType", {"hipsparseSetMatType", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseSetPointerMode", {"hipsparseSetPointerMode", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseSetStream", {"hipsparseSetStream", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseGetStream", {"hipsparseGetStream", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCreateCsrsv2Info", {"hipsparseCreateCsrsv2Info", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDestroyCsrsv2Info", {"hipsparseDestroyCsrsv2Info", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCreateCsrsm2Info", {"hipsparseCreateCsrsm2Info", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDestroyCsrsm2Info", {"hipsparseDestroyCsrsm2Info", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCreateCsric02Info", {"hipsparseCreateCsric02Info", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDestroyCsric02Info", {"hipsparseDestroyCsric02Info", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCreateCsrilu02Info", {"hipsparseCreateCsrilu02Info", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDestroyCsrilu02Info", {"hipsparseDestroyCsrilu02Info", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCreateBsrsv2Info", {"hipsparseCreateBsrsv2Info", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDestroyBsrsv2Info", {"hipsparseDestroyBsrsv2Info", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCreateBsrsm2Info", {"hipsparseCreateBsrsm2Info", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDestroyBsrsm2Info", {"hipsparseDestroyBsrsm2Info", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCreateBsric02Inf", {"hipsparseCreateBsric02Inf", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDestroyBsric02Info", {"hipsparseDestroyBsric02Info", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCreateBsrilu02Info", {"hipsparseCreateBsrilu02Info", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDestroyBsrilu02Info", {"hipsparseDestroyBsrilu02Info", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCreateCsrgemm2Info", {"hipsparseCreateCsrgemm2Info", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDestroyCsrgemm2Info", {"hipsparseDestroyCsrgemm2Info", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCreatePruneInfo", {"hipsparseCreatePruneInfo", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDestroyPruneInfo", {"hipsparseDestroyPruneInfo", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - // 6. cuSPARSE Level 1 Function Reference - {"cusparseSaxpyi", {"hipsparseSaxpyi", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDaxpyi", {"hipsparseDaxpyi", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCaxpyi", {"hipsparseCaxpyi", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZaxpyi", {"hipsparseZaxpyi", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseSdoti", {"hipsparseSdoti", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDdoti", {"hipsparseDdoti", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCdoti", {"hipsparseCdoti", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZdoti", {"hipsparseZdoti", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseCdotci", {"hipsparseCdotci", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZdotci", {"hipsparseZdotci", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseSgthr", {"hipsparseSgthr", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDgthr", {"hipsparseDgthr", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCgthr", {"hipsparseCgthr", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZgthr", {"hipsparseZgthr", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseSgthrz", {"hipsparseSgthrz", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDgthrz", {"hipsparseDgthrz", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCgthrz", {"hipsparseCgthrz", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZgthrz", {"hipsparseZgthrz", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseSroti", {"hipsparseSroti", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDroti", {"hipsparseDroti", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseSsctr", {"hipsparseSsctr", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDsctr", {"hipsparseDsctr", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCsctr", {"hipsparseCsctr", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZsctr", {"hipsparseZsctr", "", CONV_LIB_FUNC, API_SPARSE}}, - - // 7. cuSPARSE Level 2 Function Reference - {"cusparseSbsrmv", {"hipsparseSbsrmv", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsrmv", {"hipsparseDbsrmv", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsrmv", {"hipsparseCbsrmv", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsrmv", {"hipsparseZbsrmv", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSbsrxmv", {"hipsparseSbsrxmv", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsrxmv", {"hipsparseDbsrxmv", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsrxmv", {"hipsparseCbsrxmv", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsrxmv", {"hipsparseZbsrxmv", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseScsrmv", {"hipsparseScsrmv", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsrmv", {"hipsparseDcsrmv", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCcsrmv", {"hipsparseCcsrmv", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsrmv", {"hipsparseZcsrmv", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseCsrmvEx", {"hipsparseCsrmvEx", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCsrmvEx_bufferSize", {"hipsparseCsrmvEx_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseScsrmv_mp", {"hipsparseScsrmv_mp", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsrmv_mp", {"hipsparseDcsrmv_mp", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsrmv_mp", {"hipsparseCcsrmv_mp", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsrmv_mp", {"hipsparseZcsrmv_mp", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSgemvi", {"hipsparseSgemvi", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgemvi", {"hipsparseDgemvi", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgemvi", {"hipsparseCgemvi", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgemvi", {"hipsparseZgemvi", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSgemvi_bufferSize", {"hipsparseSgemvi_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgemvi_bufferSize", {"hipsparseDgemvi_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgemvi_bufferSize", {"hipsparseCgemvi_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgemvi_bufferSize", {"hipsparseZgemvi_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSbsrsv2_bufferSize", {"hipsparseSbsrsv2_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSbsrsv2_bufferSizeExt", {"hipsparseSbsrsv2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsrsv2_bufferSize", {"hipsparseDbsrsv2_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsrsv2_bufferSizeExt", {"hipsparseDbsrsv2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsrsv2_bufferSize", {"hipsparseCbsrsv2_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsrsv2_bufferSizeExt", {"hipsparseCbsrsv2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsrsv2_bufferSize", {"hipsparseZbsrsv2_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsrsv2_bufferSizeExt", {"hipsparseZbsrsv2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSbsrsv2_analysis", {"hipsparseSbsrsv2_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsrsv2_analysis", {"hipsparseDbsrsv2_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsrsv2_analysis", {"hipsparseCbsrsv2_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsrsv2_analysis", {"hipsparseZbsrsv2_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseScsrsv_solve", {"hipsparseScsrsv_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsrsv_solve", {"hipsparseDcsrsv_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsrsv_solve", {"hipsparseCcsrsv_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsrsv_solve", {"hipsparseZcsrsv_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSbsrsv2_solve", {"hipsparseSbsrsv2_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsrsv2_solve", {"hipsparseDbsrsv2_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsrsv2_solve", {"hipsparseCbsrsv2_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsrsv2_solve", {"hipsparseZbsrsv2_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseXbsrsv2_zeroPivot", {"hipsparseXbsrsv2_zeroPivot", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseScsrsv_analysis", {"hipsparseScsrsv_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsrsv_analysis", {"hipsparseDcsrsv_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsrsv_analysis", {"hipsparseCcsrsv_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsrsv_analysis", {"hipsparseZcsrsv_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseCsrsv_analysisEx", {"hipsparseCsrsv_analysisEx", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCsrsv_solveEx", {"hipsparseCsrsv_solveEx", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseScsrsv2_bufferSize", {"hipsparseScsrsv2_bufferSize", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseScsrsv2_bufferSizeExt", {"hipsparseScsrsv2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsrsv2_bufferSize", {"hipsparseDcsrsv2_bufferSize", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsrsv2_bufferSizeExt", {"hipsparseDcsrsv2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCcsrsv2_bufferSize", {"hipsparseCcsrsv2_bufferSize", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCcsrsv2_bufferSizeExt", {"hipsparseCcsrsv2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsrsv2_bufferSize", {"hipsparseZcsrsv2_bufferSize", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsrsv2_bufferSizeExt", {"hipsparseZcsrsv2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseScsrsv2_analysis", {"hipsparseScsrsv2_analysis", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsrsv2_analysis", {"hipsparseDcsrsv2_analysis", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCcsrsv2_analysis", {"hipsparseCcsrsv2_analysis", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsrsv2_analysis", {"hipsparseZcsrsv2_analysis", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseScsrsv2_solve", {"hipsparseScsrsv2_solve", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsrsv2_solve", {"hipsparseDcsrsv2_solve", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCcsrsv2_solve", {"hipsparseCcsrsv2_solve", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsrsv2_solve", {"hipsparseZcsrsv2_solve", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseXcsrsv2_zeroPivot", {"hipsparseXcsrsv2_zeroPivot", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseShybmv", {"hipsparseShybmv", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDhybmv", {"hipsparseDhybmv", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseChybmv", {"hipsparseChybmv", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZhybmv", {"hipsparseZhybmv", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseShybsv_analysis", {"hipsparseShybsv_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDhybsv_analysis", {"hipsparseDhybsv_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseChybsv_analysis", {"hipsparseChybsv_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZhybsv_analysis", {"hipsparseZhybsv_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseShybsv_solve", {"hipsparseShybsv_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDhybsv_solve", {"hipsparseDhybsv_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseChybsv_solve", {"hipsparseChybsv_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZhybsv_solve", {"hipsparseZhybsv_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - // 8. cuSPARSE Level 3 Function Reference - {"cusparseScsrmm", {"hipsparseScsrmm", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsrmm", {"hipsparseDcsrmm", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCcsrmm", {"hipsparseCcsrmm", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsrmm", {"hipsparseZcsrmm", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseScsrmm2", {"hipsparseScsrmm2", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsrmm2", {"hipsparseDcsrmm2", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCcsrmm2", {"hipsparseCcsrmm2", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsrmm2", {"hipsparseZcsrmm2", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseScsrsm_analysis", {"hipsparseScsrsm_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsrsm_analysis", {"hipsparseDcsrsm_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsrsm_analysis", {"hipsparseCcsrsm_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsrsm_analysis", {"hipsparseZcsrsm_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseScsrsm_solve", {"hipsparseScsrsm_solve", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsrsm_solve", {"hipsparseDcsrsm_solve", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCcsrsm_solve", {"hipsparseCcsrsm_solve", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsrsm_solve", {"hipsparseZcsrsm_solve", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseScsrsm2_bufferSizeExt", {"hipsparseScsrsm2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsrsm2_bufferSizeExt", {"hipsparseDcsrsm2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE,}}, - {"cusparseCcsrsm2_bufferSizeExt", {"hipsparseCcsrsm2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsrsm2_bufferSizeExt", {"hipsparseZcsrsm2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseScsrsm2_analysis", {"hipsparseScsrsm2_analysis", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsrsm2_analysis", {"hipsparseDcsrsm2_analysis", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCcsrsm2_analysis", {"hipsparseCcsrsm2_analysis", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsrsm2_analysis", {"hipsparseZcsrsm2_analysis", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseScsrsm2_solve", {"hipsparseScsrsm2_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsrsm2_solve", {"hipsparseDcsrsm2_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsrsm2_solve", {"hipsparseCcsrsm2_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsrsm2_solve", {"hipsparseZcsrsm2_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseXcsrsm2_zeroPivot", {"hipsparseXcsrsm2_zeroPivot", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseSbsrmm", {"hipsparseSbsrmm", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsrmm", {"hipsparseDbsrmm", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsrmm", {"hipsparseCbsrmm", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsrmm", {"hipsparseZbsrmm", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSbsrsm2_bufferSize", {"hipsparseCbsrsm2_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSbsrsm2_bufferSizeExt", {"hipsparseCbsrsm2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsrsm2_bufferSize", {"hipsparseDbsrsm2_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsrsm2_bufferSizeExt", {"hipsparseDbsrsm2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsrsm2_bufferSize", {"hipsparseCbsrsm2_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsrsm2_bufferSizeExt", {"hipsparseCbsrsm2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsrsm2_bufferSize", {"hipsparseZbsrsm2_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsrsm2_bufferSizeExt", {"hipsparseZbsrsm2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSbsrsm2_analysis", {"hipsparseSbsrsm2_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsrsm2_analysis", {"hipsparseDbsrsm2_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsrsm2_analysis", {"hipsparseCbsrsm2_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsrsm2_analysis", {"hipsparseZbsrsm2_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSbsrsm2_solve", {"hipsparseSbsrsm2_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsrsm2_solve", {"hipsparseDbsrsm2_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsrsm2_solve", {"hipsparseCbsrsm2_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsrsm2_solve", {"hipsparseZbsrsm2_solve", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseXbsrsm2_zeroPivot", {"hipsparseXbsrsm2_zeroPivot", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSgemmi", {"hipsparseSgemmi", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgemmi", {"hipsparseDgemmi", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgemmi", {"hipsparseCgemmi", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgemmi", {"hipsparseZgemmi", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - // 9. cuSPARSE Extra Function Reference - {"cusparseXcsrgeamNnz", {"hipsparseXcsrgeamNnz", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseScsrgeam", {"hipsparseScsrgeam", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsrgeam", {"hipsparseDcsrgeam", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsrgeam", {"hipsparseCcsrgeam", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsrgeam", {"hipsparseZcsrgeam", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseXcsrgeam2Nnz", {"hipsparseXcsrgeam2Nnz", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseScsrgeam2", {"hipsparseScsrgeam2", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsrgeam2", {"hipsparseDcsrgeam2", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsrgeam2", {"hipsparseCcsrgeam2", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsrgeam2", {"hipsparseZcsrgeam2", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseScsrgeam2_bufferSizeExt", {"hipsparseScsrgeam2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsrgeam2_bufferSizeExt", {"hipsparseDcsrgeam2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsrgeam2_bufferSizeExt", {"hipsparseCcsrgeam2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsrgeam2_bufferSizeExt", {"hipsparseZcsrgeam2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseXcsrgemmNnz", {"hipsparseXcsrgemmNnz", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseScsrgemm", {"hipsparseScsrgemm", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsrgemm", {"hipsparseDcsrgemm", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCcsrgemm", {"hipsparseCcsrgemm", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsrgemm", {"hipsparseZcsrgemm", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseXcsrgemm2Nnz", {"hipsparseXcsrgemm2Nnz", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseScsrgemm2", {"hipsparseScsrgemm2", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsrgemm2", {"hipsparseDcsrgemm2", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCcsrgemm2", {"hipsparseCcsrgemm2", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsrgemm2", {"hipsparseZcsrgemm2", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseScsrgemm2_bufferSizeExt", {"hipsparseScsrgemm2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsrgemm2_bufferSizeExt", {"hipsparseDcsrgemm2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCcsrgemm2_bufferSizeExt", {"hipsparseCcsrgemm2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsrgemm2_bufferSizeExt", {"hipsparseZcsrgemm2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE}}, - - // 10. cuSPARSE Preconditioners Reference - // 10.1. Incomplete Cholesky Factorization : level 0 - {"cusparseScsric0", {"hipsparseScsric0", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsric0", {"hipsparseDcsric0", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsric0", {"hipsparseCcsric0", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsric0", {"hipsparseZcsric0", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseScsric02_bufferSize", {"hipsparseScsric02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseScsric02_bufferSizeExt", {"hipsparseScsric02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsric02_bufferSize", {"hipsparseDcsric02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsric02_bufferSizeExt", {"hipsparseDcsric02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsric02_bufferSize", {"hipsparseCcsric02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsric02_bufferSizeExt", {"hipsparseCcsric02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsric02_bufferSize", {"hipsparseZcsric02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsric02_bufferSizeExt", {"hipsparseZcsric02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseScsric02_analysis", {"hipsparseScsric02_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsric02_analysis", {"hipsparseDcsric02_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsric02_analysis", {"hipsparseCcsric02_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsric02_analysis", {"hipsparseZcsric02_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseScsric02", {"hipsparseScsric02", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsric02", {"hipsparseDcsric02", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsric02", {"hipsparseCcsric02", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsric02", {"hipsparseZcsric02", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseXcsric02_zeroPivot", {"hipsparseXcsric02_zeroPivot", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSbsric02_bufferSize", {"hipsparseSbsric02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSbsric02_bufferSizeExt", {"hipsparseSbsric02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsric02_bufferSize", {"hipsparseDbsric02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsric02_bufferSizeExt", {"hipsparseDbsric02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsric02_bufferSize", {"hipsparseCbsric02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsric02_bufferSizeExt", {"hipsparseCbsric02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsric02_bufferSize", {"hipsparseZbsric02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsric02_bufferSizeExt", {"hipsparseZbsric02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSbsric02_analysis", {"hipsparseSbsric02_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsric02_analysis", {"hipsparseDbsric02_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsric02_analysis", {"hipsparseCbsric02_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsric02_analysis", {"hipsparseZbsric02_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSbsric02", {"hipsparseSbsric02", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsric02", {"hipsparseDbsric02", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsric02", {"hipsparseCbsric02", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsric02", {"hipsparseZbsric02", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseXbsric02_zeroPivot", {"hipsparseXbsric02_zeroPivot", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - // 10.2. Incomplete LU Factorization: level 0 - {"cusparseScsrilu0", {"hipsparseScsrilu0", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsrilu0", {"hipsparseDcsrilu0", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsrilu0", {"hipsparseCcsrilu0", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsrilu0", {"hipsparseZcsrilu0", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseCsrilu0Ex", {"hipsparseCsrilu0Ex", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseScsrilu02_numericBoost", {"hipsparseScsrilu02_numericBoost", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsrilu02_numericBoost", {"hipsparseDcsrilu02_numericBoost", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsrilu02_numericBoost", {"hipsparseCcsrilu02_numericBoost", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsrilu02_numericBoost", {"hipsparseZcsrilu02_numericBoost", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseXcsrilu02_zeroPivot", {"hipsparseXcsrilu02_zeroPivot", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseScsrilu02_bufferSize", {"hipsparseScsrilu02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseScsrilu02_bufferSizeExt", {"hipsparseScsrilu02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsrilu02_bufferSize", {"hipsparseDcsrilu02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsrilu02_bufferSizeExt", {"hipsparseDcsrilu02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCcsrilu02_bufferSize", {"hipsparseCcsrilu02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCcsrilu02_bufferSizeExt", {"hipsparseCcsrilu02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsrilu02_bufferSize", {"hipsparseZcsrilu02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsrilu02_bufferSizeExt", {"hipsparseZcsrilu02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseScsrilu02_analysis", {"hipsparseScsrilu02_analysis", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsrilu02_analysis", {"hipsparseDcsrilu02_analysis", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCcsrilu02_analysis", {"hipsparseCcsrilu02_analysis", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsrilu02_analysis", {"hipsparseZcsrilu02_analysis", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseScsrilu02", {"hipsparseScsrilu02", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsrilu02", {"hipsparseDcsrilu02", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCcsrilu02", {"hipsparseCcsrilu02", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsrilu02", {"hipsparseZcsrilu02", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseXbsric02_zeroPivot", {"hipsparseXcsrilu02_zeroPivot", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseSbsrilu02_numericBoost", {"hipsparseSbsrilu02_numericBoost", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsrilu02_numericBoost", {"hipsparseDbsrilu02_numericBoost", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsrilu02_numericBoost", {"hipsparseCbsrilu02_numericBoost", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsrilu02_numericBoost", {"hipsparseZbsrilu02_numericBoost", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSbsrilu02_bufferSize", {"hipsparseSbsrilu02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSbsrilu02_bufferSizeExt", {"hipsparseSbsrilu02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsrilu02_bufferSize", {"hipsparseDbsrilu02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsrilu02_bufferSizeExt", {"hipsparseDbsrilu02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsrilu02_bufferSize", {"hipsparseCbsrilu02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsrilu02_bufferSizeExt", {"hipsparseCbsrilu02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsrilu02_bufferSize", {"hipsparseZbsrilu02_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsrilu02_bufferSizeExt", {"hipsparseZbsrilu02_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSbsrilu02_analysis", {"hipsparseSbsrilu02_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsrilu02_analysis", {"hipsparseDbsrilu02_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsrilu02_analysis", {"hipsparseCbsrilu02_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsrilu02_analysis", {"hipsparseZbsrilu02_analysis", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSbsrilu02", {"hipsparseSbsrilu02", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsrilu02", {"hipsparseDbsrilu02", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsrilu02", {"hipsparseCbsrilu02", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsrilu02", {"hipsparseZbsrilu02", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseXbsrilu02_zeroPivot", {"hipsparseXbsrilu02_zeroPivot", "", CONV_LIB_FUNC, API_SPARSE}}, - - // 10.3. Tridiagonal Solve - {"cusparseSgtsv", {"hipsparseSgtsv", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgtsv", {"hipsparseDgtsv", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgtsv", {"hipsparseCgtsv", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgtsv", {"hipsparseZgtsv", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSgtsv_nopivot", {"hipsparseSgtsv_nopivot", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgtsv_nopivot", {"hipsparseDgtsv_nopivot", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgtsv_nopivot", {"hipsparseCgtsv_nopivot", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgtsv_nopivot", {"hipsparseZgtsv_nopivot", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSgtsv2_bufferSizeExt", {"hipsparseSgtsv2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgtsv2_bufferSizeExt", {"hipsparseDgtsv2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgtsv2_bufferSizeExt", {"hipsparseCgtsv2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgtsv2_bufferSizeExt", {"hipsparseZgtsv2_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSgtsv2", {"hipsparseSgtsv2", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgtsv2", {"hipsparseDgtsv2", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgtsv2", {"hipsparseCgtsv2", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgtsv2", {"hipsparseZgtsv2", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSgtsv2_nopivot_bufferSizeExt", {"hipsparseSgtsv2_nopivot_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgtsv2_nopivot_bufferSizeExt", {"hipsparseDgtsv2_nopivot_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgtsv2_nopivot_bufferSizeExt", {"hipsparseCgtsv2_nopivot_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgtsv2_nopivot_bufferSizeExt", {"hipsparseZgtsv2_nopivot_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSgtsv2_nopivot", {"hipsparseSgtsv2_nopivot", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgtsv2_nopivot", {"hipsparseDgtsv2_nopivot", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgtsv2_nopivot", {"hipsparseCgtsv2_nopivot", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgtsv2_nopivot", {"hipsparseZgtsv2_nopivot", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - // 10.4. Batched Tridiagonal Solve - {"cusparseSgtsvStridedBatch", {"hipsparseSgtsvStridedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgtsvStridedBatch", {"hipsparseDgtsvStridedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgtsvStridedBatch", {"hipsparseCgtsvStridedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgtsvStridedBatch", {"hipsparseZgtsvStridedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSgtsv2StridedBatch_bufferSizeExt", {"hipsparseSgtsv2StridedBatch_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgtsv2StridedBatch_bufferSizeExt", {"hipsparseDgtsv2StridedBatch_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgtsv2StridedBatch_bufferSizeExt", {"hipsparseCgtsv2StridedBatch_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgtsv2StridedBatch_bufferSizeExt", {"hipsparseZgtsv2StridedBatch_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSgtsv2StridedBatch", {"hipsparseSgtsv2StridedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgtsv2StridedBatch", {"hipsparseDgtsv2StridedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgtsv2StridedBatch", {"hipsparseCgtsv2StridedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgtsv2StridedBatch", {"hipsparseZgtsv2StridedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSgtsvInterleavedBatch_bufferSizeExt", {"hipsparseSgtsvInterleavedBatch_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgtsvInterleavedBatch_bufferSizeExt", {"hipsparseDgtsvInterleavedBatch_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgtsvInterleavedBatch_bufferSizeExt", {"hipsparseCgtsvInterleavedBatch_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgtsvInterleavedBatch_bufferSizeExt", {"hipsparseZgtsvInterleavedBatch_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSgtsvInterleavedBatch", {"hipsparseSgtsvInterleavedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgtsvInterleavedBatch", {"hipsparseDgtsvInterleavedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgtsvInterleavedBatch", {"hipsparseCgtsvInterleavedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgtsvInterleavedBatch", {"hipsparseZgtsvInterleavedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - // 10.5. Batched Pentadiagonal Solve - {"cusparseSgpsvInterleavedBatch_bufferSizeExt", {"hipsparseSgpsvInterleavedBatch_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgpsvInterleavedBatch_bufferSizeExt", {"hipsparseDgpsvInterleavedBatch_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgpsvInterleavedBatch_bufferSizeExt", {"hipsparseCgpsvInterleavedBatch_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgpsvInterleavedBatch_bufferSizeExt", {"hipsparseZgpsvInterleavedBatch_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSgpsvInterleavedBatch", {"hipsparseSgpsvInterleavedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgpsvInterleavedBatch", {"hipsparseDgpsvInterleavedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgpsvInterleavedBatch", {"hipsparseCgpsvInterleavedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgpsvInterleavedBatch", {"hipsparseZgpsvInterleavedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - // 11. cuSPARSE Matrix Reorderings Reference - {"cusparseScsrcolor", {"hipsparseScsrcolor", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsrcolor", {"hipsparseDcsrcolor", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsrcolor", {"hipsparseCcsrcolor", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsrcolor", {"hipsparseZcsrcolor", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - // 12. cuSPARSE Format Conversion Reference - {"cusparseSbsr2csr", {"hipsparseSbsr2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDbsr2csr", {"hipsparseDbsr2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCbsr2csr", {"hipsparseCbsr2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZbsr2csr", {"hipsparseZbsr2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSgebsr2gebsc_bufferSize", {"hipsparseSgebsr2gebsc_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSgebsr2gebsc_bufferSizeExt", {"hipsparseSgebsr2gebsc_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgebsr2gebsc_bufferSize", {"hipsparseDgebsr2gebsc_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgebsr2gebsc_bufferSizeExt", {"hipsparseDgebsr2gebsc_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgebsr2gebsc_bufferSize", {"hipsparseCgebsr2gebsc_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgebsr2gebsc_bufferSizeExt", {"hipsparseCgebsr2gebsc_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgebsr2gebsc_bufferSize", {"hipsparseZgebsr2gebsc_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgebsr2gebsc_bufferSizeExt", {"hipsparseZgebsr2gebsc_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSgebsr2gebsc", {"hipsparseSgebsr2gebsc", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgebsr2gebsc", {"hipsparseDgebsr2gebsc", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgebsr2gebsc", {"hipsparseCgebsr2gebsc", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgebsr2gebsc", {"hipsparseZgebsr2gebsc", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSgebsr2gebsr_bufferSize", {"hipsparseSgebsr2gebsr_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSgebsr2gebsr_bufferSizeExt", {"hipsparseSgebsr2gebsr_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgebsr2gebsr_bufferSize", {"hipsparseDgebsr2gebsr_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgebsr2gebsr_bufferSizeExt", {"hipsparseDgebsr2gebsr_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgebsr2gebsr_bufferSize", {"hipsparseCgebsr2gebsr_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgebsr2gebsr_bufferSizeExt", {"hipsparseCgebsr2gebsr_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgebsr2gebsr_bufferSize", {"hipsparseZgebsr2gebsr_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgebsr2gebsr_bufferSizeExt", {"hipsparseZgebsr2gebsr_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseXgebsr2csr", {"hipsparseXgebsr2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSgebsr2csr", {"hipsparseSgebsr2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgebsr2csr", {"hipsparseDgebsr2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgebsr2csr", {"hipsparseCgebsr2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgebsr2csr", {"hipsparseZgebsr2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseXgebsr2gebsrNnz", {"hipsparseXgebsr2gebsrNnz", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSgebsr2gebsr", {"hipsparseSgebsr2gebsr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDgebsr2gebsr", {"hipsparseDgebsr2gebsr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCgebsr2gebsr", {"hipsparseCgebsr2gebsr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZgebsr2gebsr", {"hipsparseZgebsr2gebsr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseScsr2gebsr_bufferSize", {"hipsparseScsr2gebsr_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseScsr2gebsr_bufferSizeExt", {"hipsparseScsr2gebsr_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsr2gebsr_bufferSize", {"hipsparseDcsr2gebsr_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsr2gebsr_bufferSizeExt", {"hipsparseDcsr2gebsr_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsr2gebsr_bufferSize", {"hipsparseCcsr2gebsr_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsr2gebsr_bufferSizeExt", {"hipsparseCcsr2gebsr_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsr2gebsr_bufferSize", {"hipsparseZcsr2gebsr_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsr2gebsr_bufferSizeExt", {"hipsparseZcsr2gebsr_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseXcsr2gebsrNnz", {"hipsparseXcsr2gebsrNnz", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseScsr2gebsr", {"hipsparseScsr2gebsr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsr2gebsr", {"hipsparseDcsr2gebsr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsr2gebsr", {"hipsparseCcsr2gebsr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsr2gebsr", {"hipsparseZcsr2gebsr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseXcoo2csr", {"hipsparseXcoo2csr", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseScsc2dense", {"hipsparseScsc2dense", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsc2dense", {"hipsparseDcsc2dense", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsc2dense", {"hipsparseCcsc2dense", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsc2dense", {"hipsparseZcsc2dense", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseScsc2hyb", {"hipsparseScsc2hyb", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsc2hyb", {"hipsparseDcsc2hyb", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsc2hyb", {"hipsparseCcsc2hyb", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsc2hyb", {"hipsparseZcsc2hyb", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseXcsr2bsrNnz", {"hipsparseXcsr2bsrNnz", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseScsr2bsr", {"hipsparseScsr2bsr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsr2bsr", {"hipsparseDcsr2bsr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsr2bsr", {"hipsparseCcsr2bsr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsr2bsr", {"hipsparseZcsr2bsr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseXcsr2coo", {"hipsparseXcsr2coo", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseScsr2csc", {"hipsparseScsr2csc", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsr2csc", {"hipsparseDcsr2csc", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCcsr2csc", {"hipsparseCcsr2csc", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsr2csc", {"hipsparseZcsr2csc", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseCsr2cscEx", {"hipsparseCsr2cscEx", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCsr2cscEx2", {"hipsparseCsr2cscEx2", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCsr2cscEx2_bufferSize", {"hipsparseCsr2cscEx2_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseScsr2dense", {"hipsparseScsr2dense", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsr2dense", {"hipsparseDcsr2dense", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsr2dense", {"hipsparseCcsr2dense", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsr2dense", {"hipsparseZcsr2dense", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseScsr2csr_compress", {"hipsparseScsr2csr_compress", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsr2csr_compress", {"hipsparseDcsr2csr_compress", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsr2csr_compress", {"hipsparseCcsr2csr_compress", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsr2csr_compress", {"hipsparseZcsr2csr_compress", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseScsr2hyb", {"hipsparseScsr2hyb", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDcsr2hyb", {"hipsparseDcsr2hyb", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCcsr2hyb", {"hipsparseCcsr2hyb", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZcsr2hyb", {"hipsparseZcsr2hyb", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseSdense2csc", {"hipsparseSdense2csc", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDdense2csc", {"hipsparseDdense2csc", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCdense2csc", {"hipsparseCdense2csc", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZdense2csc", {"hipsparseZdense2csc", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSdense2csr", {"hipsparseSdense2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDdense2csr", {"hipsparseDdense2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCdense2csr", {"hipsparseCdense2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZdense2csr", {"hipsparseZdense2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSdense2hyb", {"hipsparseSdense2hyb", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDdense2hyb", {"hipsparseDdense2hyb", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCdense2hyb", {"hipsparseCdense2hyb", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZdense2hyb", {"hipsparseZdense2hyb", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseShyb2csc", {"hipsparseShyb2csc", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDhyb2csc", {"hipsparseDhyb2csc", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseChyb2csc", {"hipsparseChyb2csc", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZhyb2csc", {"hipsparseZhyb2csc", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseShyb2csr", {"hipsparseShyb2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDhyb2csr", {"hipsparseDhyb2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseChyb2csr", {"hipsparseChyb2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZhyb2csr", {"hipsparseZhyb2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseShyb2dense", {"hipsparseShyb2dense", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDhyb2dense", {"hipsparseDhyb2dense", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseChyb2dense", {"hipsparseChyb2dense", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZhyb2dense", {"hipsparseZhyb2dense", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSnnz", {"hipsparseSnnz", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseDnnz", {"hipsparseDnnz", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseCnnz", {"hipsparseCnnz", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseZnnz", {"hipsparseZnnz", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseCreateIdentityPermutation", {"hipsparseCreateIdentityPermutation", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseXcoosort_bufferSizeExt", {"hipsparseXcoosort_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseXcoosortByRow", {"hipsparseXcoosortByRow", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseXcoosortByColumn", {"hipsparseXcoosortByColumn", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseXcsrsort_bufferSizeExt", {"hipsparseXcsrsort_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseXcsrsort", {"hipsparseXcsrsort", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseXcscsort_bufferSizeExt", {"hipsparseXcscsort_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE}}, - {"cusparseXcscsort", {"hipsparseXcscsort", "", CONV_LIB_FUNC, API_SPARSE}}, - - {"cusparseCreateCsru2csrInfo", {"hipsparseCreateCsru2csrInfo", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDestroyCsru2csrInfo", {"hipsparseDestroyCsru2csrInfo", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseScsru2csr_bufferSizeExt", {"hipsparseScsru2csr_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsru2csr_bufferSizeExt", {"hipsparseDcsru2csr_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsru2csr_bufferSizeExt", {"hipsparseCcsru2csr_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsru2csr_bufferSizeExt", {"hipsparseZcsru2csr_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseScsr2csru", {"hipsparseScsr2csru", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDcsr2csru", {"hipsparseDcsr2csru", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCcsr2csru", {"hipsparseCcsr2csru", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZcsr2csru", {"hipsparseZcsr2csru", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseHpruneDense2csr", {"hipsparseHpruneDense2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpruneDense2csr", {"hipsparseSpruneDense2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDpruneDense2csr", {"hipsparseDpruneDense2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseHpruneDense2csr_bufferSizeExt", {"hipsparseHpruneDense2csr_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpruneDense2csr_bufferSizeExt", {"hipsparseSpruneDense2csr_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDpruneDense2csr_bufferSizeExt", {"hipsparseDpruneDense2csr_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseHpruneDense2csrNnz", {"hipsparseHpruneDense2csrNnz", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpruneDense2csrNnz", {"hipsparseSpruneDense2csrNnz", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDpruneDense2csrNnz", {"hipsparseDpruneDense2csrNnz", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseHpruneCsr2csr", {"hipsparseHpruneCsr2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpruneCsr2csr", {"hipsparseSpruneCsr2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDpruneCsr2csr", {"hipsparseDpruneCsr2csr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseHpruneCsr2csr_bufferSizeExt", {"hipsparseHpruneCsr2csr_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpruneCsr2csr_bufferSizeExt", {"hipsparseSpruneCsr2csr_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDpruneCsr2csr_bufferSizeExt", {"hipsparseDpruneCsr2csr_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseHpruneCsr2csrNnz", {"hipsparseHpruneCsr2csrNnz", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpruneCsr2csrNnz", {"hipsparseSpruneCsr2csrNnz", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDpruneCsr2csrNnz", {"hipsparseDpruneCsr2csrNnz", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseHpruneDense2csrByPercentage", {"hipsparseHpruneDense2csrByPercentage", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpruneDense2csrByPercentage", {"hipsparseSpruneDense2csrByPercentage", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDpruneDense2csrByPercentage", {"hipsparseDpruneDense2csrByPercentage", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseHpruneDense2csrByPercentage_bufferSizeExt", {"hipsparseHpruneDense2csrByPercentage_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpruneDense2csrByPercentage_bufferSizeExt", {"hipsparseSpruneDense2csrByPercentage_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDpruneDense2csrByPercentage_bufferSizeExt", {"hipsparseDpruneDense2csrByPercentage_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseHpruneDense2csrNnzByPercentage", {"hipsparseHpruneDense2csrNnzByPercentage", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpruneDense2csrNnzByPercentage", {"hipsparseSpruneDense2csrNnzByPercentage", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDpruneDense2csrNnzByPercentage", {"hipsparseDpruneDense2csrNnzByPercentage", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseHpruneCsr2csrByPercentage", {"hipsparseHpruneCsr2csrByPercentage", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpruneCsr2csrByPercentage", {"hipsparseSpruneCsr2csrByPercentage", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDpruneCsr2csrByPercentage", {"hipsparseDpruneCsr2csrByPercentage", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseHpruneCsr2csrByPercentage_bufferSizeExt", {"hipsparseHpruneCsr2csrByPercentage_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpruneCsr2csrByPercentage_bufferSizeExt", {"hipsparseSpruneCsr2csrByPercentage_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDpruneCsr2csrByPercentage_bufferSizeExt", {"hipsparseDpruneCsr2csrByPercentage_bufferSizeExt", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseHpruneCsr2csrNnzByPercentage", {"hipsparseHpruneCsr2csrNnzByPercentage", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpruneCsr2csrNnzByPercentage", {"hipsparseSpruneCsr2csrNnzByPercentage", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDpruneCsr2csrNnzByPercentage", {"hipsparseDpruneCsr2csrNnzByPercentage", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSnnz_compress", {"hipsparseSnnz_compress", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDnnz_compress", {"hipsparseDnnz_compress", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCnnz_compress", {"hipsparseCnnz_compress", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseZnnz_compress", {"hipsparseZnnz_compress", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - // 13. cuSPARSE Generic API Reference - // Generic Sparse API helper functions - // Sparse Matrix descriptor - {"cusparseCreateCoo", {"hipsparseCreateCoo", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCreateCooAoS", {"hipsparseCreateCooAoS", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCreateCsr", {"hipsparseCreateCsr", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDestroySpMat", {"hipsparseDestroySpMat", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCooGet", {"hipsparseCooGet", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCooAoSGet", {"hipsparseCooAoSGet", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseCsrGet", {"hipsparseCsrGet", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpMatGetFormat", {"hipsparseSpMatGetFormat", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpMatGetIndexBase", {"hipsparseSpMatGetIndexBase", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpMatGetValues", {"hipsparseSpMatGetValues", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpMatSetValues", {"hipsparseSpMatSetValues", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpMatGetStridedBatch", {"hipsparseSpMatGetStridedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpMatSetStridedBatch", {"hipsparseSpMatSetStridedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpMatSetNumBatches", {"hipsparseSpMatSetNumBatches", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpMatGetNumBatches", {"hipsparseSpMatGetNumBatches", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - // Sparse Vector descriptor - {"cusparseCreateSpVec", {"hipsparseCreateSpVec", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDestroySpVec", {"hipsparseDestroySpVec", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpVecGet", {"hipsparseSpVecGet", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpVecGetIndexBase", {"hipsparseSpVecGetIndexBase", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpVecGetValues", {"hipsparseSpVecGetValues", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpVecSetValues", {"hipsparseSpVecSetValues", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - // Generic Dense API helper functions - // Dense Matrix descriptor - {"cusparseCreateDnMat", {"hipsparseCreateDnMat", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDestroyDnMat", {"hipsparseDestroyDnMat", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDnMatGet", {"hipsparseDnMatGet", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDnMatGetValues", {"hipsparseDnMatGetValues", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDnMatSetValues", {"hipsparseDnMatSetValues", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDnMatSetStridedBatch", {"hipsparseDnMatSetStridedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDnMatGetStridedBatch", {"hipsparseDnMatGetStridedBatch", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - // Dense Vector descriptor - {"cusparseCreateDnVec", {"hipsparseCreateDnVec", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDestroyDnVec", {"hipsparseDestroyDnVec", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDnVecGet", {"hipsparseDnVecGet", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDnVecGetValues", {"hipsparseDnVecGetValues", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDnVecSetValues", {"hipsparseDnVecSetValues", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - // Sparse Matrix * Matrix Multiplication - {"cusparseSpMM", {"hipsparseSpMM", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpMM_bufferSize", {"hipsparseSpMM_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - // Sparse Vector * Vector Multiplication - {"cusparseSpVV", {"hipsparseSpVV", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpVV_bufferSize", {"hipsparseSpVV_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - - // Sparse Matrix * Vector Multiplication - {"cusparseSpMV", {"hipsparseSpMV", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpMV_bufferSize", {"hipsparseSpMV_bufferSize", "", CONV_LIB_FUNC, API_SPARSE, HIP_UNSUPPORTED}}, -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_SPARSE_API_types.cpp b/hipamd/hipify-clang/src/CUDA2HIP_SPARSE_API_types.cpp deleted file mode 100644 index aae85a50d3..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_SPARSE_API_types.cpp +++ /dev/null @@ -1,187 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "CUDA2HIP.h" - -// Maps the names of CUDA SPARSE API types to the corresponding HIP types -const std::map CUDA_SPARSE_TYPE_NAME_MAP{ - - // 1. Structs - {"cusparseContext", {"hipsparseContext", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseHandle_t", {"hipsparseHandle_t", "", CONV_TYPE, API_SPARSE}}, - - {"cusparseHybMat", {"hipsparseHybMat", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseHybMat_t", {"hipsparseHybMat_t", "", CONV_TYPE, API_SPARSE}}, - - {"cusparseMatDescr", {"hipsparseMatDescr", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseMatDescr_t", {"hipsparseMatDescr_t", "", CONV_TYPE, API_SPARSE}}, - - {"cusparseSolveAnalysisInfo", {"hipsparseSolveAnalysisInfo", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSolveAnalysisInfo_t", {"hipsparseSolveAnalysisInfo_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - - {"csrsv2Info", {"csrsv2Info", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"csrsv2Info_t", {"csrsv2Info_t", "", CONV_TYPE, API_SPARSE}}, - - {"csrsm2Info", {"csrsm2Info", "", CONV_TYPE, API_SPARSE}}, - {"csrsm2Info_t", {"csrsm2Info_t", "", CONV_TYPE, API_SPARSE}}, - - {"bsrsv2Info", {"bsrsv2Info", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"bsrsv2Info_t", {"bsrsv2Info_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - - {"bsrsm2Info", {"bsrsm2Info", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"bsrsm2Info_t", {"bsrsm2Info_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - - {"bsric02Info", {"bsric02Info", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"bsric02Info_t", {"bsric02Info_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - - {"csrilu02Info", {"csrilu02Info", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"csrilu02Info_t", {"csrilu02Info_t", "", CONV_TYPE, API_SPARSE}}, - - {"bsrilu02Info", {"bsrilu02Info", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"bsrilu02Info_t", {"bsrilu02Info_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - - {"csru2csrInfo", {"csru2csrInfo", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"csru2csrInfo_t", {"csru2csrInfo_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - - {"csrgemm2Info", {"csrgemm2Info", "", CONV_TYPE, API_SPARSE}}, - {"csrgemm2Info_t", {"csrgemm2Info_t", "", CONV_TYPE, API_SPARSE}}, - - {"cusparseColorInfo", {"hipsparseColorInfo", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseColorInfo_t", {"hipsparseColorInfo_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - - {"pruneInfo", {"pruneInfo", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"pruneInfo_t", {"pruneInfo_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSpMatDescr", {"hipsparseSpMatDescr", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpMatDescr_t", {"hipsparseSpMatDescr_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseDnMatDescr", {"hipsparseDnMatDescr", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDnMatDescr_t", {"hipsparseDnMatDescr_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSpVecDescr", {"hipsparseSpVecDescr", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseSpVecDescr_t", {"hipsparseSpVecDescr_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseDnVecDescr", {"hipsparseDnVecDescr", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"cusparseDnVecDescr_t", {"hipsparseDnVecDescr_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - - // 2. Enums - {"cusparseAction_t", {"hipsparseAction_t", "", CONV_TYPE, API_SPARSE}}, - {"CUSPARSE_ACTION_SYMBOLIC", {"HIPSPARSE_ACTION_SYMBOLIC", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_ACTION_NUMERIC", {"HIPSPARSE_ACTION_NUMERIC", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - - {"cusparseDirection_t", {"hipsparseDirection_t", "", CONV_TYPE, API_SPARSE}}, - {"CUSPARSE_DIRECTION_ROW", {"HIPSPARSE_DIRECTION_ROW", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_DIRECTION_COLUMN", {"HIPSPARSE_DIRECTION_COLUMN", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - - {"cusparseHybPartition_t", {"hipsparseHybPartition_t", "", CONV_TYPE, API_SPARSE}}, - {"CUSPARSE_HYB_PARTITION_AUTO", {"HIPSPARSE_HYB_PARTITION_AUTO", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_HYB_PARTITION_USER", {"HIPSPARSE_HYB_PARTITION_USER", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_HYB_PARTITION_MAX", {"HIPSPARSE_HYB_PARTITION_MAX", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - - {"cusparseDiagType_t", {"hipsparseDiagType_t", "", CONV_TYPE, API_SPARSE}}, - {"CUSPARSE_DIAG_TYPE_NON_UNIT", {"HIPSPARSE_DIAG_TYPE_NON_UNIT", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_DIAG_TYPE_UNIT", {"HIPSPARSE_DIAG_TYPE_UNIT", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - - {"cusparseFillMode_t", {"hipsparseFillMode_t", "", CONV_TYPE, API_SPARSE}}, - {"CUSPARSE_FILL_MODE_LOWER", {"HIPSPARSE_FILL_MODE_LOWER", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_FILL_MODE_UPPER", {"HIPSPARSE_FILL_MODE_UPPER", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - - {"cusparseIndexBase_t", {"hipsparseIndexBase_t", "", CONV_TYPE, API_SPARSE}}, - {"CUSPARSE_INDEX_BASE_ZERO", {"HIPSPARSE_INDEX_BASE_ZERO", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_INDEX_BASE_ONE", {"HIPSPARSE_INDEX_BASE_ONE", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - - {"cusparseMatrixType_t", {"hipsparseMatrixType_t", "", CONV_TYPE, API_SPARSE}}, - {"CUSPARSE_MATRIX_TYPE_GENERAL", {"HIPSPARSE_MATRIX_TYPE_GENERAL", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_MATRIX_TYPE_SYMMETRIC", {"HIPSPARSE_MATRIX_TYPE_SYMMETRIC", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_MATRIX_TYPE_HERMITIAN", {"HIPSPARSE_MATRIX_TYPE_HERMITIAN", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_MATRIX_TYPE_TRIANGULAR", {"HIPSPARSE_MATRIX_TYPE_TRIANGULAR", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - - {"cusparseOperation_t", {"hipsparseOperation_t", "", CONV_TYPE, API_SPARSE}}, - {"CUSPARSE_OPERATION_NON_TRANSPOSE", {"HIPSPARSE_OPERATION_NON_TRANSPOSE", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_OPERATION_TRANSPOSE", {"HIPSPARSE_OPERATION_TRANSPOSE", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_OPERATION_CONJUGATE_TRANSPOSE", {"HIPSPARSE_OPERATION_CONJUGATE_TRANSPOSE", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - - {"cusparsePointerMode_t", {"hipsparsePointerMode_t", "", CONV_TYPE, API_SPARSE}}, - {"CUSPARSE_POINTER_MODE_HOST", {"HIPSPARSE_POINTER_MODE_HOST", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_POINTER_MODE_DEVICE", {"HIPSPARSE_POINTER_MODE_DEVICE", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - - {"cusparseAlgMode_t", {"hipsparseAlgMode_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_ALG0", {"CUSPARSE_ALG0", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_ALG1", {"CUSPARSE_ALG1", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_ALG_NAIVE", {"CUSPARSE_ALG_NAIVE", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_ALG_MERGE_PATH", {"CUSPARSE_ALG_MERGE_PATH", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSolvePolicy_t", {"hipsparseSolvePolicy_t", "", CONV_TYPE, API_SPARSE}}, - {"CUSPARSE_SOLVE_POLICY_NO_LEVEL", {"HIPSPARSE_SOLVE_POLICY_NO_LEVEL", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_SOLVE_POLICY_USE_LEVEL", {"HIPSPARSE_SOLVE_POLICY_USE_LEVEL", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - - {"cusparseStatus_t", {"hipsparseStatus_t", "", CONV_TYPE, API_SPARSE}}, - {"CUSPARSE_STATUS_SUCCESS", {"HIPSPARSE_STATUS_SUCCESS", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_STATUS_NOT_INITIALIZED", {"HIPSPARSE_STATUS_NOT_INITIALIZED", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_STATUS_ALLOC_FAILED", {"HIPSPARSE_STATUS_ALLOC_FAILED", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_STATUS_INVALID_VALUE", {"HIPSPARSE_STATUS_INVALID_VALUE", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_STATUS_ARCH_MISMATCH", {"HIPSPARSE_STATUS_ARCH_MISMATCH", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_STATUS_MAPPING_ERROR", {"HIPSPARSE_STATUS_MAPPING_ERROR", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_STATUS_EXECUTION_FAILED", {"HIPSPARSE_STATUS_EXECUTION_FAILED", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_STATUS_INTERNAL_ERROR", {"HIPSPARSE_STATUS_INTERNAL_ERROR", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED", {"HIPSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - {"CUSPARSE_STATUS_ZERO_PIVOT", {"HIPSPARSE_STATUS_ZERO_PIVOT", "", CONV_NUMERIC_LITERAL, API_SPARSE}}, - - {"cusparseCsr2CscAlg_t", {"hipsparseCsr2CscAlg_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_CSR2CSC_ALG1", {"HIPSPARSE_CSR2CSC_ALG1", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_CSR2CSC_ALG2", {"HIPSPARSE_CSR2CSC_ALG2", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseFormat_t", {"hipsparseFormat_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_FORMAT_CSR", {"HIPSPARSE_FORMAT_CSR", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_FORMAT_CSC", {"HIPSPARSE_FORMAT_CSC", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_FORMAT_COO", {"HIPSPARSE_FORMAT_COO", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_FORMAT_COO_AOS", {"HIPSPARSE_FORMAT_COO_AOS", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseOrder_t", {"hipsparseOrder_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_ORDER_COL", {"HIPSPARSE_ORDER_COL", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_ORDER_ROW", {"HIPSPARSE_ORDER_ROW", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSpMVAlg_t", {"hipsparseSpMVAlg_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_MV_ALG_DEFAULT", {"HIPSPARSE_MV_ALG_DEFAULT", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_COOMV_ALG", {"HIPSPARSE_COOMV_ALG", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_CSRMV_ALG1", {"HIPSPARSE_CSRMV_ALG1", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_CSRMV_ALG2", {"HIPSPARSE_CSRMV_ALG2", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseSpMMAlg_t", {"hipsparseSpMMAlg_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_MM_ALG_DEFAULT", {"HIPSPARSE_MM_ALG_DEFAULT", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_COOMM_ALG1", {"HIPSPARSE_COOMM_ALG1", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_COOMM_ALG2", {"HIPSPARSE_COOMM_ALG2", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_COOMM_ALG3", {"HIPSPARSE_COOMM_ALG3", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_CSRMM_ALG1", {"HIPSPARSE_CSRMM_ALG1", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - - {"cusparseIndexType_t", {"hipsparseIndexType_t", "", CONV_TYPE, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_INDEX_16U", {"HIPSPARSE_INDEX_16U", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_INDEX_32I", {"HIPSPARSE_INDEX_32I", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_INDEX_64I", {"HIPSPARSE_INDEX_64I", "", CONV_NUMERIC_LITERAL, API_SPARSE, HIP_UNSUPPORTED}}, - - // 3. Defines - {"CUSPARSE_VER_MAJOR", {"HIPSPARSE_VER_MAJOR", "", CONV_DEFINE, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_VER_MINOR", {"HIPSPARSE_VER_MINOR", "", CONV_DEFINE, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_VER_PATCH", {"HIPSPARSE_VER_PATCH", "", CONV_DEFINE, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_VER_BUILD", {"HIPSPARSE_VER_BUILD", "", CONV_DEFINE, API_SPARSE, HIP_UNSUPPORTED}}, - {"CUSPARSE_VERSION", {"HIPSPARSE_VERSION", "", CONV_DEFINE, API_SPARSE, HIP_UNSUPPORTED}}, -}; diff --git a/hipamd/hipify-clang/src/CUDA2HIP_Scripting.h b/hipamd/hipify-clang/src/CUDA2HIP_Scripting.h deleted file mode 100644 index 76b103735b..0000000000 --- a/hipamd/hipify-clang/src/CUDA2HIP_Scripting.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#pragma once - -extern std::set DeviceSymbolFunctions0; -extern std::set DeviceSymbolFunctions1; -extern std::set ReinterpretFunctions0; -extern std::set ReinterpretFunctions1; - -extern std::string sHIP_SYMBOL; -extern std::string s_reinterpret_cast; - -namespace perl { - - bool generate(bool Generate = true); -} - -namespace python { - - bool generate(bool Generate = true); -} diff --git a/hipamd/hipify-clang/src/HipifyAction.cpp b/hipamd/hipify-clang/src/HipifyAction.cpp deleted file mode 100644 index 75138c47ab..0000000000 --- a/hipamd/hipify-clang/src/HipifyAction.cpp +++ /dev/null @@ -1,755 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include -#include -#include "HipifyAction.h" -#include "clang/Basic/SourceLocation.h" -#include "clang/Frontend/CompilerInstance.h" -#include "clang/ASTMatchers/ASTMatchFinder.h" -#include "clang/ASTMatchers/ASTMatchers.h" -#include "clang/Lex/HeaderSearch.h" -#include "LLVMCompat.h" -#include "CUDA2HIP.h" -#include "StringUtils.h" -#include "ArgParse.h" - -const std::string sHIP = "HIP"; -const std::string sROC = "ROC"; -const std::string sCub = "cub"; -const std::string sHipcub = "hipcub"; -const std::string sHIP_DYNAMIC_SHARED = "HIP_DYNAMIC_SHARED"; -const std::string sHIP_KERNEL_NAME = "HIP_KERNEL_NAME"; -std::string sHIP_SYMBOL = "HIP_SYMBOL"; -std::string s_reinterpret_cast = "reinterpret_cast"; -const std::string sHipLaunchKernelGGL = "hipLaunchKernelGGL"; -const std::string sDim3 = "dim3("; -const std::string s_hiprand_kernel_h = "hiprand_kernel.h"; -const std::string s_hiprand_h = "hiprand.h"; -const std::string sOnce = "once"; -const std::string s_string_literal = "[string literal]"; -// CUDA identifiers, used in matchers -const std::string sCudaMemcpyToSymbol = "cudaMemcpyToSymbol"; -const std::string sCudaMemcpyToSymbolAsync = "cudaMemcpyToSymbolAsync"; -const std::string sCudaGetSymbolSize = "cudaGetSymbolSize"; -const std::string sCudaGetSymbolAddress = "cudaGetSymbolAddress"; -const std::string sCudaMemcpyFromSymbol = "cudaMemcpyFromSymbol"; -const std::string sCudaMemcpyFromSymbolAsync = "cudaMemcpyFromSymbolAsync"; -const std::string sCudaFuncSetCacheConfig = "cudaFuncSetCacheConfig"; -const std::string sCudaFuncGetAttributes = "cudaFuncGetAttributes"; -// Matchers' names -const StringRef sCudaSharedIncompleteArrayVar = "cudaSharedIncompleteArrayVar"; -const StringRef sCudaLaunchKernel = "cudaLaunchKernel"; -const StringRef sCudaHostFuncCall = "cudaHostFuncCall"; -const StringRef sCudaDeviceFuncCall = "cudaDeviceFuncCall"; -const StringRef sCubNamespacePrefix = "cubNamespacePrefix"; -const StringRef sCubFunctionTemplateDecl = "cubFunctionTemplateDecl"; -const StringRef sCubUsingNamespaceDecl = "cubUsingNamespaceDecl"; - -std::set DeviceSymbolFunctions0 { - {sCudaMemcpyToSymbol}, - {sCudaMemcpyToSymbolAsync} -}; - -std::set DeviceSymbolFunctions1 { - {sCudaGetSymbolSize}, - {sCudaGetSymbolAddress}, - {sCudaMemcpyFromSymbol}, - {sCudaMemcpyFromSymbolAsync} -}; - -std::set ReinterpretFunctions{ - {sCudaFuncSetCacheConfig}, - {sCudaFuncGetAttributes} -}; - -std::set ReinterpretFunctions0{ - {sCudaFuncSetCacheConfig} -}; - -std::set ReinterpretFunctions1{ - {sCudaFuncGetAttributes} -}; - -void HipifyAction::RewriteString(StringRef s, clang::SourceLocation start) { - auto &SM = getCompilerInstance().getSourceManager(); - size_t begin = 0; - while ((begin = s.find("cu", begin)) != StringRef::npos) { - const size_t end = s.find_first_of(" ", begin + 4); - StringRef name = s.slice(begin, end); - const auto found = CUDA_RENAMES_MAP().find(name); - if (found != CUDA_RENAMES_MAP().end()) { - StringRef repName = Statistics::isToRoc(found->second) ? found->second.rocName : found->second.hipName; - hipCounter counter = {s_string_literal, "", ConvTypes::CONV_LITERAL, ApiTypes::API_RUNTIME, found->second.supportDegree}; - Statistics::current().incrementCounter(counter, name.str()); - if (!Statistics::isUnsupported(counter)) { - clang::SourceLocation sl = start.getLocWithOffset(begin + 1); - ct::Replacement Rep(SM, sl, name.size(), repName.str()); - clang::FullSourceLoc fullSL(sl, SM); - insertReplacement(Rep, fullSL); - } - } - if (end == StringRef::npos) break; - begin = end + 1; - } -} - -clang::SourceLocation HipifyAction::GetSubstrLocation(const std::string &str, const clang::SourceRange &sr) { - clang::SourceLocation sl(sr.getBegin()); - clang::SourceLocation end(sr.getEnd()); - auto &SM = getCompilerInstance().getSourceManager(); - size_t length = SM.getCharacterData(end) - SM.getCharacterData(sl); - StringRef sfull = StringRef(SM.getCharacterData(sl), length); - size_t offset = sfull.find(str); - if (offset > 0) { - sl = sl.getLocWithOffset(offset); - } - return sl; -} - -/** - * Look at, and consider altering, a given token. - * - * If it's not a CUDA identifier, nothing happens. - * If it's an unsupported CUDA identifier, a warning is emitted. - * Otherwise, the source file is updated with the corresponding hipification. - */ -void HipifyAction::RewriteToken(const clang::Token &t) { - // String literals containing CUDA references need fixing. - if (t.is(clang::tok::string_literal)) { - StringRef s(t.getLiteralData(), t.getLength()); - RewriteString(unquoteStr(s), t.getLocation()); - return; - } else if (!t.isAnyIdentifier()) { - // If it's neither a string nor an identifier, we don't care. - return; - } - StringRef name = t.getRawIdentifier(); - clang::SourceLocation sl = t.getLocation(); - FindAndReplace(name, sl, CUDA_RENAMES_MAP()); -} - -void HipifyAction::FindAndReplace(StringRef name, - clang::SourceLocation sl, - const std::map &repMap, - bool bReplace) { - const auto found = repMap.find(name); - if (found == repMap.end()) { - // So it's an identifier, but not CUDA? Boring. - return; - } - Statistics::current().incrementCounter(found->second, name.str()); - clang::DiagnosticsEngine &DE = getCompilerInstance().getDiagnostics(); - // Warn the user about unsupported identifier. - if (Statistics::isUnsupported(found->second)) { - std::string sWarn; - Statistics::isToRoc(found->second) ? sWarn = sROC : sWarn = sHIP; - sWarn = "" + sWarn; - const auto ID = DE.getCustomDiagID(clang::DiagnosticsEngine::Warning, "CUDA identifier is unsupported in %0."); - DE.Report(sl, ID) << sWarn; - return; - } - if (!bReplace) { - return; - } - StringRef repName = Statistics::isToRoc(found->second) ? found->second.rocName : found->second.hipName; - auto &SM = getCompilerInstance().getSourceManager(); - ct::Replacement Rep(SM, sl, name.size(), repName.str()); - clang::FullSourceLoc fullSL(sl, SM); - insertReplacement(Rep, fullSL); -} - -namespace { - -clang::SourceRange getReadRange(clang::SourceManager &SM, const clang::SourceRange &exprRange) { - clang::SourceLocation begin = exprRange.getBegin(); - clang::SourceLocation end = exprRange.getEnd(); - bool beginSafe = !SM.isMacroBodyExpansion(begin) || clang::Lexer::isAtStartOfMacroExpansion(begin, SM, clang::LangOptions{}); - bool endSafe = !SM.isMacroBodyExpansion(end) || clang::Lexer::isAtEndOfMacroExpansion(end, SM, clang::LangOptions{}); - if (beginSafe && endSafe) { - return {SM.getFileLoc(begin), SM.getFileLoc(end)}; - } else { - return {SM.getSpellingLoc(begin), SM.getSpellingLoc(end)}; - } -} - -clang::SourceRange getWriteRange(clang::SourceManager &SM, const clang::SourceRange &exprRange) { - clang::SourceLocation begin = exprRange.getBegin(); - clang::SourceLocation end = exprRange.getEnd(); - // If the range is contained within a macro, update the macro definition. - // Otherwise, use the file location and hope for the best. - if (!SM.isMacroBodyExpansion(begin) || !SM.isMacroBodyExpansion(end)) { - return {SM.getExpansionLoc(begin), SM.getExpansionLoc(end)}; - } - return {SM.getSpellingLoc(begin), SM.getSpellingLoc(end)}; -} - -StringRef readSourceText(clang::SourceManager &SM, const clang::SourceRange &exprRange) { - return clang::Lexer::getSourceText(clang::CharSourceRange::getTokenRange(getReadRange(SM, exprRange)), SM, clang::LangOptions(), nullptr); -} - -/** - * Get a string representation of the expression `arg`, unless it's a defaulting function - * call argument, in which case get a 0. Used for building argument lists to kernel calls. - */ -std::string stringifyZeroDefaultedArg(clang::SourceManager &SM, const clang::Expr *arg) { - if (clang::isa(arg)) return "0"; - else return std::string(readSourceText(SM, arg->getSourceRange())); -} - -} // anonymous namespace - -bool HipifyAction::Exclude(const hipCounter &hipToken) { - switch (hipToken.type) { - case CONV_INCLUDE_CUDA_MAIN_H: - switch (hipToken.apiType) { - case API_DRIVER: - case API_RUNTIME: - if (insertedRuntimeHeader) return true; - insertedRuntimeHeader = true; - return false; - case API_BLAS: - if (insertedBLASHeader) return true; - insertedBLASHeader = true; - return false; - case API_RAND: - if (hipToken.hipName == s_hiprand_kernel_h) { - if (insertedRAND_kernelHeader) return true; - insertedRAND_kernelHeader = true; - return false; - } else if (hipToken.hipName == s_hiprand_h) { - if (insertedRANDHeader) return true; - insertedRANDHeader = true; - return false; - } - case API_DNN: - if (insertedDNNHeader) return true; - insertedDNNHeader = true; - return false; - case API_FFT: - if (insertedFFTHeader) return true; - insertedFFTHeader = true; - return false; - case API_COMPLEX: - if (insertedComplexHeader) return true; - insertedComplexHeader = true; - return false; - case API_SPARSE: - if (insertedSPARSEHeader) return true; - insertedSPARSEHeader = true; - return false; - default: - return false; - } - return false; - case CONV_INCLUDE: - if (hipToken.hipName.empty()) return true; - switch (hipToken.apiType) { - case API_RAND: - if (hipToken.hipName == s_hiprand_kernel_h) { - if (insertedRAND_kernelHeader) return true; - insertedRAND_kernelHeader = true; - } - return false; - default: - return false; - } - return false; - default: - return false; - } - return false; -} - -void HipifyAction::InclusionDirective(clang::SourceLocation hash_loc, - const clang::Token&, - StringRef file_name, - bool is_angled, - clang::CharSourceRange filename_range, - const clang::FileEntry*, StringRef, - StringRef, const clang::Module*) { - auto &SM = getCompilerInstance().getSourceManager(); - if (!SM.isWrittenInMainFile(hash_loc)) return; - if (!firstHeader) { - firstHeader = true; - firstHeaderLoc = hash_loc; - } - const auto found = CUDA_INCLUDE_MAP.find(file_name); - if (found == CUDA_INCLUDE_MAP.end()) return; - bool exclude = Exclude(found->second); - Statistics::current().incrementCounter(found->second, file_name.str()); - clang::SourceLocation sl = filename_range.getBegin(); - if (Statistics::isUnsupported(found->second)) { - clang::DiagnosticsEngine &DE = getCompilerInstance().getDiagnostics(); - DE.Report(sl, DE.getCustomDiagID(clang::DiagnosticsEngine::Warning, "Unsupported CUDA header.")); - return; - } - clang::StringRef newInclude; - // Keep the same include type that the user gave. - if (!exclude) { - clang::SmallString<128> includeBuffer; - llvm::StringRef name = Statistics::isToRoc(found->second) ? found->second.rocName : found->second.hipName; - if (is_angled) newInclude = llvm::Twine("<" + name+ ">").toStringRef(includeBuffer); - else newInclude = llvm::Twine("\"" + name + "\"").toStringRef(includeBuffer); - } else { - // hashLoc is location of the '#', thus replacing the whole include directive by empty newInclude starting with '#'. - sl = hash_loc; - } - const char *B = SM.getCharacterData(sl); - const char *E = SM.getCharacterData(filename_range.getEnd()); - ct::Replacement Rep(SM, sl, E - B, newInclude.str()); - insertReplacement(Rep, clang::FullSourceLoc{sl, SM}); -} - -void HipifyAction::PragmaDirective(clang::SourceLocation Loc, clang::PragmaIntroducerKind Introducer) { - if (pragmaOnce) return; - auto &SM = getCompilerInstance().getSourceManager(); - if (!SM.isWrittenInMainFile(Loc)) return; - clang::Preprocessor &PP = getCompilerInstance().getPreprocessor(); - clang::Token tok; - PP.Lex(tok); - StringRef Text(SM.getCharacterData(tok.getLocation()), tok.getLength()); - if (Text == sOnce) { - pragmaOnce = true; - pragmaOnceLoc = tok.getEndLoc(); - } -} - -bool HipifyAction::cudaLaunchKernel(const mat::MatchFinder::MatchResult &Result) { - auto *launchKernel = Result.Nodes.getNodeAs(sCudaLaunchKernel); - if (!launchKernel) return false; - auto *calleeExpr = launchKernel->getCallee(); - if (!calleeExpr) return false; - auto *caleeDecl = launchKernel->getDirectCallee(); - if (!caleeDecl) return false; - auto *config = launchKernel->getConfig(); - if (!config) return false; - clang::SmallString<40> XStr; - llvm::raw_svector_ostream OS(XStr); - clang::LangOptions DefaultLangOptions; - auto *SM = Result.SourceManager; - clang::SourceRange sr = calleeExpr->getSourceRange(); - std::string kern = readSourceText(*SM, sr).str(); - OS << sHipLaunchKernelGGL << "("; - if (caleeDecl->isTemplateInstantiation()) { - OS << sHIP_KERNEL_NAME << "("; - std::string cub = sCub + "::"; - std::string hipcub; - const auto found = CUDA_CUB_TYPE_NAME_MAP.find(sCub); - if (found != CUDA_CUB_TYPE_NAME_MAP.end()) { - hipcub = found->second.hipName.str() + "::"; - } else { - hipcub = sHipcub + "::"; - } - size_t pos = kern.find(cub); - while (pos != std::string::npos) { - kern.replace(pos, cub.size(), hipcub); - pos = kern.find(cub, pos + hipcub.size()); - } - } - OS << kern; - if (caleeDecl->isTemplateInstantiation()) OS << ")"; - OS << ", "; - // Next up are the four kernel configuration parameters, the last two of which are optional and default to zero. - // Copy the two dimensional arguments verbatim. - for (unsigned int i = 0; i < 2; ++i) { - const std::string sArg = readSourceText(*SM, config->getArg(i)->getSourceRange()).str(); - bool bDim3 = std::equal(sDim3.begin(), sDim3.end(), sArg.c_str()); - OS << (bDim3 ? "" : sDim3) << sArg << (bDim3 ? "" : ")") << ", "; - } - // The stream/memory arguments default to zero if omitted. - OS << stringifyZeroDefaultedArg(*SM, config->getArg(2)) << ", "; - OS << stringifyZeroDefaultedArg(*SM, config->getArg(3)); - // If there are ordinary arguments to the kernel, just copy them verbatim into our new call. - int numArgs = launchKernel->getNumArgs(); - if (numArgs > 0) { - OS << ", "; - // Start of the first argument. - clang::SourceLocation argStart = llcompat::getBeginLoc(launchKernel->getArg(0)); - // End of the last argument. - clang::SourceLocation argEnd = llcompat::getEndLoc(launchKernel->getArg(numArgs - 1)); - OS << readSourceText(*SM, {argStart, argEnd}); - } - OS << ")"; - clang::SourceLocation launchKernelExprLocBeg = launchKernel->getExprLoc(); - clang::SourceLocation launchKernelExprLocEnd = launchKernelExprLocBeg.isMacroID() ? llcompat::getEndOfExpansionRangeForLoc(*SM, launchKernelExprLocBeg) : llcompat::getEndLoc(launchKernel); - clang::SourceLocation launchKernelEnd = llcompat::getEndLoc(launchKernel); - clang::BeforeThanCompare isBefore(*SM); - launchKernelExprLocEnd = isBefore(launchKernelEnd, launchKernelExprLocEnd) ? launchKernelExprLocEnd : launchKernelEnd; - clang::SourceRange replacementRange = getWriteRange(*SM, {launchKernelExprLocBeg, launchKernelExprLocEnd}); - clang::SourceLocation launchBeg = replacementRange.getBegin(); - clang::SourceLocation launchEnd = replacementRange.getEnd(); - if (isBefore(launchBeg, launchEnd)) { - size_t length = SM->getCharacterData(clang::Lexer::getLocForEndOfToken(launchEnd, 0, *SM, DefaultLangOptions)) - SM->getCharacterData(launchBeg); - ct::Replacement Rep(*SM, launchBeg, length, OS.str()); - clang::FullSourceLoc fullSL(launchBeg, *SM); - insertReplacement(Rep, fullSL); - hipCounter counter = {sHipLaunchKernelGGL, "", ConvTypes::CONV_KERNEL_LAUNCH, ApiTypes::API_RUNTIME}; - Statistics::current().incrementCounter(counter, sCudaLaunchKernel.str()); - return true; - } - return false; -} - -bool HipifyAction::cudaSharedIncompleteArrayVar(const mat::MatchFinder::MatchResult &Result) { - auto *sharedVar = Result.Nodes.getNodeAs(sCudaSharedIncompleteArrayVar); - if (!sharedVar) return false; - // Example: extern __shared__ uint sRadix1[]; - if (!sharedVar->hasExternalFormalLinkage()) return false; - clang::QualType QT = sharedVar->getType(); - std::string typeName; - if (QT->isIncompleteArrayType()) { - const clang::ArrayType *AT = QT.getTypePtr()->getAsArrayTypeUnsafe(); - QT = AT->getElementType(); - if (QT.getTypePtr()->isBuiltinType()) { - QT = QT.getCanonicalType(); - auto *BT = clang::dyn_cast(QT); - if (BT) { - clang::LangOptions LO; - LO.CUDA = true; - clang::PrintingPolicy policy(LO); - typeName = std::string(BT->getName(policy)); - } - } else { - typeName = QT.getAsString(); - } - } - if (!typeName.empty()) { - clang::SourceLocation slStart = sharedVar->getOuterLocStart(); - clang::SourceLocation slEnd = llcompat::getEndLoc(sharedVar->getTypeSourceInfo()->getTypeLoc()); - auto *SM = Result.SourceManager; - size_t repLength = SM->getCharacterData(slEnd) - SM->getCharacterData(slStart) + 1; - std::string varName = sharedVar->getNameAsString(); - std::string repName = sHIP_DYNAMIC_SHARED + "(" + typeName + ", " + varName + ")"; - ct::Replacement Rep(*SM, slStart, repLength, repName); - clang::FullSourceLoc fullSL(slStart, *SM); - insertReplacement(Rep, fullSL); - hipCounter counter = {sHIP_DYNAMIC_SHARED, "", ConvTypes::CONV_EXTERN_SHARED, ApiTypes::API_RUNTIME}; - Statistics::current().incrementCounter(counter, sCudaSharedIncompleteArrayVar.str()); - return true; - } - return false; -} - -bool HipifyAction::cudaDeviceFuncCall(const mat::MatchFinder::MatchResult &Result) { - if (const clang::CallExpr *call = Result.Nodes.getNodeAs(sCudaDeviceFuncCall)) { - auto *funcDcl = call->getDirectCallee(); - if (!funcDcl) return false; - FindAndReplace(funcDcl->getDeclName().getAsString(), llcompat::getBeginLoc(call), CUDA_DEVICE_FUNC_MAP, false); - return true; - } - return false; -} - -bool HipifyAction::cubNamespacePrefix(const mat::MatchFinder::MatchResult &Result) { - if (auto *decl = Result.Nodes.getNodeAs(sCubNamespacePrefix)) { - clang::QualType QT = decl->getUnderlyingType(); - auto *t = QT.getTypePtr(); - if (!t) return false; - const clang::ElaboratedType *et = t->getAs(); - if (!et) return false; - const clang::NestedNameSpecifier *nns = et->getQualifier(); - if (!nns) return false; - const clang::NamespaceDecl *nsd = nns->getAsNamespace(); - if (!nsd) return false; - const clang::TypeSourceInfo *si = decl->getTypeSourceInfo(); - const clang::TypeLoc tloc = si->getTypeLoc(); - const clang::SourceRange sr = tloc.getSourceRange(); - std::string name = nsd->getDeclName().getAsString(); - FindAndReplace(name, GetSubstrLocation(name, sr), CUDA_CUB_TYPE_NAME_MAP); - return true; - } - return false; -} - -bool HipifyAction::cubUsingNamespaceDecl(const mat::MatchFinder::MatchResult &Result) { - if (auto *decl = Result.Nodes.getNodeAs(sCubUsingNamespaceDecl)) { - if (auto nsd = decl->getNominatedNamespace()) { - FindAndReplace(nsd->getDeclName().getAsString(), decl->getIdentLocation(), CUDA_CUB_TYPE_NAME_MAP); - return true; - } - } - return false; -} - -bool HipifyAction::cubFunctionTemplateDecl(const mat::MatchFinder::MatchResult &Result) { - if (auto *decl = Result.Nodes.getNodeAs(sCubFunctionTemplateDecl)) { - auto *Tparams = decl->getTemplateParameters(); - bool ret = false; - for (size_t I = 0; I < Tparams->size(); ++I) { - const clang::ValueDecl *valueDecl = dyn_cast(Tparams->getParam(I)); - if (!valueDecl) continue; - clang::QualType QT = valueDecl->getType(); - auto *t = QT.getTypePtr(); - if (!t) continue; - const clang::ElaboratedType *et = t->getAs(); - if (!et) continue; - const clang::NestedNameSpecifier *nns = et->getQualifier(); - if (!nns) continue; - const clang::NamespaceDecl *nsd = nns->getAsNamespace(); - if (!nsd) continue; - const clang::SourceRange sr = valueDecl->getSourceRange(); - std::string name = nsd->getDeclName().getAsString(); - FindAndReplace(name, GetSubstrLocation(name, sr), CUDA_CUB_TYPE_NAME_MAP); - ret = true; - } - return ret; - } - return false; -} - -bool HipifyAction::cudaHostFuncCall(const mat::MatchFinder::MatchResult &Result) { - if (auto *call = Result.Nodes.getNodeAs(sCudaHostFuncCall)) { - if (!call->getNumArgs()) return false; - auto *funcDcl = call->getDirectCallee(); - if (!funcDcl) return false; - std::string sName = funcDcl->getDeclName().getAsString(); - unsigned int argNum = 0; - bool b_reinterpret = (ReinterpretFunctions.find(sName) != ReinterpretFunctions.end()) ? true : false; - if (DeviceSymbolFunctions0.find(sName) != DeviceSymbolFunctions0.end() || sCudaFuncSetCacheConfig == sName) { - argNum = 0; - } else if (call->getNumArgs() > 1 && (DeviceSymbolFunctions1.find(sName) != DeviceSymbolFunctions1.end() || sCudaFuncGetAttributes == sName)) { - argNum = 1; - } else { - return false; - } - clang::SmallString<40> XStr; - llvm::raw_svector_ostream OS(XStr); - clang::SourceRange sr = call->getArg(argNum)->getSourceRange(); - auto *SM = Result.SourceManager; - OS << (b_reinterpret ? s_reinterpret_cast : sHIP_SYMBOL) << "(" << readSourceText(*SM, sr) << ")"; - clang::SourceRange replacementRange = getWriteRange(*SM, { sr.getBegin(), sr.getEnd() }); - clang::SourceLocation s = replacementRange.getBegin(); - clang::SourceLocation e = replacementRange.getEnd(); - clang::LangOptions DefaultLangOptions; - size_t length = SM->getCharacterData(clang::Lexer::getLocForEndOfToken(e, 0, *SM, DefaultLangOptions)) - SM->getCharacterData(s); - ct::Replacement Rep(*SM, s, length, OS.str()); - clang::FullSourceLoc fullSL(s, *SM); - insertReplacement(Rep, fullSL); - return true; - } - return false; -} - -void HipifyAction::insertReplacement(const ct::Replacement &rep, const clang::FullSourceLoc &fullSL) { - llcompat::insertReplacement(*replacements, rep); - if (PrintStats) { - rep.getLength(); - Statistics::current().lineTouched(fullSL.getExpansionLineNumber()); - Statistics::current().bytesChanged(rep.getLength()); - } -} - -std::unique_ptr HipifyAction::CreateASTConsumer(clang::CompilerInstance &CI, StringRef) { - Finder.reset(new mat::MatchFinder); - // Replace the <<<...>>> language extension with a hip kernel launch - Finder->addMatcher(mat::cudaKernelCallExpr(mat::isExpansionInMainFile()).bind(sCudaLaunchKernel), this); - Finder->addMatcher( - mat::varDecl( - mat::isExpansionInMainFile(), - mat::allOf( - mat::hasAttr(clang::attr::CUDAShared), - mat::hasType(mat::incompleteArrayType()) - ) - ).bind(sCudaSharedIncompleteArrayVar), - this - ); - Finder->addMatcher( - mat::callExpr( - mat::isExpansionInMainFile(), - mat::callee( - mat::functionDecl( - mat::hasAnyName( - sCudaGetSymbolAddress, - sCudaGetSymbolSize, - sCudaMemcpyFromSymbol, - sCudaMemcpyFromSymbolAsync, - sCudaMemcpyToSymbol, - sCudaMemcpyToSymbolAsync, - sCudaFuncSetCacheConfig, - sCudaFuncGetAttributes - ) - ) - ) - ).bind(sCudaHostFuncCall), - this - ); - Finder->addMatcher( - mat::callExpr( - mat::isExpansionInMainFile(), - mat::callee( - mat::functionDecl( - mat::anyOf( - mat::hasAttr(clang::attr::CUDADevice), - mat::hasAttr(clang::attr::CUDAGlobal) - ), - mat::unless(mat::hasAttr(clang::attr::CUDAHost)) - ) - ) - ).bind(sCudaDeviceFuncCall), - this - ); - Finder->addMatcher( - mat::typedefDecl( - mat::isExpansionInMainFile(), - mat::hasType( - mat::elaboratedType( - mat::hasQualifier( - mat::specifiesNamespace( - mat::hasName(sCub) - ) - ) - ) - ) - ).bind(sCubNamespacePrefix), - this - ); - // TODO: Maybe worth to make it more concrete based on final cubFunctionTemplateDecl - Finder->addMatcher( - mat::functionTemplateDecl( - mat::isExpansionInMainFile() - ).bind(sCubFunctionTemplateDecl), - this - ); - // TODO: Maybe worth to make it more concrete - Finder->addMatcher( - mat::usingDirectiveDecl( - mat::isExpansionInMainFile() - ).bind(sCubUsingNamespaceDecl), - this - ); - // Ownership is transferred to the caller. - return Finder->newASTConsumer(); -} - -void HipifyAction::Ifndef(clang::SourceLocation Loc, const clang::Token &MacroNameTok, const clang::MacroDefinition &MD) { - auto &SM = getCompilerInstance().getSourceManager(); - if (!SM.isWrittenInMainFile(Loc)) return; - StringRef Text(SM.getCharacterData(MacroNameTok.getLocation()), MacroNameTok.getLength()); - Ifndefs.insert(std::make_pair(Text.str(), MacroNameTok.getEndLoc())); -} - -void HipifyAction::EndSourceFileAction() { - // Insert the hip header, if we didn't already do it by accident during substitution. - if (!insertedRuntimeHeader) { - // It's not sufficient to just replace CUDA headers with hip ones, because numerous CUDA headers are - // implicitly included by the compiler. Instead, we _delete_ CUDA headers, and unconditionally insert - // one copy of the hip include into every file. - bool placeForIncludeCalculated = false; - clang::SourceLocation sl, controllingMacroLoc; - auto &SM = getCompilerInstance().getSourceManager(); - clang::Preprocessor &PP = getCompilerInstance().getPreprocessor(); - clang::HeaderSearch &HS = PP.getHeaderSearchInfo(); - clang::ExternalPreprocessorSource *EPL = HS.getExternalLookup(); - const clang::FileEntry *FE = SM.getFileEntryForID(SM.getMainFileID()); - const clang::IdentifierInfo *controllingMacro = HS.getFileInfo(FE).getControllingMacro(EPL); - if (controllingMacro) { - auto found = Ifndefs.find(controllingMacro->getName().str()); - if (found != Ifndefs.end()) { - controllingMacroLoc = found->second; - placeForIncludeCalculated = true; - } - } - if (pragmaOnce) { - if (placeForIncludeCalculated) sl = pragmaOnceLoc < controllingMacroLoc ? pragmaOnceLoc : controllingMacroLoc; - else sl = pragmaOnceLoc; - placeForIncludeCalculated = true; - } - if (!placeForIncludeCalculated) { - if (firstHeader) sl = firstHeaderLoc; - else sl = SM.getLocForStartOfFile(SM.getMainFileID()); - } - clang::FullSourceLoc fullSL(sl, SM); - ct::Replacement Rep(SM, sl, 0, "\n#include \n"); - insertReplacement(Rep, fullSL); - } - clang::ASTFrontendAction::EndSourceFileAction(); -} - -namespace { - -/** - * A silly little class to proxy PPCallbacks back to the HipifyAction class. - */ -class PPCallbackProxy : public clang::PPCallbacks { - HipifyAction &hipifyAction; - -public: - explicit PPCallbackProxy(HipifyAction &action): hipifyAction(action) {} - - void InclusionDirective(clang::SourceLocation hash_loc, const clang::Token &include_token, - StringRef file_name, bool is_angled, clang::CharSourceRange filename_range, - const clang::FileEntry *file, StringRef search_path, StringRef relative_path, - const clang::Module *imported -#if LLVM_VERSION_MAJOR > 6 - , clang::SrcMgr::CharacteristicKind FileType -#endif - ) override { - hipifyAction.InclusionDirective(hash_loc, include_token, file_name, is_angled, filename_range, file, search_path, relative_path, imported); - } - - void PragmaDirective(clang::SourceLocation Loc, clang::PragmaIntroducerKind Introducer) override { - hipifyAction.PragmaDirective(Loc, Introducer); - } - - void Ifndef(clang::SourceLocation Loc, const clang::Token &MacroNameTok, const clang::MacroDefinition &MD) override { - hipifyAction.Ifndef(Loc, MacroNameTok, MD); - } -}; -} - -bool HipifyAction::BeginInvocation(clang::CompilerInstance &CI) { - llcompat::RetainExcludedConditionalBlocks(CI); - return true; -} - -void HipifyAction::ExecuteAction() { - clang::Preprocessor &PP = getCompilerInstance().getPreprocessor(); - auto &SM = getCompilerInstance().getSourceManager(); - // Start lexing the specified input file. - const llvm::MemoryBuffer *FromFile = SM.getBuffer(SM.getMainFileID()); - clang::Lexer RawLex(SM.getMainFileID(), FromFile, SM, PP.getLangOpts()); - RawLex.SetKeepWhitespaceMode(true); - // Perform a token-level rewrite of CUDA identifiers to hip ones. The raw-mode lexer gives us enough - // information to tell the difference between identifiers, string literals, and "other stuff". It also - // ignores preprocessor directives, so this transformation will operate inside preprocessor-deleted code. - clang::Token RawTok; - RawLex.LexFromRawLexer(RawTok); - while (RawTok.isNot(clang::tok::eof)) { - RewriteToken(RawTok); - RawLex.LexFromRawLexer(RawTok); - } - // Register yourself as the preprocessor callback, by proxy. - PP.addPPCallbacks(std::unique_ptr(new PPCallbackProxy(*this))); - // Now we're done futzing with the lexer, have the subclass proceeed with Sema and AST matching. - clang::ASTFrontendAction::ExecuteAction(); -} - -void HipifyAction::run(const mat::MatchFinder::MatchResult &Result) { - if (cudaLaunchKernel(Result)) return; - if (cudaSharedIncompleteArrayVar(Result)) return; - if (cudaHostFuncCall(Result)) return; - if (cudaDeviceFuncCall(Result)) return; - if (cubNamespacePrefix(Result)) return; - if (cubFunctionTemplateDecl(Result)) return; - if (cubUsingNamespaceDecl(Result)) return; -} diff --git a/hipamd/hipify-clang/src/HipifyAction.h b/hipamd/hipify-clang/src/HipifyAction.h deleted file mode 100644 index f70d17dd0b..0000000000 --- a/hipamd/hipify-clang/src/HipifyAction.h +++ /dev/null @@ -1,110 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#pragma once - -#include "clang/Lex/PPCallbacks.h" -#include "clang/Tooling/Tooling.h" -#include "clang/Tooling/Core/Replacement.h" -#include "clang/Frontend/FrontendAction.h" -#include "clang/ASTMatchers/ASTMatchFinder.h" -#include "ReplacementsFrontendActionFactory.h" -#include "Statistics.h" - -namespace ct = clang::tooling; -namespace mat = clang::ast_matchers; -using namespace llvm; - -/** - * A FrontendAction that hipifies CUDA programs. - */ -class HipifyAction : public clang::ASTFrontendAction, - public mat::MatchFinder::MatchCallback { -private: - ct::Replacements *replacements; - std::map Ifndefs; - std::unique_ptr Finder; - // CUDA implicitly adds its runtime header. We rewrite explicitly-provided CUDA includes with equivalent - // ones, and track - using this flag - if the result led to us including the hip runtime header. If it did - // not, we insert it at the top of the file when we finish processing it. - // This approach means we do the best it's possible to do w.r.t preserving the user's include order. - bool insertedRuntimeHeader = false; - bool insertedBLASHeader = false; - bool insertedRANDHeader = false; - bool insertedRAND_kernelHeader = false; - bool insertedDNNHeader = false; - bool insertedFFTHeader = false; - bool insertedSPARSEHeader = false; - bool insertedComplexHeader = false; - bool firstHeader = false; - bool pragmaOnce = false; - clang::SourceLocation firstHeaderLoc; - clang::SourceLocation pragmaOnceLoc; - // Rewrite a string literal to refer to hip, not CUDA. - void RewriteString(StringRef s, clang::SourceLocation start); - // Replace a CUDA identifier with the corresponding hip identifier, if applicable. - void RewriteToken(const clang::Token &t); - // Calculate str's SourceLocation in SourceRange sr - clang::SourceLocation GetSubstrLocation(const std::string &str, const clang::SourceRange &sr); - -public: - explicit HipifyAction(ct::Replacements *replacements): clang::ASTFrontendAction(), - replacements(replacements) {} - // MatchCallback listeners - bool cudaLaunchKernel(const mat::MatchFinder::MatchResult &Result); - bool cudaSharedIncompleteArrayVar(const mat::MatchFinder::MatchResult &Result); - bool cudaDeviceFuncCall(const mat::MatchFinder::MatchResult &Result); - bool cudaHostFuncCall(const mat::MatchFinder::MatchResult &Result); - bool cubNamespacePrefix(const mat::MatchFinder::MatchResult &Result); - bool cubFunctionTemplateDecl(const mat::MatchFinder::MatchResult &Result); - bool cubUsingNamespaceDecl(const mat::MatchFinder::MatchResult &Result); - // Called by the preprocessor for each include directive during the non-raw lexing pass. - void InclusionDirective(clang::SourceLocation hash_loc, - const clang::Token &include_token, - StringRef file_name, - bool is_angled, - clang::CharSourceRange filename_range, - const clang::FileEntry *file, - StringRef search_path, - StringRef relative_path, - const clang::Module *imported); - // Called by the preprocessor for each pragma directive during the non-raw lexing pass. - void PragmaDirective(clang::SourceLocation Loc, clang::PragmaIntroducerKind Introducer); - // Called by the preprocessor for each ifndef directive during the non-raw lexing pass. - // Found ifndef will be used in EndSourceFileAction() for catching include guard controlling macro. - void Ifndef(clang::SourceLocation Loc, const clang::Token &MacroNameTok, const clang::MacroDefinition &MD); - -protected: - // Add a Replacement for the current file. These will all be applied after executing the FrontendAction. - void insertReplacement(const ct::Replacement &rep, const clang::FullSourceLoc &fullSL); - // FrontendAction entry point. - void ExecuteAction() override; - // Callback before starting processing a single input; used by hipify-clang for setting Preprocessor options. - bool BeginInvocation(clang::CompilerInstance &CI) override; - // Called at the start of each new file to process. - void EndSourceFileAction() override; - // MatchCallback API entry point. Called by the AST visitor while searching the AST for things we registered an interest for. - void run(const mat::MatchFinder::MatchResult &Result) override; - std::unique_ptr CreateASTConsumer(clang::CompilerInstance &CI, StringRef InFile) override; - bool Exclude(const hipCounter &hipToken); - void FindAndReplace(StringRef name, clang::SourceLocation sl, const std::map &repMap, bool bReplace = true); -}; diff --git a/hipamd/hipify-clang/src/LLVMCompat.cpp b/hipamd/hipify-clang/src/LLVMCompat.cpp deleted file mode 100644 index f6d74121e4..0000000000 --- a/hipamd/hipify-clang/src/LLVMCompat.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "ArgParse.h" -#include "LLVMCompat.h" -#include "llvm/Support/Path.h" -#include "clang/Lex/PreprocessorOptions.h" -#include "clang/Frontend/CompilerInstance.h" - -const std::string sHipify = "[HIPIFY] ", sConflict = "conflict: ", sError = "error: ", sWarning = "warning: "; - -namespace llcompat { - -void PrintStackTraceOnErrorSignal() { - // The signature of PrintStackTraceOnErrorSignal changed in llvm 3.9. We don't support - // anything older than 3.8, so let's specifically detect the one old version we support. -#if (LLVM_VERSION_MAJOR == 3) && (LLVM_VERSION_MINOR == 8) - llvm::sys::PrintStackTraceOnErrorSignal(); -#else - llvm::sys::PrintStackTraceOnErrorSignal(StringRef()); -#endif -} - -ct::Replacements &getReplacements(ct::RefactoringTool &Tool, StringRef file) { -#if LLVM_VERSION_MAJOR > 3 - // getReplacements() now returns a map from filename to Replacements - so create an entry - // for this source file and return a reference to it. - return Tool.getReplacements()[std::string(file)]; -#else - return Tool.getReplacements(); -#endif -} - -void insertReplacement(ct::Replacements &replacements, const ct::Replacement &rep) { -#if LLVM_VERSION_MAJOR > 3 - // New clang added error checking to Replacements, and *insists* that you explicitly check it. - llvm::consumeError(replacements.add(rep)); -#else - // In older versions, it's literally an std::set - replacements.insert(rep); -#endif -} - -void EnterPreprocessorTokenStream(clang::Preprocessor &_pp, const clang::Token *start, size_t len, bool DisableMacroExpansion) { -#if (LLVM_VERSION_MAJOR == 3) && (LLVM_VERSION_MINOR == 8) - _pp.EnterTokenStream(start, len, false, DisableMacroExpansion); -#else - #if (LLVM_VERSION_MAJOR < 9) - _pp.EnterTokenStream(clang::ArrayRef{start, len}, DisableMacroExpansion); - #else - _pp.EnterTokenStream(clang::ArrayRef{start, len}, DisableMacroExpansion, false); - #endif -#endif -} - -clang::SourceLocation getBeginLoc(const clang::Stmt *stmt) { -#if LLVM_VERSION_MAJOR < 8 - return stmt->getLocStart(); -#else - return stmt->getBeginLoc(); -#endif -} - -clang::SourceLocation getBeginLoc(const clang::TypeLoc &typeLoc) { -#if LLVM_VERSION_MAJOR < 8 - return typeLoc.getLocStart(); -#else - return typeLoc.getBeginLoc(); -#endif -} - -clang::SourceLocation getEndLoc(const clang::Stmt *stmt) { -#if LLVM_VERSION_MAJOR < 8 - return stmt->getLocEnd(); -#else - return stmt->getEndLoc(); -#endif -} - -clang::SourceLocation getEndLoc(const clang::TypeLoc &typeLoc) { -#if LLVM_VERSION_MAJOR < 8 - return typeLoc.getLocEnd(); -#else - return typeLoc.getEndLoc(); -#endif -} - -std::error_code real_path(const Twine &path, SmallVectorImpl &output, - bool expand_tilde) { -#if LLVM_VERSION_MAJOR < 5 - output.clear(); - std::string s = path.str(); - output.append(s.begin(), s.end()); - if (sys::path::is_relative(path)) { - return sys::fs::make_absolute(output); - } - return std::error_code(); -#else - return sys::fs::real_path(path, output, expand_tilde); -#endif -} - -bool pragma_once_outside_header() { -#if LLVM_VERSION_MAJOR < 4 - return false; -#else - return true; -#endif -} - -void RetainExcludedConditionalBlocks(clang::CompilerInstance &CI) { -#if LLVM_VERSION_MAJOR > 9 - clang::PreprocessorOptions &PPOpts = CI.getPreprocessorOpts(); - PPOpts.RetainExcludedConditionalBlocks = !SkipExcludedPPConditionalBlocks; -#endif -} - -bool CheckCompatibility() { -#if LLVM_VERSION_MAJOR < 10 - if (SkipExcludedPPConditionalBlocks) { - llvm::errs() << "\n" << sHipify << sWarning << "Option '" << SkipExcludedPPConditionalBlocks.ArgStr.str() << "' is supported starting from LLVM version 10.0\n"; - } -#endif - return true; -} - -clang::SourceLocation getEndOfExpansionRangeForLoc(const clang::SourceManager &SM, const clang::SourceLocation &loc) { -#if LLVM_VERSION_MAJOR > 6 - return SM.getExpansionRange(loc).getEnd(); -#else - return SM.getExpansionRange(loc).second; -#endif -} - -} // namespace llcompat diff --git a/hipamd/hipify-clang/src/LLVMCompat.h b/hipamd/hipify-clang/src/LLVMCompat.h deleted file mode 100644 index 48e008d40d..0000000000 --- a/hipamd/hipify-clang/src/LLVMCompat.h +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#pragma once - -#include -#include -#include -#include -#include - -namespace ct = clang::tooling; - -extern const std::string sHipify, sConflict, sError, sWarning; - -// Things for papering over the differences between different LLVM versions. - -namespace llcompat { -/** - * The getNumArgs function on macros was rather unhelpfully renamed in clang 4.0. Its semantics - * remain unchanged, so let's be slightly ugly about it here. :D - */ -#if LLVM_VERSION_MAJOR > 4 - #define GET_NUM_ARGS() getNumParams() -#else - #define GET_NUM_ARGS() getNumArgs() -#endif - -#if LLVM_VERSION_MAJOR < 7 - #define LLVM_DEBUG(X) DEBUG(X) -#endif - -clang::SourceLocation getBeginLoc(const clang::Stmt *stmt); -clang::SourceLocation getBeginLoc(const clang::TypeLoc &typeLoc); - -clang::SourceLocation getEndLoc(const clang::Stmt *stmt); -clang::SourceLocation getEndLoc(const clang::TypeLoc &typeLoc); - -void PrintStackTraceOnErrorSignal(); - -using namespace llvm; - -/** - * Get the replacement map for a given filename in a RefactoringTool. - * - * Older LLVM versions don't actually support multiple filenames, so everything all gets - * smushed together. It is the caller's responsibility to cope with this. - */ -ct::Replacements &getReplacements(ct::RefactoringTool &Tool, StringRef file); - -/** - * Add a Replacement to a Replacements. - */ -void insertReplacement(ct::Replacements &replacements, const ct::Replacement &rep); - -/** - * Version-agnostic version of Preprocessor::EnterTokenStream(). - */ -void EnterPreprocessorTokenStream(clang::Preprocessor &_pp, - const clang::Token *start, - size_t len, - bool DisableMacroExpansion); - -std::error_code real_path(const Twine &path, SmallVectorImpl &output, - bool expand_tilde = false); - -bool pragma_once_outside_header(); - -void RetainExcludedConditionalBlocks(clang::CompilerInstance &CI); - -bool CheckCompatibility(); - -clang::SourceLocation getEndOfExpansionRangeForLoc(const clang::SourceManager &SM, const clang::SourceLocation &loc); - -} // namespace llcompat diff --git a/hipamd/hipify-clang/src/ReplacementsFrontendActionFactory.h b/hipamd/hipify-clang/src/ReplacementsFrontendActionFactory.h deleted file mode 100644 index 92d77655af..0000000000 --- a/hipamd/hipify-clang/src/ReplacementsFrontendActionFactory.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#pragma once - -#include "clang/Tooling/Tooling.h" -#include "clang/Frontend/FrontendAction.h" -#include "clang/Tooling/Core/Replacement.h" - -namespace ct = clang::tooling; - -/** - * A FrontendActionFactory that propagates a set of Replacements into the FrontendAction. - * This is necessary boilerplate for using a custom FrontendAction with a RefactoringTool. - * - * @tparam T The FrontendAction to create. - */ -template -class ReplacementsFrontendActionFactory : public ct::FrontendActionFactory { - ct::Replacements *replacements; - -public: - explicit ReplacementsFrontendActionFactory(ct::Replacements *r): - ct::FrontendActionFactory(), - replacements(r) {} - -#if LLVM_VERSION_MAJOR < 10 - clang::FrontendAction *create() override { - return new T(replacements); - } -#else - std::unique_ptr create() override { - return std::unique_ptr(new T(replacements)); - } -#endif -}; diff --git a/hipamd/hipify-clang/src/Statistics.cpp b/hipamd/hipify-clang/src/Statistics.cpp deleted file mode 100644 index 1f7713cd88..0000000000 --- a/hipamd/hipify-clang/src/Statistics.cpp +++ /dev/null @@ -1,368 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "Statistics.h" -#include -#include -#include -#include "ArgParse.h" - -const char *counterNames[NUM_CONV_TYPES] = { - "error", // CONV_ERROR - "init", // CONV_INIT - "version", // CONV_VERSION - "device", // CONV_DEVICE - "context", // CONV_CONTEXT - "module", // CONV_MODULE - "memory", // CONV_MEMORY - "virtual_memory", // CONV_VIRTUAL_MEMORY - "addressing", // CONV_ADDRESSING - "stream", // CONV_STREAM - "event", // CONV_EVENT - "external_resource_interop", // CONV_EXT_RES - "stream_memory", // CONV_STREAM_MEMORY - "execution", // CONV_EXECUTION - "graph", // CONV_GRAPH - "occupancy", // CONV_OCCUPANCY - "texture", // CONV_TEXTURE - "surface", // CONV_SURFACE - "peer", // CONV_PEER - "graphics", // CONV_GRAPHICS - "profiler", // CONV_PROFILER - "openGL", // CONV_OPENGL - "D3D9", // CONV_D3D9 - "D3D10", // CONV_D3D10 - "D3D11", // CONV_D3D11 - "VDPAU", // CONV_VDPAU - "EGL", // CONV_EGL - "thread", // CONV_THREAD - "complex", // CONV_COMPLEX - "library", // CONV_LIB_FUNC - "device_library", // CONV_LIB_DEVICE_FUNC - "device_function", // CONV_DEVICE_FUNC - "include", // CONV_INCLUDE - "include_cuda_main_header", // CONV_INCLUDE_CUDA_MAIN_H - "type", // CONV_TYPE - "literal", // CONV_LITERAL - "numeric_literal", // CONV_NUMERIC_LITERAL - "define", // CONV_DEFINE - "extern_shared", // CONV_EXTERN_SHARED - "kernel_launch" // CONV_KERNEL_LAUNCH -}; - -const char *counterTypes[NUM_CONV_TYPES] = { - "CONV_ERROR", - "CONV_INIT", - "CONV_VERSION", - "CONV_DEVICE", - "CONV_CONTEXT", - "CONV_MODULE", - "CONV_MEMORY", - "CONV_VIRTUAL_MEMORY", - "CONV_ADDRESSING", - "CONV_STREAM", - "CONV_EVENT", - "CONV_EXT_RES", - "CONV_STREAM_MEMORY", - "CONV_EXECUTION", - "CONV_GRAPH", - "CONV_OCCUPANCY", - "CONV_TEXTURE", - "CONV_SURFACE", - "CONV_PEER", - "CONV_GRAPHICS", - "CONV_PROFILER", - "CONV_OPENGL", - "CONV_D3D9", - "CONV_D3D10", - "CONV_D3D11", - "CONV_VDPAU", - "CONV_EGL", - "CONV_THREAD", - "CONV_COMPLEX", - "CONV_LIB_FUNC", - "CONV_LIB_DEVICE_FUNC", - "CONV_INCLUDE", - "CONV_INCLUDE_CUDA_MAIN_H", - "CONV_TYPE", - "CONV_LITERAL", - "CONV_NUMERIC_LITERAL", - "CONV_DEFINE", - "CONV_EXTERN_SHARED", - "CONV_KERNEL_LAUNCH" -}; - -const char *apiNames[NUM_API_TYPES] = { - "CUDA Driver API", - "CUDA RT API", - "cuComplex API", - "cuBLAS API", - "cuRAND API", - "cuDNN API", - "cuFFT API", - "cuSPARSE API", - "CUB API", - "CAFFE2 API" -}; - -const char *apiTypes[NUM_API_TYPES] = { - "API_DRIVER", - "API_RUNTIME", - "API_COMPLEX", - "API_BLAS", - "API_RAND", - "API_DNN", - "API_FFT", - "API_CUB", - "API_SPARSE", - "API_CAFFE2" -}; - -namespace { - -template -void conditionalPrint(ST *stream1, - ST2* stream2, - const std::string& s1, - const std::string& s2) { - if (stream1) { - *stream1 << s1; - } - if (stream2) { - *stream2 << s2; - } -} - -// Print a named stat value to both the terminal and the CSV file. -template -void printStat(std::ostream *csv, llvm::raw_ostream* printOut, const std::string &name, T value) { - if (printOut) { - *printOut << " " << name << ": " << value << "\n"; - } - if (csv) { - *csv << name << ";" << value << "\n"; - } -} - -} // Anonymous namespace - -void StatCounter::incrementCounter(const hipCounter &counter, const std::string &name) { - counters[name]++; - apiCounters[(int) counter.apiType]++; - convTypeCounters[(int) counter.type]++; -} - -void StatCounter::add(const StatCounter &other) { - for (const auto &p : other.counters) { - counters[p.first] += p.second; - } - for (int i = 0; i < NUM_API_TYPES; ++i) { - apiCounters[i] += other.apiCounters[i]; - } - for (int i = 0; i < NUM_CONV_TYPES; ++i) { - convTypeCounters[i] += other.convTypeCounters[i]; - } -} - -int StatCounter::getConvSum() { - int acc = 0; - for (const int &i : convTypeCounters) { - acc += i; - } - return acc; -} - -void StatCounter::print(std::ostream* csv, llvm::raw_ostream* printOut, const std::string &prefix) { - for (int i = 0; i < NUM_CONV_TYPES; ++i) { - if (convTypeCounters[i] > 0) { - conditionalPrint(csv, printOut, "\nCUDA ref type;Count\n", "[HIPIFY] info: " + prefix + " refs by type:\n"); - break; - } - } - for (int i = 0; i < NUM_CONV_TYPES; ++i) { - if (convTypeCounters[i] > 0) { - printStat(csv, printOut, counterNames[i], convTypeCounters[i]); - } - } - for (int i = 0; i < NUM_API_TYPES; ++i) { - if (apiCounters[i] > 0) { - conditionalPrint(csv, printOut, "\nCUDA API;Count\n", "[HIPIFY] info: " + prefix + " refs by API:\n"); - break; - } - } - for (int i = 0; i < NUM_API_TYPES; ++i) { - if (apiCounters[i] > 0) { - printStat(csv, printOut, apiNames[i], apiCounters[i]); - } - } - if (counters.size() > 0) { - conditionalPrint(csv, printOut, "\nCUDA ref name;Count\n", "[HIPIFY] info: " + prefix + " refs by names:\n"); - for (const auto &it : counters) { - printStat(csv, printOut, it.first, it.second); - } - } -} - -Statistics::Statistics(const std::string &name): fileName(name) { - // Compute the total bytes/lines in the input file. - std::ifstream src_file(name, std::ios::binary | std::ios::ate); - src_file.clear(); - src_file.seekg(0); - totalLines = (unsigned) std::count(std::istreambuf_iterator(src_file), std::istreambuf_iterator(), '\n'); - totalBytes = (int) src_file.tellg(); - if (totalBytes < 0) { - totalBytes = 0; - } - startTime = chr::steady_clock::now(); -} - -///////// Counter update routines ////////// - -void Statistics::incrementCounter(const hipCounter &counter, const std::string &name) { - if (Statistics::isUnsupported(counter)) { - unsupported.incrementCounter(counter, name); - } else { - supported.incrementCounter(counter, name); - } -} - -void Statistics::add(const Statistics &other) { - supported.add(other.supported); - unsupported.add(other.unsupported); - touchedBytes += other.touchedBytes; - totalBytes += other.totalBytes; - touchedLines += other.touchedLines; - totalLines += other.totalLines; - if (other.hasErrors && !hasErrors) { - hasErrors = true; - } - if (startTime > other.startTime) { - startTime = other.startTime; - } -} - -void Statistics::lineTouched(int lineNumber) { - touchedLinesSet.insert(lineNumber); - touchedLines = unsigned(touchedLinesSet.size()); -} - -void Statistics::bytesChanged(int bytes) { - touchedBytes += bytes; -} - -void Statistics::markCompletion() { - completionTime = chr::steady_clock::now(); -} - -///////// Output functions ////////// - -void Statistics::print(std::ostream* csv, llvm::raw_ostream* printOut, bool skipHeader) { - if (!skipHeader) { - std::string str = "file \'" + fileName + "\' statistics:\n"; - conditionalPrint(csv, printOut, "\n" + str, "\n[HIPIFY] info: " + str); - } - if (hasErrors || totalBytes <= 0 || totalLines <= 0) { - std::string str = "\n ERROR: Statistics is invalid due to failed hipification.\n\n"; - conditionalPrint(csv, printOut, str, str); - } - // Total number of (un)supported refs that were converted. - int supportedSum = supported.getConvSum(); - int unsupportedSum = unsupported.getConvSum(); - int allSum = supportedSum + unsupportedSum; - printStat(csv, printOut, "CONVERTED refs count", supportedSum); - printStat(csv, printOut, "UNCONVERTED refs count", unsupportedSum); - printStat(csv, printOut, "CONVERSION %", 100 - (0 == allSum ? 100 : std::lround(double(unsupportedSum * 100) / double(allSum)))); - printStat(csv, printOut, "REPLACED bytes", touchedBytes); - printStat(csv, printOut, "TOTAL bytes", totalBytes); - printStat(csv, printOut, "CHANGED lines of code", touchedLines); - printStat(csv, printOut, "TOTAL lines of code", totalLines); - printStat(csv, printOut, "CODE CHANGED (in bytes) %", 0 == totalBytes ? 0 : std::lround(double(touchedBytes * 100) / double(totalBytes))); - printStat(csv, printOut, "CODE CHANGED (in lines) %", 0 == totalLines ? 0 : std::lround(double(touchedLines * 100) / double(totalLines))); - typedef std::chrono::duration duration; - duration elapsed = completionTime - startTime; - std::stringstream stream; - stream << std::fixed << std::setprecision(2) << elapsed.count() / 1000; - printStat(csv, printOut, "TIME ELAPSED s", stream.str()); - supported.print(csv, printOut, "CONVERTED"); - unsupported.print(csv, printOut, "UNCONVERTED"); -} - -void Statistics::printAggregate(std::ostream *csv, llvm::raw_ostream* printOut) { - Statistics globalStats = getAggregate(); - // A file is considered "converted" if we made any changes to it. - int convertedFiles = 0; - for (const auto &p : stats) { - if (p.second.touchedLines && p.second.totalBytes && - p.second.totalLines && !p.second.hasErrors) { - convertedFiles++; - } - } - globalStats.markCompletion(); - globalStats.print(csv, printOut); - std::string str = "TOTAL statistics:"; - conditionalPrint(csv, printOut, "\n" + str + "\n", "\n[HIPIFY] info: " + str + "\n"); - printStat(csv, printOut, "CONVERTED files", convertedFiles); - printStat(csv, printOut, "PROCESSED files", stats.size()); -} - -//// Static state management //// - -Statistics Statistics::getAggregate() { - Statistics globalStats("GLOBAL"); - for (const auto &p : stats) { - globalStats.add(p.second); - } - return globalStats; -} - -Statistics &Statistics::current() { - assert(Statistics::currentStatistics); - return *Statistics::currentStatistics; -} - -void Statistics::setActive(const std::string &name) { - stats.emplace(std::make_pair(name, Statistics{name})); - Statistics::currentStatistics = &stats.at(name); -} - -bool Statistics::isToRoc(const hipCounter &counter) { - return TranslateToRoc && counter.apiType == API_BLAS; -} - -bool Statistics::isHipUnsupported(const hipCounter &counter) { - return HIP_UNSUPPORTED == (counter.supportDegree & HIP_UNSUPPORTED); -} - -bool Statistics::isRocUnsupported(const hipCounter &counter) { - return ROC_UNSUPPORTED == (counter.supportDegree & ROC_UNSUPPORTED); -} - -bool Statistics::isUnsupported(const hipCounter &counter) { - if (Statistics::isToRoc(counter)) { - return Statistics::isRocUnsupported(counter); - } else { - return Statistics::isHipUnsupported(counter); - } -} - -std::map Statistics::stats = {}; -Statistics* Statistics::currentStatistics = nullptr; diff --git a/hipamd/hipify-clang/src/Statistics.h b/hipamd/hipify-clang/src/Statistics.h deleted file mode 100644 index 6cff9cd9d6..0000000000 --- a/hipamd/hipify-clang/src/Statistics.h +++ /dev/null @@ -1,250 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#pragma once - -#include -#include -#include -#include -#include -#include -#include - -namespace chr = std::chrono; - -enum ConvTypes { - // Driver API: 5.2. Error Handling - // Runtime API: 5.3. Error Handling - CONV_ERROR = 0, - // Driver API : 5.3. Initialization - CONV_INIT, - // Driver API : 5.4. Version Management - // Runtime API: 5.28. Version Management - CONV_VERSION, - // Driver API : 5.5. Device Management, 5.6. Device Management [DEPRECATED] - // Runtime API: 5.1. Device Management - CONV_DEVICE, - // Driver API : 5.7. Primary Context Management, 5.8.Context Management, 5.9. Context Management [DEPRECATED] - CONV_CONTEXT, - // Driver API : 5.10. Module Management - CONV_MODULE, - // Driver API : 5.11. Memory Management - // Runtime API: 5.9. Memory Management, 5.10. Memory Management [DEPRECATED] - CONV_MEMORY, - // Driver API : 5.12. Virtual Memory Management - CONV_VIRTUAL_MEMORY, - // Driver API : 5.13. Unified Addressing - // Runtime API: 5.11. Unified Addressing - CONV_ADDRESSING, - // Driver API : 5.14. Stream Management - // Runtime API: 5.4. Stream Management - CONV_STREAM, - // Driver API : 5.15. Event Management - // Runtime API: 5.5. Event Management - CONV_EVENT, - // Driver API : 5.16. External Resource Interoperability - // Runtime API: 5.6.External Resource Interoperability - CONV_EXT_RES, - // Driver API : 5.17. Stream memory operations - CONV_STREAM_MEMORY, - // Driver API : 5.18. Execution Control, 5.19. Execution Control [DEPRECATED] - // Runtime API: 5.7.Execution Control, Former 5.9. Execution Control [DEPRECATED] - CONV_EXECUTION, - // Driver API : 5.20. Graph Management - // Runtime API: 5.29. Graph Management - CONV_GRAPH, - // Driver API : 5.21. Occupancy - // Runtime API: 5.8. Occupancy - CONV_OCCUPANCY, - // Driver API : 5.22. Texture Reference Management [DEPRECATED], 5.24. Texture Object Management - // Runtime API: 5.24. Texture Reference Management [DEPRECATED], 5.26. Texture Object Management - CONV_TEXTURE, - // Driver API : 5.23. Surface Reference Management [DEPRECATED], 5.25. Surface Object Management - // Runtime API: 5.25. Surface Reference Management [DEPRECATED], 5.27. Surface Object Management - CONV_SURFACE, - // Driver API : 5.26. Peer Context Memory Access - // Runtime API: 5.12. Peer Device Memory Access - CONV_PEER, - // Driver API : 5.27. Graphics Interoperability - // Runtime API: 5.23. Graphics Interoperability - CONV_GRAPHICS, - // Driver API : 5.28. Profiler Control - // Runtime API: 5.32. Profiler Control - CONV_PROFILER, - // Driver API : 5.29. OpenGL Interoperability - // Runtime API: 5.13. OpenGL Interoperability, 5.14. OpenGL Interoperability [DEPRECATED] - CONV_OPENGL, - // Driver API : 5.30. Direct3D 9 Interoperability - // Runtime API: 5.15. Direct3D 9 Interoperability, 5.16. Direct3D 9 Interoperability [DEPRECATED] - CONV_D3D9, - // Driver API : 5.31. Direct3D 10 Interoperability - // Runtime API: 5.17. Direct3D 10 Interoperability, 5.18. Direct3D 10 Interoperability [DEPRECATED] - CONV_D3D10, - // Driver API : 5.32. Direct3D 11 Interoperability - // Runtime API: 5.19. Direct3D 11 Interoperability, 5.20. Direct3D 11 Interoperability [DEPRECATED] - CONV_D3D11, - // Driver API : 5.33. VDPAU Interoperability - // Runtime API: 5.21. VDPAU Interoperability - CONV_VDPAU, - // Driver API : 5.34. EGL Interoperability - // Runtime API: 5.22. EGL Interoperability - CONV_EGL, - // Runtime API: 5.2. Thread Management [DEPRECATED] - CONV_THREAD, - CONV_COMPLEX, - CONV_LIB_FUNC, - CONV_LIB_DEVICE_FUNC, - CONV_DEVICE_FUNC, - CONV_INCLUDE, - CONV_INCLUDE_CUDA_MAIN_H, - CONV_TYPE, - CONV_LITERAL, - CONV_NUMERIC_LITERAL, - CONV_DEFINE, - CONV_EXTERN_SHARED, - CONV_KERNEL_LAUNCH, - CONV_LAST -}; -constexpr int NUM_CONV_TYPES = (int) ConvTypes::CONV_LAST; - -enum ApiTypes { - API_DRIVER = 0, - API_RUNTIME, - API_COMPLEX, - API_BLAS, - API_RAND, - API_DNN, - API_FFT, - API_SPARSE, - API_CUB, - API_CAFFE2, - API_LAST -}; -constexpr int NUM_API_TYPES = (int) ApiTypes::API_LAST; - -enum SupportDegree { - FULL = 0, - HIP_UNSUPPORTED = 1, - ROC_UNSUPPORTED = 2, - UNSUPPORTED = 3 -}; - -// The names of various fields in in the statistics reports. -extern const char *counterNames[NUM_CONV_TYPES]; -extern const char *counterTypes[NUM_CONV_TYPES]; -extern const char *apiNames[NUM_API_TYPES]; -extern const char *apiTypes[NUM_API_TYPES]; - -struct hipCounter { - llvm::StringRef hipName; - llvm::StringRef rocName; - ConvTypes type; - ApiTypes apiType; - SupportDegree supportDegree; -}; - -/** - * Tracks a set of named counters, as well as counters for each of the type enums defined above. - */ -class StatCounter { -private: - // Each thing we track is either "supported" or "unsupported"... - std::map counters; - int apiCounters[NUM_API_TYPES] = {}; - int convTypeCounters[NUM_CONV_TYPES] = {}; - -public: - void incrementCounter(const hipCounter &counter, const std::string &name); - // Add the counters from `other` onto the counters of this object. - void add(const StatCounter &other); - int getConvSum(); - void print(std::ostream* csv, llvm::raw_ostream* printOut, const std::string &prefix); -}; - -/** - * Tracks the statistics for a single input file. - */ -class Statistics { - StatCounter supported; - StatCounter unsupported; - std::string fileName; - std::set touchedLinesSet = {}; - unsigned touchedLines = 0; - unsigned totalLines = 0; - unsigned touchedBytes = 0; - int totalBytes = 0; - chr::steady_clock::time_point startTime; - chr::steady_clock::time_point completionTime; - -public: - Statistics(const std::string &name); - void incrementCounter(const hipCounter &counter, const std::string &name); - // Add the counters from `other` onto the counters of this object. - void add(const Statistics &other); - void lineTouched(int lineNumber); - void bytesChanged(int bytes); - // Set the completion timestamp to now. - void markCompletion(); - -public: - /** - * Pretty-print the statistics stored in this object. - * - * @param csv Pointer to an output stream for the CSV to write. If null, no CSV is written - * @param printOut Pointer to an output stream to print human-readable textual stats to. If null, no - * such stats are produced. - */ - void print(std::ostream* csv, llvm::raw_ostream* printOut, bool skipHeader = false); - // Print aggregated statistics for all registered counters. - static void printAggregate(std::ostream *csv, llvm::raw_ostream* printOut); - // The Statistics for each input file. - static std::map stats; - // The Statistics objects for the currently-being-processed input file. - static Statistics* currentStatistics; - // Aggregate statistics over all entries in `stats` and return the resulting Statistics object. - static Statistics getAggregate(); - /** - * Convenient global entry point for updating the "active" Statistics. Since we operate single-threadedly - * processing one file at a time, this allows us to simply expose the stats for the current file globally, - * simplifying things. - */ - static Statistics ¤t(); - /** - * Set the active Statistics object to the named one, creating it if necessary, and write the completion - * timestamp into the currently active one. - */ - static void setActive(const std::string &name); - // Check the counter and option TranslateToRoc whether it should be translated to Roc or not. - static bool isToRoc(const hipCounter &counter); - // Check whether the counter is HIP_UNSUPPORTED or not. - static bool isHipUnsupported(const hipCounter &counter); - // Check whether the counter is ROC_UNSUPPORTED or not. - static bool isRocUnsupported(const hipCounter &counter); - /** - * Check whether the counter is ROC_UNSUPPORTED/HIP_UNSUPPORTED/UNSUPPORTED or not - * based on counter's API_TYPE and option TranslateToRoc. - */ - static bool isUnsupported(const hipCounter &counter); - // Set this flag in case of hipification errors - bool hasErrors = false; -}; diff --git a/hipamd/hipify-clang/src/StringUtils.cpp b/hipamd/hipify-clang/src/StringUtils.cpp deleted file mode 100644 index 31ab331174..0000000000 --- a/hipamd/hipify-clang/src/StringUtils.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include "StringUtils.h" -#include "LLVMCompat.h" -#include "llvm/ADT/SmallString.h" - -using namespace llvm; - -llvm::StringRef unquoteStr(llvm::StringRef s) { - if (s.size() > 1 && s.front() == '"' && s.back() == '"') { - return s.substr(1, s.size() - 2); - } - return s; -} - -void removePrefixIfPresent(std::string &s, const std::string &prefix) { - if (s.find(prefix) != 0) { - return; - } - s.erase(0, prefix.size()); -} - -std::string getAbsoluteFilePath(const std::string &sFile, std::error_code &EC) { - if (sFile.empty()) { - return sFile; - } - if (!sys::fs::exists(sFile)) { - llvm::errs() << "\n" << sHipify << sError << "source file: " << sFile << " doesn't exist\n"; - EC = std::error_code(static_cast(std::errc::no_such_file_or_directory), std::generic_category()); - return ""; - } - SmallString<256> fileAbsPath; - EC = llcompat::real_path(sFile, fileAbsPath, true); - if (EC) { - llvm::errs() << "\n" << sHipify << sError << EC.message() << ": source file: " << sFile << "\n"; - return ""; - } - EC = std::error_code(); - return fileAbsPath.c_str(); -} - -std::string getAbsoluteDirectoryPath(const std::string &sDir, std::error_code &EC, - const std::string &sDirType, bool bCreateDir) { - if (sDir.empty()) { - return sDir; - } - EC = std::error_code(); - SmallString<256> dirAbsPath; - if (sys::fs::exists(sDir)) { - if (sys::fs::is_regular_file(sDir)) { - llvm::errs() << "\n" << sHipify << sError << sDir << " is not a directory\n"; - EC = std::error_code(static_cast(std::errc::not_a_directory), std::generic_category()); - return ""; - } - } - else { - if (bCreateDir) { - EC = sys::fs::create_directory(sDir); - if (EC) { - llvm::errs() << "\n" << sHipify << sError << EC.message() << ": " << sDirType << " directory: " << sDir << "\n"; - return ""; - } - } - else { - llvm::errs() << "\n" << sHipify << sError << sDirType << " directory: " << sDir << " doesn't exist\n"; - EC = std::error_code(static_cast(std::errc::no_such_file_or_directory), std::generic_category()); - return ""; - } - } - EC = llcompat::real_path(sDir, dirAbsPath, true); - if (EC) { - llvm::errs() << "\n" << sHipify << sError << EC.message() << ": " << sDirType << " directory: " << sDir << "\n"; - return ""; - } - return dirAbsPath.c_str(); -} - diff --git a/hipamd/hipify-clang/src/StringUtils.h b/hipamd/hipify-clang/src/StringUtils.h deleted file mode 100644 index ecbca5e832..0000000000 --- a/hipamd/hipify-clang/src/StringUtils.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#pragma once - -#include -#include "llvm/ADT/StringRef.h" - -/** - * Remove double-quotes from the start/end of a string, if present. - */ -llvm::StringRef unquoteStr(llvm::StringRef s); - -/** - * If `s` starts with `prefix`, remove it. Otherwise, does nothing. - */ -void removePrefixIfPresent(std::string &s, const std::string &prefix); - -/** - * Returns Absolute File Path based on filename, otherwise - error. - */ -std::string getAbsoluteFilePath(const std::string &sFile, std::error_code &EC); - -/** - * Returns Absolute Directory Path based on directory name, otherwise - error; - * by default the directory is temporary and created. - */ -std::string getAbsoluteDirectoryPath(const std::string &sDir, std::error_code &EC, - const std::string &sDirType = "temporary", bool bCreateDir = true); diff --git a/hipamd/hipify-clang/src/main.cpp b/hipamd/hipify-clang/src/main.cpp deleted file mode 100644 index cb411eba2f..0000000000 --- a/hipamd/hipify-clang/src/main.cpp +++ /dev/null @@ -1,352 +0,0 @@ -/* -Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include "CUDA2HIP.h" -#include "CUDA2HIP_Scripting.h" -#include "LLVMCompat.h" -#include "HipifyAction.h" -#include "ArgParse.h" -#include "StringUtils.h" -#include "llvm/Support/Debug.h" -#include "clang/Basic/Diagnostic.h" -#include "clang/Basic/DiagnosticIDs.h" -#include "clang/Basic/DiagnosticOptions.h" -#include "clang/Driver/Driver.h" -#include "clang/Driver/Compilation.h" -#include "clang/Driver/Tool.h" -#include "clang/Frontend/TextDiagnosticPrinter.h" - -#if LLVM_VERSION_MAJOR < 8 -#include "llvm/Support/Path.h" -#endif - -constexpr auto DEBUG_TYPE = "cuda2hip"; - -namespace ct = clang::tooling; - -void cleanupHipifyOptions(std::vector &args) { - std::vector hipifyOptions = {"-perl", "-python", "-roc", "-inplace", - "-no-backup", "-no-output", "-print-stats", - "-print-stats-csv", "-examine", "-save-temps", - "-skip-excluded-preprocessor-conditional-blocks"}; - for (const auto &a : hipifyOptions) { - args.erase(std::remove(args.begin(), args.end(), a), args.end()); - args.erase(std::remove(args.begin(), args.end(), "-" + a), args.end()); - } - std::vector hipifyDirOptions = {"-o-dir", "-o-hipify-perl-dir", "-o-stats", - "-o-python-map-dir", "-temp-dir"}; - for (const auto &a : hipifyDirOptions) { - // remove all pairs of arguments "-option value" - auto it = args.erase(std::remove(args.begin(), args.end(), a), args.end()); - if (it != args.end()) { - args.erase(it); - } - // remove all pairs of arguments "--option value" - it = args.erase(std::remove(args.begin(), args.end(), "-" + a), args.end()); - if (it != args.end()) { - args.erase(it); - } - // remove all "-option=value" and "--option=value" - args.erase( - std::remove_if(args.begin(), args.end(), - [a](const std::string &s) { return s.find(a + "=") == 0 || s.find("-" + a + "=") == 0; } - ), - args.end() - ); - } -} - -void sortInputFiles(int argc, const char **argv, std::vector &files) { - if (files.size() < 2) return; - IntrusiveRefCntPtr diagOpts(new clang::DiagnosticOptions()); - clang::TextDiagnosticPrinter diagClient(llvm::errs(), &*diagOpts); - clang::DiagnosticsEngine Diagnostics(IntrusiveRefCntPtr(new clang::DiagnosticIDs()), &*diagOpts, &diagClient, false); - std::unique_ptr driver(new clang::driver::Driver("", "nvptx64-nvidia-cuda", Diagnostics)); - std::vector Args(argv, argv + argc); - cleanupHipifyOptions(Args); - std::unique_ptr C(driver->BuildCompilation(Args)); - std::vector sortedFiles; - for (const auto &J : C->getJobs()) { - if (std::string(J.getCreator().getName()) != "clang") continue; - const auto &JA = J.getArguments(); - for (size_t i = 0; i < JA.size(); ++i) { - const auto &A = std::string(JA[i]); - if (std::find(files.begin(), files.end(), A) != files.end() && - i > 0 && std::string(JA[i - 1]) == "-main-file-name") { - sortedFiles.push_back(A); - } - } - } - if (sortedFiles.empty()) return; - std::reverse(sortedFiles.begin(), sortedFiles.end()); - files.assign(sortedFiles.begin(), sortedFiles.end()); -} - -void appendArgumentsAdjusters(ct::RefactoringTool &Tool, const std::string &sSourceAbsPath, const char *hipify_exe) { - if (!IncludeDirs.empty()) { - for (std::string s : IncludeDirs) { - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster(s.c_str(), ct::ArgumentInsertPosition::BEGIN)); - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-I", ct::ArgumentInsertPosition::BEGIN)); - } - } - if (!MacroNames.empty()) { - for (std::string s : MacroNames) { - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster(s.c_str(), ct::ArgumentInsertPosition::BEGIN)); - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-D", ct::ArgumentInsertPosition::BEGIN)); - } - } - // Includes for clang's CUDA wrappers for using by packaged hipify-clang - static int Dummy; - std::string hipify = llvm::sys::fs::getMainExecutable(hipify_exe, (void *)&Dummy); - std::string clang_inc_path = std::string(llvm::sys::path::parent_path(hipify)); - clang_inc_path.append("/include"); - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster(clang_inc_path.c_str(), ct::ArgumentInsertPosition::BEGIN)); - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-isystem", ct::ArgumentInsertPosition::BEGIN)); - clang_inc_path.append("/cuda_wrappers"); - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster(clang_inc_path.c_str(), ct::ArgumentInsertPosition::BEGIN)); - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-isystem", ct::ArgumentInsertPosition::BEGIN)); - // Ensure at least c++11 is used. - std::string stdCpp = "-std=c++11"; -#if defined(_MSC_VER) - stdCpp = "-std=c++14"; -#endif - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster(stdCpp.c_str(), ct::ArgumentInsertPosition::BEGIN)); - std::string sInclude = "-I" + sys::path::parent_path(sSourceAbsPath).str(); -#if defined(HIPIFY_CLANG_RES) - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-resource-dir=" HIPIFY_CLANG_RES, ct::ArgumentInsertPosition::BEGIN)); -#endif - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster(sInclude.c_str(), ct::ArgumentInsertPosition::BEGIN)); - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-fno-delayed-template-parsing", ct::ArgumentInsertPosition::BEGIN)); - if (llcompat::pragma_once_outside_header()) { - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-Wno-pragma-once-outside-header", ct::ArgumentInsertPosition::BEGIN)); - } - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("--cuda-host-only", ct::ArgumentInsertPosition::BEGIN)); - if (!CudaGpuArch.empty()) { - std::string sCudaGpuArch = "--cuda-gpu-arch=" + CudaGpuArch; - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster(sCudaGpuArch.c_str(), ct::ArgumentInsertPosition::BEGIN)); - } - if (!CudaPath.empty()) { - std::string sCudaPath = "--cuda-path=" + CudaPath; - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster(sCudaPath.c_str(), ct::ArgumentInsertPosition::BEGIN)); - } - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("cuda", ct::ArgumentInsertPosition::BEGIN)); - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-x", ct::ArgumentInsertPosition::BEGIN)); - if (Verbose) { - Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-v", ct::ArgumentInsertPosition::END)); - } - Tool.appendArgumentsAdjuster(ct::getClangSyntaxOnlyAdjuster()); -} - -bool generatePython() { - bool bToRoc = TranslateToRoc; - TranslateToRoc = true; - bool bToPython = python::generate(GeneratePython); - TranslateToRoc = bToRoc; - return bToPython; -} - -int main(int argc, const char **argv) { - std::vector new_argv(argv, argv + argc); - if (std::find(new_argv.begin(), new_argv.end(), std::string("--")) == new_argv.end()) { - new_argv.push_back("--"); - new_argv.push_back(nullptr); - argv = new_argv.data(); - argc++; - } - llcompat::PrintStackTraceOnErrorSignal(); - ct::CommonOptionsParser OptionsParser(argc, argv, ToolTemplateCategory, llvm::cl::ZeroOrMore); - if (!llcompat::CheckCompatibility()) { - return 1; - } - std::vector fileSources = OptionsParser.getSourcePathList(); - if (fileSources.empty() && !GeneratePerl && !GeneratePython) { - llvm::errs() << "\n" << sHipify << sError << "Must specify at least 1 positional argument for source file" << "\n"; - return 1; - } - if (!perl::generate(GeneratePerl)) { - llvm::errs() << "\n" << sHipify << sError << "hipify-perl generating failed" << "\n"; - return 1; - } - if (!generatePython()) { - llvm::errs() << "\n" << sHipify << sError << "hipify-python generating failed" << "\n"; - return 1; - } - if (fileSources.empty()) { - return 0; - } - std::string dst = OutputFilename, dstDir = OutputDir; - std::error_code EC; - std::string sOutputDirAbsPath = getAbsoluteDirectoryPath(OutputDir, EC, "output"); - if (EC) { - return 1; - } - if (!dst.empty()) { - if (fileSources.size() > 1) { - llvm::errs() << sHipify << sConflict << "-o and multiple source files are specified\n"; - return 1; - } - if (Inplace) { - llvm::errs() << sHipify << sConflict << "both -o and -inplace options are specified\n"; - return 1; - } - if (NoOutput) { - llvm::errs() << sHipify << sConflict << "both -no-output and -o options are specified\n"; - return 1; - } - if (!dstDir.empty()) { - dst = sOutputDirAbsPath + "/" + dst; - } - } - if (NoOutput && Inplace) { - llvm::errs() << sHipify << sConflict << "both -no-output and -inplace options are specified\n"; - return 1; - } - if (!dstDir.empty() && Inplace) { - llvm::errs() << sHipify << sConflict << "both -o-dir and -inplace options are specified\n"; - return 1; - } - if (Examine) { - NoOutput = PrintStats = true; - } - int Result = 0; - SmallString<128> tmpFile; - StringRef sourceFileName, ext = "hip", csv_ext = "csv"; - std::string sTmpFileName, sSourceAbsPath; - std::string sTmpDirAbsParh = getAbsoluteDirectoryPath(TemporaryDir, EC); - if (EC) { - return 1; - } - // Arguments for the Statistics print routines. - std::unique_ptr csv = nullptr; - llvm::raw_ostream *statPrint = nullptr; - bool create_csv = false; - if (!OutputStatsFilename.empty()) { - PrintStatsCSV = true; - create_csv = true; - } else { - if (PrintStatsCSV && fileSources.size() > 1) { - OutputStatsFilename = "sum_stat.csv"; - create_csv = true; - } - } - if (create_csv) { - if (!OutputDir.empty()) { - OutputStatsFilename = sOutputDirAbsPath + "/" + OutputStatsFilename; - } - csv = std::unique_ptr(new std::ofstream(OutputStatsFilename, std::ios_base::trunc)); - } - if (PrintStats) { - statPrint = &llvm::errs(); - } - sortInputFiles(argc, argv, fileSources); - for (const auto &src : fileSources) { - // Create a copy of the file to work on. When we're done, we'll move this onto the - // output (which may mean overwriting the input, if we're in-place). - // Should we fail for some reason, we'll just leak this file and not corrupt the input. - sSourceAbsPath = getAbsoluteFilePath(src, EC); - if (EC) { - continue; - } - sourceFileName = sys::path::filename(sSourceAbsPath); - if (dst.empty()) { - if (Inplace) { - dst = src; - } else { - dst = src + "." + ext.str(); - if (!dstDir.empty()) { - dst = sOutputDirAbsPath + "/" + sourceFileName.str() + "." + ext.str(); - } - } - } - if (TemporaryDir.empty()) { - EC = sys::fs::createTemporaryFile(sourceFileName, ext, tmpFile); - if (EC) { - llvm::errs() << "\n" << sHipify << sError << EC.message() << ": " << tmpFile << "\n"; - Result = 1; - continue; - } - } else { - sTmpFileName = sTmpDirAbsParh + "/" + sourceFileName.str() + "." + ext.str(); - tmpFile = sTmpFileName; - } - EC = sys::fs::copy_file(src, tmpFile); - if (EC) { - llvm::errs() << "\n" << sHipify << sError << EC.message() << ": while copying " << src << " to " << tmpFile << "\n"; - Result = 1; - continue; - } - if (PrintStatsCSV) { - if (OutputStatsFilename.empty()) { - OutputStatsFilename = sourceFileName.str() + "." + csv_ext.str(); - if (!OutputDir.empty()) { - OutputStatsFilename = sOutputDirAbsPath + "/" + OutputStatsFilename; - } - } - if (!csv) { - csv = std::unique_ptr(new std::ofstream(OutputStatsFilename, std::ios_base::trunc)); - } - } - // Initialise the statistics counters for this file. - Statistics::setActive(src); - // RefactoringTool operates on the file in-place. Giving it the output path is no good, - // because that'll break relative includes, and we don't want to overwrite the input file. - // So what we do is operate on a copy, which we then move to the output. - ct::RefactoringTool Tool(OptionsParser.getCompilations(), std::string(tmpFile.c_str())); - ct::Replacements &replacementsToUse = llcompat::getReplacements(Tool, tmpFile.c_str()); - ReplacementsFrontendActionFactory actionFactory(&replacementsToUse); - appendArgumentsAdjusters(Tool, sSourceAbsPath, argv[0]); - Statistics ¤tStat = Statistics::current(); - // Hipify _all_ the things! - if (Tool.runAndSave(&actionFactory)) { - currentStat.hasErrors = true; - Result = 1; - LLVM_DEBUG(llvm::dbgs() << "Skipped some replacements.\n"); - } - // Copy the tmpfile to the output - if (!NoOutput && !currentStat.hasErrors) { - EC = sys::fs::copy_file(tmpFile, dst); - if (EC) { - llvm::errs() << "\n" << sHipify << sError << EC.message() << ": while copying " << tmpFile << " to " << dst << "\n"; - Result = 1; - continue; - } - } - // Remove the tmp file without error check - if (!SaveTemps) { - sys::fs::remove(tmpFile); - } - Statistics::current().markCompletion(); - Statistics::current().print(csv.get(), statPrint); - dst.clear(); - } - if (fileSources.size() > 1) { - Statistics::printAggregate(csv.get(), statPrint); - } - return Result; -} diff --git a/hipamd/tests/hipify-clang/lit.cfg b/hipamd/tests/hipify-clang/lit.cfg deleted file mode 100644 index ea496e6a69..0000000000 --- a/hipamd/tests/hipify-clang/lit.cfg +++ /dev/null @@ -1,151 +0,0 @@ -# -*- Python -*- -import os -import platform -import re -import subprocess -import struct - -import lit.formats -import lit.util - -# Configuration file for the 'lit' test runner. -site_cfg = lit_config.params.get('site_config', None) -lit_config.load_config(config, site_cfg) - -config.excludes = ['cmdparser.hpp'] -config.excludes.append('spatial_batch_norm_op.h') -config.excludes.append('common_cudnn.h') - -delimiter = "==============================================================="; -print(delimiter) -print("CUDA " + config.cuda_version + " - will be used for testing") -print("LLVM " + config.llvm_version + " - will be used for testing") -print(platform.machine() + " - Platform architecture") -print(platform.system() + " " + platform.release() + " - Platform OS") -print(str(config.pointer_size * 8) + " - hipify-clang binary bitness") -print(str(struct.calcsize("P") * 8) + " - python " + str(platform.python_version()) + " binary bitness") -print(delimiter) -warns = None -if not config.cuda_dnn_root: - config.excludes.append('cudnn_convolution_forward.cu') - config.excludes.append('cudnn_softmax.cu') - print("WARN: cuDNN tests are excluded due to unset CUDA_DNN_ROOT_DIR") - warns = True -if not config.cuda_cub_root: - config.excludes.append('cub_01.cu') - config.excludes.append('cub_02.cu') - config.excludes.append('cub_03.cu') - print("WARN: CUB tests are excluded due to unset CUDA_CUB_ROOT_DIR") - warns = True -if warns: - print(delimiter) - -if config.cuda_version_major == 7 and config.cuda_version_minor == 0: - config.excludes.append('headers_test_09.cu') - config.excludes.append('cudnn_convolution_forward.cu') -if config.cuda_version_major < 8: - config.excludes.append('cuSPARSE_02.cu') -if config.cuda_version_major < 9: - config.excludes.append('cuSPARSE_04.cu') - config.excludes.append('cuSPARSE_05.cu') - config.excludes.append('cuSPARSE_06.cu') - config.excludes.append('cuSPARSE_07.cu') - config.excludes.append('benchmark_curand_kernel.cpp') -if config.cuda_version_major < 10: - config.excludes.append('cuSPARSE_08.cu') - config.excludes.append('cuSPARSE_09.cu') - config.excludes.append('cuSPARSE_10.cu') - config.excludes.append('cuSPARSE_11.cu') - -if config.llvm_version_major < 10: - config.excludes.append('pp_if_else_conditionals_LLVM_10.cu') - config.excludes.append('pp_if_else_conditionals_01_LLVM_10.cu') - -# name: The name of this test suite. -config.name = 'hipify' - -# suffixes: CUDA source is only supported -config.suffixes = ['.cu','.cuh','.cpp','.c','.hpp','.h'] - -# testFormat: The test format to use to interpret tests. -config.test_format = lit.formats.ShTest() - -# test_source_root: The root path where tests are located. -config.test_source_root = os.path.dirname(__file__) - -# test_exec_root: The path where tests are located (default is the test suite root). -#config.test_exec_root = config.test_source_root - -# target_triple: Used by ShTest and TclTest formats for XFAIL checks. -config.target_triple = '(unused)' - -# available_features: Used by ShTest and TclTest formats for REQUIRES checks. -config.available_features = [] - -obj_root = getattr(config, 'obj_root', None) -if obj_root is not None: - config.test_exec_root = obj_root - -if obj_root is not None: - llvm_tools_dir = getattr(config, 'llvm_tools_dir', None) - if not llvm_tools_dir: - lit_config.fatal('No LLVM tools dir set!') - path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH'])) - config.environment['PATH'] = path - -hipify_path = obj_root - -clang_arguments = "-v" -if sys.platform in ['win32']: - run_test_ext = ".bat" - hipify_path += "/" + config.build_type - # CUDA SDK ROOT - clang_arguments += " -isystem'%s'/common/inc" -else: - run_test_ext = ".sh" - # CUDA SDK ROOT - clang_arguments += " -isystem'%s'/samples/common/inc" -if config.pointer_size == 8: - clang_arguments += " -D__LP64__" - -# Set max clang's CudaArch for corresponding CUDA version -# to support maximum CUDA features in offline tests -if config.cuda_version_major == 7: - if config.cuda_version_minor == 5: - clang_arguments += " --cuda-gpu-arch=sm_53" - else: - clang_arguments += " --cuda-gpu-arch=sm_52" -elif config.cuda_version_major == 8: - clang_arguments += " --cuda-gpu-arch=sm_62" -elif config.cuda_version_major == 9: - if config.cuda_version_minor == 2: - clang_arguments += " --cuda-gpu-arch=sm_72" - else: - clang_arguments += " --cuda-gpu-arch=sm_70" -elif config.cuda_version_major == 10: - clang_arguments += " --cuda-gpu-arch=sm_75" - -# cuDNN ROOT -if config.cuda_dnn_root: - clang_arguments += " -I'%s'/include" -# CUB ROOT -if config.cuda_cub_root: - clang_arguments += " -I'%s'" - -if config.cuda_dnn_root and config.cuda_cub_root: - config.substitutions.append(("%clang_args", clang_arguments % (config.cuda_sdk_root, config.cuda_dnn_root, config.cuda_cub_root))) -elif config.cuda_dnn_root: - config.substitutions.append(("%clang_args", clang_arguments % (config.cuda_sdk_root, config.cuda_dnn_root))) -elif config.cuda_cub_root: - config.substitutions.append(("%clang_args", clang_arguments % (config.cuda_sdk_root, config.cuda_cub_root))) -else: - config.substitutions.append(("%clang_args", clang_arguments % config.cuda_sdk_root)) - -if config.llvm_version_major < 4: - hipify_arguments = "-I'%s'/include" -else: - hipify_arguments = "--cuda-path='%s'" - -config.substitutions.append(("%hipify_args", hipify_arguments % config.cuda_root)) -config.substitutions.append(("hipify", '"' + hipify_path + "/hipify-clang" + '"')) -config.substitutions.append(("%run_test", '"' + config.test_source_root + "/run_test" + run_test_ext + '"')) diff --git a/hipamd/tests/hipify-clang/lit.site.cfg.in b/hipamd/tests/hipify-clang/lit.site.cfg.in deleted file mode 100644 index 3c17567903..0000000000 --- a/hipamd/tests/hipify-clang/lit.site.cfg.in +++ /dev/null @@ -1,38 +0,0 @@ -import sys -import os - -config.pointer_size = @CMAKE_SIZEOF_VOID_P@ -config.llvm_version = "@LLVM_PACKAGE_VERSION@" -config.llvm_version_major = int("@LLVM_VERSION_MAJOR@") -config.llvm_tools_dir = "@LLVM_TOOLS_BINARY_DIR@" -config.obj_root = "@CMAKE_CURRENT_BINARY_DIR@" -config.cuda_root = "@CUDA_TOOLKIT_ROOT_DIR@" -config.cuda_dnn_root = "@CUDA_DNN_ROOT_DIR@" -config.cuda_cub_root = "@CUDA_CUB_ROOT_DIR@" -config.cuda_version_major = int("@CUDA_VERSION_MAJOR@") -config.cuda_version_minor = int("@CUDA_VERSION_MINOR@") -config.cuda_version = "@CUDA_VERSION@" -if sys.platform in ['win32']: - config.cuda_sdk_root = "@CUDA_SDK_ROOT_DIR@" - if not config.cuda_sdk_root or config.cuda_sdk_root == "CUDA_SDK_ROOT_DIR-NOTFOUND": - cuda_version = config.cuda_version - cuda_version = cuda_version.replace('.','_') - config.cuda_samples_root = os.environ.get('NVCUDASAMPLES' + cuda_version + '_ROOT') - if not config.cuda_samples_root: - lit_config.fatal('No CUDA Samples dir set! Please set CUDA_SDK_ROOT_DIR.') - config.cuda_sdk_root = config.cuda_samples_root - config.build_type = "@CMAKE_BUILD_TYPE@" - if not config.build_type: - config.build_type = "Debug" -else: - config.cuda_sdk_root = config.cuda_root - -# Support substitution of the tools and libs dirs with user parameters. This is -# used when we can't determine the tool dir at configuration time. -try: - config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params - config.obj_root = config.obj_root % lit_config.params -except KeyError: - e = sys.exc_info()[1] - key, = e.args - lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key)) diff --git a/hipamd/tests/hipify-clang/run_test.bat b/hipamd/tests/hipify-clang/run_test.bat deleted file mode 100644 index 8b10bc8c2e..0000000000 --- a/hipamd/tests/hipify-clang/run_test.bat +++ /dev/null @@ -1,21 +0,0 @@ -@echo off -setlocal - -for %%i in (FileCheck.exe) do set FILE_CHECK=%%~$PATH:i -if not defined FILE_CHECK (echo Error: FileCheck.exe not found in PATH. && exit /b 1) - -set HIPIFY=%1 -set IN_FILE=%2 -set TMP_FILE=%3 -set CUDA_ROOT=%4 -set ROC=%5 - -set all_args=%* -call set clang_args=%%all_args:*%6=%% -set clang_args=%6%clang_args% - -%HIPIFY% -o=%TMP_FILE% %IN_FILE% %CUDA_ROOT% %ROC% -- %clang_args% -if errorlevel 1 (echo Error: hipify-clang.exe failed with exit code: %errorlevel% && exit /b %errorlevel%) - -findstr /v /r /c:"[ ]*//[ ]*[CHECK*|RUN]" %TMP_FILE% | %FILE_CHECK% %IN_FILE% -if errorlevel 1 (echo Error: FileCheck.exe failed with exit code: %errorlevel% && exit /b %errorlevel%) diff --git a/hipamd/tests/hipify-clang/run_test.sh b/hipamd/tests/hipify-clang/run_test.sh deleted file mode 100755 index 357976558e..0000000000 --- a/hipamd/tests/hipify-clang/run_test.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit - -# Run a single LIT test file in a magical way that preserves colour output, to work around -# a known flaw in lit. - -# Capture lit substitutions -HIPIFY=$1 -IN_FILE=$2 -TMP_FILE=$3 -CUDA_ROOT=$4 -ROC=$5 -shift 5 - -# Remaining args are the ones to forward to clang proper. - -$HIPIFY -o=$TMP_FILE $IN_FILE $CUDA_ROOT $ROC -- $@ && cat $TMP_FILE | sed -Ee 's|//.+|// |g' | FileCheck $IN_FILE diff --git a/hipamd/tests/hipify-clang/unit_tests/casts/reinterpret_cast.cu b/hipamd/tests/hipify-clang/unit_tests/casts/reinterpret_cast.cu deleted file mode 100644 index 6b6f4f5dde..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/casts/reinterpret_cast.cu +++ /dev/null @@ -1,52 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -/* -Copyright (c) 2015-present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -// CHECK: #include -#include - -__global__ -void fn(float* px, float* py) { - bool a[42]; - __shared__ double b[69]; - for (auto&& x : b) x = *py++; - for (auto&& x : a) x = *px++ > 0.0; - for (auto&& x : a) if (x) *--py = *--px; -} - -int main() { - // CHECK: hipFuncCache_t cacheConfig; - cudaFuncCache cacheConfig; - void* func; - // CHECK: hipFuncSetCacheConfig(reinterpret_cast(func), cacheConfig); - cudaFuncSetCacheConfig(func, cacheConfig); - // CHECK: hipFuncAttributes attr{}; - cudaFuncAttributes attr{}; - // CHECK: auto r = hipFuncGetAttributes(&attr, reinterpret_cast(&fn)); - auto r = cudaFuncGetAttributes(&attr, &fn); - // CHECK: if (r != hipSuccess || attr.maxThreadsPerBlock == 0) { - if (r != cudaSuccess || attr.maxThreadsPerBlock == 0) { - return 1; - } - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/device/atomics.cu b/hipamd/tests/hipify-clang/unit_tests/device/atomics.cu deleted file mode 100644 index 3089efe1b8..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/device/atomics.cu +++ /dev/null @@ -1,286 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args "-Xclang" "-fcuda-allow-variadic-functions" - -/* -Copyright (c) 2015-present Advanced Micro Devices, Inc. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -// CHECK: #include "hip/hip_runtime.h" -#include "cuda_runtime.h" - -#include -#include -#include -#include -#include -#include - -#define EXIT_WAIVED 2 - -const char* sampleName = "hipSimpleAtomicsTest"; - -using namespace std; -// Auto-Verification Code -bool testResult = true; - -bool computeGoldBitwise(...) { - return true; -} - -template{}>::type* = nullptr> -bool computeGoldBitwise(T* gpuData, int len) { - T val = 0xff; - for (int i = 0; i < len; ++i) { - // 9th element should be 1 - val &= (2 * i + 7); - } - if (val != gpuData[8]) { - printf("atomicAnd failed\n"); - return false; - } - - val = 0; - for (int i = 0; i < len; ++i) { - // 10th element should be 0xff - val |= (1 << i); - } - if (val != gpuData[9]) { - printf("atomicOr failed\n"); - return false; - } - - val = 0xff; - for (int i = 0; i < len; ++i) { - // 11th element should be 0xff - val ^= i; - } - if (val != gpuData[10]) { - printf("atomicXor failed\n"); - return false; - } - - return true; -} - -template -bool computeGold(T* gpuData, int len) { - T val = 0; - for (int i = 0; i < len; ++i) { - val += 10; - } - if (val != gpuData[0]) { - printf("atomicAdd failed\n"); - return false; - } - - val = 0; - for (int i = 0; i < len; ++i) { - val -= 10; - } - if (val != gpuData[1]) { - printf("atomicSub failed\n"); - return false; - } - - bool found = false; - for (T i = 0; i < len; ++i) { - // third element should be a member of [0, len) - if (i == gpuData[2]) { - found = true; - break; - } - } - if (!found) { - printf("atomicExch failed\n"); - return false; - } - - val = -(1 << 8); - for (T i = 0; i < len; ++i) { - // fourth element should be len-1 - val = max(val, i); - } - if (val != gpuData[3]) { - printf("atomicMax failed\n"); - return false; - } - - val = 1 << 8; - for (T i = 0; i < len; ++i) { - val = min(val, i); - } - if (val != gpuData[4]) { - printf("atomicMin failed\n"); - return false; - } - - int limit = 17; - val = 0; - for (int i = 0; i < len; ++i) { - val = (val >= limit) ? 0 : val + 1; - } - if (val != gpuData[5]) { - printf("atomicInc failed\n"); - return false; - } - - limit = 137; - val = 0; - for (int i = 0; i < len; ++i) { - val = ((val == 0) || (val > limit)) ? limit : val - 1; - } - if (val != gpuData[6]) { - printf("atomicDec failed\n"); - return false; - } - - found = false; - for (T i = 0; i < len; ++i) { - // eighth element should be a member of [0, len) - if (i == gpuData[7]) { - found = true; - break; - } - } - if (!found) { - printf("atomicCAS failed\n"); - return false; - } - - return computeGoldBitwise(gpuData, len); -} - -__device__ -void testKernelExch(...) {} - -template{}>::type* = nullptr> -__device__ -void testKernelExch(T* g_odata) { - // access thread id - const T tid = blockDim.x * blockIdx.x + threadIdx.x; - // Atomic exchange - atomicExch(&g_odata[2], tid); -} - -__device__ -void testKernelSub(...) {} - -template< - typename T, - typename enable_if< - is_same{} || is_same{}>::type* = nullptr> -__device__ -void testKernelSub(T* g_odata) { - // Atomic subtraction (final should be 0) - atomicSub(&g_odata[1], 10); -} - -__device__ -void testKernelIntegral(...) {} - -template{}>::type* = nullptr> -__device__ -void testKernelIntegral(T* g_odata) { - // access thread id - const T tid = blockDim.x * blockIdx.x + threadIdx.x; - // Atomic maximum - atomicMax(&g_odata[3], tid); - // Atomic minimum - atomicMin(&g_odata[4], tid); - // Atomic increment (modulo 17+1) - atomicInc((unsigned int*)&g_odata[5], 17); - // Atomic decrement - atomicDec((unsigned int*)&g_odata[6], 137); - // Atomic compare-and-swap - atomicCAS(&g_odata[7], tid - 1, tid); - // Atomic AND - atomicAnd(&g_odata[8], 2 * tid + 7); - // Atomic OR - atomicOr(&g_odata[9], 1 << tid); - // Atomic XOR - atomicXor(&g_odata[10], tid); - testKernelSub(g_odata); -} - -template -__global__ void testKernel(T* g_odata) { - // Atomic addition - atomicAdd(&g_odata[0], 10); - testKernelIntegral(g_odata); - testKernelExch(g_odata); -} - -template -void runTest() { - // CHECK: hipDeviceProp_t deviceProp; - cudaDeviceProp deviceProp; - deviceProp.major = 0; - deviceProp.minor = 0; - int dev = 0; - // CHECK: hipGetDeviceProperties(&deviceProp, dev); - cudaGetDeviceProperties(&deviceProp, dev); - // Statistics about the GPU device - printf( - "> GPU device has %d Multi-Processors, " - "SM %d.%d compute capabilities\n\n", - deviceProp.multiProcessorCount, deviceProp.major, deviceProp.minor); - unsigned int numThreads = 256; - unsigned int numBlocks = 64; - unsigned int numData = 11; - unsigned int memSize = sizeof(T) * numData; - - // Allocate mem for the result on host side - T* hOData = (T*)malloc(memSize); - // Initialize the memory - for (unsigned int i = 0; i < numData; i++) hOData[i] = 0; - // To make the AND and XOR tests generate something other than 0... - hOData[8] = hOData[10] = 0xff; - // Allocate device memory for result - T* dOData; - // CHECK: hipMalloc((void**)&dOData, memSize); - cudaMalloc((void**)&dOData, memSize); - // Copy host memory to device to initialize to zero - // CHECK: hipMemcpy(dOData, hOData, memSize, hipMemcpyHostToDevice); - cudaMemcpy(dOData, hOData, memSize, cudaMemcpyHostToDevice); - // Execute the kernel - // CHECK: hipLaunchKernelGGL(HIP_KERNEL_NAME(testKernel), dim3(numBlocks), dim3(numThreads), 0, 0, dOData); - testKernel<<>>(dOData); - // Copy result from device to host - // CHECK: hipMemcpy(hOData, dOData, memSize, hipMemcpyDeviceToHost); - cudaMemcpy(hOData, dOData, memSize, cudaMemcpyDeviceToHost); - // Compute reference solution - testResult = computeGold(hOData, numThreads * numBlocks); - // Cleanup memory - free(hOData); - // CHECK: hipFree(dOData); - cudaFree(dOData); -} - -int main(int argc, char** argv) { - printf("%s starting...\n", sampleName); - runTest(); - runTest(); - runTest(); - runTest(); -#if CUDA_VERSION >= 8000 && defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 600 - runTest(); -#endif - // CHECK: hipDeviceReset(); - cudaDeviceReset(); - printf("%s completed, returned %s\n", sampleName, testResult ? "OK" : "ERROR!"); - exit(testResult ? EXIT_SUCCESS : EXIT_FAILURE); -} diff --git a/hipamd/tests/hipify-clang/unit_tests/device/device_symbols.cu b/hipamd/tests/hipify-clang/unit_tests/device/device_symbols.cu deleted file mode 100644 index b58abeda46..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/device/device_symbols.cu +++ /dev/null @@ -1,152 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -/* -Copyright (c) 2015-present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -// CHECK: #include -#include -#include -#include - -#define NUM 1024 -#define SIZE 1024 * 4 - -__device__ int globalIn[NUM]; -__device__ int globalOut[NUM]; - -__global__ void Assign(int* Out) { - int tid = threadIdx.x + blockIdx.x * blockDim.x; - Out[tid] = globalIn[tid]; - globalOut[tid] = globalIn[tid]; -} - -__device__ __constant__ int globalConst[NUM]; - -__global__ void checkAddress(int* addr, bool* out) { - *out = (globalConst == addr); -} - -int main() { - int *A, *Am, *B, *Ad, *C, *Cm; - A = new int[NUM]; - B = new int[NUM]; - C = new int[NUM]; - for (int i = 0; i < NUM; ++i) { - A[i] = -1 * i; - B[i] = 0; - C[i] = 0; - } - // CHECK: hipMalloc((void**)&Ad, SIZE); - cudaMalloc((void**)&Ad, SIZE); - // CHECK: hipHostMalloc((void**)&Am, SIZE); - cudaMallocHost((void**)&Am, SIZE); - // CHECK: hipHostMalloc((void**)&Cm, SIZE); - cudaMallocHost((void**)&Cm, SIZE); - for (int i = 0; i < NUM; ++i) { - Am[i] = -1 * i; - Cm[i] = 0; - } - // CHECK: hipStream_t stream = NULL; - cudaStream_t stream = NULL; - // CHECK: hipStreamCreate(&stream); - cudaStreamCreate(&stream); - // CHECK: hipMemcpyToSymbolAsync(HIP_SYMBOL(globalIn), Am, SIZE, 0, hipMemcpyHostToDevice, stream); - cudaMemcpyToSymbolAsync(globalIn, Am, SIZE, 0, cudaMemcpyHostToDevice, stream); - // CHECK: hipStreamSynchronize(stream); - cudaStreamSynchronize(stream); - // CHECK: hipLaunchKernelGGL(Assign, dim3(1, 1, 1), dim3(NUM, 1, 1), 0, 0, Ad); - Assign<<>>(Ad); - // CHECK: hipMemcpy(B, Ad, SIZE, hipMemcpyDeviceToHost); - cudaMemcpy(B, Ad, SIZE, cudaMemcpyDeviceToHost); - // CHECK: hipMemcpyFromSymbolAsync(Cm, HIP_SYMBOL(globalOut), SIZE, 0, hipMemcpyDeviceToHost, stream); - cudaMemcpyFromSymbolAsync(Cm, globalOut, SIZE, 0, cudaMemcpyDeviceToHost, stream); - // CHECK: hipStreamSynchronize(stream); - cudaStreamSynchronize(stream); - for (int i = 0; i < NUM; ++i) { - assert(Am[i] == B[i]); - assert(Am[i] == Cm[i]); - } - for (int i = 0; i < NUM; ++i) { - A[i] = -2 * i; - B[i] = 0; - } - // CHECK: hipMemcpyToSymbol(HIP_SYMBOL(globalIn), A, SIZE, 0, hipMemcpyHostToDevice); - cudaMemcpyToSymbol(globalIn, A, SIZE, 0, cudaMemcpyHostToDevice); - // CHECK: hipLaunchKernelGGL(Assign, dim3(1, 1, 1), dim3(NUM, 1, 1), 0, 0, Ad); - Assign<<>>(Ad); - // CHECK: hipMemcpy(B, Ad, SIZE, hipMemcpyDeviceToHost); - cudaMemcpy(B, Ad, SIZE, cudaMemcpyDeviceToHost); - // CHECK: hipMemcpyFromSymbol(C, HIP_SYMBOL(globalOut), SIZE, 0, hipMemcpyDeviceToHost); - cudaMemcpyFromSymbol(C, globalOut, SIZE, 0, cudaMemcpyDeviceToHost); - for (int i = 0; i < NUM; ++i) { - assert(A[i] == B[i]); - assert(A[i] == C[i]); - } - for (int i = 0; i < NUM; ++i) { - A[i] = -3 * i; - B[i] = 0; - } - // CHECK: hipMemcpyToSymbolAsync(HIP_SYMBOL(globalIn), A, SIZE, 0, hipMemcpyHostToDevice, stream); - cudaMemcpyToSymbolAsync(globalIn, A, SIZE, 0, cudaMemcpyHostToDevice, stream); - // CHECK: hipStreamSynchronize(stream); - cudaStreamSynchronize(stream); - // CHECK: hipLaunchKernelGGL(Assign, dim3(1, 1, 1), dim3(NUM, 1, 1), 0, 0, Ad); - Assign<<>>(Ad); - // CHECK: hipMemcpy(B, Ad, SIZE, hipMemcpyDeviceToHost); - cudaMemcpy(B, Ad, SIZE, cudaMemcpyDeviceToHost); - // CHECK: hipMemcpyFromSymbolAsync(C, HIP_SYMBOL(globalOut), SIZE, 0, hipMemcpyDeviceToHost, stream); - cudaMemcpyFromSymbolAsync(C, globalOut, SIZE, 0, cudaMemcpyDeviceToHost, stream); - // CHECK: hipStreamSynchronize(stream); - cudaStreamSynchronize(stream); - for (int i = 0; i < NUM; ++i) { - assert(A[i] == B[i]); - assert(A[i] == C[i]); - } - bool *checkOkD; - bool checkOk = false; - size_t symbolSize = 0; - int *symbolAddress; - // CHECK: hipGetSymbolSize(&symbolSize, HIP_SYMBOL(globalConst)); - cudaGetSymbolSize(&symbolSize, globalConst); - // CHECK: hipGetSymbolAddress((void**) &symbolAddress, HIP_SYMBOL(globalConst)); - cudaGetSymbolAddress((void**) &symbolAddress, globalConst); - // CHECK: hipMalloc((void**)&checkOkD, sizeof(bool)); - cudaMalloc((void**)&checkOkD, sizeof(bool)); - // CHECK: hipLaunchKernelGGL(checkAddress, dim3(1, 1, 1), dim3(1, 1, 1), 0, 0, symbolAddress, checkOkD); - checkAddress<<>>(symbolAddress, checkOkD); - // CHECK: hipMemcpy(&checkOk, checkOkD, sizeof(bool), hipMemcpyDeviceToHost); - cudaMemcpy(&checkOk, checkOkD, sizeof(bool), cudaMemcpyDeviceToHost); - // CHECK: hipFree(checkOkD); - cudaFree(checkOkD); - assert(checkOk); - assert(symbolSize == SIZE); - // CHECK: hipHostFree(Am); - cudaFreeHost(Am); - // CHECK: hipHostFree(Cm); - cudaFreeHost(Cm); - // CHECK: hipFree(Ad); - cudaFree(Ad); - delete[] A; - delete[] B; - delete[] C; - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/device/math_functions.cu b/hipamd/tests/hipify-clang/unit_tests/device/math_functions.cu deleted file mode 100644 index c833ca0182..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/device/math_functions.cu +++ /dev/null @@ -1,58 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -// Synthetic test to warn only on device functions umin and umax as unsupported, but not on user defined ones. -// ToDo: change lit testing in order to parse the output. - -#define LEN 1024 -#define SIZE LEN * sizeof(float) -// CHECK: #include -#include - -namespace my { - // user defined function - unsigned int umin(unsigned int arg1, unsigned int arg2) { - return (arg1 < arg2) ? arg1 : arg2; - } - // user defined function - unsigned int umax(unsigned int arg1, unsigned int arg2) { - return (arg1 > arg2) ? arg1 : arg2; - } -} - -__global__ void uint_arithm(float* A, float* B, float* C, unsigned int u1, unsigned int u2) -{ - // device function call (warn if unsupported) - unsigned int _umin = umin ( u1, u2 ); - // device function call (warn if unsupported) - unsigned int _umax = umax ( u1, u2 ); - // device function call (warn if unsupported) - unsigned int _umin_global = ::umin ( u1, u2 ); - // device function call (warn if unsupported) - unsigned int _umax_global = ::umax(u1, u2); - if (_umin != _umin_global) return; - if (_umax != _umax_global) return; - int i = threadIdx.x; - A[i] = i + _umin; - B[i] = i + _umax; - C[i] = A[i] + B[i]; -} - -int main() { - unsigned int u1 = 33; - unsigned int u2 = 34; - // user defined function call - unsigned int _min = my::umin(u1, u2); - // user defined function call - unsigned int _max = my::umax(u1, u2); - float *A, *B, *C; - // CHECK: hipMalloc((void**)&A, SIZE); - cudaMalloc((void**)&A, SIZE); - // CHECK: hipMalloc((void**)&B, SIZE); - cudaMalloc((void**)&B, SIZE); - // CHECK: hipMalloc((void**)&C, SIZE); - cudaMalloc((void**)&C, SIZE); - dim3 dimGrid(LEN / 512, 1, 1); - dim3 dimBlock(512, 1, 1); - // CHECK: hipLaunchKernelGGL(uint_arithm, dim3(dimGrid), dim3(dimBlock), 0, 0, A, B, C, u1, u2); - uint_arithm<<>>(A, B, C, u1, u2); - return _min < _max; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_01.cu b/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_01.cu deleted file mode 100644 index 013d7c17c4..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_01.cu +++ /dev/null @@ -1,8 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -// CHECK: #include -// CHECK-NOT: #include -// CHECK: #include -#include -#include -#include diff --git a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_02.cu b/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_02.cu deleted file mode 100644 index 957fd16559..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_02.cu +++ /dev/null @@ -1,8 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -// CHECK: #include "hip/hip_runtime.h" -// CHECK-NOT: #include "cuda_runtime.h" -// CHECK: #include -#include "cuda.h" -#include "cuda_runtime.h" -#include diff --git a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_03.cu b/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_03.cu deleted file mode 100644 index 14735172fb..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_03.cu +++ /dev/null @@ -1,10 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -// CHECK: #pragma once -// CHECK-NEXT: #include -#pragma once -// CHECK-NOT: #include -int main(int argc, char* argv[]) { - return 0; -} - diff --git a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_04.cu b/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_04.cu deleted file mode 100644 index 10a7daf41c..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_04.cu +++ /dev/null @@ -1,12 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -// CHECK: #include -// CHECK-NEXT: #include -// CHECK-NEXT: #include -#include -#include -// CHECK-NOT: #include -int main(int argc, char* argv[]) { - return 0; -} - diff --git a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_05.cu b/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_05.cu deleted file mode 100644 index 4706044b9d..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_05.cu +++ /dev/null @@ -1,12 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -// CHECK: #pragma once -// CHECK-NEXT: #include -#pragma once -// CHECK-NOT: #include -#include - -int main(int argc, char* argv[]) { - return 0; -} - diff --git a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_06.cu b/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_06.cu deleted file mode 100644 index 1adccd95e4..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_06.cu +++ /dev/null @@ -1,8 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -// CHECK: #include -// CHECK-NOT: #include -// CHECK: #include -#include -#include -#include diff --git a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_07.cu b/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_07.cu deleted file mode 100644 index 1effc189b8..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_07.cu +++ /dev/null @@ -1,8 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -// CHECK: #include "hipblas.h" -// CHECK-NOT: #include "cublas.h" -// CHECK: #include -#include "cublas_v2.h" -#include "cublas.h" -#include diff --git a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_08.cu b/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_08.cu deleted file mode 100644 index aca7f194b0..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_08.cu +++ /dev/null @@ -1,14 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -// CHECK: #include -// CHECK-NOT: #include -// CHECK: #include -// CHECK: #include "hipblas.h" -// CHECK-NOT: #include "cublas.h" -// CHECK: #include -#include -#include -#include -#include "cublas_v2.h" -#include "cublas.h" -#include diff --git a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_09.cu b/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_09.cu deleted file mode 100644 index 37e718b5a4..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_09.cu +++ /dev/null @@ -1,100 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -// CHECK: #include -// CHECK: #include - -// CHECK-NOT: #include -// CHECK-NOT: #include - -// CHECK: #include "hip/hip_runtime_api.h" -// CHECK: #include "hip/channel_descriptor.h" -// CHECK: #include "hip/device_functions.h" -// CHECK: #include "hip/driver_types.h" -// CHECK: #include "hip/hip_complex.h" -// CHECK: #include "hip/hip_fp16.h" -// CHECK: #include "hip/hip_texture_types.h" -// CHECK: #include "hip/hip_vector_types.h" - -// CHECK: #include - -// CHECK: #include "hipblas.h" -// CHECK-NOT: #include "cublas.h" - -// CHECK: #include - -// CHECK: #include "hiprand.h" -// CHECK: #include "hiprand_kernel.h" - -// CHECK: #include - -// CHECK-NOT: #include "hiprand.h" -// CHECK-NOT: #include "hiprand_kernel.h" -// CHECK-NOT: #include "curand_discrete.h" -// CHECK-NOT: #include "curand_discrete2.h" -// CHECK-NOT: #include "curand_globals.h" -// CHECK-NOT: #include "curand_lognormal.h" -// CHECK-NOT: #include "curand_mrg32k3a.h" -// CHECK-NOT: #include "curand_mtgp32.h" -// CHECK-NOT: #include "curand_mtgp32_host.h" -// CHECK-NOT: #include "curand_mtgp32_kernel.h" -// CHECK-NOT: #include "curand_mtgp32dc_p_11213.h" -// CHECK-NOT: #include "curand_normal.h" -// CHECK-NOT: #include "curand_normal_static.h" -// CHECK-NOT: #include "curand_philox4x32_x.h" -// CHECK-NOT: #include "curand_poisson.h" -// CHECK-NOT: #include "curand_precalc.h" -// CHECK-NOT: #include "curand_uniform.h" - -// CHECK: #include - -// CHECK: #include "hipfft.h" -// CHECK: #include "hipsparse.h" - -#include - -#include - -#include - -#include "cuda_runtime_api.h" -#include "channel_descriptor.h" -#include "device_functions.h" -#include "driver_types.h" -#include "cuComplex.h" -#include "cuda_fp16.h" -#include "cuda_texture_types.h" -#include "vector_types.h" - -#include - -#include "cublas_v2.h" -#include "cublas.h" - -#include - -#include "curand.h" -#include "curand_kernel.h" - -#include - -#include "curand_discrete.h" -#include "curand_discrete2.h" -#include "curand_globals.h" -#include "curand_lognormal.h" -#include "curand_mrg32k3a.h" -#include "curand_mtgp32.h" -#include "curand_mtgp32_host.h" -#include "curand_mtgp32_kernel.h" -#include "curand_mtgp32dc_p_11213.h" -#include "curand_normal.h" -#include "curand_normal_static.h" -#include "curand_philox4x32_x.h" -#include "curand_poisson.h" -#include "curand_precalc.h" -#include "curand_uniform.h" - -#include - -#include "cufft.h" - -#include "cusparse.h" diff --git a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_10.cu b/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_10.cu deleted file mode 100644 index 1c2db50e3b..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_10.cu +++ /dev/null @@ -1,14 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -// Checks that HIP header file is included after #pragma once, -// which goes before include guard controlling macro. -// CHECK: #pragma once -// CHECK-NEXT: #include -#pragma once -#ifndef HEADERS_TEST_10_H -// CHECK: #ifndef HEADERS_TEST_10_H -// CHECK-NOT: #include -#define HEADERS_TEST_10_H -#include -static int counter = 0; -#endif // HEADERS_TEST_10_H diff --git a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_11.cu b/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_11.cu deleted file mode 100644 index 7c59dbe4a7..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/headers/headers_test_11.cu +++ /dev/null @@ -1,14 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -// Checks that HIP header file is included after include guard controlling macro, -// which goes before #pragma once. -// CHECK: #ifndef HEADERS_TEST_10_H -// CHECK-NEXT: #include -#ifndef HEADERS_TEST_10_H -// CHECK: #pragma once -#pragma once -// CHECK-NOT: #include -#define HEADERS_TEST_10_H -#include -static int counter = 0; -#endif // HEADERS_TEST_10_H diff --git a/hipamd/tests/hipify-clang/unit_tests/kernel_launch/kernel_launch_01.cu b/hipamd/tests/hipify-clang/unit_tests/kernel_launch/kernel_launch_01.cu deleted file mode 100644 index 3795d3c799..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/kernel_launch/kernel_launch_01.cu +++ /dev/null @@ -1,46 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -// Synthetic test to warn only on device functions umin and umax as unsupported, but not on user defined ones. -// ToDo: change lit testing in order to parse the output. - -#define LEN 1024 -#define SIZE LEN * sizeof(float) -#define ITER 1024*1024 - -// CHECK: #include -#include - -#define CUDA_LAUNCH(cuda_call,dimGrid,dimBlock, ...) \ - cuda_call<<>>(__VA_ARGS__); - -__global__ void Inc1(float *Ad, float *Bd) { - int tx = threadIdx.x + blockIdx.x * blockDim.x; - if (tx < 1) { - for (int i = 0; i < ITER; ++i) { - Ad[tx] = Ad[tx] + 1.0f; - for (int j = 0; j < 256; ++j) { - Bd[tx] = Ad[tx]; - } - } - } -} - -int main() { - float *A, *Ad, *Bd; - A = new float[LEN]; - for (int i = 0; i < LEN; ++i) { - A[i] = 0.0f; - } - // CHECK: hipError_t status; - cudaError_t status; - // CHECK: status = hipHostRegister(A, SIZE, hipHostRegisterMapped); - status = cudaHostRegister(A, SIZE, cudaHostRegisterMapped); - // CHECK: hipHostGetDevicePointer(&Ad, A, 0); - cudaHostGetDevicePointer(&Ad, A, 0); - // CHECK: hipMalloc((void**)&Bd, SIZE); - cudaMalloc((void**)&Bd, SIZE); - dim3 dimGrid(LEN / 512, 1, 1); - dim3 dimBlock(512, 1, 1); - - // CHECK: hipLaunchKernelGGL(Inc1, dim3(dimGrid), dim3(dimBlock), 0, 0, Ad, Bd); - CUDA_LAUNCH(Inc1, dimGrid, dimBlock, Ad, Bd); -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/CAFFE2/caffe2/core/common_cudnn.h b/hipamd/tests/hipify-clang/unit_tests/libraries/CAFFE2/caffe2/core/common_cudnn.h deleted file mode 100644 index e9437c11f5..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/CAFFE2/caffe2/core/common_cudnn.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef CAFFE2_CORE_COMMON_CUDNN_H_ -#define CAFFE2_CORE_COMMON_CUDNN_H_ - -#include -#include - -#endif // CAFFE2_CORE_COMMON_CUDNN_H_ diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/CAFFE2/caffe2/operators/spatial_batch_norm_op.h b/hipamd/tests/hipify-clang/unit_tests/libraries/CAFFE2/caffe2/operators/spatial_batch_norm_op.h deleted file mode 100644 index 7b8a13788a..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/CAFFE2/caffe2/operators/spatial_batch_norm_op.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef CAFFE2_OPERATORS_SPATIAL_BATCH_NORM_OP_H_ -#define CAFFE2_OPERATORS_SPATIAL_BATCH_NORM_OP_H_ - -#include -#include -#include -#include -#include - -namespace caffe2 { - -} // namespace caffe2 - -#endif // CAFFE2_OPERATORS_SPATIAL_BATCH_NORM_OP_H_ diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/CAFFE2/caffe2_01.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/CAFFE2/caffe2_01.cu deleted file mode 100644 index 3c82045d30..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/CAFFE2/caffe2_01.cu +++ /dev/null @@ -1,12 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args "-roc" %clang_args - -// NOTE: Nonworking code just for conversion testing - -// CHECK: #include -#include -#include -#include -// CHECK: #include "caffe2/operators/hip/spatial_batch_norm_op_miopen.hip" -#include "caffe2/operators/spatial_batch_norm_op.h" -// CHECK: #include "caffe2/core/hip/common_miopen.h" -#include "caffe2/core/common_cudnn.h" diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/CAFFE2/caffe2_02.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/CAFFE2/caffe2_02.cu deleted file mode 100644 index 7f29cfe25c..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/CAFFE2/caffe2_02.cu +++ /dev/null @@ -1,102 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args "-roc" %clang_args - -// NOTE: Nonworking code just for conversion testing - -// CHECK: #include -#include -#include -#include -#include - -namespace caffe2 { - -// Operator Definition. -struct OperatorDef { - int input = 1; - int output = 2; - int name = 3; -}; - -class OperatorBase; -class Workspace; - -template -class Observable { - public: - Observable() = default; - - Observable(Observable&&) = default; - Observable& operator =(Observable&&) = default; - - virtual ~Observable() = default; -}; - -template -class ObserverBase { - public: - explicit ObserverBase(T* subject) : subject_(subject) {} - - virtual void Start() {} - virtual void Stop() {} - - virtual std::string debugInfo() { - return "Not implemented."; - } - - virtual ~ObserverBase() noexcept {}; - - T* subject() const { - return subject_; - } - - protected: - T* subject_; -}; - -typedef ObserverBase OperatorObserver; - -class OperatorBase : public Observable { - public: - explicit OperatorBase(const OperatorDef& operator_def, Workspace* ws); - virtual ~OperatorBase() noexcept {} -}; - -template -class Operator : public OperatorBase { - public: - explicit Operator(const OperatorDef& operator_def, Workspace* ws) - : OperatorBase(operator_def, ws) { - } - ~Operator() noexcept override {} -}; - -template -class DummyEmptyOp : public Operator { - public: - DummyEmptyOp(const OperatorDef& def, Workspace* ws) - : Operator(def, ws) {} - - bool RunOnDevice() final { return true; } -}; - - -class CUDAContext { -public: - CUDAContext(); - virtual ~CUDAContext() noexcept {} -}; - -#define REGISTER_CUDA_OPERATOR(name, ...) \ - void CAFFE2_PLEASE_ADD_OPERATOR_SCHEMA_FOR_##name(); \ - static void CAFFE_ANONYMOUS_VARIABLE_CUDA##name() { \ - CAFFE2_PLEASE_ADD_OPERATOR_SCHEMA_FOR_##name(); \ - } - -#define REGISTER_CUDA_OPERATOR_CREATOR(key, ...) - -// CHECK: REGISTER_HIP_OPERATOR(Operator, DummyEmptyOp); -REGISTER_CUDA_OPERATOR(Operator, DummyEmptyOp); -// CHECK: REGISTER_HIP_OPERATOR_CREATOR(Operator, DummyEmptyOp); -REGISTER_CUDA_OPERATOR_CREATOR(Operator, DummyEmptyOp); - -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/CUB/cub_01.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/CUB/cub_01.cu deleted file mode 100644 index 4646015e74..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/CUB/cub_01.cu +++ /dev/null @@ -1,60 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -// CHECK: #include -#include -// CHECK: #include -#include -// CHECK: #include -#include - -#include - -// TODO: -// using namespace cub; - -template -__global__ void sort(const T* data_in, T* data_out){ - // CHECK: typedef ::hipcub::BlockRadixSort BlockRadixSortT; - typedef ::cub::BlockRadixSort BlockRadixSortT; - __shared__ typename BlockRadixSortT::TempStorage tmp_sort; - double items[4]; - int i0 = 4 * (blockIdx.x * blockDim.x + threadIdx.x); - for (int i = 0; i < 4; ++i){ - items[i] = data_in[i0 + i]; - } - BlockRadixSortT(tmp_sort).Sort(items); - for (int i = 0; i < 4; ++i){ - data_out[i0 + i] = items[i]; - } -} - -int main(){ - double* d_gpu = NULL; - double* result_gpu = NULL; - double* data_sorted = new double[4096]; - // Allocate memory on the GPU - // CHECK: hipMalloc(&d_gpu, 4096 * sizeof(double)); - cudaMalloc(&d_gpu, 4096 * sizeof(double)); - // CHECK: hipMalloc(&result_gpu, 4096 * sizeof(double)); - cudaMalloc(&result_gpu, 4096 * sizeof(double)); - // CHECK: hiprandGenerator_t gen; - curandGenerator_t gen; - // Create generator - // CHECK: hiprandCreateGenerator(&gen, HIPRAND_RNG_PSEUDO_DEFAULT); - curandCreateGenerator(&gen, CURAND_RNG_PSEUDO_DEFAULT); - // Fill array with random numbers - // CHECK: hiprandGenerateNormalDouble(gen, d_gpu, 4096, 0.0, 1.0); - curandGenerateNormalDouble(gen, d_gpu, 4096, 0.0, 1.0); - // Destroy generator - // CHECK: hiprandDestroyGenerator(gen); - curandDestroyGenerator(gen); - // Sort data - // CHECK: hipLaunchKernelGGL(HIP_KERNEL_NAME(sort), dim3(1), dim3(1024), 0, 0, d_gpu, result_gpu); - sort<<<1, 1024>>>(d_gpu, result_gpu); - // CHECK: hipMemcpy(data_sorted, result_gpu, 4096 * sizeof(double), hipMemcpyDeviceToHost); - cudaMemcpy(data_sorted, result_gpu, 4096 * sizeof(double), cudaMemcpyDeviceToHost); - // Write the sorted data to standard out - for (int i = 0; i < 4096; ++i){ - std::cout << data_sorted[i] << ", "; - } - std::cout << std::endl; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/CUB/cub_02.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/CUB/cub_02.cu deleted file mode 100644 index 21898baa03..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/CUB/cub_02.cu +++ /dev/null @@ -1,69 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -// CHECK: #include -#include -// CHECK: #include -#include -// CHECK: #include -#include - -#include - -template -__global__ void sort(const T* data_in, T* data_out){ - // CHECK: typedef hipcub::BlockLoad BlockLoadT; - typedef cub::BlockLoad BlockLoadT; - // CHECK: typedef hipcub::BlockRadixSort BlockRadixSortT; - typedef cub::BlockRadixSort BlockRadixSortT; - // CHECK: typedef hipcub::BlockStore BlockStoreT; - typedef cub::BlockStore BlockStoreT; - __shared__ union { - typename BlockLoadT::TempStorage load; - typename BlockRadixSortT::TempStorage sort; - typename BlockStoreT::TempStorage store; - } tmp_storage; - T items[ITEMS_PER_THREAD]; - BlockLoadT(tmp_storage.load).Load(data_in + blockIdx.x * BLOCK_WIDTH * ITEMS_PER_THREAD, items); - __syncthreads(); - BlockRadixSortT(tmp_storage.sort).Sort(items); - __syncthreads(); - BlockStoreT(tmp_storage.store).Store(data_out + blockIdx.x * BLOCK_WIDTH * ITEMS_PER_THREAD, items); -} - -int main() { - double* d_gpu = NULL; - double* result_gpu = NULL; - double* data_sorted = new double[1000*4096]; - // Allocate memory on the GPU - // CHECK: hipMalloc(&d_gpu, 1000*4096 * sizeof(double)); - cudaMalloc(&d_gpu, 1000*4096 * sizeof(double)); - // CHECK: hipMalloc(&result_gpu, 1000*4096 * sizeof(double)); - cudaMalloc(&result_gpu, 1000*4096 * sizeof(double)); - // CHECK: hiprandGenerator_t gen; - curandGenerator_t gen; - // Create generator - // CHECK: hiprandCreateGenerator(&gen, HIPRAND_RNG_PSEUDO_DEFAULT); - curandCreateGenerator(&gen, CURAND_RNG_PSEUDO_DEFAULT); - // Fill array with random numbers - // CHECK: hiprandGenerateNormalDouble(gen, d_gpu, 1000*4096, 0.0, 1.0); - curandGenerateNormalDouble(gen, d_gpu, 1000*4096, 0.0, 1.0); - // Destroy generator - // CHECK: hiprandDestroyGenerator(gen); - curandDestroyGenerator(gen); - // Sort data - // CHECK: hipLaunchKernelGGL(HIP_KERNEL_NAME(sort<512, 8, hipcub::BLOCK_LOAD_TRANSPOSE, hipcub::BLOCK_STORE_TRANSPOSE>), dim3(1000), dim3(512), 0, 0, d_gpu, result_gpu); - sort<512, 8, cub::BLOCK_LOAD_TRANSPOSE, cub::BLOCK_STORE_TRANSPOSE><<<1000, 512>>>(d_gpu, result_gpu); - // CHECK: hipLaunchKernelGGL(HIP_KERNEL_NAME(sort<256, 16, hipcub::BLOCK_LOAD_DIRECT, hipcub::BLOCK_STORE_DIRECT>), dim3(1000), dim3(256), 0, 0, d_gpu, result_gpu); - sort<256, 16, cub::BLOCK_LOAD_DIRECT, cub::BLOCK_STORE_DIRECT><<<1000, 256>>>(d_gpu, result_gpu); - // CHECK: hipMemcpy(data_sorted, result_gpu, 1000*4096*sizeof(double), hipMemcpyDeviceToHost); - cudaMemcpy(data_sorted, result_gpu, 1000*4096*sizeof(double), cudaMemcpyDeviceToHost); - // Write the sorted data to standard out - for (int i = 0; i < 4095; ++i) { - std::cout << data_sorted[i] << ", "; - } - std::cout << data_sorted[4095] << std::endl; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/CUB/cub_03.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/CUB/cub_03.cu deleted file mode 100644 index bc914d419d..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/CUB/cub_03.cu +++ /dev/null @@ -1,33 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -// CHECK: #include -#include -// CHECK: #include -#include - -// using namespace hipcub; -using namespace cub; - -// Simple CUDA kernel for computing tiled partial sums -template - cub::BlockScanAlgorithm SCAN_ALGO> -__global__ void ScanTilesKernel(int *d_in, int *d_out) { - // Specialize collective types for problem context - // CHECK: typedef ::hipcub::BlockLoad BlockLoadT; - typedef ::cub::BlockLoad BlockLoadT; - typedef BlockScan BlockScanT; - // Allocate on-chip temporary storage - __shared__ union { - typename BlockLoadT::TempStorage load; - typename BlockScanT::TempStorage reduce; - } temp_storage; - // Load data per thread - int thread_data[ITEMS_PER_THREAD]; - int offset = blockIdx.x * (BLOCK_THREADS * ITEMS_PER_THREAD); - BlockLoadT(temp_storage.load).Load(d_in + offset, offset); - __syncthreads(); - // Compute the block-wide prefix sum - BlockScanT(temp_storage).Sum(thread_data); -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/cublas_0_based_indexing.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/cublas_0_based_indexing.cu deleted file mode 100644 index 69812c98b0..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/cublas_0_based_indexing.cu +++ /dev/null @@ -1,81 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -// CHECK: #include -#include -#include -#include -// CHECK: #include "hipblas.h" -#include "cublas.h" -#define M 6 -#define N 5 -#define IDX2C(i,j,ld) (((j)*(ld))+(i)) -static __inline__ void modify(float *m, int ldm, int n, int p, int q, float - alpha, float beta) { - // CHECK: hipblasSscal(n - p, alpha, &m[IDX2C(p, q, ldm)], ldm); - // CHECK: hipblasSscal(ldm - p, beta, &m[IDX2C(p, q, ldm)], 1); - cublasSscal(n - p, alpha, &m[IDX2C(p, q, ldm)], ldm); - cublasSscal(ldm - p, beta, &m[IDX2C(p, q, ldm)], 1); -} -int main(void) { - int i, j; - // CHECK: hipblasStatus_t stat; - cublasStatus stat; - float* devPtrA; - float* a = 0; - a = (float *)malloc(M * N * sizeof(*a)); - if (!a) { - printf("host memory allocation failed"); - return EXIT_FAILURE; - } - for (j = 0; j < N; j++) { - for (i = 0; i < M; i++) { - a[IDX2C(i, j, M)] = (float)(i * M + j + 1); - } - } - // cublasInit is not supported yet - cublasInit(); - // cublasAlloc is not supported yet - stat = cublasAlloc(M*N, sizeof(*a), (void**)&devPtrA); - // CHECK: if (stat != HIPBLAS_STATUS_SUCCESS) { - if (stat != CUBLAS_STATUS_SUCCESS) { - printf("device memory allocation failed"); - // cublasShutdown is not supported yet - cublasShutdown(); - return EXIT_FAILURE; - } - // CHECK: stat = hipblasSetMatrix(M, N, sizeof(*a), a, M, devPtrA, M); - stat = cublasSetMatrix(M, N, sizeof(*a), a, M, devPtrA, M); - // CHECK: if (stat != HIPBLAS_STATUS_SUCCESS) { - if (stat != CUBLAS_STATUS_SUCCESS) { - printf("data download failed"); - // cublasFree is not supported yet - cublasFree(devPtrA); - // cublasShutdown is not supported yet - cublasShutdown(); - return EXIT_FAILURE; - } - modify(devPtrA, M, N, 1, 2, 16.0f, 12.0f); - // CHECK: stat = hipblasGetMatrix(M, N, sizeof(*a), devPtrA, M, a, M); - stat = cublasGetMatrix(M, N, sizeof(*a), devPtrA, M, a, M); - // CHECK: if (stat != HIPBLAS_STATUS_SUCCESS) { - if (stat != CUBLAS_STATUS_SUCCESS) { - printf("data upload failed"); - // cublasFree is not supported yet - cublasFree(devPtrA); - // cublasShutdown is not supported yet - cublasShutdown(); - return EXIT_FAILURE; - } - // cublasFree is not supported yet - cublasFree(devPtrA); - // cublasShutdown is not supported yet - cublasShutdown(); - for (j = 0; j < N; j++) { - for (i = 0; i < M; i++) { - printf("%7.0f", a[IDX2C(i, j, M)]); - } - printf("\n"); - } - free(a); - return EXIT_SUCCESS; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/cublas_1_based_indexing.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/cublas_1_based_indexing.cu deleted file mode 100644 index 6983140eac..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/cublas_1_based_indexing.cu +++ /dev/null @@ -1,90 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -#include -#include -#include -// CHECK: #include -#include -// CHECK: #include "hipblas.h" -#include "cublas_v2.h" -#define M 6 -#define N 5 -#define IDX2F(i,j,ld) ((((j)-1)*(ld))+((i)-1)) -// CHECK: static __inline__ void modify(hipblasHandle_t handle, float *m, int ldm, int -static __inline__ void modify(cublasHandle_t handle, float *m, int ldm, int - n, int p, int q, float alpha, float beta) { - // CHECK: hipblasSscal(handle, n - p + 1, &alpha, &m[IDX2F(p, q, ldm)], ldm); - // CHECK: hipblasSscal(handle, ldm - p + 1, &beta, &m[IDX2F(p, q, ldm)], 1); - cublasSscal(handle, n - p + 1, &alpha, &m[IDX2F(p, q, ldm)], ldm); - cublasSscal(handle, ldm - p + 1, &beta, &m[IDX2F(p, q, ldm)], 1); -} -int main(void) { - // CHECK: hipError_t cudaStat; - // CHECK: hipblasStatus_t stat; - // CHECK: hipblasHandle_t handle; - cudaError_t cudaStat; - cublasStatus_t stat; - cublasHandle_t handle; - int i, j; - float* devPtrA; - float* a = 0; - a = (float *)malloc(M * N * sizeof(*a)); - if (!a) { - printf("host memory allocation failed"); - return EXIT_FAILURE; - } - for (j = 1; j <= N; j++) { - for (i = 1; i <= M; i++) { - a[IDX2F(i, j, M)] = (float)((i - 1) * M + j); - } - } - // CHECK: cudaStat = hipMalloc((void**)&devPtrA, M*N * sizeof(*a)); - cudaStat = cudaMalloc((void**)&devPtrA, M*N * sizeof(*a)); - // CHECK: if (cudaStat != hipSuccess) { - if (cudaStat != cudaSuccess) { - printf("device memory allocation failed"); - return EXIT_FAILURE; - } - // CHECK: stat = hipblasCreate(&handle); - stat = cublasCreate(&handle); - // CHECK: if (stat != HIPBLAS_STATUS_SUCCESS) { - if (stat != CUBLAS_STATUS_SUCCESS) { - printf("CUBLAS initialization failed\n"); - return EXIT_FAILURE; - } - // CHECK: stat = hipblasSetMatrix(M, N, sizeof(*a), a, M, devPtrA, M); - stat = cublasSetMatrix(M, N, sizeof(*a), a, M, devPtrA, M); - // CHECK: if (stat != HIPBLAS_STATUS_SUCCESS) { - if (stat != CUBLAS_STATUS_SUCCESS) { - printf("data download failed"); - // CHECK: hipFree(devPtrA); - // CHECK: hipblasDestroy(handle); - cudaFree(devPtrA); - cublasDestroy(handle); - return EXIT_FAILURE; - } - modify(handle, devPtrA, M, N, 2, 3, 16.0f, 12.0f); - // CHECK: stat = hipblasGetMatrix(M, N, sizeof(*a), devPtrA, M, a, M); - stat = cublasGetMatrix(M, N, sizeof(*a), devPtrA, M, a, M); - // CHECK: if (stat != HIPBLAS_STATUS_SUCCESS) { - if (stat != CUBLAS_STATUS_SUCCESS) { - printf("data upload failed"); - // CHECK: hipFree(devPtrA); - // CHECK: hipblasDestroy(handle); - cudaFree(devPtrA); - cublasDestroy(handle); - return EXIT_FAILURE; - } - // CHECK: hipFree(devPtrA); - // CHECK: hipblasDestroy(handle); - cudaFree(devPtrA); - cublasDestroy(handle); - for (j = 1; j <= N; j++) { - for (i = 1; i <= M; i++) { - printf("%7.0f", a[IDX2F(i, j, M)]); - } - printf("\n"); - } - free(a); - return EXIT_SUCCESS; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/cublas_sgemm_matrix_multiplication.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/cublas_sgemm_matrix_multiplication.cu deleted file mode 100644 index ecd8fb7eee..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/cublas_sgemm_matrix_multiplication.cu +++ /dev/null @@ -1,108 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -#include -#include -// CHECK: #include -#include -// CHECK: #include "hipblas.h" -#include "cublas_v2.h" -#define IDX2C(i,j,ld) (((j)*(ld))+(i)) -#define m 6 -#define n 4 -#define k 5 -int main(void) { - // CHECK: hipError_t cudaStat; - // CHECK: hipblasStatus_t stat; - // CHECK: hipblasHandle_t handle; - cudaError_t cudaStat; - cublasStatus_t stat; - cublasHandle_t handle; - int i, j; - float * a; - float * b; - float * c; - a = (float *)malloc(m*k * sizeof(float)); - b = (float *)malloc(k*n * sizeof(float)); - c = (float *)malloc(m*n * sizeof(float)); - int ind = 11; - for (j = 0; j -#include -#include -#include -// CHECK: #include "rocblas.h" -#include "cublas.h" -#define M 6 -#define N 5 -#define IDX2C(i,j,ld) (((j)*(ld))+(i)) -static __inline__ void modify(float *m, int ldm, int n, int p, int q, float - alpha, float beta) { - // CHECK: rocblas_sscal(n - p, alpha, &m[IDX2C(p, q, ldm)], ldm); - // CHECK: rocblas_sscal(ldm - p, beta, &m[IDX2C(p, q, ldm)], 1); - cublasSscal(n - p, alpha, &m[IDX2C(p, q, ldm)], ldm); - cublasSscal(ldm - p, beta, &m[IDX2C(p, q, ldm)], 1); -} -int main(void) { - int i, j; - // CHECK: rocblas_status stat; - cublasStatus stat; - float* devPtrA; - float* a = 0; - a = (float *)malloc(M * N * sizeof(*a)); - if (!a) { - printf("host memory allocation failed"); - return EXIT_FAILURE; - } - for (j = 0; j < N; j++) { - for (i = 0; i < M; i++) { - a[IDX2C(i, j, M)] = (float)(i * M + j + 1); - } - } - // cublasInit is not supported yet - cublasInit(); - // cublasAlloc is not supported yet - stat = cublasAlloc(M*N, sizeof(*a), (void**)&devPtrA); - // CHECK: if (stat != rocblas_status_success) { - if (stat != CUBLAS_STATUS_SUCCESS) { - printf("device memory allocation failed"); - // cublasShutdown is not supported yet - cublasShutdown(); - return EXIT_FAILURE; - } - // CHECK: stat = rocblas_set_matrix(M, N, sizeof(*a), a, M, devPtrA, M); - stat = cublasSetMatrix(M, N, sizeof(*a), a, M, devPtrA, M); - // CHECK: if (stat != rocblas_status_success) { - if (stat != CUBLAS_STATUS_SUCCESS) { - printf("data download failed"); - // cublasFree is not supported yet - cublasFree(devPtrA); - // cublasShutdown is not supported yet - cublasShutdown(); - return EXIT_FAILURE; - } - modify(devPtrA, M, N, 1, 2, 16.0f, 12.0f); - // CHECK: stat = rocblas_get_matrix(M, N, sizeof(*a), devPtrA, M, a, M); - stat = cublasGetMatrix(M, N, sizeof(*a), devPtrA, M, a, M); - // CHECK: if (stat != rocblas_status_success) { - if (stat != CUBLAS_STATUS_SUCCESS) { - printf("data upload failed"); - // cublasFree is not supported yet - cublasFree(devPtrA); - // cublasShutdown is not supported yet - cublasShutdown(); - return EXIT_FAILURE; - } - // cublasFree is not supported yet - cublasFree(devPtrA); - // cublasShutdown is not supported yet - cublasShutdown(); - for (j = 0; j < N; j++) { - for (i = 0; i < M; i++) { - printf("%7.0f", a[IDX2C(i, j, M)]); - } - printf("\n"); - } - free(a); - return EXIT_SUCCESS; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/rocBLAS/cublas_1_based_indexing_rocblas.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/rocBLAS/cublas_1_based_indexing_rocblas.cu deleted file mode 100644 index 0202e2f7fa..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/rocBLAS/cublas_1_based_indexing_rocblas.cu +++ /dev/null @@ -1,90 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args "-roc" %clang_args - -#include -#include -#include -// CHECK: #include -#include -// CHECK: #include "rocblas.h" -#include "cublas_v2.h" -#define M 6 -#define N 5 -#define IDX2F(i,j,ld) ((((j)-1)*(ld))+((i)-1)) -// CHECK: static __inline__ void modify(rocblas_handle handle, float *m, int ldm, int -static __inline__ void modify(cublasHandle_t handle, float *m, int ldm, int - n, int p, int q, float alpha, float beta) { - // CHECK: rocblas_sscal(handle, n - p + 1, &alpha, &m[IDX2F(p, q, ldm)], ldm); - // CHECK: rocblas_sscal(handle, ldm - p + 1, &beta, &m[IDX2F(p, q, ldm)], 1); - cublasSscal(handle, n - p + 1, &alpha, &m[IDX2F(p, q, ldm)], ldm); - cublasSscal(handle, ldm - p + 1, &beta, &m[IDX2F(p, q, ldm)], 1); -} -int main(void) { - // CHECK: hipError_t cudaStat; - // CHECK: rocblas_status stat; - // CHECK: rocblas_handle handle; - cudaError_t cudaStat; - cublasStatus_t stat; - cublasHandle_t handle; - int i, j; - float* devPtrA; - float* a = 0; - a = (float *)malloc(M * N * sizeof(*a)); - if (!a) { - printf("host memory allocation failed"); - return EXIT_FAILURE; - } - for (j = 1; j <= N; j++) { - for (i = 1; i <= M; i++) { - a[IDX2F(i, j, M)] = (float)((i - 1) * M + j); - } - } - // CHECK: cudaStat = hipMalloc((void**)&devPtrA, M*N * sizeof(*a)); - cudaStat = cudaMalloc((void**)&devPtrA, M*N * sizeof(*a)); - // CHECK: if (cudaStat != hipSuccess) { - if (cudaStat != cudaSuccess) { - printf("device memory allocation failed"); - return EXIT_FAILURE; - } - // CHECK: stat = rocblas_create_handle(&handle); - stat = cublasCreate(&handle); - // CHECK: if (stat != rocblas_status_success) { - if (stat != CUBLAS_STATUS_SUCCESS) { - printf("CUBLAS initialization failed\n"); - return EXIT_FAILURE; - } - // CHECK: stat = rocblas_set_matrix(M, N, sizeof(*a), a, M, devPtrA, M); - stat = cublasSetMatrix(M, N, sizeof(*a), a, M, devPtrA, M); - // CHECK: if (stat != rocblas_status_success) { - if (stat != CUBLAS_STATUS_SUCCESS) { - printf("data download failed"); - // CHECK: hipFree(devPtrA); - // CHECK: rocblas_destroy_handle(handle); - cudaFree(devPtrA); - cublasDestroy(handle); - return EXIT_FAILURE; - } - modify(handle, devPtrA, M, N, 2, 3, 16.0f, 12.0f); - // CHECK: stat = rocblas_get_matrix(M, N, sizeof(*a), devPtrA, M, a, M); - stat = cublasGetMatrix(M, N, sizeof(*a), devPtrA, M, a, M); - // CHECK: if (stat != rocblas_status_success) { - if (stat != CUBLAS_STATUS_SUCCESS) { - printf("data upload failed"); - // CHECK: hipFree(devPtrA); - // CHECK: rocblas_destroy_handle(handle); - cudaFree(devPtrA); - cublasDestroy(handle); - return EXIT_FAILURE; - } - // CHECK: hipFree(devPtrA); - // CHECK: rocblas_destroy_handle(handle); - cudaFree(devPtrA); - cublasDestroy(handle); - for (j = 1; j <= N; j++) { - for (i = 1; i <= M; i++) { - printf("%7.0f", a[IDX2F(i, j, M)]); - } - printf("\n"); - } - free(a); - return EXIT_SUCCESS; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/rocBLAS/cublas_sgemm_matrix_multiplication_rocblas.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/rocBLAS/cublas_sgemm_matrix_multiplication_rocblas.cu deleted file mode 100644 index 8e35f28f0e..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuBLAS/rocBLAS/cublas_sgemm_matrix_multiplication_rocblas.cu +++ /dev/null @@ -1,108 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args "-roc" %clang_args - -#include -#include -// CHECK: #include -#include -// CHECK: #include "rocblas.h" -#include "cublas_v2.h" -#define IDX2C(i,j,ld) (((j)*(ld))+(i)) -#define m 6 -#define n 4 -#define k 5 -int main(void) { - // CHECK: hipError_t cudaStat; - // CHECK: rocblas_status stat; - // CHECK: rocblas_handle handle; - cudaError_t cudaStat; - cublasStatus_t stat; - cublasHandle_t handle; - int i, j; - float * a; - float * b; - float * c; - a = (float *)malloc(m*k * sizeof(float)); - b = (float *)malloc(k*n * sizeof(float)); - c = (float *)malloc(m*n * sizeof(float)); - int ind = 11; - for (j = 0; j -// CHECK: #include "hip/hip_complex.h" -#include "cuComplex.h" - -#define TYPEFLOAT -#define DIMX 100 -#define DIMY 40 -#define moveX 2 -#define moveY 1 - -#define MAXITERATIONS 10 - -#ifdef TYPEFLOAT -#define TYPE float -// CHECK: #define cTYPE hipFloatComplex -#define cTYPE cuFloatComplex -// CHECK: #define cMakecuComplex(re,i) make_hipFloatComplex(re,i) -#define cMakecuComplex(re,i) make_cuFloatComplex(re,i) -#endif -#ifdef TYPEDOUBLE -// CHECK: #define TYPE hipDoubleComplex -#define TYPE cuDoubleComplex -// CHECK: #define cMakecuComplex(re,i) make_hipDoubleComplex(re,i) -#define cMakecuComplex(re,i) make_cuDoubleComplex(re,i) -#endif - -__device__ cTYPE juliaFunctor(cTYPE p, cTYPE c) { - // CHECK: return hipCaddf(hipCmulf(p, p), c); - return cuCaddf(cuCmulf(p, p), c); -} - -__device__ cTYPE convertToComplex(int x, int y, float zoom) { - TYPE jx = 1.5 * (x - DIMX / 2) / (0.5 * zoom * DIMX) + moveX; - TYPE jy = (y - DIMY / 2) / (0.5 * zoom * DIMY) + moveY; - return cMakecuComplex(jx, jy); -} - -__device__ int evolveComplexPoint(cTYPE p, cTYPE c) { - int it = 1; - // CHECK: while (it <= MAXITERATIONS && hipCabsf(p) <= 4) { - while (it <= MAXITERATIONS && cuCabsf(p) <= 4) { - p = juliaFunctor(p, c); - it++; - } - return it; -} - -__global__ void computeJulia(int* data, cTYPE c, float zoom) { - int i = blockIdx.x * blockDim.x + threadIdx.x; - int j = blockIdx.y * blockDim.y + threadIdx.y; - - if (i -#include -#include -#include - -// CHECK: #include -#include -// CHECK: #include "hipDNN.h" -#include "cudnn.h" - -// CHECK: hipError_t err = (f); \ -// CHECK: if (err != hipSuccess) { \ - -#define CUDA_CALL(f) { \ - cudaError_t err = (f); \ - if (err != cudaSuccess) { \ - std::cout \ - << " Error occurred: " << err << std::endl; \ - std::exit(1); \ - } \ -} -// CHECK: hipdnnStatus_t err = (f); \ -// CHECK: if (err != HIPDNN_STATUS_SUCCESS) { \ - -#define CUDNN_CALL(f) { \ - cudnnStatus_t err = (f); \ - if (err != CUDNN_STATUS_SUCCESS) { \ - std::cout \ - << " Error occurred: " << err << std::endl; \ - std::exit(1); \ - } \ -} - -__global__ void dev_const(float *px, float k) { - int tid = threadIdx.x + blockIdx.x * blockDim.x; - px[tid] = k; -} - -__global__ void dev_iota(float *px) { - int tid = threadIdx.x + blockIdx.x * blockDim.x; - px[tid] = tid; -} - -void print(const float *data, int n, int c, int h, int w) { - std::vector buffer(1 << 20); - // CHECK: CUDA_CALL(hipMemcpy( - CUDA_CALL(cudaMemcpy( - buffer.data(), data, - n * c * h * w * sizeof(float), - // CHECK: hipMemcpyDeviceToHost)); - cudaMemcpyDeviceToHost)); - int a = 0; - for (int i = 0; i < n; ++i) { - for (int j = 0; j < c; ++j) { - std::cout << "n=" << i << ", c=" << j << ":" << std::endl; - for (int k = 0; k < h; ++k) { - for (int l = 0; l < w; ++l) { - std::cout << std::setw(4) << std::right << buffer[a]; - ++a; - } - std::cout << std::endl; - } - } - } - std::cout << std::endl; -} - -int main() { - // CHECK: hipdnnHandle_t cudnn; - cudnnHandle_t cudnn; - // CHECK: CUDNN_CALL(hipdnnCreate(&cudnn)); - CUDNN_CALL(cudnnCreate(&cudnn)); - - // input - const int in_n = 1; - const int in_c = 1; - const int in_h = 5; - const int in_w = 5; - std::cout << "in_n: " << in_n << std::endl; - std::cout << "in_c: " << in_c << std::endl; - std::cout << "in_h: " << in_h << std::endl; - std::cout << "in_w: " << in_w << std::endl; - std::cout << std::endl; - // CHECK: hipdnnTensorDescriptor_t in_desc; - cudnnTensorDescriptor_t in_desc; - // CHECK: CUDNN_CALL(hipdnnCreateTensorDescriptor(&in_desc)); - CUDNN_CALL(cudnnCreateTensorDescriptor(&in_desc)); - // CHECK: CUDNN_CALL(hipdnnSetTensor4dDescriptor( - CUDNN_CALL(cudnnSetTensor4dDescriptor( - // CHECK: in_desc, HIPDNN_TENSOR_NCHW, HIPDNN_DATA_FLOAT, - in_desc, CUDNN_TENSOR_NCHW, CUDNN_DATA_FLOAT, - in_n, in_c, in_h, in_w)); - - float *in_data; - // CHECK: CUDA_CALL(hipMalloc( - CUDA_CALL(cudaMalloc( - &in_data, in_n * in_c * in_h * in_w * sizeof(float))); - - // filter - const int filt_k = 1; - const int filt_c = 1; - const int filt_h = 2; - const int filt_w = 2; - std::cout << "filt_k: " << filt_k << std::endl; - std::cout << "filt_c: " << filt_c << std::endl; - std::cout << "filt_h: " << filt_h << std::endl; - std::cout << "filt_w: " << filt_w << std::endl; - std::cout << std::endl; - - // CHECK: hipdnnFilterDescriptor_t filt_desc; - cudnnFilterDescriptor_t filt_desc; - // CHECK: CUDNN_CALL(hipdnnCreateFilterDescriptor(&filt_desc)); - CUDNN_CALL(cudnnCreateFilterDescriptor(&filt_desc)); - // CHECK: CUDNN_CALL(hipdnnSetFilter4dDescriptor( - CUDNN_CALL(cudnnSetFilter4dDescriptor( - // CHECK: filt_desc, HIPDNN_DATA_FLOAT, HIPDNN_TENSOR_NCHW, - filt_desc, CUDNN_DATA_FLOAT, CUDNN_TENSOR_NCHW, - filt_k, filt_c, filt_h, filt_w)); - - float *filt_data; - // CUDA_CALL(hipMalloc( - CUDA_CALL(cudaMalloc( - &filt_data, filt_k * filt_c * filt_h * filt_w * sizeof(float))); - - // convolution - const int pad_h = 1; - const int pad_w = 1; - const int str_h = 1; - const int str_w = 1; - const int dil_h = 1; - const int dil_w = 1; - std::cout << "pad_h: " << pad_h << std::endl; - std::cout << "pad_w: " << pad_w << std::endl; - std::cout << "str_h: " << str_h << std::endl; - std::cout << "str_w: " << str_w << std::endl; - std::cout << "dil_h: " << dil_h << std::endl; - std::cout << "dil_w: " << dil_w << std::endl; - std::cout << std::endl; - - // CHECK: hipdnnConvolutionDescriptor_t conv_desc; - cudnnConvolutionDescriptor_t conv_desc; - // CUDNN_CALL(hipdnnCreateConvolutionDescriptor(&conv_desc)); - CUDNN_CALL(cudnnCreateConvolutionDescriptor(&conv_desc)); - // CHECK: CUDNN_CALL(hipdnnSetConvolution2dDescriptor( - CUDNN_CALL(cudnnSetConvolution2dDescriptor( - conv_desc, - pad_h, pad_w, str_h, str_w, dil_h, dil_w, - // CHECK: HIPDNN_CONVOLUTION, HIPDNN_DATA_FLOAT)); - CUDNN_CONVOLUTION, CUDNN_DATA_FLOAT)); - - // output - int out_n; - int out_c; - int out_h; - int out_w; - - // CHECK: CUDNN_CALL(hipdnnGetConvolution2dForwardOutputDim( - CUDNN_CALL(cudnnGetConvolution2dForwardOutputDim( - conv_desc, in_desc, filt_desc, - &out_n, &out_c, &out_h, &out_w)); - - std::cout << "out_n: " << out_n << std::endl; - std::cout << "out_c: " << out_c << std::endl; - std::cout << "out_h: " << out_h << std::endl; - std::cout << "out_w: " << out_w << std::endl; - std::cout << std::endl; - // CHECK: hipdnnTensorDescriptor_t out_desc; - cudnnTensorDescriptor_t out_desc; - // CHECK: CUDNN_CALL(hipdnnCreateTensorDescriptor(&out_desc)); - CUDNN_CALL(cudnnCreateTensorDescriptor(&out_desc)); - // CHECK: CUDNN_CALL(hipdnnSetTensor4dDescriptor( - CUDNN_CALL(cudnnSetTensor4dDescriptor( - // CHECK: out_desc, HIPDNN_TENSOR_NCHW, HIPDNN_DATA_FLOAT, - out_desc, CUDNN_TENSOR_NCHW, CUDNN_DATA_FLOAT, - out_n, out_c, out_h, out_w)); - - - cudnnDataType_t *dataType = nullptr; - cudnnTensorFormat_t *tensorFormat = nullptr; - int *p_filt_k = nullptr; - int *p_filt_c = nullptr; - int *p_filt_h = nullptr; - int *p_filt_w = nullptr; - - // CHECK: CUDNN_CALL(hipdnnGetFilter4dDescriptor( - CUDNN_CALL(cudnnGetFilter4dDescriptor( - filt_desc, dataType, tensorFormat, - p_filt_k, p_filt_c, p_filt_h, p_filt_w)); - - float *out_data; - // CHECK: CUDA_CALL(hipMalloc( - CUDA_CALL(cudaMalloc( - &out_data, out_n * out_c * out_h * out_w * sizeof(float))); - - // algorithm - // CHECK: hipdnnConvolutionFwdAlgo_t algo; - cudnnConvolutionFwdAlgo_t algo; - // CHECK: CUDNN_CALL(hipdnnGetConvolutionForwardAlgorithm( - CUDNN_CALL(cudnnGetConvolutionForwardAlgorithm( - cudnn, - in_desc, filt_desc, conv_desc, out_desc, - // CHECK: HIPDNN_CONVOLUTION_FWD_PREFER_FASTEST, 0, &algo)); - CUDNN_CONVOLUTION_FWD_PREFER_FASTEST, 0, &algo)); - - std::cout << "Convolution algorithm: " << algo << std::endl; - std::cout << std::endl; - - // workspace - size_t ws_size; - // CHECK: CUDNN_CALL(hipdnnGetConvolutionForwardWorkspaceSize( - CUDNN_CALL(cudnnGetConvolutionForwardWorkspaceSize( - cudnn, in_desc, filt_desc, conv_desc, out_desc, algo, &ws_size)); - - float *ws_data; - // CHECK: CUDA_CALL(hipMalloc(&ws_data, ws_size)); - CUDA_CALL(cudaMalloc(&ws_data, ws_size)); - - std::cout << "Workspace size: " << ws_size << std::endl; - std::cout << std::endl; - - // perform - float alpha = 1.f; - float beta = 0.f; - // CHECK: hipLaunchKernelGGL(dev_iota, dim3(in_w * in_h), dim3(in_n * in_c), 0, 0, in_data); - // CHECK: hipLaunchKernelGGL(dev_const, dim3(filt_w * filt_h), dim3(filt_k * filt_c), 0, 0, filt_data, 1.f); - dev_iota<<>>(in_data); - dev_const<<>>(filt_data, 1.f); - // CHECK: CUDNN_CALL(hipdnnConvolutionForward( - CUDNN_CALL(cudnnConvolutionForward( - cudnn, - &alpha, in_desc, in_data, filt_desc, filt_data, - conv_desc, algo, ws_data, ws_size, - &beta, out_desc, out_data)); - - // results - std::cout << "in_data:" << std::endl; - print(in_data, in_n, in_c, in_h, in_w); - - std::cout << "filt_data:" << std::endl; - print(filt_data, filt_k, filt_c, filt_h, filt_w); - - std::cout << "out_data:" << std::endl; - print(out_data, out_n, out_c, out_h, out_w); - - // finalizing - // CHECK: CUDA_CALL(hipFree(ws_data)); - CUDA_CALL(cudaFree(ws_data)); - // CHECK: CUDA_CALL(hipFree(out_data)); - CUDA_CALL(cudaFree(out_data)); - // CHECK: CUDNN_CALL(hipdnnDestroyTensorDescriptor(out_desc)); - CUDNN_CALL(cudnnDestroyTensorDescriptor(out_desc)); - // CHECK: CUDNN_CALL(hipdnnDestroyConvolutionDescriptor(conv_desc)); - CUDNN_CALL(cudnnDestroyConvolutionDescriptor(conv_desc)); - // CHECK: CUDA_CALL(hipFree(filt_data)); - CUDA_CALL(cudaFree(filt_data)); - // CHECK: CUDNN_CALL(hipdnnDestroyFilterDescriptor(filt_desc)); - CUDNN_CALL(cudnnDestroyFilterDescriptor(filt_desc)); - // CHECK: CUDA_CALL(hipFree(in_data)); - CUDA_CALL(cudaFree(in_data)); - // CHECK: CUDNN_CALL(hipdnnDestroyTensorDescriptor(in_desc)); - CUDNN_CALL(cudnnDestroyTensorDescriptor(in_desc)); - // CHECK: CUDNN_CALL(hipdnnDestroy(cudnn)); - CUDNN_CALL(cudnnDestroy(cudnn)); - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuDNN/cudnn_softmax.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuDNN/cudnn_softmax.cu deleted file mode 100644 index a2052b3de6..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuDNN/cudnn_softmax.cu +++ /dev/null @@ -1,159 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -// CHECK: #include -#include -// CHECK: #include -#include - -/** - * - * Author: Jon Gauthier - * February 2015 - * -. * Adopted for CUDA/CUDNN 9.0 - */ - -void printMatrix(const double *mat, int m, int n) { - for (int j = 0; j < n; j++) { - for (int i = 0; i < m; i++) { - printf("%f\n", mat[j * m + i]); - } - printf("\n\n"); - } -} - -double *makeDiffData(int m, int c) { - double *diff = (double *) calloc(m * c, sizeof(double)); - for (int j = 0; j < m; j++) { - int class_ = rand() % c; - printf("%d class: %d\n", j, class_); - for (int i = 0; i < c; i++) - diff[j * c + i] = class_ == i ? -c / (double) m : 0; - } - - return diff; -} - -int main() { - int m = 5, c = 4, numChannels = 1; - - double *fcLayer = (double *) malloc(m * c * sizeof(double)); - for (int i = 0; i < m; i++) { - double def = rand() % 25; - for (int c_idx = 0; c_idx < c; c_idx++) { - int offset = i * c + c_idx; - fcLayer[offset] = def; - } - } - printf("FC LAYER:\n"); - printMatrix(fcLayer, c, m); - - double *d_fcLayer; - // CHECK: hipMalloc((void**) &d_fcLayer, m * c * sizeof(double)); - cudaMalloc((void**) &d_fcLayer, m * c * sizeof(double)); - // CHECK: hipMemcpy(d_fcLayer, fcLayer, m * c * sizeof(double), hipMemcpyHostToDevice); - cudaMemcpy(d_fcLayer, fcLayer, m * c * sizeof(double), cudaMemcpyHostToDevice); - - double *d_softmaxData; - // CHECK: hipMalloc((void**) &d_softmaxData, m * c * sizeof(double)); - cudaMalloc((void**) &d_softmaxData, m * c * sizeof(double)); - - // CHECK: hipdnnHandle_t handle; - cudnnHandle_t handle; - // CHECK: hipdnnCreate(&handle); - cudnnCreate(&handle); - - float one = 1; - float zero = 0; - - // softmaxForward(n, c, h, w, dstData, &srcData); - // CHECK: hipdnnTensorDescriptor_t srcTensorDesc, sftTensorDesc; - // CHECK: hipdnnCreateTensorDescriptor(&srcTensorDesc); - // CHECK: hipdnnCreateTensorDescriptor(&sftTensorDesc); - cudnnTensorDescriptor_t srcTensorDesc, sftTensorDesc; - cudnnCreateTensorDescriptor(&srcTensorDesc); - cudnnCreateTensorDescriptor(&sftTensorDesc); - // CHECK: hipdnnSetTensor4dDescriptor(srcTensorDesc, HIPDNN_TENSOR_NCHW, HIPDNN_DATA_DOUBLE, - cudnnSetTensor4dDescriptor(srcTensorDesc, CUDNN_TENSOR_NCHW, CUDNN_DATA_DOUBLE, - m, c, 1, 1); - // CHECK: hipdnnSetTensor4dDescriptor(sftTensorDesc, HIPDNN_TENSOR_NCHW, HIPDNN_DATA_DOUBLE, - cudnnSetTensor4dDescriptor(sftTensorDesc, CUDNN_TENSOR_NCHW, CUDNN_DATA_DOUBLE, - m, c, 1, 1); - // CHECK: hipdnnSoftmaxForward(handle, HIPDNN_SOFTMAX_ACCURATE, HIPDNN_SOFTMAX_MODE_CHANNEL, &one, - cudnnSoftmaxForward(handle, CUDNN_SOFTMAX_ACCURATE, CUDNN_SOFTMAX_MODE_CHANNEL, &one, - srcTensorDesc, d_fcLayer, &zero, sftTensorDesc, d_softmaxData); - // CHECK: hipDeviceSynchronize(); - cudaDeviceSynchronize(); - - // Copy back - double *result = (double *) malloc(m * c * sizeof(double)); - // CHECK: hipMemcpy(result, d_softmaxData, m * c * sizeof(double), hipMemcpyDeviceToHost); - // CHECK: hipDeviceSynchronize(); - cudaMemcpy(result, d_softmaxData, m * c * sizeof(double), cudaMemcpyDeviceToHost); - cudaDeviceSynchronize(); - - // Log - printf("SOFTMAX:\n"); - printMatrix(result, c, m); - - // Try backward - // CHECK: hipdnnTensorDescriptor_t diffTensorDesc; - // CHECK: hipdnnCreateTensorDescriptor(&diffTensorDesc); - // CHECK: hipdnnSetTensor4dDescriptor(diffTensorDesc, HIPDNN_TENSOR_NCHW, HIPDNN_DATA_DOUBLE, - cudnnTensorDescriptor_t diffTensorDesc; - cudnnCreateTensorDescriptor(&diffTensorDesc); - cudnnSetTensor4dDescriptor(diffTensorDesc, CUDNN_TENSOR_NCHW, CUDNN_DATA_DOUBLE, - m, c, 1, 1); - - double *d_gradData; - // CHECK: hipMalloc((void**) &d_gradData, m * c * sizeof(double)); - cudaMalloc((void**) &d_gradData, m * c * sizeof(double)); - - double *diffData = makeDiffData(m, c); - double *d_diffData; - // CHECK: hipMalloc((void**) &d_diffData, m * c * sizeof(double)); - // CHECK: hipMemcpy(d_diffData, diffData, m * c * sizeof(double), hipMemcpyHostToDevice); - // CHECK: hipDeviceSynchronize(); - cudaMalloc((void**) &d_diffData, m * c * sizeof(double)); - cudaMemcpy(d_diffData, diffData, m * c * sizeof(double), cudaMemcpyHostToDevice); - cudaDeviceSynchronize(); - // CHECK: hipdnnSoftmaxBackward(handle, HIPDNN_SOFTMAX_ACCURATE, HIPDNN_SOFTMAX_MODE_CHANNEL, - cudnnSoftmaxBackward(handle, CUDNN_SOFTMAX_ACCURATE, CUDNN_SOFTMAX_MODE_CHANNEL, - &one, srcTensorDesc, d_softmaxData, diffTensorDesc, d_diffData, &zero, sftTensorDesc, d_gradData); - // CHECK: hipDeviceSynchronize(); - cudaDeviceSynchronize(); - - // Copy back - double *result_backward = (double *) malloc(m * c * sizeof(double)); - // CHECK: hipMemcpy(result_backward, d_gradData, m * c * sizeof(double), hipMemcpyDeviceToHost); - // CHECK: hipDeviceSynchronize(); - cudaMemcpy(result_backward, d_gradData, m * c * sizeof(double), cudaMemcpyDeviceToHost); - cudaDeviceSynchronize(); - - // Log - printf("GRADIENT:\n"); - printMatrix(result_backward, c, m); - - // Destruct - free(result); - free(diffData); - free(result_backward); - free(fcLayer); - - // CHECK: hipdnnDestroyTensorDescriptor(srcTensorDesc); - // CHECK: hipdnnDestroyTensorDescriptor(sftTensorDesc); - // CHECK: hipdnnDestroyTensorDescriptor(diffTensorDesc); - // CHECK: hipFree(d_fcLayer); - // CHECK: hipFree(d_softmaxData); - // CHECK: hipFree(d_gradData); - // CHECK: hipFree(d_diffData); - // CHECK: hipdnnDestroy(handle); - cudnnDestroyTensorDescriptor(srcTensorDesc); - cudnnDestroyTensorDescriptor(sftTensorDesc); - cudnnDestroyTensorDescriptor(diffTensorDesc); - cudaFree(d_fcLayer); - cudaFree(d_softmaxData); - cudaFree(d_gradData); - cudaFree(d_diffData); - cudnnDestroy(handle); -} \ No newline at end of file diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuFFT/simple_cufft.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuFFT/simple_cufft.cu deleted file mode 100644 index 9c05a53fa8..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuFFT/simple_cufft.cu +++ /dev/null @@ -1,78 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -// CHECK: #include -#include -// CHECK: #include -#include -#include -#include - -#define DATASIZE 8 -#define BATCH 2 - -#define gpuErrchk(ans) { gpuAssert((ans), __FILE__, __LINE__); } -// CHECK: inline void gpuAssert(hipError_t code, const char *file, int line, bool abort = true) -inline void gpuAssert(cudaError_t code, const char *file, int line, bool abort = true) -{ - // CHECK: if (code != hipSuccess) - if (code != cudaSuccess) - { - // CHECK: fprintf(stderr, "GPUassert: %s %s %dn", hipGetErrorString(code), file, line); - fprintf(stderr, "GPUassert: %s %s %dn", cudaGetErrorString(code), file, line); - if (abort) exit(code); - } -} - -int main() -{ - // --- Host side input data allocation and initialization - // CHECK: hipfftReal *hostInputData = (hipfftReal*)malloc(DATASIZE*BATCH * sizeof(hipfftReal)); - cufftReal *hostInputData = (cufftReal*)malloc(DATASIZE*BATCH * sizeof(cufftReal)); - for (int i = 0; iHost copy of the results - // CHECK: gpuErrchk(hipMemcpy(hostOutputData, deviceOutputData, (DATASIZE / 2 + 1) * BATCH * sizeof(hipfftComplex), hipMemcpyDeviceToHost)); - gpuErrchk(cudaMemcpy(hostOutputData, deviceOutputData, (DATASIZE / 2 + 1) * BATCH * sizeof(cufftComplex), cudaMemcpyDeviceToHost)); - - for (int i = 0; i -#include -#include -#include -#include -#include -#include -#include - -#include "cmdparser.hpp" -// CHECK: #include -#include -// CHECK: #include -#include - -// CHECK: if ((x) != hipSuccess) { -#define CUDA_CALL(x) \ - do { \ - if ((x) != cudaSuccess) { \ - printf("Error at %s:%d\n", __FILE__, __LINE__); \ - exit(EXIT_FAILURE); \ - } \ - } while (0) -// CHECK: if ((x) != HIPRAND_STATUS_SUCCESS) { -#define CURAND_CALL(x) \ - do { \ - if ((x) != CURAND_STATUS_SUCCESS) { \ - printf("Error at %s:%d\n", __FILE__, __LINE__); \ - exit(EXIT_FAILURE); \ - } \ - } while (0) - -#ifndef DEFAULT_RAND_N -const size_t DEFAULT_RAND_N = 1024 * 1024 * 128; -#endif - -// CHECK: typedef hiprandRngType_t rng_type_t; -typedef curandRngType rng_type_t; - -template -// CHECK: using generate_func_type = std::function; -using generate_func_type = std::function; - -template -void run_benchmark(const cli::Parser& parser, const rng_type_t rng_type, - generate_func_type generate_func) { - const size_t size = parser.get("size"); - const size_t trials = parser.get("trials"); - - T* data; - // CHECK: CUDA_CALL(hipMalloc((void**)&data, size * sizeof(T))); - CUDA_CALL(cudaMalloc((void**)&data, size * sizeof(T))); - - // CHECK: hiprandGenerator_t generator; - // CHECK: CURAND_CALL(hiprandCreateGenerator(&generator, rng_type)); - curandGenerator_t generator; - CURAND_CALL(curandCreateGenerator(&generator, rng_type)); - - const size_t dimensions = parser.get("dimensions"); - // CHECK: hiprandStatus_t status = hiprandSetQuasiRandomGeneratorDimensions(generator, dimensions); - // CHECK: if (status != HIPRAND_STATUS_TYPE_ERROR) - curandStatus_t status = curandSetQuasiRandomGeneratorDimensions(generator, dimensions); - if (status != CURAND_STATUS_TYPE_ERROR) // If the RNG is not quasi-random - { - CURAND_CALL(status); - } - - // Warm-up - for (size_t i = 0; i < 5; i++) { - CURAND_CALL(generate_func(generator, data, size)); - } - // CHECK: CUDA_CALL(hipDeviceSynchronize()); - CUDA_CALL(cudaDeviceSynchronize()); - - // Measurement - auto start = std::chrono::high_resolution_clock::now(); - for (size_t i = 0; i < trials; i++) { - CURAND_CALL(generate_func(generator, data, size)); - } - // CHECK: CUDA_CALL(hipDeviceSynchronize()); - CUDA_CALL(cudaDeviceSynchronize()); - auto end = std::chrono::high_resolution_clock::now(); - std::chrono::duration elapsed = end - start; - - std::cout << std::fixed << std::setprecision(3) << " " - << "Throughput = " << std::setw(8) - << (trials * size * sizeof(T)) / (elapsed.count() / 1e3 * (1 << 30)) - << " GB/s, Samples = " << std::setw(8) - << (trials * size) / (elapsed.count() / 1e3 * (1 << 30)) - << " GSample/s, AvgTime (1 trial) = " << std::setw(8) << elapsed.count() / trials - << " ms, Time (all) = " << std::setw(8) << elapsed.count() << " ms, Size = " << size - << std::endl; - // CHECK: CURAND_CALL(hiprandDestroyGenerator(generator)); - // CHECK: CUDA_CALL(hipFree(data)); - CURAND_CALL(curandDestroyGenerator(generator)); - CUDA_CALL(cudaFree(data)); -} - -void run_benchmarks(const cli::Parser& parser, const rng_type_t rng_type, - const std::string& distribution) { - if (distribution == "uniform-uint") { - // CHECK: if (rng_type != HIPRAND_RNG_QUASI_SOBOL64 && - // CHECK: rng_type != HIPRAND_RNG_QUASI_SCRAMBLED_SOBOL64) { - if (rng_type != CURAND_RNG_QUASI_SOBOL64 && - rng_type != CURAND_RNG_QUASI_SCRAMBLED_SOBOL64) { - run_benchmark( - parser, rng_type, - // CHECK: [](hiprandGenerator_t gen, unsigned int* data, size_t size) { - // CHECK: return hiprandGenerate(gen, data, size); - [](curandGenerator_t gen, unsigned int* data, size_t size) { - return curandGenerate(gen, data, size); - }); - } - } - if (distribution == "uniform-long-long") { - // CHECK: if (rng_type == HIPRAND_RNG_QUASI_SOBOL64 || - // CHECK: rng_type == HIPRAND_RNG_QUASI_SCRAMBLED_SOBOL64) - if (rng_type == CURAND_RNG_QUASI_SOBOL64 || - rng_type == CURAND_RNG_QUASI_SCRAMBLED_SOBOL64) { - run_benchmark( - parser, rng_type, - // CHECK: [](hiprandGenerator_t gen, unsigned long long* data, size_t size) { - [](curandGenerator_t gen, unsigned long long* data, size_t size) { - // curandGenerateLongLong is yet unsupported by HIP - // CHECK-NOT: return hiprandGenerateLongLong(gen, data, size); - return curandGenerateLongLong(gen, data, size); - }); - } - } - if (distribution == "uniform-float") { - run_benchmark(parser, rng_type, - // CHECK: [](hiprandGenerator_t gen, float* data, size_t size) { - // CHECK: return hiprandGenerateUniform(gen, data, size); - [](curandGenerator_t gen, float* data, size_t size) { - return curandGenerateUniform(gen, data, size); - }); - } - if (distribution == "uniform-double") { - run_benchmark(parser, rng_type, - // CHECK: [](hiprandGenerator_t gen, double* data, size_t size) { - // CHECK: return hiprandGenerateUniformDouble(gen, data, size); - [](curandGenerator_t gen, double* data, size_t size) { - return curandGenerateUniformDouble(gen, data, size); - }); - } - if (distribution == "normal-float") { - run_benchmark(parser, rng_type, - // CHECK: [](hiprandGenerator_t gen, float* data, size_t size) { - // CHECK: return hiprandGenerateNormal(gen, data, size, 0.0f, 1.0f); - [](curandGenerator_t gen, float* data, size_t size) { - return curandGenerateNormal(gen, data, size, 0.0f, 1.0f); - }); - } - if (distribution == "normal-double") { - run_benchmark( - parser, rng_type, - // CHECK: [](hiprandGenerator_t gen, double* data, size_t size) { - // CHECK: return hiprandGenerateNormalDouble(gen, data, size, 0.0, 1.0); - [](curandGenerator_t gen, double* data, size_t size) { - return curandGenerateNormalDouble(gen, data, size, 0.0, 1.0); - }); - } - if (distribution == "log-normal-float") { - run_benchmark(parser, rng_type, - // CHECK: [](hiprandGenerator_t gen, float* data, size_t size) { - // CHECK: return hiprandGenerateLogNormal(gen, data, size, 0.0f, 1.0f); - [](curandGenerator_t gen, float* data, size_t size) { - return curandGenerateLogNormal(gen, data, size, 0.0f, 1.0f); - }); - } - if (distribution == "log-normal-double") { - run_benchmark( - parser, rng_type, - // CHECK: [](hiprandGenerator_t gen, double* data, size_t size) { - // CHECK: return hiprandGenerateLogNormalDouble(gen, data, size, 0.0, 1.0); - [](curandGenerator_t gen, double* data, size_t size) { - return curandGenerateLogNormalDouble(gen, data, size, 0.0, 1.0); - }); - } - if (distribution == "poisson") { - const auto lambdas = parser.get>("lambda"); - for (double lambda : lambdas) { - std::cout << " " - << "lambda " << std::fixed << std::setprecision(1) << lambda << std::endl; - run_benchmark( - parser, rng_type, - // CHECK: [lambda](hiprandGenerator_t gen, unsigned int* data, size_t size) { - // CHECK: return hiprandGeneratePoisson(gen, data, size, lambda); - [lambda](curandGenerator_t gen, unsigned int* data, size_t size) { - return curandGeneratePoisson(gen, data, size, lambda); - }); - } - } -} - -const std::vector all_engines = { - "xorwow", "mrg32k3a", "mtgp32", - // "mt19937", - "philox", "sobol32", - // "scrambled_sobol32", - // "sobol64", - // "scrambled_sobol64", -}; - -const std::vector all_distributions = { - "uniform-uint", "uniform-long-long", "uniform-float", "uniform-double", "normal-float", - "normal-double", "log-normal-float", "log-normal-double", "poisson"}; - -int main(int argc, char* argv[]) { - cli::Parser parser(argc, argv); - - const std::string distribution_desc = - "space-separated list of distributions:" + - std::accumulate(all_distributions.begin(), all_distributions.end(), std::string(), - [](std::string a, std::string b) { return a + "\n " + b; }) + - "\n or all"; - const std::string engine_desc = - "space-separated list of random number engines:" + - std::accumulate(all_engines.begin(), all_engines.end(), std::string(), - [](std::string a, std::string b) { return a + "\n " + b; }) + - "\n or all"; - - parser.set_optional("size", "size", DEFAULT_RAND_N, "number of values"); - parser.set_optional("dimensions", "dimensions", 1, - "number of dimensions of quasi-random values"); - parser.set_optional("trials", "trials", 20, "number of trials"); - parser.set_optional>("dis", "dis", {"uniform-uint"}, - distribution_desc.c_str()); - parser.set_optional>("engine", "engine", {"philox"}, - engine_desc.c_str()); - parser.set_optional>( - "lambda", "lambda", {10.0}, "space-separated list of lambdas of Poisson distribution"); - parser.run_and_exit_if_error(); - - std::vector engines; - { - auto es = parser.get>("engine"); - if (std::find(es.begin(), es.end(), "all") != es.end()) { - engines = all_engines; - } else { - for (auto e : all_engines) { - if (std::find(es.begin(), es.end(), e) != es.end()) engines.push_back(e); - } - } - } - - std::vector distributions; - { - auto ds = parser.get>("dis"); - if (std::find(ds.begin(), ds.end(), "all") != ds.end()) { - distributions = all_distributions; - } else { - for (auto d : all_distributions) { - if (std::find(ds.begin(), ds.end(), d) != ds.end()) distributions.push_back(d); - } - } - } - - int version; - // CHECK: CURAND_CALL(hiprandGetVersion(&version)); - CURAND_CALL(curandGetVersion(&version)); - int runtime_version; - // cudaRuntimeGetVersion is yet unsupported by HIP - // CHECK: CUDA_CALL(hipRuntimeGetVersion(&runtime_version)); - CUDA_CALL(cudaRuntimeGetVersion(&runtime_version)); - int device_id; - // CHECK: CUDA_CALL(hipGetDevice(&device_id)); - // CHECK: hipDeviceProp_t props; - // CHECK: CUDA_CALL(hipGetDeviceProperties(&props, device_id)); - CUDA_CALL(cudaGetDevice(&device_id)); - cudaDeviceProp props; - CUDA_CALL(cudaGetDeviceProperties(&props, device_id)); - - std::cout << "cuRAND: " << version << " "; - std::cout << "Runtime: " << runtime_version << " "; - std::cout << "Device: " << props.name; - std::cout << std::endl << std::endl; - - for (auto engine : engines) { - // CHECK: rng_type_t rng_type = HIPRAND_RNG_PSEUDO_XORWOW; - // CHECK: rng_type = HIPRAND_RNG_PSEUDO_XORWOW; - // CHECK: rng_type = HIPRAND_RNG_PSEUDO_MRG32K3A; - // CHECK: rng_type = HIPRAND_RNG_PSEUDO_MTGP32; - // CHECK: rng_type = HIPRAND_RNG_PSEUDO_MT19937; - // CHECK: rng_type = HIPRAND_RNG_PSEUDO_PHILOX4_32_10; - // CHECK: rng_type = HIPRAND_RNG_QUASI_SOBOL32; - // CHECK: rng_type = HIPRAND_RNG_QUASI_SCRAMBLED_SOBOL32; - // CHECK: rng_type = HIPRAND_RNG_QUASI_SOBOL64; - // CHECK: rng_type = HIPRAND_RNG_QUASI_SCRAMBLED_SOBOL64; - rng_type_t rng_type = CURAND_RNG_PSEUDO_XORWOW; - if (engine == "xorwow") - rng_type = CURAND_RNG_PSEUDO_XORWOW; - else if (engine == "mrg32k3a") - rng_type = CURAND_RNG_PSEUDO_MRG32K3A; - else if (engine == "mtgp32") - rng_type = CURAND_RNG_PSEUDO_MTGP32; - else if (engine == "mt19937") - rng_type = CURAND_RNG_PSEUDO_MT19937; - else if (engine == "philox") - rng_type = CURAND_RNG_PSEUDO_PHILOX4_32_10; - else if (engine == "sobol32") - rng_type = CURAND_RNG_QUASI_SOBOL32; - else if (engine == "scrambled_sobol32") - rng_type = CURAND_RNG_QUASI_SCRAMBLED_SOBOL32; - else if (engine == "sobol64") - rng_type = CURAND_RNG_QUASI_SOBOL64; - else if (engine == "scrambled_sobol64") - rng_type = CURAND_RNG_QUASI_SCRAMBLED_SOBOL64; - else { - std::cout << "Wrong engine name" << std::endl; - exit(1); - } - - std::cout << engine << ":" << std::endl; - - for (auto distribution : distributions) { - std::cout << " " << distribution << ":" << std::endl; - run_benchmarks(parser, rng_type, distribution); - } - std::cout << std::endl; - } - - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuRAND/benchmark_curand_kernel.cpp b/hipamd/tests/hipify-clang/unit_tests/libraries/cuRAND/benchmark_curand_kernel.cpp deleted file mode 100644 index bff9b77cad..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuRAND/benchmark_curand_kernel.cpp +++ /dev/null @@ -1,673 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -// Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "cmdparser.hpp" -// CHECK: #include -#include -// CHECK: #include -#include -// CHECK: #include -#include -// CHECK: #include -#include -// CHECK: #include -#include - -// CHECK: if ((x) != hipSuccess) { -#define CUDA_CALL(x) \ - do { \ - if ((x) != cudaSuccess) { \ - printf("Error at %s:%d\n", __FILE__, __LINE__); \ - exit(EXIT_FAILURE); \ - } \ - } while (0) -// CHECK: if ((x) != HIPRAND_STATUS_SUCCESS) { -#define CURAND_CALL(x) \ - do { \ - if ((x) != CURAND_STATUS_SUCCESS) { \ - printf("Error at %s:%d\n", __FILE__, __LINE__); \ - exit(EXIT_FAILURE); \ - } \ - } while (0) - -#ifndef DEFAULT_RAND_N -const size_t DEFAULT_RAND_N = 1024 * 1024 * 128; -#endif - -size_t next_power2(size_t x) -{ - size_t power = 1; - while (power < x) - { - power *= 2; - } - return power; -} - -template -__global__ -void init_kernel(GeneratorState * states, - const unsigned long long seed, - const unsigned long long offset) -{ - const unsigned int state_id = blockIdx.x * blockDim.x + threadIdx.x; - GeneratorState state; - // CHECK: hiprand_init(seed, state_id, offset, &state); - curand_init(seed, state_id, offset, &state); - states[state_id] = state; -} - -template -__global__ -void generate_kernel(GeneratorState * states, - T * data, - const size_t size, - const GenerateFunc& generate_func, - const Extra extra) -{ - const unsigned int state_id = blockIdx.x * blockDim.x + threadIdx.x; - const unsigned int stride = gridDim.x * blockDim.x; - - GeneratorState state = states[state_id]; - unsigned int index = state_id; - while(index < size) - { - data[index] = generate_func(&state, extra); - index += stride; - } - states[state_id] = state; -} - -template -struct runner -{ - GeneratorState * states; - - runner(const size_t dimensions, - const size_t blocks, - const size_t threads, - const unsigned long long seed, - const unsigned long long offset) - { - const size_t states_size = blocks * threads; - // CHECK: CUDA_CALL(hipMalloc((void **)&states, states_size * sizeof(GeneratorState))); - CUDA_CALL(cudaMalloc((void **)&states, states_size * sizeof(GeneratorState))); - // CHECK: hipLaunchKernelGGL(HIP_KERNEL_NAME(init_kernel), dim3(blocks), dim3(threads), 0, 0, states, seed, offset); - init_kernel<<>>(states, seed, offset); - // CHECK: CUDA_CALL(hipPeekAtLastError()); - // CHECK: CUDA_CALL(hipDeviceSynchronize()); - CUDA_CALL(cudaPeekAtLastError()); - CUDA_CALL(cudaDeviceSynchronize()); - } - - ~runner() - { - CUDA_CALL(cudaFree(states)); - } - - template - void generate(const size_t blocks, - const size_t threads, - T * data, - const size_t size, - const GenerateFunc& generate_func, - const Extra extra) - { - // CHECK: hipLaunchKernelGGL(HIP_KERNEL_NAME(generate_kernel), dim3(blocks), dim3(threads), 0, 0, states, data, size, generate_func, extra); - generate_kernel<<>>(states, data, size, generate_func, extra); - } -}; - -// CHECK: void generate_kernel(hiprandStateMtgp32_t * states, -template -__global__ -void generate_kernel(curandStateMtgp32_t * states, - T * data, - const size_t size, - const GenerateFunc& generate_func, - const Extra extra) -{ - const unsigned int state_id = blockIdx.x; - const unsigned int thread_id = threadIdx.x; - unsigned int index = blockIdx.x * blockDim.x + threadIdx.x; - unsigned int stride = gridDim.x * blockDim.x; - // CHECK: __shared__ hiprandStateMtgp32_t state; - __shared__ curandStateMtgp32_t state; - - if (thread_id == 0) - state = states[state_id]; - __syncthreads(); - - const size_t r = size%blockDim.x; - const size_t size_rounded_up = r == 0 ? size : size + (blockDim.x - r); - while(index < size_rounded_up) - { - auto value = generate_func(&state, extra); - if(index < size) - data[index] = value; - index += stride; - } - __syncthreads(); - - if (thread_id == 0) - states[state_id] = state; -} - -// CHECK: struct runner -template<> -struct runner -{ - // CHECK: hiprandStateMtgp32_t * states; - curandStateMtgp32_t * states; - mtgp32_kernel_params_t * d_param; - - runner(const size_t dimensions, - const size_t blocks, - const size_t threads, - const unsigned long long seed, - const unsigned long long offset) - { - const size_t states_size = std::min((size_t)200, blocks); - // CHECK: CUDA_CALL(hipMalloc((void **)&states, states_size * sizeof(hiprandStateMtgp32_t))); - CUDA_CALL(cudaMalloc((void **)&states, states_size * sizeof(curandStateMtgp32_t))); - // CHECK: CUDA_CALL(hipMalloc((void **)&d_param, sizeof(mtgp32_kernel_params))); - CUDA_CALL(cudaMalloc((void **)&d_param, sizeof(mtgp32_kernel_params))); - // CHECK: CURAND_CALL(hiprandMakeMTGP32Constants(mtgp32dc_params_fast_11213, d_param)); - CURAND_CALL(curandMakeMTGP32Constants(mtgp32dc_params_fast_11213, d_param)); - // CHECK: CURAND_CALL(hiprandMakeMTGP32KernelState(states, mtgp32dc_params_fast_11213, d_param, states_size, seed)); - CURAND_CALL(curandMakeMTGP32KernelState(states, mtgp32dc_params_fast_11213, d_param, states_size, seed)); - } - - ~runner() - { - // CHECK: CUDA_CALL(hipFree(states)); - // CHECK: CUDA_CALL(hipFree(d_param)); - CUDA_CALL(cudaFree(states)); - CUDA_CALL(cudaFree(d_param)); - } - - template - void generate(const size_t blocks, - const size_t threads, - T * data, - const size_t size, - const GenerateFunc& generate_func, - const Extra extra) - { - // CHECK: hipLaunchKernelGGL(HIP_KERNEL_NAME(generate_kernel), dim3(std::min((size_t)200, blocks)), dim3(256), 0, 0, states, data, size, generate_func, extra); - generate_kernel<<>>(states, data, size, generate_func, extra); - } -}; - -// CHECK: void init_kernel(hiprandStateSobol32_t * states, -template -__global__ -void init_kernel(curandStateSobol32_t * states, - const Directions directions, - const unsigned long long offset) -{ - const unsigned int dimension = blockIdx.y; - const unsigned int state_id = blockIdx.x * blockDim.x + threadIdx.x; - // CHECK: hiprandStateSobol32_t state; - // CHECK: hiprand_init(directions[dimension], offset + state_id, &state); - curandStateSobol32_t state; - curand_init(directions[dimension], offset + state_id, &state); - states[gridDim.x * blockDim.x * dimension + state_id] = state; -} - -// CHECK: void generate_kernel(hiprandStateSobol32_t * states, -template -__global__ -void generate_kernel(curandStateSobol32_t * states, - T * data, - const size_t size, - const GenerateFunc& generate_func, - const Extra extra) -{ - const unsigned int dimension = blockIdx.y; - const unsigned int state_id = blockIdx.x * blockDim.x + threadIdx.x; - const unsigned int stride = gridDim.x * blockDim.x; - // CHECK: hiprandStateSobol32_t state = states[gridDim.x * blockDim.x * dimension + state_id]; - curandStateSobol32_t state = states[gridDim.x * blockDim.x * dimension + state_id]; - const unsigned int offset = dimension * size; - unsigned int index = state_id; - while(index < size) - { - data[offset + index] = generate_func(&state, extra); - skipahead(stride - 1, &state); - index += stride; - } - state = states[gridDim.x * blockDim.x * dimension + state_id]; - skipahead(static_cast(size), &state); - states[gridDim.x * blockDim.x * dimension + state_id] = state; -} - -// CHECK: struct runner -template<> -struct runner -{ - // CHECK: hiprandStateSobol32_t * states; - curandStateSobol32_t * states; - size_t dimensions; - - runner(const size_t dimensions, - const size_t blocks, - const size_t threads, - const unsigned long long seed, - const unsigned long long offset) - { - this->dimensions = dimensions; - // CHECK: CUDA_CALL(hipMalloc((void **)&states, states_size * sizeof(hiprandStateSobol32_t))); - const size_t states_size = blocks * threads * dimensions; - CUDA_CALL(cudaMalloc((void **)&states, states_size * sizeof(curandStateSobol32_t))); - // CHECK: hiprandDirectionVectors32_t * directions; - curandDirectionVectors32_t * directions; - // CHECK: const size_t size = dimensions * sizeof(hiprandDirectionVectors32_t); - const size_t size = dimensions * sizeof(curandDirectionVectors32_t); - // CHECK: CUDA_CALL(hipMalloc((void **)&directions, size)); - CUDA_CALL(cudaMalloc((void **)&directions, size)); - // CHECK: hiprandDirectionVectors32_t * h_directions; - curandDirectionVectors32_t * h_directions; - // hiprandGetDirectionVectors32 and HIPRAND_DIRECTION_VECTORS_32_JOEKUO6 (of hiprandDirectionVectorSet_t) are yet unsupported by HIP - // CHECK-NOT: CURAND_CALL(hiprandGetDirectionVectors32(&h_directions, HIPRAND_DIRECTION_VECTORS_32_JOEKUO6)); - CURAND_CALL(curandGetDirectionVectors32(&h_directions, CURAND_DIRECTION_VECTORS_32_JOEKUO6)); - // CHECK: CUDA_CALL(hipMemcpy(directions, h_directions, size, hipMemcpyHostToDevice)); - CUDA_CALL(cudaMemcpy(directions, h_directions, size, cudaMemcpyHostToDevice)); - - const size_t blocks_x = next_power2((blocks + dimensions - 1) / dimensions); - // CHECK: hipLaunchKernelGGL(HIP_KERNEL_NAME(init_kernel), dim3(blocks_x, dimensions), dim3(threads), 0, 0, states, directions, offset); - init_kernel<<>>(states, directions, offset); - // CHECK: CUDA_CALL(hipPeekAtLastError()); - // CHECK: CUDA_CALL(hipDeviceSynchronize()); - CUDA_CALL(cudaPeekAtLastError()); - CUDA_CALL(cudaDeviceSynchronize()); - // CHECK: CUDA_CALL(hipFree(directions)); - CUDA_CALL(cudaFree(directions)); - } - - ~runner() - { - // CHECK: CUDA_CALL(hipFree(states)); - CUDA_CALL(cudaFree(states)); - } - - template - void generate(const size_t blocks, - const size_t threads, - T * data, - const size_t size, - const GenerateFunc& generate_func, - const Extra extra) - { - const size_t blocks_x = next_power2((blocks + dimensions - 1) / dimensions); - // CHECK: hipLaunchKernelGGL(HIP_KERNEL_NAME(generate_kernel), dim3(blocks_x, dimensions), dim3(threads), 0, 0, states, data, size / dimensions, generate_func, extra); - generate_kernel<<>>(states, data, size / dimensions, generate_func, extra); - } -}; - -template -void run_benchmark(const cli::Parser& parser, - const GenerateFunc& generate_func, - const Extra extra) -{ - const size_t size = parser.get("size"); - const size_t dimensions = parser.get("dimensions"); - const size_t trials = parser.get("trials"); - - const size_t blocks = parser.get("blocks"); - const size_t threads = parser.get("threads"); - - T * data; - // CHECK: CUDA_CALL(hipMalloc((void **)&data, size * sizeof(T))); - CUDA_CALL(cudaMalloc((void **)&data, size * sizeof(T))); - - runner r(dimensions, blocks, threads, 12345ULL, 6789ULL); - - // Warm-up - for (size_t i = 0; i < 5; i++) - { - r.generate(blocks, threads, data, size, generate_func, extra); - // CHECK: CUDA_CALL(hipPeekAtLastError()); - // CHECK: CUDA_CALL(hipDeviceSynchronize()); - CUDA_CALL(cudaPeekAtLastError()); - CUDA_CALL(cudaDeviceSynchronize()); - } - // CHECK: CUDA_CALL(hipDeviceSynchronize()); - CUDA_CALL(cudaDeviceSynchronize()); - - // Measurement - auto start = std::chrono::high_resolution_clock::now(); - for (size_t i = 0; i < trials; i++) - { - r.generate(blocks, threads, data, size, generate_func, extra); - } - // CHECK: CUDA_CALL(hipPeekAtLastError()); - // CHECK: CUDA_CALL(hipDeviceSynchronize()); - CUDA_CALL(cudaPeekAtLastError()); - CUDA_CALL(cudaDeviceSynchronize()); - auto end = std::chrono::high_resolution_clock::now(); - std::chrono::duration elapsed = end - start; - - std::cout << std::fixed << std::setprecision(3) - << " " - << "Throughput = " - << std::setw(8) << (trials * size * sizeof(T)) / - (elapsed.count() / 1e3 * (1 << 30)) - << " GB/s, Samples = " - << std::setw(8) << (trials * size) / - (elapsed.count() / 1e3 * (1 << 30)) - << " GSample/s, AvgTime (1 trial) = " - << std::setw(8) << elapsed.count() / trials - << " ms, Time (all) = " - << std::setw(8) << elapsed.count() - << " ms, Size = " << size - << std::endl; - // CHECK: CUDA_CALL(hipFree(data)); - CUDA_CALL(cudaFree(data)); -} - -template -void run_benchmarks(const cli::Parser& parser, - const std::string& distribution) -{ - if (distribution == "uniform-uint") - { - // curandStateSobol64_t and curandStateScrambledSobol64_t are yet unsupported by HIP - // CHECK-NOT: if (!std::is_same::value && - // CHECK-NOT: !std::is_same::value) - if (!std::is_same::value && - !std::is_same::value) - { - run_benchmark(parser, - [] __device__ (GeneratorState * state, int) { - // CHECK: return hiprand(state); - return curand(state); - }, 0 - ); - } - } - if (distribution == "uniform-long-long") - { - // curandStateSobol64_t and curandStateScrambledSobol64_t are yet unsupported by HIP - // CHECK-NOT: if (!std::is_same::value && - // CHECK-NOT: !std::is_same::value) - if (std::is_same::value || - std::is_same::value) - { - run_benchmark(parser, - [] __device__ (GeneratorState * state, int) { - // CHECK: return hiprand(state); - return curand(state); - }, 0 - ); - } - } - if (distribution == "uniform-float") - { - run_benchmark(parser, - [] __device__ (GeneratorState * state, int) { - // CHECK: return hiprand_uniform(state); - return curand_uniform(state); - }, 0 - ); - } - if (distribution == "uniform-double") - { - run_benchmark(parser, - [] __device__ (GeneratorState * state, int) { - // CHECK: return hiprand_uniform_double(state); - return curand_uniform_double(state); - }, 0 - ); - } - if (distribution == "normal-float") - { - run_benchmark(parser, - [] __device__ (GeneratorState * state, int) { - // CHECK: return hiprand_normal(state); - return curand_normal(state); - }, 0 - ); - } - if (distribution == "normal-double") - { - run_benchmark(parser, - [] __device__ (GeneratorState * state, int) { - // CHECK: return hiprand_normal_double(state); - return curand_normal_double(state); - }, 0 - ); - } - if (distribution == "log-normal-float") - { - run_benchmark(parser, - [] __device__ (GeneratorState * state, int) { - // CHECK: return hiprand_log_normal(state, 0.0f, 1.0f); - return curand_log_normal(state, 0.0f, 1.0f); - }, 0 - ); - } - if (distribution == "log-normal-double") - { - run_benchmark(parser, - [] __device__ (GeneratorState * state, int) { - // CHECK: return hiprand_log_normal_double(state, 0.0, 1.0); - return curand_log_normal_double(state, 0.0, 1.0); - }, 0 - ); - } - if (distribution == "poisson") - { - const auto lambdas = parser.get>("lambda"); - for (double lambda : lambdas) - { - std::cout << " " << "lambda " - << std::fixed << std::setprecision(1) << lambda << std::endl; - run_benchmark(parser, - [] __device__ (GeneratorState * state, double lambda) { - // CHECK: return hiprand_poisson(state, lambda); - return curand_poisson(state, lambda); - }, lambda - ); - } - } - if (distribution == "discrete-poisson") - { - const auto lambdas = parser.get>("lambda"); - for (double lambda : lambdas) - { - std::cout << " " << "lambda " - << std::fixed << std::setprecision(1) << lambda << std::endl; - // CHECK: hiprandDiscreteDistribution_t discrete_distribution; - curandDiscreteDistribution_t discrete_distribution; - // CHECK: CURAND_CALL(hiprandCreatePoissonDistribution(lambda, &discrete_distribution)); - CURAND_CALL(curandCreatePoissonDistribution(lambda, &discrete_distribution)); - run_benchmark(parser, - // CHECK: [] __device__ (GeneratorState * state, hiprandDiscreteDistribution_t discrete_distribution) { - [] __device__ (GeneratorState * state, curandDiscreteDistribution_t discrete_distribution) { - // CHECK: return hiprand_discrete(state, discrete_distribution); - return curand_discrete(state, discrete_distribution); - }, discrete_distribution - ); - // CHECK: CURAND_CALL(hiprandDestroyDistribution(discrete_distribution)); - CURAND_CALL(curandDestroyDistribution(discrete_distribution)); - } - } -} - -const std::vector all_engines = { - "xorwow", - "mrg32k3a", - "mtgp32", - // "mt19937", - "philox", - "sobol32", - // "scrambled_sobol32", - // "sobol64", - // "scrambled_sobol64", -}; - -const std::vector all_distributions = { - "uniform-uint", - // "uniform-long-long", - "uniform-float", - "uniform-double", - "normal-float", - "normal-double", - "log-normal-float", - "log-normal-double", - "poisson", - "discrete-poisson", -}; - -int main(int argc, char *argv[]) -{ - cli::Parser parser(argc, argv); - - const std::string distribution_desc = - "space-separated list of distributions:" + - std::accumulate(all_distributions.begin(), all_distributions.end(), std::string(), - [](std::string a, std::string b) { - return a + "\n " + b; - } - ) + - "\n or all"; - const std::string engine_desc = - "space-separated list of random number engines:" + - std::accumulate(all_engines.begin(), all_engines.end(), std::string(), - [](std::string a, std::string b) { - return a + "\n " + b; - } - ) + - "\n or all"; - - parser.set_optional("size", "size", DEFAULT_RAND_N, "number of values"); - parser.set_optional("dimensions", "dimensions", 1, "number of dimensions of quasi-random values"); - parser.set_optional("trials", "trials", 20, "number of trials"); - parser.set_optional("blocks", "blocks", 256, "number of blocks"); - parser.set_optional("threads", "threads", 256, "number of threads in each block"); - parser.set_optional>("dis", "dis", {"uniform-uint"}, distribution_desc.c_str()); - parser.set_optional>("engine", "engine", {"philox"}, engine_desc.c_str()); - parser.set_optional>("lambda", "lambda", {10.0}, "space-separated list of lambdas of Poisson distribution"); - parser.run_and_exit_if_error(); - - std::vector engines; - { - auto es = parser.get>("engine"); - if (std::find(es.begin(), es.end(), "all") != es.end()) - { - engines = all_engines; - } - else - { - for (auto e : all_engines) - { - if (std::find(es.begin(), es.end(), e) != es.end()) - engines.push_back(e); - } - } - } - - std::vector distributions; - { - auto ds = parser.get>("dis"); - if (std::find(ds.begin(), ds.end(), "all") != ds.end()) - { - distributions = all_distributions; - } - else - { - for (auto d : all_distributions) - { - if (std::find(ds.begin(), ds.end(), d) != ds.end()) - distributions.push_back(d); - } - } - } - - int version; - // CHECK: CURAND_CALL(hiprandGetVersion(&version)); - CURAND_CALL(curandGetVersion(&version)); - int runtime_version; - // cudaRuntimeGetVersion is yet unsupported by HIP - // CHECK: CUDA_CALL(hipRuntimeGetVersion(&runtime_version)); - CUDA_CALL(cudaRuntimeGetVersion(&runtime_version)); - int device_id; - // CHECK: CUDA_CALL(hipGetDevice(&device_id)); - // CHECK: hipDeviceProp_t props; - // CHECK: CUDA_CALL(hipGetDeviceProperties(&props, device_id)); - CUDA_CALL(cudaGetDevice(&device_id)); - cudaDeviceProp props; - CUDA_CALL(cudaGetDeviceProperties(&props, device_id)); - - std::cout << "cuRAND: " << version << " "; - std::cout << "Runtime: " << runtime_version << " "; - std::cout << "Device: " << props.name; - std::cout << std::endl << std::endl; - - for (auto engine : engines) - { - std::cout << engine << ":" << std::endl; - for (auto distribution : distributions) - { - std::cout << " " << distribution << ":" << std::endl; - const std::string plot_name = engine + "-" + distribution; - if (engine == "xorwow") - { - // CHECK: run_benchmarks(parser, distribution); - run_benchmarks(parser, distribution); - } - else if (engine == "mrg32k3a") - { - // CHECK: run_benchmarks(parser, distribution); - run_benchmarks(parser, distribution); - } - else if (engine == "philox") - { - // CHECK: run_benchmarks(parser, distribution); - run_benchmarks(parser, distribution); - } - else if (engine == "sobol32") - { - // CHECK: run_benchmarks(parser, distribution); - run_benchmarks(parser, distribution); - } - else if (engine == "mtgp32") - { - // CHECK: run_benchmarks(parser, distribution); - run_benchmarks(parser, distribution); - } - } - } - - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuRAND/cmdparser.hpp b/hipamd/tests/hipify-clang/unit_tests/libraries/cuRAND/cmdparser.hpp deleted file mode 100644 index 1fe8ad9ce2..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuRAND/cmdparser.hpp +++ /dev/null @@ -1,494 +0,0 @@ -// The MIT License (MIT) -// -// Copyright (c) 2015 - 2016 Florian Rappl -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -/* - This file is part of the C++ CmdParser utility. - Copyright (c) 2015 - 2016 Florian Rappl -*/ - -#pragma once -#include -#include -#include -#include -#include -#include - -namespace cli { -struct CallbackArgs { - const std::vector& arguments; - std::ostream& output; - std::ostream& error; -}; -class Parser { - private: - class CmdBase { - public: - explicit CmdBase(const std::string& name, const std::string& alternative, - const std::string& description, bool required, bool dominant, - bool variadic) - : name(name), - command(name.size() > 0 ? "-" + name : ""), - alternative(alternative.size() > 0 ? "--" + alternative : ""), - description(description), - required(required), - handled(false), - arguments({}), - dominant(dominant), - variadic(variadic) {} - - virtual ~CmdBase() {} - - std::string name; - std::string command; - std::string alternative; - std::string description; - bool required; - bool handled; - std::vector arguments; - bool const dominant; - bool const variadic; - - virtual std::string print_value() const = 0; - virtual bool parse(std::ostream& output, std::ostream& error) = 0; - - bool is(const std::string& given) const { return given == command || given == alternative; } - }; - - template - struct ArgumentCountChecker { - static constexpr bool Variadic = false; - }; - - template - struct ArgumentCountChecker> { - static constexpr bool Variadic = true; - }; - - template - class CmdFunction final : public CmdBase { - public: - explicit CmdFunction(const std::string& name, const std::string& alternative, - const std::string& description, bool required, bool dominant) - : CmdBase(name, alternative, description, required, dominant, - ArgumentCountChecker::Variadic) {} - - virtual bool parse(std::ostream& output, std::ostream& error) { - try { - CallbackArgs args{arguments, output, error}; - value = callback(args); - return true; - } catch (...) { - return false; - } - } - - virtual std::string print_value() const { return ""; } - - std::function callback; - T value; - }; - - template - class CmdArgument final : public CmdBase { - public: - explicit CmdArgument(const std::string& name, const std::string& alternative, - const std::string& description, bool required, bool dominant) - : CmdBase(name, alternative, description, required, dominant, - ArgumentCountChecker::Variadic) {} - - virtual bool parse(std::ostream&, std::ostream&) { - try { - value = Parser::parse(arguments, value); - return true; - } catch (...) { - return false; - } - } - - virtual std::string print_value() const { return stringify(value); } - - T value; - }; - - static int parse(const std::vector& elements, const int&) { - if (elements.size() != 1) throw std::bad_cast(); - - return std::stoi(elements[0]); - } - - static bool parse(const std::vector& elements, const bool& defval) { - if (elements.size() != 0) - throw std::runtime_error("A boolean command line parameter cannot have any arguments."); - - return !defval; - } - - static double parse(const std::vector& elements, const double&) { - if (elements.size() != 1) throw std::bad_cast(); - - return std::stod(elements[0]); - } - - static float parse(const std::vector& elements, const float&) { - if (elements.size() != 1) throw std::bad_cast(); - - return std::stof(elements[0]); - } - - static long double parse(const std::vector& elements, const long double&) { - if (elements.size() != 1) throw std::bad_cast(); - - return std::stold(elements[0]); - } - - static unsigned int parse(const std::vector& elements, const unsigned int&) { - if (elements.size() != 1) throw std::bad_cast(); - - return static_cast(std::stoul(elements[0])); - } - - static unsigned long parse(const std::vector& elements, const unsigned long&) { - if (elements.size() != 1) throw std::bad_cast(); - - return std::stoul(elements[0]); - } - - static unsigned long long parse(const std::vector& elements, - const unsigned long long&) { - if (elements.size() != 1) throw std::bad_cast(); - - return std::stoull(elements[0]); - } - - static long parse(const std::vector& elements, const long&) { - if (elements.size() != 1) throw std::bad_cast(); - - return std::stol(elements[0]); - } - - static std::string parse(const std::vector& elements, const std::string&) { - if (elements.size() != 1) throw std::bad_cast(); - - return elements[0]; - } - - template - static std::vector parse(const std::vector& elements, const std::vector&) { - const T defval = T(); - std::vector values{}; - std::vector buffer(1); - - for (const auto& element : elements) { - buffer[0] = element; - values.push_back(parse(buffer, defval)); - } - - return values; - } - - template - static std::string stringify(const T& value) { - return std::to_string(value); - } - - template - static std::string stringify(const std::vector& values) { - std::stringstream ss{}; - ss << "[ "; - - for (const auto& value : values) { - ss << stringify(value) << " "; - } - - ss << "]"; - return ss.str(); - } - - static std::string stringify(const std::string& str) { return str; } - - public: - explicit Parser(int argc, const char** argv) : _appname(argv[0]) { - for (int i = 1; i < argc; ++i) { - _arguments.push_back(argv[i]); - } - enable_help(); - } - - explicit Parser(int argc, char** argv) : _appname(argv[0]) { - for (int i = 1; i < argc; ++i) { - _arguments.push_back(argv[i]); - } - enable_help(); - } - - ~Parser() { - for (int i = 0, n = _commands.size(); i < n; ++i) { - delete _commands[i]; - } - } - - bool has_help() const { - for (const auto command : _commands) { - if (command->name == "h" && command->alternative == "--help") { - return true; - } - } - - return false; - } - - void enable_help() { - set_callback("h", "help", std::function([this](CallbackArgs& args) { - args.output << this->usage(); - exit(0); - return false; - }), - "", true); - } - - void disable_help() { - for (auto command = _commands.begin(); command != _commands.end(); ++command) { - if ((*command)->name == "h" && (*command)->alternative == "--help") { - _commands.erase(command); - break; - } - } - } - - template - void set_default(bool is_required, const std::string& description = "") { - auto command = new CmdArgument{"", "", description, is_required, false}; - _commands.push_back(command); - } - - template - void set_required(const std::string& name, const std::string& alternative, - const std::string& description = "", bool dominant = false) { - auto command = new CmdArgument{name, alternative, description, true, dominant}; - _commands.push_back(command); - } - - template - void set_optional(const std::string& name, const std::string& alternative, T defaultValue, - const std::string& description = "", bool dominant = false) { - auto command = new CmdArgument{name, alternative, description, false, dominant}; - command->value = defaultValue; - _commands.push_back(command); - } - - template - void set_callback(const std::string& name, const std::string& alternative, - std::function callback, const std::string& description = "", - bool dominant = false) { - auto command = new CmdFunction{name, alternative, description, false, dominant}; - command->callback = callback; - _commands.push_back(command); - } - - inline void run_and_exit_if_error() { - if (run() == false) { - exit(1); - } - } - - inline bool run() { return run(std::cout, std::cerr); } - - inline bool run(std::ostream& output) { return run(output, std::cerr); } - - bool run(std::ostream& output, std::ostream& error) { - if (_arguments.size() > 0) { - auto current = find_default(); - - for (int i = 0, n = _arguments.size(); i < n; ++i) { - auto isarg = _arguments[i].size() > 0 && _arguments[i][0] == '-'; - auto associated = isarg ? find(_arguments[i]) : nullptr; - - if (associated != nullptr) { - current = associated; - associated->handled = true; - } else if (current == nullptr) { - error << no_default(); - return false; - } else { - current->arguments.push_back(_arguments[i]); - current->handled = true; - if (!current->variadic) { - // If the current command is not variadic, then no more arguments - // should be added to it. In this case, switch back to the default - // command. - current = find_default(); - } - } - } - } - - // First, parse dominant arguments since they succeed even if required - // arguments are missing. - for (auto command : _commands) { - if (command->handled && command->dominant && !command->parse(output, error)) { - error << howto_use(command); - return false; - } - } - - // Next, check for any missing arguments. - for (auto command : _commands) { - if (command->required && !command->handled) { - error << howto_required(command); - return false; - } - } - - // Finally, parse all remaining arguments. - for (auto command : _commands) { - if (command->handled && !command->dominant && !command->parse(output, error)) { - error << howto_use(command); - return false; - } - } - - return true; - } - - template - T get(const std::string& name) const { - for (const auto& command : _commands) { - if (command->name == name) { - auto cmd = dynamic_cast*>(command); - - if (cmd == nullptr) { - throw std::runtime_error("Invalid usage of the parameter " + name + - " detected."); - } - - return cmd->value; - } - } - - throw std::runtime_error("The parameter " + name + " could not be found."); - } - - template - T get_if(const std::string& name, std::function callback) const { - auto value = get(name); - return callback(value); - } - - int requirements() const { - int count = 0; - - for (const auto& command : _commands) { - if (command->required) { - ++count; - } - } - - return count; - } - - int commands() const { return static_cast(_commands.size()); } - - inline const std::string& app_name() const { return _appname; } - - protected: - CmdBase* find(const std::string& name) { - for (auto command : _commands) { - if (command->is(name)) { - return command; - } - } - - return nullptr; - } - - CmdBase* find_default() { - for (auto command : _commands) { - if (command->name == "") { - return command; - } - } - - return nullptr; - } - - std::string usage() const { - std::stringstream ss{}; - ss << "Available parameters:\n\n"; - - for (const auto& command : _commands) { - ss << " " << command->command << "\t" << command->alternative; - - if (command->required == true) { - ss << "\t(required)"; - } - - ss << "\n " << command->description; - - if (command->required == false) { - ss << "\n " - << "This parameter is optional. The default value is '" + command->print_value() - << "'."; - } - - ss << "\n\n"; - } - - return ss.str(); - } - - void print_help(std::stringstream& ss) const { - if (has_help()) { - ss << "For more help use --help or -h.\n"; - } - } - - std::string howto_required(CmdBase* command) const { - std::stringstream ss{}; - ss << "The parameter " << command->name << " is required.\n"; - ss << command->description << '\n'; - print_help(ss); - return ss.str(); - } - - std::string howto_use(CmdBase* command) const { - std::stringstream ss{}; - ss << "The parameter " << command->name << " has invalid arguments.\n"; - ss << command->description << '\n'; - print_help(ss); - return ss.str(); - } - - std::string no_default() const { - std::stringstream ss{}; - ss << "No default parameter has been specified.\n"; - ss << "The given argument must be used with a parameter.\n"; - print_help(ss); - return ss.str(); - } - - private: - const std::string _appname; - std::vector _arguments; - std::vector _commands; -}; -} // namespace cli diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuRAND/poisson_api_example.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuRAND/poisson_api_example.cu deleted file mode 100644 index 567de05e6e..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuRAND/poisson_api_example.cu +++ /dev/null @@ -1,416 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -// Taken from: http://docs.nvidia.com/cuda/curand/device-api-overview.html#poisson-api-example -/* - * This program uses CURAND library for Poisson distribution - * to simulate queues in store for 16 hours. It shows the - * difference of using 3 different APIs: - * - HOST API -arrival of customers is described by Poisson(4) - * - SIMPLE DEVICE API -arrival of customers is described by - * Poisson(4*(sin(x/100)+1)), where x is number of minutes - * from store opening time. - * - ROBUST DEVICE API -arrival of customers is described by: - * - Poisson(2) for first 3 hours. - * - Poisson(1) for second 3 hours. - * - Poisson(3) after 6 hours. - */ - -#include -#include -// CHECK: #include -#include -// CHECK: #include -#include -// CHECK: #include -#include - -// CHECK: #define CUDA_CALL(x) do { if((x) != hipSuccess) { -#define CUDA_CALL(x) do { if((x) != cudaSuccess) { \ - printf("Error at %s:%d\n",__FILE__,__LINE__); \ - return EXIT_FAILURE;}} while(0) -// CHECK: #define CURAND_CALL(x) do { if((x)!=HIPRAND_STATUS_SUCCESS) { -#define CURAND_CALL(x) do { if((x)!=CURAND_STATUS_SUCCESS) { \ - printf("Error at %s:%d\n",__FILE__,__LINE__);\ - return EXIT_FAILURE;}} while(0) - - -#define HOURS 16 -#define OPENING_HOUR 7 -#define CLOSING_HOUR (OPENING_HOUR + HOURS) - -#define access_2D(type, ptr, row, column, pitch)\ - *((type*)((char*)ptr + (row) * pitch) + column) - -enum API_TYPE { - HOST_API = 0, - SIMPLE_DEVICE_API = 1, - ROBUST_DEVICE_API = 2, -}; - -/* global variables */ -API_TYPE api; -int report_break; -int cashiers_load_h[HOURS]; -__constant__ int cashiers_load[HOURS]; -// CHECK: __global__ void setup_kernel(hiprandState *state) -__global__ void setup_kernel(curandState *state) -{ - int id = threadIdx.x + blockIdx.x * blockDim.x; - /* Each thread gets same seed, a different sequence - number, no offset */ - // CHECK: hiprand_init(1234, id, 0, &state[id]); - curand_init(1234, id, 0, &state[id]); -} - -__inline__ __device__ -void update_queue(int id, int min, unsigned int new_customers, - unsigned int &queue_length, - unsigned int *queue_lengths, size_t pitch) -{ - int balance; - balance = new_customers - 2 * cashiers_load[(min-1)/60]; - if (balance + (int)queue_length <= 0){ - queue_length = 0; - }else{ - queue_length += balance; - } - /* Store results */ - access_2D(unsigned int, queue_lengths, min-1, id, pitch) - = queue_length; -} - -// CHECK: __global__ void simple_device_API_kernel(hiprandState *state, -__global__ void simple_device_API_kernel(curandState *state, - unsigned int *queue_lengths, size_t pitch) -{ - int id = threadIdx.x + blockIdx.x * blockDim.x; - unsigned int new_customers; - unsigned int queue_length = 0; - /* Copy state to local memory for efficiency */ - // CHECK: hiprandState localState = state[id]; - curandState localState = state[id]; - /* Simulate queue in time */ - for(int min = 1; min <= 60 * HOURS; min++) { - /* Draw number of new customers depending on API */ - // CHECK: new_customers = hiprand_poisson(&localState, - new_customers = curand_poisson(&localState, - 4*(sin((float)min/100.0)+1)); - /* Update queue */ - update_queue(id, min, new_customers, queue_length, - queue_lengths, pitch); - } - /* Copy state back to global memory */ - state[id] = localState; -} - - -__global__ void host_API_kernel(unsigned int *poisson_numbers, - unsigned int *queue_lengths, size_t pitch) -{ - int id = threadIdx.x + blockIdx.x * blockDim.x; - unsigned int new_customers; - unsigned int queue_length = 0; - /* Simulate queue in time */ - for(int min = 1; min <= 60 * HOURS; min++) { - /* Get random number from global memory */ - new_customers = poisson_numbers - [blockDim.x * gridDim.x * (min -1) + id]; - /* Update queue */ - update_queue(id, min, new_customers, queue_length, - queue_lengths, pitch); - } -} -// CHECK: __global__ void robust_device_API_kernel(hiprandState *state, -// CHECK: hiprandDiscreteDistribution_t poisson_1, -// CHECK: hiprandDiscreteDistribution_t poisson_2, -// CHECK: hiprandDiscreteDistribution_t poisson_3, -__global__ void robust_device_API_kernel(curandState *state, - curandDiscreteDistribution_t poisson_1, - curandDiscreteDistribution_t poisson_2, - curandDiscreteDistribution_t poisson_3, - unsigned int *queue_lengths, size_t pitch) -{ - int id = threadIdx.x + blockIdx.x * 64; - unsigned int new_customers; - unsigned int queue_length = 0; - /* Copy state to local memory for efficiency */ - // CHECK: hiprandState localState = state[id]; - curandState localState = state[id]; - /* Simulate queue in time */ - /* first 3 hours */ - for(int min = 1; min <= 60 * 3; min++) { - /* draw number of new customers depending on API */ - new_customers = - // CHECK: hiprand_discrete(&localState, poisson_2); - curand_discrete(&localState, poisson_2); - /* Update queue */ - update_queue(id, min, new_customers, queue_length, - queue_lengths, pitch); - } - /* second 3 hours */ - for(int min = 60 * 3 + 1; min <= 60 * 6; min++) { - /* draw number of new customers depending on API */ - new_customers = - // CHECK: hiprand_discrete(&localState, poisson_1); - curand_discrete(&localState, poisson_1); - /* Update queue */ - update_queue(id, min, new_customers, queue_length, - queue_lengths, pitch); - } - /* after 6 hours */ - for(int min = 60 * 6 + 1; min <= 60 * HOURS; min++) { - /* draw number of new customers depending on API */ - new_customers = - // CHECK: hiprand_discrete(&localState, poisson_3); - curand_discrete(&localState, poisson_3); - /* Update queue */ - update_queue(id, min, new_customers, queue_length, - queue_lengths, pitch); - } - /* Copy state back to global memory */ - state[id] = localState; -} - -/* Set time intervals between reports */ -void report_settings() -{ - do{ - printf("Set time intervals between queue reports"); - printf("(in minutes > 0)\n"); - if (scanf("%d", &report_break) == 0) continue; - }while(report_break <= 0); -} - - -/* Set number of cashiers each hour */ -void add_cachiers(int *cashiers_load) -{ - int i, min, max, begin, end; - printf("Cashier serves 2 customers per minute...\n"); - for (i = 0; i < HOURS; i++){ - cashiers_load_h[i] = 0; - } - while (true){ - printf("Adding cashier...\n"); - min = OPENING_HOUR; - max = CLOSING_HOUR-1; - do{ - printf("Set hour that cahier comes (%d-%d)", - min, max); - printf(" [type 0 to finish adding cashiers]\n"); - if (scanf("%d", &begin) == 0) continue; - }while (begin > max || (begin < min && begin != 0)); - if (begin == 0) break; - min = begin+1; - max = CLOSING_HOUR; - do{ - printf("Set hour that cahier leaves (%d-%d)", - min, max); - printf(" [type 0 to finish adding cashiers]\n"); - if (scanf("%d", &end) == 0) continue; - }while (end > max || (end < min && end != 0)); - if (end == 0) break; - for (i = begin - OPENING_HOUR; - i < end - OPENING_HOUR; i++){ - cashiers_load_h[i]++; - } - } - for (i = OPENING_HOUR; i < CLOSING_HOUR; i++){ - printf("\n%2d:00 - %2d:00 %d cashier", - i, i+1, cashiers_load_h[i-OPENING_HOUR]); - if (cashiers_load[i-OPENING_HOUR] != 1) printf("s"); - } - printf("\n"); -} - -/* Set API type */ -API_TYPE set_API_type() -{ - printf("Choose API type:\n"); - int choose; - do{ - printf("type 1 for HOST API\n"); - printf("type 2 for SIMPLE DEVICE API\n"); - printf("type 3 for ROBUST DEVICE API\n"); - if (scanf("%d", &choose) == 0) continue; - }while( choose < 1 || choose > 3); - switch(choose){ - case 1: return HOST_API; - case 2: return SIMPLE_DEVICE_API; - case 3: return ROBUST_DEVICE_API; - default: - fprintf(stderr, "wrong API\n"); - return HOST_API; - } -} - -void settings() -{ - add_cachiers(cashiers_load); - // CHECK: hipMemcpyToSymbol(HIP_SYMBOL("cashiers_load"), cashiers_load_h, - // CHECK: HOURS * sizeof(int), 0, hipMemcpyHostToDevice); - cudaMemcpyToSymbol("cashiers_load", cashiers_load_h, - HOURS * sizeof(int), 0, cudaMemcpyHostToDevice); - report_settings(); - api = set_API_type(); -} - -void print_statistics(unsigned int *hostResults, size_t pitch) -{ - int min, i, hour, minute; - unsigned int sum; - for(min = report_break; min <= 60 * HOURS; - min += report_break) { - sum = 0; - for(i = 0; i < 64 * 64; i++) { - sum += access_2D(unsigned int, hostResults, - min-1, i, pitch); - } - hour = OPENING_HOUR + min/60; - minute = min%60; - printf("%2d:%02d # of waiting customers = %10.4g |", - hour, minute, (float)sum/(64.0 * 64.0)); - printf(" # of cashiers = %d | ", - cashiers_load_h[(min-1)/60]); - printf("# of new customers/min ~= "); - switch (api){ - case HOST_API: - printf("%2.2f\n", 4.0); - break; - case SIMPLE_DEVICE_API: - printf("%2.2f\n", - 4*(sin((float)min/100.0)+1)); - break; - case ROBUST_DEVICE_API: - if (min <= 3 * 60){ - printf("%2.2f\n", 2.0); - }else{ - if (min <= 6 * 60){ - printf("%2.2f\n", 1.0); - }else{ - printf("%2.2f\n", 3.0); - } - } - break; - default: - fprintf(stderr, "Wrong API\n"); - } - } -} - -int main(int argc, char *argv[]) -{ - int n; - size_t pitch; - // CHECK: hiprandState *devStates; - curandState *devStates; - unsigned int *devResults, *hostResults; - unsigned int *poisson_numbers_d; - // CHECK: hiprandDiscreteDistribution_t poisson_1, poisson_2; - // CHECK: hiprandDiscreteDistribution_t poisson_3; - // CHECK: hiprandGenerator_t gen; - curandDiscreteDistribution_t poisson_1, poisson_2; - curandDiscreteDistribution_t poisson_3; - curandGenerator_t gen; - - /* Setting cashiers, report and API */ - settings(); - - /* Allocate space for results on device */ - // CHECK: CUDA_CALL(hipMallocPitch((void **)&devResults, &pitch, - CUDA_CALL(cudaMallocPitch((void **)&devResults, &pitch, - 64 * 64 * sizeof(unsigned int), 60 * HOURS)); - - /* Allocate space for results on host */ - hostResults = (unsigned int *)calloc(pitch * 60 * HOURS, - sizeof(unsigned int)); - - /* Allocate space for prng states on device */ - // CHECK: CUDA_CALL(hipMalloc((void **)&devStates, 64 * 64 * - // CHECK: sizeof(hiprandState))); - CUDA_CALL(cudaMalloc((void **)&devStates, 64 * 64 * - sizeof(curandState))); - - /* Setup prng states */ - if (api != HOST_API){ - // CHECK: hipLaunchKernelGGL(setup_kernel, dim3(64), dim3(64), 0, 0, devStates); - setup_kernel<<<64, 64>>>(devStates); - } - /* Simulate queue */ - switch (api){ - case HOST_API: - /* Create pseudo-random number generator */ - // CHECK: CURAND_CALL(hiprandCreateGenerator(&gen, - // CHECK: HIPRAND_RNG_PSEUDO_DEFAULT)); - CURAND_CALL(curandCreateGenerator(&gen, - CURAND_RNG_PSEUDO_DEFAULT)); - /* Set seed */ - // CHECK: CURAND_CALL(hiprandSetPseudoRandomGeneratorSeed( - CURAND_CALL(curandSetPseudoRandomGeneratorSeed( - gen, 1234ULL)); - /* compute n */ - n = 64 * 64 * HOURS * 60; - /* Allocate n unsigned ints on device */ - // CHECK: CUDA_CALL(hipMalloc((void **)&poisson_numbers_d, - CUDA_CALL(cudaMalloc((void **)&poisson_numbers_d, - n * sizeof(unsigned int))); - /* Generate n unsigned ints on device */ - // CHECK: CURAND_CALL(hiprandGeneratePoisson(gen, - CURAND_CALL(curandGeneratePoisson(gen, - poisson_numbers_d, n, 4.0)); - // CHECK: hipLaunchKernelGGL(host_API_kernel, dim3(64), dim3(64), 0, 0, poisson_numbers_d, - host_API_kernel<<<64, 64>>>(poisson_numbers_d, - devResults, pitch); - /* Cleanup */ - // CHECK: CURAND_CALL(hiprandDestroyGenerator(gen)); - CURAND_CALL(curandDestroyGenerator(gen)); - break; - case SIMPLE_DEVICE_API: - // CHECK: hipLaunchKernelGGL(simple_device_API_kernel, dim3(64), dim3(64), 0, 0, devStates, - simple_device_API_kernel<<<64, 64>>>(devStates, - devResults, pitch); - break; - case ROBUST_DEVICE_API: - /* Create histograms for Poisson(1) */ - // CHECK: CURAND_CALL(hiprandCreatePoissonDistribution(1.0, - CURAND_CALL(curandCreatePoissonDistribution(1.0, - &poisson_1)); - /* Create histograms for Poisson(2) */ - // CHECK: CURAND_CALL(hiprandCreatePoissonDistribution(2.0, - CURAND_CALL(curandCreatePoissonDistribution(2.0, - &poisson_2)); - /* Create histograms for Poisson(3) */ - // CHECK: CURAND_CALL(hiprandCreatePoissonDistribution(3.0, - CURAND_CALL(curandCreatePoissonDistribution(3.0, - &poisson_3)); - // CHECK: hipLaunchKernelGGL(robust_device_API_kernel, dim3(64), dim3(64), 0, 0, devStates, - robust_device_API_kernel<<<64, 64>>>(devStates, - poisson_1, poisson_2, poisson_3, - devResults, pitch); - /* Cleanup */ - // CHECK: CURAND_CALL(hiprandDestroyDistribution(poisson_1)); - // CHECK: CURAND_CALL(hiprandDestroyDistribution(poisson_2)); - // CHECK: CURAND_CALL(hiprandDestroyDistribution(poisson_3)); - CURAND_CALL(curandDestroyDistribution(poisson_1)); - CURAND_CALL(curandDestroyDistribution(poisson_2)); - CURAND_CALL(curandDestroyDistribution(poisson_3)); - break; - default: - fprintf(stderr, "Wrong API\n"); - } - /* Copy device memory to host */ - // CHECK: CUDA_CALL(hipMemcpy2D(hostResults, pitch, devResults, - // CHECK: 60 * HOURS, hipMemcpyDeviceToHost)); - CUDA_CALL(cudaMemcpy2D(hostResults, pitch, devResults, - pitch, 64 * 64 * sizeof(unsigned int), - 60 * HOURS, cudaMemcpyDeviceToHost)); - /* Show result */ - print_statistics(hostResults, pitch); - /* Cleanup */ - // CHECK: CUDA_CALL(hipFree(devStates)); - // CHECK: CUDA_CALL(hipFree(devResults)); - CUDA_CALL(cudaFree(devStates)); - CUDA_CALL(cudaFree(devResults)); - free(hostResults); - return EXIT_SUCCESS; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_01.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_01.cu deleted file mode 100644 index 6e163d47a6..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_01.cu +++ /dev/null @@ -1,367 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -#include -#include -// CHECK: #include -#include -// CHECK: #include "hipsparse.h" -#include "cusparse.h" - -// CHECK: if (y) hipFree(y); -// CHECK: if (z) hipFree(z); -// CHECK: if (xInd) hipFree(xInd); -// CHECK: if (xVal) hipFree(xVal); -// CHECK: if (csrRowPtr) hipFree(csrRowPtr); -// CHECK: if (cooRowIndex) hipFree(cooRowIndex); -// CHECK: if (cooColIndex) hipFree(cooColIndex); -// CHECK: if (cooVal) hipFree(cooVal); -// CHECK: if (descr) hipsparseDestroyMatDescr(descr); -// CHECK: if (handle) hipsparseDestroy(handle); -// CHECK: hipDeviceReset(); -#define CLEANUP(s) \ -do { \ - printf ("%s\n", s); \ - if (yHostPtr) free(yHostPtr); \ - if (zHostPtr) free(zHostPtr); \ - if (xIndHostPtr) free(xIndHostPtr); \ - if (xValHostPtr) free(xValHostPtr); \ - if (cooRowIndexHostPtr) free(cooRowIndexHostPtr);\ - if (cooColIndexHostPtr) free(cooColIndexHostPtr);\ - if (cooValHostPtr) free(cooValHostPtr); \ - if (y) cudaFree(y); \ - if (z) cudaFree(z); \ - if (xInd) cudaFree(xInd); \ - if (xVal) cudaFree(xVal); \ - if (csrRowPtr) cudaFree(csrRowPtr); \ - if (cooRowIndex) cudaFree(cooRowIndex); \ - if (cooColIndex) cudaFree(cooColIndex); \ - if (cooVal) cudaFree(cooVal); \ - if (descr) cusparseDestroyMatDescr(descr);\ - if (handle) cusparseDestroy(handle); \ - cudaDeviceReset(); \ - fflush (stdout); \ -} while (0) - -int main(){ - // CHECK: hipError_t cudaStat1,cudaStat2,cudaStat3,cudaStat4,cudaStat5,cudaStat6; - cudaError_t cudaStat1,cudaStat2,cudaStat3,cudaStat4,cudaStat5,cudaStat6; - // CHECK: hipsparseStatus_t status; - cusparseStatus_t status; - // CHECK: hipsparseHandle_t handle=0; - cusparseHandle_t handle=0; - // CHECK: hipsparseMatDescr_t descr=0; - cusparseMatDescr_t descr=0; - int * cooRowIndexHostPtr=0; - int * cooColIndexHostPtr=0; - double * cooValHostPtr=0; - int * cooRowIndex=0; - int * cooColIndex=0; - double * cooVal=0; - int * xIndHostPtr=0; - double * xValHostPtr=0; - double * yHostPtr=0; - int * xInd=0; - double * xVal=0; - double * y=0; - int * csrRowPtr=0; - double * zHostPtr=0; - double * z=0; - int n, nnz, nnz_vector; - double dzero =0.0; - double dtwo =2.0; - double dthree=3.0; - double dfive =5.0; - printf("testing example\n"); - /* create the following sparse test matrix in COO format */ - /* |1.0 2.0 3.0| - | 4.0 | - |5.0 6.0 7.0| - | 8.0 9.0| */ - n=4; nnz=9; - cooRowIndexHostPtr = (int *) malloc(nnz*sizeof(cooRowIndexHostPtr[0])); - cooColIndexHostPtr = (int *) malloc(nnz*sizeof(cooColIndexHostPtr[0])); - cooValHostPtr = (double *)malloc(nnz*sizeof(cooValHostPtr[0])); - if ((!cooRowIndexHostPtr) || (!cooColIndexHostPtr) || (!cooValHostPtr)){ - CLEANUP("Host malloc failed (matrix)"); - return 1; - } - cooRowIndexHostPtr[0]=0; cooColIndexHostPtr[0]=0; cooValHostPtr[0]=1.0; - cooRowIndexHostPtr[1]=0; cooColIndexHostPtr[1]=2; cooValHostPtr[1]=2.0; - cooRowIndexHostPtr[2]=0; cooColIndexHostPtr[2]=3; cooValHostPtr[2]=3.0; - cooRowIndexHostPtr[3]=1; cooColIndexHostPtr[3]=1; cooValHostPtr[3]=4.0; - cooRowIndexHostPtr[4]=2; cooColIndexHostPtr[4]=0; cooValHostPtr[4]=5.0; - cooRowIndexHostPtr[5]=2; cooColIndexHostPtr[5]=2; cooValHostPtr[5]=6.0; - cooRowIndexHostPtr[6]=2; cooColIndexHostPtr[6]=3; cooValHostPtr[6]=7.0; - cooRowIndexHostPtr[7]=3; cooColIndexHostPtr[7]=1; cooValHostPtr[7]=8.0; - cooRowIndexHostPtr[8]=3; cooColIndexHostPtr[8]=3; cooValHostPtr[8]=9.0; - nnz_vector = 3; - xIndHostPtr = (int *) malloc(nnz_vector*sizeof(xIndHostPtr[0])); - xValHostPtr = (double *)malloc(nnz_vector*sizeof(xValHostPtr[0])); - yHostPtr = (double *)malloc(2*n *sizeof(yHostPtr[0])); - zHostPtr = (double *)malloc(2*(n+1) *sizeof(zHostPtr[0])); - if((!xIndHostPtr) || (!xValHostPtr) || (!yHostPtr) || (!zHostPtr)) { - CLEANUP("Host malloc failed (vectors)"); - return 1; - } - yHostPtr[0] = 10.0; - xIndHostPtr[0]=0; - xValHostPtr[0]=100.0; - yHostPtr[1] = 20.0; - xIndHostPtr[1]=1; - xValHostPtr[1]=200.0; - yHostPtr[2] = 30.0; - yHostPtr[3] = 40.0; - xIndHostPtr[2]=3; - xValHostPtr[2]=400.0; - yHostPtr[4] = 50.0; - yHostPtr[5] = 60.0; - yHostPtr[6] = 70.0; - yHostPtr[7] = 80.0; - /* allocate GPU memory and copy the matrix and vectors into it */ - // CHECK: cudaStat1 = hipMalloc((void**)&cooRowIndex,nnz*sizeof(cooRowIndex[0])); - cudaStat1 = cudaMalloc((void**)&cooRowIndex,nnz*sizeof(cooRowIndex[0])); - // CHECK: cudaStat2 = hipMalloc((void**)&cooColIndex,nnz*sizeof(cooColIndex[0])); - cudaStat2 = cudaMalloc((void**)&cooColIndex,nnz*sizeof(cooColIndex[0])); - // CHECK: cudaStat3 = hipMalloc((void**)&cooVal, nnz*sizeof(cooVal[0])); - cudaStat3 = cudaMalloc((void**)&cooVal, nnz*sizeof(cooVal[0])); - // CHECK: cudaStat4 = hipMalloc((void**)&y, 2*n*sizeof(y[0])); - cudaStat4 = cudaMalloc((void**)&y, 2*n*sizeof(y[0])); - // CHECK: cudaStat5 = hipMalloc((void**)&xInd,nnz_vector*sizeof(xInd[0])); - cudaStat5 = cudaMalloc((void**)&xInd,nnz_vector*sizeof(xInd[0])); - // CHECK: cudaStat6 = hipMalloc((void**)&xVal,nnz_vector*sizeof(xVal[0])); - cudaStat6 = cudaMalloc((void**)&xVal,nnz_vector*sizeof(xVal[0])); - // CHECK: if ((cudaStat1 != hipSuccess) || - // CHECK: (cudaStat2 != hipSuccess) || - // CHECK: (cudaStat3 != hipSuccess) || - // CHECK: (cudaStat4 != hipSuccess) || - // CHECK: (cudaStat5 != hipSuccess) || - // CHECK: (cudaStat6 != hipSuccess)) { - if ((cudaStat1 != cudaSuccess) || - (cudaStat2 != cudaSuccess) || - (cudaStat3 != cudaSuccess) || - (cudaStat4 != cudaSuccess) || - (cudaStat5 != cudaSuccess) || - (cudaStat6 != cudaSuccess)) { - CLEANUP("Device malloc failed"); - return 1; - } - // CHECK: cudaStat1 = hipMemcpy(cooRowIndex, cooRowIndexHostPtr, - // CHECK: hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(cooRowIndex, cooRowIndexHostPtr, - (size_t)(nnz*sizeof(cooRowIndex[0])), - cudaMemcpyHostToDevice); - // CHECK: cudaStat2 = hipMemcpy(cooColIndex, cooColIndexHostPtr, - // CHECK: hipMemcpyHostToDevice); - cudaStat2 = cudaMemcpy(cooColIndex, cooColIndexHostPtr, - (size_t)(nnz*sizeof(cooColIndex[0])), - cudaMemcpyHostToDevice); - // CHECK: cudaStat3 = hipMemcpy(cooVal, cooValHostPtr, - // CHECK: hipMemcpyHostToDevice); - cudaStat3 = cudaMemcpy(cooVal, cooValHostPtr, - (size_t)(nnz*sizeof(cooVal[0])), - cudaMemcpyHostToDevice); - // CHECK: cudaStat4 = hipMemcpy(y, yHostPtr, - // CHECK: hipMemcpyHostToDevice); - cudaStat4 = cudaMemcpy(y, yHostPtr, - (size_t)(2*n*sizeof(y[0])), - cudaMemcpyHostToDevice); - // CHECK: cudaStat5 = hipMemcpy(xInd, xIndHostPtr, - // CHECK: hipMemcpyHostToDevice); - cudaStat5 = cudaMemcpy(xInd, xIndHostPtr, - (size_t)(nnz_vector*sizeof(xInd[0])), - cudaMemcpyHostToDevice); - // CHECK: cudaStat6 = hipMemcpy(xVal, xValHostPtr, - // CHECK: hipMemcpyHostToDevice); - cudaStat6 = cudaMemcpy(xVal, xValHostPtr, - (size_t)(nnz_vector*sizeof(xVal[0])), - cudaMemcpyHostToDevice); - // CHECK: if ((cudaStat1 != hipSuccess) || - // CHECK: (cudaStat2 != hipSuccess) || - // CHECK: (cudaStat3 != hipSuccess) || - // CHECK: (cudaStat4 != hipSuccess) || - // CHECK: (cudaStat5 != hipSuccess) || - // CHECK: (cudaStat6 != hipSuccess)) { - if ((cudaStat1 != cudaSuccess) || - (cudaStat2 != cudaSuccess) || - (cudaStat3 != cudaSuccess) || - (cudaStat4 != cudaSuccess) || - (cudaStat5 != cudaSuccess) || - (cudaStat6 != cudaSuccess)) { - CLEANUP("Memcpy from Host to Device failed"); - return 1; - } - /* initialize cusparse library */ - // CHECK: status= hipsparseCreate(&handle); - status= cusparseCreate(&handle); - // CHECK: if (status != HIPSPARSE_STATUS_SUCCESS) { - if (status != CUSPARSE_STATUS_SUCCESS) { - CLEANUP("CUSPARSE Library initialization failed"); - return 1; - } - /* create and setup matrix descriptor */ - // CHECK: status= hipsparseCreateMatDescr(&descr); - status= cusparseCreateMatDescr(&descr); - // CHECK: if (status != HIPSPARSE_STATUS_SUCCESS) { - if (status != CUSPARSE_STATUS_SUCCESS) { - CLEANUP("Matrix descriptor initialization failed"); - return 1; - } - // CHECK: hipsparseSetMatType(descr,HIPSPARSE_MATRIX_TYPE_GENERAL); - cusparseSetMatType(descr,CUSPARSE_MATRIX_TYPE_GENERAL); - // CHECK: hipsparseSetMatIndexBase(descr,HIPSPARSE_INDEX_BASE_ZERO); - cusparseSetMatIndexBase(descr,CUSPARSE_INDEX_BASE_ZERO); - /* exercise conversion routines (convert matrix from COO 2 CSR format) */ - // CHECK: cudaStat1 = hipMalloc((void**)&csrRowPtr,(n+1)*sizeof(csrRowPtr[0])); - cudaStat1 = cudaMalloc((void**)&csrRowPtr,(n+1)*sizeof(csrRowPtr[0])); - // CHECK: if (cudaStat1 != hipSuccess) { - if (cudaStat1 != cudaSuccess) { - CLEANUP("Device malloc failed (csrRowPtr)"); - return 1; - } - status= cusparseXcoo2csr(handle,cooRowIndex,nnz,n, - // CHECK: csrRowPtr,HIPSPARSE_INDEX_BASE_ZERO); - csrRowPtr,CUSPARSE_INDEX_BASE_ZERO); - // CHECK: if (status != HIPSPARSE_STATUS_SUCCESS) { - if (status != CUSPARSE_STATUS_SUCCESS) { - CLEANUP("Conversion from COO to CSR format failed"); - return 1; - } - //csrRowPtr = [0 3 4 7 9] - // The following test only works for compute capability 1.3 and above - // because it needs double precision. - int devId; - // CHECK: hipDeviceProp_t prop; - cudaDeviceProp prop; - // CHECK: hipError_t cudaStat; - cudaError_t cudaStat; - // CHECK: cudaStat = hipGetDevice(&devId); - cudaStat = cudaGetDevice(&devId); - // CHECK: if (hipSuccess != cudaStat){ - if (cudaSuccess != cudaStat){ - // CLEANUP("hipGetDevice failed"); - CLEANUP("cudaGetDevice failed"); - // printf("Error: cudaStat %d, %s\n", cudaStat, hipGetErrorString(cudaStat)); - printf("Error: cudaStat %d, %s\n", cudaStat, cudaGetErrorString(cudaStat)); - return 1; - } - // CHECK: cudaStat = hipGetDeviceProperties( &prop, devId); - cudaStat = cudaGetDeviceProperties( &prop, devId); - // CHECK: if (hipSuccess != cudaStat) { - if (cudaSuccess != cudaStat) { - // CHECK: CLEANUP("hipGetDeviceProperties failed"); - CLEANUP("cudaGetDeviceProperties failed"); - // CHECK: printf("Error: cudaStat %d, %s\n", cudaStat, hipGetErrorString(cudaStat)); - printf("Error: cudaStat %d, %s\n", cudaStat, cudaGetErrorString(cudaStat)); - return 1; - } - int cc = 100*prop.major + 10*prop.minor; - if (cc < 130){ - CLEANUP("waive the test because only sm13 and above are supported\n"); - printf("the device has compute capability %d\n", cc); - printf("example test WAIVED"); - return 2; - } - /* exercise Level 1 routines (scatter vector elements) */ - // CHECK: status= hipsparseDsctr(handle, nnz_vector, xVal, xInd, - // CHECK: &y[n], HIPSPARSE_INDEX_BASE_ZERO); - status= cusparseDsctr(handle, nnz_vector, xVal, xInd, - &y[n], CUSPARSE_INDEX_BASE_ZERO); - // CHECK: if (status != HIPSPARSE_STATUS_SUCCESS) { - if (status != CUSPARSE_STATUS_SUCCESS) { - CLEANUP("Scatter from sparse to dense vector failed"); - return 1; - } - //y = [10 20 30 40 | 100 200 70 400] - /* exercise Level 2 routines (csrmv) */ - // CHECK: status= hipsparseDcsrmv(handle,HIPSPARSE_OPERATION_NON_TRANSPOSE, n, n, nnz, - status= cusparseDcsrmv(handle,CUSPARSE_OPERATION_NON_TRANSPOSE, n, n, nnz, - &dtwo, descr, cooVal, csrRowPtr, cooColIndex, - &y[0], &dthree, &y[n]); - // CHECK: if (status != HIPSPARSE_STATUS_SUCCESS) { - if (status != CUSPARSE_STATUS_SUCCESS) { - CLEANUP("Matrix-vector multiplication failed"); - return 1; - } - //y = [10 20 30 40 | 680 760 1230 2240] - // CHECK: hipMemcpy(yHostPtr, y, (size_t)(2*n*sizeof(y[0])), hipMemcpyDeviceToHost); - cudaMemcpy(yHostPtr, y, (size_t)(2*n*sizeof(y[0])), cudaMemcpyDeviceToHost); - /* exercise Level 3 routines (csrmm) */ - // cudaStat1 = hipMalloc((void**)&z, 2*(n+1)*sizeof(z[0])); - cudaStat1 = cudaMalloc((void**)&z, 2*(n+1)*sizeof(z[0])); - // CHECK: if (cudaStat1 != hipSuccess) { - if (cudaStat1 != cudaSuccess) { - CLEANUP("Device malloc failed (z)"); - return 1; - } - // CHECK: cudaStat1 = hipMemset((void *)z,0, 2*(n+1)*sizeof(z[0])); - cudaStat1 = cudaMemset((void *)z,0, 2*(n+1)*sizeof(z[0])); - // CHECK: if (cudaStat1 != hipSuccess) { - if (cudaStat1 != cudaSuccess) { - CLEANUP("Memset on Device failed"); - return 1; - } - // CHECK: status= hipsparseDcsrmm(handle, HIPSPARSE_OPERATION_NON_TRANSPOSE, n, 2, n, - status= cusparseDcsrmm(handle, CUSPARSE_OPERATION_NON_TRANSPOSE, n, 2, n, - nnz, &dfive, descr, cooVal, csrRowPtr, cooColIndex, - y, n, &dzero, z, n+1); - // CHECK: if (status != HIPSPARSE_STATUS_SUCCESS) { - if (status != CUSPARSE_STATUS_SUCCESS) { - CLEANUP("Matrix-matrix multiplication failed"); - return 1; - } - /* print final results (z) */ - // CHECK: cudaStat1 = hipMemcpy(zHostPtr, z, - // CHECK: hipMemcpyDeviceToHost); - cudaStat1 = cudaMemcpy(zHostPtr, z, - (size_t)(2*(n+1)*sizeof(z[0])), - cudaMemcpyDeviceToHost); - // CHECK: if (cudaStat1 != hipSuccess) { - if (cudaStat1 != cudaSuccess) { - CLEANUP("Memcpy from Device to Host failed"); - return 1; - } - //z = [950 400 2550 2600 0 | 49300 15200 132300 131200 0] - /* destroy matrix descriptor */ - // status = hipsparseDestroyMatDescr(descr); - status = cusparseDestroyMatDescr(descr); - descr = 0; - // CHECK: if (status != HIPSPARSE_STATUS_SUCCESS) { - if (status != CUSPARSE_STATUS_SUCCESS) { - CLEANUP("Matrix descriptor destruction failed"); - return 1; - } - /* destroy handle */ - // CHECK: status = hipsparseDestroy(handle); - status = cusparseDestroy(handle); - handle = 0; - // CHECK: if (status != HIPSPARSE_STATUS_SUCCESS) { - if (status != CUSPARSE_STATUS_SUCCESS) { - CLEANUP("CUSPARSE Library release of resources failed"); - return 1; - } - /* check the results */ - // Notice that CLEANUP() contains a call to cusparseDestroy(handle) - if ((zHostPtr[0] != 950.0) || - (zHostPtr[1] != 400.0) || - (zHostPtr[2] != 2550.0) || - (zHostPtr[3] != 2600.0) || - (zHostPtr[4] != 0.0) || - (zHostPtr[5] != 49300.0) || - (zHostPtr[6] != 15200.0) || - (zHostPtr[7] != 132300.0) || - (zHostPtr[8] != 131200.0) || - (zHostPtr[9] != 0.0) || - (yHostPtr[0] != 10.0) || - (yHostPtr[1] != 20.0) || - (yHostPtr[2] != 30.0) || - (yHostPtr[3] != 40.0) || - (yHostPtr[4] != 680.0) || - (yHostPtr[5] != 760.0) || - (yHostPtr[6] != 1230.0) || - (yHostPtr[7] != 2240.0)) { - CLEANUP("example test FAILED"); - return 1; - } else { - CLEANUP("example test PASSED"); - return 0; - } -} \ No newline at end of file diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_02.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_02.cu deleted file mode 100644 index 57b2c61098..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_02.cu +++ /dev/null @@ -1,284 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -#include -#include -#include -// CHECK: #include -#include -// CHECK: #include -#include -// CHECK: #include "hipsparse.h" -#include "cusparse.h" - -void printMatrix(int m, int n, const double*A, int lda, const char* name) -{ - for(int row = 0 ; row < m ; row++){ - for(int col = 0 ; col < n ; col++){ - double Areg = A[row + col*lda]; - printf("%s(%d,%d) = %f\n", name, row+1, col+1, Areg); - } - } -} - -int main(int argc, char*argv[]) -{ - // CHECK: hipblasHandle_t cublasH = NULL; - cublasHandle_t cublasH = NULL; - // CHECK: hipsparseHandle_t cusparseH = NULL; - cusparseHandle_t cusparseH = NULL; - // CHECK: hipStream_t stream = NULL; - cudaStream_t stream = NULL; - // CHECK: hipsparseMatDescr_t descrA = NULL; - cusparseMatDescr_t descrA = NULL; - // CHECK: hipblasStatus_t cublasStat = HIPBLAS_STATUS_SUCCESS; - cublasStatus_t cublasStat = CUBLAS_STATUS_SUCCESS; - // CHECK: hipsparseStatus_t cusparseStat = HIPSPARSE_STATUS_SUCCESS; - cusparseStatus_t cusparseStat = CUSPARSE_STATUS_SUCCESS; - // CHECK: hipError_t cudaStat1 = hipSuccess; - // CHECK: hipError_t cudaStat2 = hipSuccess; - // CHECK: hipError_t cudaStat3 = hipSuccess; - // CHECK: hipError_t cudaStat4 = hipSuccess; - // CHECK: hipError_t cudaStat5 = hipSuccess; - cudaError_t cudaStat1 = cudaSuccess; - cudaError_t cudaStat2 = cudaSuccess; - cudaError_t cudaStat3 = cudaSuccess; - cudaError_t cudaStat4 = cudaSuccess; - cudaError_t cudaStat5 = cudaSuccess; - const int n = 4; - const int nnzA = 9; -/* - * | 1 0 2 3 | - * | 0 4 0 0 | - * A = | 5 0 6 7 | - * | 0 8 0 9 | - * - * eigevales are { -0.5311, 7.5311, 9.0000, 4.0000 } - * - * The largest eigenvaluse is 9 and corresponding eigenvector is - * - * | 0.3029 | - * v = | 0 | - * | 0.9350 | - * | 0.1844 | - */ - const int csrRowPtrA[n+1] = { 0, 3, 4, 7, 9 }; - const int csrColIndA[nnzA] = {0, 2, 3, 1, 0, 2, 3, 1, 3 }; - const double csrValA[nnzA] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0 }; - const double lambda_exact[n] = { 9.0000, 7.5311, 4.0000, -0.5311 }; - const double x0[n] = {1.0, 2.0, 3.0, 4.0 }; /* initial guess */ - double x[n]; /* numerical eigenvector */ - - int *d_csrRowPtrA = NULL; - int *d_csrColIndA = NULL; - double *d_csrValA = NULL; - - double *d_x = NULL; /* eigenvector */ - double *d_y = NULL; /* workspace */ - - const double tol = 1.e-6; - const int max_ites = 30; - - const double h_one = 1.0; - const double h_zero = 0.0; - - printf("example of csrmv_mp \n"); - printf("tol = %E \n", tol); - printf("max. iterations = %d \n", max_ites); - - printf("1st eigenvaluse is %f\n", lambda_exact[0] ); - printf("2nd eigenvaluse is %f\n", lambda_exact[1] ); - - double alpha = lambda_exact[1]/lambda_exact[0] ; - printf("convergence rate is %f\n", alpha ); - - double est_iterations = log(tol)/log(alpha); - printf("# of iterations required is %d\n", (int)ceil(est_iterations)); - - // step 1: create cublas/cusparse handle, bind a stream - // CHECK: cudaStat1 = hipStreamCreateWithFlags(&stream, hipStreamNonBlocking); - cudaStat1 = cudaStreamCreateWithFlags(&stream, cudaStreamNonBlocking); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cublasStat = hipblasCreate(&cublasH); - cublasStat = cublasCreate(&cublasH); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - // CHECK: cublasStat = hipblasSetStream(cublasH, stream); - cublasStat = cublasSetStream(cublasH, stream); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - // CHECK: cusparseStat = hipsparseCreate(&cusparseH); - cusparseStat = cusparseCreate(&cusparseH); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == cusparseStat); - assert(CUSPARSE_STATUS_SUCCESS == cusparseStat); - // CHECK: cusparseStat = hipsparseSetStream(cusparseH, stream); - cusparseStat = cusparseSetStream(cusparseH, stream); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == cusparseStat); - assert(CUSPARSE_STATUS_SUCCESS == cusparseStat); - - // step 2: configuration of matrix A - // CHECK: cusparseStat = hipsparseCreateMatDescr(&descrA); - cusparseStat = cusparseCreateMatDescr(&descrA); - // assert(HIPSPARSE_STATUS_SUCCESS == cusparseStat); - assert(CUSPARSE_STATUS_SUCCESS == cusparseStat); - // CHECK: hipsparseSetMatIndexBase(descrA,HIPSPARSE_INDEX_BASE_ZERO); - cusparseSetMatIndexBase(descrA,CUSPARSE_INDEX_BASE_ZERO); - // CHECK: hipsparseSetMatType(descrA, HIPSPARSE_MATRIX_TYPE_GENERAL ); - cusparseSetMatType(descrA, CUSPARSE_MATRIX_TYPE_GENERAL ); - - // step 3: copy A and x0 to device - // CHECK: cudaStat1 = hipMalloc ((void**)&d_csrRowPtrA, sizeof(int) * (n+1) ); - cudaStat1 = cudaMalloc ((void**)&d_csrRowPtrA, sizeof(int) * (n+1) ); - // CHECK: cudaStat2 = hipMalloc ((void**)&d_csrColIndA, sizeof(int) * nnzA ); - cudaStat2 = cudaMalloc ((void**)&d_csrColIndA, sizeof(int) * nnzA ); - // CHECK: cudaStat3 = hipMalloc ((void**)&d_csrValA , sizeof(double) * nnzA ); - cudaStat3 = cudaMalloc ((void**)&d_csrValA , sizeof(double) * nnzA ); - // CHECK: cudaStat4 = hipMalloc ((void**)&d_x , sizeof(double) * n ); - cudaStat4 = cudaMalloc ((void**)&d_x , sizeof(double) * n ); - // CHECK: cudaStat5 = hipMalloc ((void**)&d_y , sizeof(double) * n ); - cudaStat5 = cudaMalloc ((void**)&d_y , sizeof(double) * n ); - // CHECK: assert(hipSuccess == cudaStat1); - // CHECK: assert(hipSuccess == cudaStat2); - // CHECK: assert(hipSuccess == cudaStat3); - // CHECK: assert(hipSuccess == cudaStat4); - // CHECK: assert(hipSuccess == cudaStat5); - assert(cudaSuccess == cudaStat1); - assert(cudaSuccess == cudaStat2); - assert(cudaSuccess == cudaStat3); - assert(cudaSuccess == cudaStat4); - assert(cudaSuccess == cudaStat5); - - // CHECK: cudaStat1 = hipMemcpy(d_csrRowPtrA, csrRowPtrA, sizeof(int) * (n+1) , hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_csrRowPtrA, csrRowPtrA, sizeof(int) * (n+1) , cudaMemcpyHostToDevice); - // CHECK: cudaStat2 = hipMemcpy(d_csrColIndA, csrColIndA, sizeof(int) * nnzA , hipMemcpyHostToDevice); - cudaStat2 = cudaMemcpy(d_csrColIndA, csrColIndA, sizeof(int) * nnzA , cudaMemcpyHostToDevice); - // CHECK: cudaStat3 = hipMemcpy(d_csrValA , csrValA , sizeof(double) * nnzA , hipMemcpyHostToDevice); - cudaStat3 = cudaMemcpy(d_csrValA , csrValA , sizeof(double) * nnzA , cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: assert(hipSuccess == cudaStat2); - assert(cudaSuccess == cudaStat2); - // CHECK: assert(hipSuccess == cudaStat3); - assert(cudaSuccess == cudaStat3); - - // step 4: power method - double lambda = 0.0; - double lambda_next = 0.0; - - // 4.1: initial guess x0 - cudaStat1 = cudaMemcpy(d_x, x0, sizeof(double) * n, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - for(int ite = 0 ; ite < max_ites ; ite++ ){ - // 4.2: normalize vector x - // x = x / |x| - double nrm2_x; - // TODO: cublasStat = hipblasDnrm2_v2(cublasH, - cublasStat = cublasDnrm2_v2(cublasH, - n, - d_x, - 1, // incx, - &nrm2_x /* host pointer */ - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - double one_over_nrm2_x = 1.0 / nrm2_x; - // TODO: cublasStat = hipblasDscal_v2( cublasH, - cublasStat = cublasDscal_v2( cublasH, - n, - &one_over_nrm2_x, /* host pointer */ - d_x, - 1 // incx - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - - // 4.3: y = A*x - // TODO: hipsparseStat = cusparseDcsrmv_mp(cusparseH, - // CHECK: HIPSPARSE_OPERATION_NON_TRANSPOSE - cusparseStat = cusparseDcsrmv_mp(cusparseH, - CUSPARSE_OPERATION_NON_TRANSPOSE, - n, - n, - nnzA, - &h_one, - descrA, - d_csrValA, - d_csrRowPtrA, - d_csrColIndA, - d_x, - &h_zero, - d_y); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == cusparseStat); - assert(CUSPARSE_STATUS_SUCCESS == cusparseStat); - - // 4.4: lambda = y**T*x - // TODO: cublasStat = hipblasDdot_v2 ( cublasH, - cublasStat = cublasDdot_v2 ( cublasH, - n, - d_x, - 1, // incx, - d_y, - 1, // incy, - &lambda_next /* host pointer */ - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - - double lambda_err = fabs( lambda_next - lambda_exact[0] ); - printf("ite %d: lambda = %f, error = %E\n", ite, lambda_next, lambda_err ); - - // 4.5: check if converges - if ( (ite > 0) && - fabs( lambda - lambda_next ) < tol - ){ - break; // converges - } - - /* - * 4.6: x := y - * lambda = lambda_next - * - * so new approximation is (lambda, x), x is not normalized. - */ - // CHECK: cudaStat1 = hipMemcpy(d_x, d_y, sizeof(double) * n , hipMemcpyDeviceToDevice); - cudaStat1 = cudaMemcpy(d_x, d_y, sizeof(double) * n , cudaMemcpyDeviceToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - lambda = lambda_next; - } - // step 5: report eigen-pair - // CHECK: cudaStat1 = hipMemcpy(x, d_x, sizeof(double) * n, hipMemcpyDeviceToHost); - cudaStat1 = cudaMemcpy(x, d_x, sizeof(double) * n, cudaMemcpyDeviceToHost); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - printf("largest eigenvalue is %E\n", lambda ); - printf("eigenvector = (matlab base-1)\n"); - printMatrix(n, 1, x, n, "V0"); - printf("=====\n"); - - // free resources - // CHECK: if (d_csrRowPtrA ) hipFree(d_csrRowPtrA); - if (d_csrRowPtrA ) cudaFree(d_csrRowPtrA); - // CHECK: if (d_csrColIndA ) hipFree(d_csrColIndA); - if (d_csrColIndA ) cudaFree(d_csrColIndA); - // CHECK: if (d_csrValA ) hipFree(d_csrValA); - if (d_csrValA ) cudaFree(d_csrValA); - // CHECK: if (d_x ) hipFree(d_x); - if (d_x ) cudaFree(d_x); - // CHeCK: if (d_y ) hipFree(d_y); - if (d_y ) cudaFree(d_y); - // CHECK: if (cublasH ) hipblasDestroy(cublasH); - if (cublasH ) cublasDestroy(cublasH); - // CHECK: if (cusparseH ) hipsparseDestroy(cusparseH); - if (cusparseH ) cusparseDestroy(cusparseH); - // CHECK: if (stream ) hipStreamDestroy(stream); - if (stream ) cudaStreamDestroy(stream); - // CHECK: if (descrA ) hipsparseDestroyMatDescr(descrA); - if (descrA ) cusparseDestroyMatDescr(descrA); - // CHECK: hipDeviceReset(); - cudaDeviceReset(); - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_03.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_03.cu deleted file mode 100644 index 8618be4748..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_03.cu +++ /dev/null @@ -1,229 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args "--skip-excluded-preprocessor-conditional-blocks" %clang_args -#include -#include -#include -// CHECK: #include -#include -// CHECK: #include "hipsparse.h" -#include "cusparse.h" - -int main(int argc, char*argv[]) -{ - // CHECK: hipsparseHandle_t handle = NULL; - cusparseHandle_t handle = NULL; - // CHECK: hipStream_t stream = NULL; - cudaStream_t stream = NULL; - // CHECK: hipsparseStatus_t status = HIPSPARSE_STATUS_SUCCESS; - cusparseStatus_t status = CUSPARSE_STATUS_SUCCESS; - // CHECK: hipError_t cudaStat1 = hipSuccess; - // CHECK: hipError_t cudaStat2 = hipSuccess; - // CHECK: hipError_t cudaStat3 = hipSuccess; - // CHECK: hipError_t cudaStat4 = hipSuccess; - // CHECK: hipError_t cudaStat5 = hipSuccess; - // CHECK: hipError_t cudaStat6 = hipSuccess; - cudaError_t cudaStat1 = cudaSuccess; - cudaError_t cudaStat2 = cudaSuccess; - cudaError_t cudaStat3 = cudaSuccess; - cudaError_t cudaStat4 = cudaSuccess; - cudaError_t cudaStat5 = cudaSuccess; - cudaError_t cudaStat6 = cudaSuccess; - - /* - * A is a 3x3 sparse matrix - * | 1 2 0 | - * A = | 0 5 0 | - * | 0 8 0 | - */ - const int m = 3; - const int n = 3; - const int nnz = 4; - -#if 0 - /* index starts at 0 */ - int h_cooRows[nnz] = { 2, 1, 0, 0 }; - int h_cooCols[nnz] = { 1, 1, 0, 1 }; -#else - /* index starts at -2 */ - int h_cooRows[nnz] = { 0, -1, -2, -2 }; - int h_cooCols[nnz] = { -1, -1, -2, -1 }; -#endif - double h_cooVals[nnz] = { 8.0, 5.0, 1.0, 2.0 }; - int h_P[nnz]; - - int *d_cooRows = NULL; - int *d_cooCols = NULL; - int *d_P = NULL; - double *d_cooVals = NULL; - double *d_cooVals_sorted = NULL; - size_t pBufferSizeInBytes = 0; - void *pBuffer = NULL; - - printf("m = %d, n = %d, nnz=%d \n", m, n, nnz); - - /* step 1: create cusparse handle, bind a stream */ - // CHECK: cudaStat1 = hipStreamCreateWithFlags(&stream, hipStreamNonBlocking); - cudaStat1 = cudaStreamCreateWithFlags(&stream, cudaStreamNonBlocking); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: status = hipsparseCreate(&handle); - status = cusparseCreate(&handle); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: status = hipsparseSetStream(handle, stream); - status = cusparseSetStream(handle, stream); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - /* step 2: allocate buffer */ - // TODO: status = hipsparseXcoosort_bufferSizeExt( - status = cusparseXcoosort_bufferSizeExt( - handle, - m, - n, - nnz, - d_cooRows, - d_cooCols, - &pBufferSizeInBytes - ); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - printf("pBufferSizeInBytes = %lld bytes \n", (long long)pBufferSizeInBytes); - - // CHECK: cudaStat1 = hipMalloc(&d_cooRows, sizeof(int)*nnz); - cudaStat1 = cudaMalloc(&d_cooRows, sizeof(int)*nnz); - // CHECK: cudaStat2 = hipMalloc(&d_cooCols, sizeof(int)*nnz); - cudaStat2 = cudaMalloc(&d_cooCols, sizeof(int)*nnz); - // CHECK: cudaStat3 = hipMalloc(&d_P, sizeof(int)*nnz); - cudaStat3 = cudaMalloc(&d_P, sizeof(int)*nnz); - // CHECK: cudaStat4 = hipMalloc(&d_cooVals, sizeof(double)*nnz); - cudaStat4 = cudaMalloc(&d_cooVals, sizeof(double)*nnz); - // CHECK: cudaStat5 = hipMalloc(&d_cooVals_sorted, sizeof(double)*nnz); - cudaStat5 = cudaMalloc(&d_cooVals_sorted, sizeof(double)*nnz); - // CHECK: cudaStat6 = hipMalloc(&pBuffer, sizeof(char)* pBufferSizeInBytes); - cudaStat6 = cudaMalloc(&pBuffer, sizeof(char)* pBufferSizeInBytes); - - // CHECK: assert(hipSuccess == cudaStat1); - // CHECK: assert(hipSuccess == cudaStat2); - // CHECK: assert(hipSuccess == cudaStat3); - // CHECK: assert(hipSuccess == cudaStat4); - // CHECK: assert(hipSuccess == cudaStat5); - // CHECK: assert(hipSuccess == cudaStat6); - assert(cudaSuccess == cudaStat1); - assert(cudaSuccess == cudaStat2); - assert(cudaSuccess == cudaStat3); - assert(cudaSuccess == cudaStat4); - assert(cudaSuccess == cudaStat5); - assert(cudaSuccess == cudaStat6); - - // CHECK: cudaStat1 = hipMemcpy(d_cooRows, h_cooRows, sizeof(int)*nnz, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_cooRows, h_cooRows, sizeof(int)*nnz, cudaMemcpyHostToDevice); - // CHECK: cudaStat2 = hipMemcpy(d_cooCols, h_cooCols, sizeof(int)*nnz, hipMemcpyHostToDevice); - cudaStat2 = cudaMemcpy(d_cooCols, h_cooCols, sizeof(int)*nnz, cudaMemcpyHostToDevice); - // CHECK: cudaStat3 = hipMemcpy(d_cooVals, h_cooVals, sizeof(double)*nnz, hipMemcpyHostToDevice); - cudaStat3 = cudaMemcpy(d_cooVals, h_cooVals, sizeof(double)*nnz, cudaMemcpyHostToDevice); - // CHECK: cudaStat4 = hipDeviceSynchronize(); - cudaStat4 = cudaDeviceSynchronize(); - - // CHECK: assert(hipSuccess == cudaStat1); - // CHECK: assert(hipSuccess == cudaStat2); - // CHECK: assert(hipSuccess == cudaStat3); - // CHECK: assert(hipSuccess == cudaStat4); - assert(cudaSuccess == cudaStat1); - assert(cudaSuccess == cudaStat2); - assert(cudaSuccess == cudaStat3); - assert(cudaSuccess == cudaStat4); - - /* step 3: setup permutation vector P to identity */ - // TODO: status = hipsparseCreateIdentityPermutation( - status = cusparseCreateIdentityPermutation( - handle, - nnz, - d_P); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - /* step 4: sort COO format by Row */ - // TODO: status = hipsparseXcoosortByRow( - status = cusparseXcoosortByRow( - handle, - m, - n, - nnz, - d_cooRows, - d_cooCols, - d_P, - pBuffer - ); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - /* step 5: gather sorted cooVals */ - // CHECK: status = hipsparseDgthr( - // CHECK: HIPSPARSE_INDEX_BASE_ZERO - status = cusparseDgthr( - handle, - nnz, - d_cooVals, - d_cooVals_sorted, - d_P, - CUSPARSE_INDEX_BASE_ZERO - ); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - /* wait until the computation is done */ - // CHECK: cudaStat1 = hipDeviceSynchronize(); - cudaStat1 = cudaDeviceSynchronize(); - // CHECK: cudaStat2 = hipMemcpy(h_cooRows, d_cooRows, sizeof(int)*nnz, hipMemcpyDeviceToHost); - cudaStat2 = cudaMemcpy(h_cooRows, d_cooRows, sizeof(int)*nnz, cudaMemcpyDeviceToHost); - // CHECK: cudaStat3 = hipMemcpy(h_cooCols, d_cooCols, sizeof(int)*nnz, hipMemcpyDeviceToHost); - cudaStat3 = cudaMemcpy(h_cooCols, d_cooCols, sizeof(int)*nnz, cudaMemcpyDeviceToHost); - // CHECK: cudaStat4 = hipMemcpy(h_P, d_P, sizeof(int)*nnz, hipMemcpyDeviceToHost); - cudaStat4 = cudaMemcpy(h_P, d_P, sizeof(int)*nnz, cudaMemcpyDeviceToHost); - // CHECK: cudaStat5 = hipMemcpy(h_cooVals, d_cooVals_sorted, sizeof(double)*nnz, hipMemcpyDeviceToHost); - cudaStat5 = cudaMemcpy(h_cooVals, d_cooVals_sorted, sizeof(double)*nnz, cudaMemcpyDeviceToHost); - // CHECK: cudaStat6 = hipDeviceSynchronize(); - cudaStat6 = cudaDeviceSynchronize(); - // CHECK: assert(hipSuccess == cudaStat1); - // CHECK: assert(hipSuccess == cudaStat2); - // CHECK: assert(hipSuccess == cudaStat3); - // CHECK: assert(hipSuccess == cudaStat4); - // CHECK: assert(hipSuccess == cudaStat5); - // CHECK: assert(hipSuccess == cudaStat6); - assert(cudaSuccess == cudaStat1); - assert(cudaSuccess == cudaStat2); - assert(cudaSuccess == cudaStat3); - assert(cudaSuccess == cudaStat4); - assert(cudaSuccess == cudaStat5); - assert(cudaSuccess == cudaStat6); - - printf("sorted coo: \n"); - for (int j = 0; j < nnz; j++) { - printf("(%d, %d, %f) \n", h_cooRows[j], h_cooCols[j], h_cooVals[j]); - } - - for (int j = 0; j < nnz; j++) { - printf("P[%d] = %d \n", j, h_P[j]); - } - - /* free resources */ - // CHECK: if (d_cooRows) hipFree(d_cooRows); - if (d_cooRows) cudaFree(d_cooRows); - // CHECK: if (d_cooCols) hipFree(d_cooCols); - if (d_cooCols) cudaFree(d_cooCols); - // CHECK: if (d_P) hipFree(d_P); - if (d_P) cudaFree(d_P); - // CHECK: if (d_cooVals) hipFree(d_cooVals); - if (d_cooVals) cudaFree(d_cooVals); - // CHECK: if (d_cooVals_sorted) hipFree(d_cooVals_sorted); - if (d_cooVals_sorted) cudaFree(d_cooVals_sorted); - // CHECK: if (pBuffer) hipFree(pBuffer); - if (pBuffer) cudaFree(pBuffer); - // if (handle) hipsparseDestroy(handle); - if (handle) cusparseDestroy(handle); - // CHECK: if (stream) hipStreamDestroy(stream); - if (stream) cudaStreamDestroy(stream); - // CHECK: hipDeviceReset(); - cudaDeviceReset(); - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_04.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_04.cu deleted file mode 100644 index 18ba9b006c..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_04.cu +++ /dev/null @@ -1,261 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -#include -#include -#include -// CHECK: #include -#include -// CHECK: #include -#include - -void printMatrix(int m, int n, const float*A, int lda, const char* name) -{ - for (int row = 0; row < m; row++) { - for (int col = 0; col < n; col++) { - float Areg = A[row + col * lda]; - printf("%s(%d,%d) = %f\n", name, row + 1, col + 1, Areg); - } - } -} - -void printCsr( - int m, - int n, - int nnz, - // CHECK: const hipsparseMatDescr_t descrA, - const cusparseMatDescr_t descrA, - const float *csrValA, - const int *csrRowPtrA, - const int *csrColIndA, - const char* name) -{ - // CHECK: const int base = (hipsparseGetMatIndexBase(descrA) != HIPSPARSE_INDEX_BASE_ONE) ? 0 : 1; - const int base = (cusparseGetMatIndexBase(descrA) != CUSPARSE_INDEX_BASE_ONE) ? 0 : 1; - - printf("matrix %s is %d-by-%d, nnz=%d, base=%d\n", name, m, n, nnz, base); - for (int row = 0; row < m; row++) { - const int start = csrRowPtrA[row] - base; - const int end = csrRowPtrA[row + 1] - base; - for (int colidx = start; colidx < end; colidx++) { - const int col = csrColIndA[colidx] - base; - const float Areg = csrValA[colidx]; - printf("%s(%d,%d) = %f\n", name, row + 1, col + 1, Areg); - } - } -} - -int main(int argc, char*argv[]) -{ - // CHECK: hipsparseHandle_t handle = NULL; - cusparseHandle_t handle = NULL; - // CHECK: hipStream_t stream = NULL; - cudaStream_t stream = NULL; - // CHECK: hipsparseMatDescr_t descrC = NULL; - cusparseMatDescr_t descrC = NULL; - // CHECK: hipsparseStatus_t status = HIPSPARSE_STATUS_SUCCESS; - cusparseStatus_t status = CUSPARSE_STATUS_SUCCESS; - // CHECK: hipError_t cudaStat1 = hipSuccess; - // CHECK: hipError_t cudaStat2 = hipSuccess; - // CHECK: hipError_t cudaStat3 = hipSuccess; - // CHECK: hipError_t cudaStat4 = hipSuccess; - // CHECK: hipError_t cudaStat5 = hipSuccess; - cudaError_t cudaStat1 = cudaSuccess; - cudaError_t cudaStat2 = cudaSuccess; - cudaError_t cudaStat3 = cudaSuccess; - cudaError_t cudaStat4 = cudaSuccess; - cudaError_t cudaStat5 = cudaSuccess; - const int m = 4; - const int n = 4; - const int lda = m; - /* - * | 1 0 2 -3 | - * | 0 4 0 0 | - * A = | 5 0 6 7 | - * | 0 8 0 9 | - * - */ - const float A[lda*n] = { 1, 0, 5, 0, 0, 4, 0, 8, 2, 0, 6, 0, -3, 0, 7, 9 }; - int* csrRowPtrC = NULL; - int* csrColIndC = NULL; - float* csrValC = NULL; - - float *d_A = NULL; - int *d_csrRowPtrC = NULL; - int *d_csrColIndC = NULL; - float *d_csrValC = NULL; - - size_t lworkInBytes = 0; - char *d_work = NULL; - - int nnzC = 0; - - float threshold = 4.1; /* remove Aij <= 4.1 */ -// float threshold = 0; /* remove zeros */ - - printf("example of pruneDense2csr \n"); - - printf("prune |A(i,j)| <= threshold \n"); - printf("threshold = %E \n", threshold); - - printMatrix(m, n, A, lda, "A"); - - /* step 1: create cusparse handle, bind a stream */ - // CHECK: cudaStat1 = hipStreamCreateWithFlags(&stream, hipStreamNonBlocking); - cudaStat1 = cudaStreamCreateWithFlags(&stream, cudaStreamNonBlocking); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: status = hipsparseCreate(&handle); - status = cusparseCreate(&handle); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: status = hipsparseSetStream(handle, stream); - status = cusparseSetStream(handle, stream); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - /* step 2: configuration of matrix C */ - // CHECK: status = hipsparseCreateMatDescr(&descrC); - status = cusparseCreateMatDescr(&descrC); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: hipsparseSetMatIndexBase(descrC, HIPSPARSE_INDEX_BASE_ZERO); - cusparseSetMatIndexBase(descrC, CUSPARSE_INDEX_BASE_ZERO); - // CHECK: hipsparseSetMatType(descrC, HIPSPARSE_MATRIX_TYPE_GENERAL); - cusparseSetMatType(descrC, CUSPARSE_MATRIX_TYPE_GENERAL); - // CHECK: cudaStat1 = hipMalloc((void**)&d_A, sizeof(float)*lda*n); - cudaStat1 = cudaMalloc((void**)&d_A, sizeof(float)*lda*n); - // CHECK: cudaStat2 = hipMalloc((void**)&d_csrRowPtrC, sizeof(int)*(m + 1)); - cudaStat2 = cudaMalloc((void**)&d_csrRowPtrC, sizeof(int)*(m + 1)); - // CHECK: assert(hipSuccess == cudaStat1); - // CHECK: assert(hipSuccess == cudaStat2); - assert(cudaSuccess == cudaStat1); - assert(cudaSuccess == cudaStat2); - - /* step 3: query workspace */ - // CHECK: cudaStat1 = hipMemcpy(d_A, A, sizeof(float)*lda*n, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_A, A, sizeof(float)*lda*n, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // TODO: status = hipsparseSpruneDense2csr_bufferSizeExt( - status = cusparseSpruneDense2csr_bufferSizeExt( - handle, - m, - n, - d_A, - lda, - &threshold, - descrC, - d_csrValC, - d_csrRowPtrC, - d_csrColIndC, - &lworkInBytes); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - printf("lworkInBytes (prune) = %lld \n", (long long)lworkInBytes); - // CHECK: if (NULL != d_work) { hipFree(d_work); } - if (NULL != d_work) { cudaFree(d_work); } - // CHECK: cudaStat1 = hipMalloc((void**)&d_work, lworkInBytes); - cudaStat1 = cudaMalloc((void**)&d_work, lworkInBytes); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 4: compute csrRowPtrC and nnzC */ - // TODO: status = hipsparseSpruneDense2csrNnz( - status = cusparseSpruneDense2csrNnz( - handle, - m, - n, - d_A, - lda, - &threshold, - descrC, - d_csrRowPtrC, - &nnzC, /* host */ - d_work); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: cudaStat1 = hipDeviceSynchronize(); - cudaStat1 = cudaDeviceSynchronize(); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - printf("nnzC = %d\n", nnzC); - if (0 == nnzC) { - printf("C is empty \n"); - return 0; - } - - /* step 5: compute csrColIndC and csrValC */ - // CHECK: cudaStat1 = hipMalloc((void**)&d_csrColIndC, sizeof(int) * nnzC); - cudaStat1 = cudaMalloc((void**)&d_csrColIndC, sizeof(int) * nnzC); - // CHECK: cudaStat2 = hipMalloc((void**)&d_csrValC, sizeof(float) * nnzC); - cudaStat2 = cudaMalloc((void**)&d_csrValC, sizeof(float) * nnzC); - // CHECK: assert(hipSuccess == cudaStat1); - // CHECK: assert(hipSuccess == cudaStat2); - assert(cudaSuccess == cudaStat1); - assert(cudaSuccess == cudaStat2); - // TODO: status = hipsparseSpruneDense2csr( - status = cusparseSpruneDense2csr( - handle, - m, - n, - d_A, - lda, - &threshold, - descrC, - d_csrValC, - d_csrRowPtrC, - d_csrColIndC, - d_work); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: cudaStat1 = hipDeviceSynchronize(); - cudaStat1 = cudaDeviceSynchronize(); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 6: output C */ - csrRowPtrC = (int*)malloc(sizeof(int)*(m + 1)); - csrColIndC = (int*)malloc(sizeof(int)*nnzC); - csrValC = (float*)malloc(sizeof(float)*nnzC); - assert(NULL != csrRowPtrC); - assert(NULL != csrColIndC); - assert(NULL != csrValC); - // CHECK: cudaStat1 = hipMemcpy(csrRowPtrC, d_csrRowPtrC, sizeof(int)*(m + 1), hipMemcpyDeviceToHost); - cudaStat1 = cudaMemcpy(csrRowPtrC, d_csrRowPtrC, sizeof(int)*(m + 1), cudaMemcpyDeviceToHost); - // CHECK: cudaStat2 = hipMemcpy(csrColIndC, d_csrColIndC, sizeof(int)*nnzC, hipMemcpyDeviceToHost); - cudaStat2 = cudaMemcpy(csrColIndC, d_csrColIndC, sizeof(int)*nnzC, cudaMemcpyDeviceToHost); - // CHECK: cudaStat3 = hipMemcpy(csrValC, d_csrValC, sizeof(float)*nnzC, hipMemcpyDeviceToHost); - cudaStat3 = cudaMemcpy(csrValC, d_csrValC, sizeof(float)*nnzC, cudaMemcpyDeviceToHost); - // CHECK: assert(hipSuccess == cudaStat1); - // CHECK: assert(hipSuccess == cudaStat2); - // CHECK: assert(hipSuccess == cudaStat3); - assert(cudaSuccess == cudaStat1); - assert(cudaSuccess == cudaStat2); - assert(cudaSuccess == cudaStat3); - - printCsr(m, n, nnzC, descrC, csrValC, csrRowPtrC, csrColIndC, "C"); - - /* free resources */ - // CHECK: if (d_A) hipFree(d_A); - if (d_A) cudaFree(d_A); - // CHECK: if (d_csrRowPtrC) hipFree(d_csrRowPtrC); - if (d_csrRowPtrC) cudaFree(d_csrRowPtrC); - // CHECK: if (d_csrColIndC) hipFree(d_csrColIndC); - if (d_csrColIndC) cudaFree(d_csrColIndC); - // CHECK: if (d_csrValC) hipFree(d_csrValC); - if (d_csrValC) cudaFree(d_csrValC); - - if (csrRowPtrC) free(csrRowPtrC); - if (csrColIndC) free(csrColIndC); - if (csrValC) free(csrValC); - // CHECK: if (handle) hipsparseDestroy(handle); - if (handle) cusparseDestroy(handle); - // CHECK: if (stream) hipStreamDestroy(stream); - if (stream) cudaStreamDestroy(stream); - // CHECK: if (descrC) hipsparseDestroyMatDescr(descrC); - if (descrC) cusparseDestroyMatDescr(descrC); - // CHECK: hipDeviceReset(); - cudaDeviceReset(); - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_05.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_05.cu deleted file mode 100644 index 1155af09e1..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_05.cu +++ /dev/null @@ -1,288 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -#include -#include -#include -// CHECK: #include -#include -// CHECK: #include -#include - -void printCsr( - int m, - int n, - int nnz, - // CHECK: const hipsparseMatDescr_t descrA, - const cusparseMatDescr_t descrA, - const float *csrValA, - const int *csrRowPtrA, - const int *csrColIndA, - const char* name) -{ - // CHECK: const int base = (hipsparseGetMatIndexBase(descrA) != HIPSPARSE_INDEX_BASE_ONE) ? 0 : 1; - const int base = (cusparseGetMatIndexBase(descrA) != CUSPARSE_INDEX_BASE_ONE) ? 0 : 1; - - printf("matrix %s is %d-by-%d, nnz=%d, base=%d, output base-1\n", name, m, n, nnz, base); - for (int row = 0; row < m; row++) { - const int start = csrRowPtrA[row] - base; - const int end = csrRowPtrA[row + 1] - base; - for (int colidx = start; colidx < end; colidx++) { - const int col = csrColIndA[colidx] - base; - const float Areg = csrValA[colidx]; - printf("%s(%d,%d) = %f\n", name, row + 1, col + 1, Areg); - } - } -} - -int main(int argc, char*argv[]) -{ - // CHECK: hipsparseHandle_t handle = NULL; - cusparseHandle_t handle = NULL; - // CHECK: hipStream_t stream = NULL; - cudaStream_t stream = NULL; - // CHECK: hipsparseMatDescr_t descrA = NULL; - cusparseMatDescr_t descrA = NULL; - // CHECK: hipsparseMatDescr_t descrC = NULL; - cusparseMatDescr_t descrC = NULL; - // CHECK: hipsparseStatus_t status = HIPSPARSE_STATUS_SUCCESS; - cusparseStatus_t status = CUSPARSE_STATUS_SUCCESS; - // CHECK: hipError_t cudaStat1 = hipSuccess; - cudaError_t cudaStat1 = cudaSuccess; - const int m = 4; - const int n = 4; - const int nnzA = 9; - /* - * | 1 0 2 -3 | - * | 0 4 0 0 | - * A = | 5 0 6 7 | - * | 0 8 0 9 | - * - */ - - const int csrRowPtrA[m + 1] = { 1, 4, 5, 8, 10 }; - const int csrColIndA[nnzA] = { 1, 3, 4, 2, 1, 3, 4, 2, 4 }; - const float csrValA[nnzA] = { 1, 2, -3, 4, 5, 6, 7, 8, 9 }; - - int* csrRowPtrC = NULL; - int* csrColIndC = NULL; - float* csrValC = NULL; - - int *d_csrRowPtrA = NULL; - int *d_csrColIndA = NULL; - float *d_csrValA = NULL; - - int *d_csrRowPtrC = NULL; - int *d_csrColIndC = NULL; - float *d_csrValC = NULL; - - size_t lworkInBytes = 0; - char *d_work = NULL; - - int nnzC = 0; - - float threshold = 4.1; /* remove Aij <= 4.1 */ -// float threshold = 0; /* remove zeros */ - - printf("example of pruneCsr2csr \n"); - - printf("prune |A(i,j)| <= threshold \n"); - printf("threshold = %E \n", threshold); - - /* step 1: create cusparse handle, bind a stream */ - // CHECK: cudaStat1 = hipStreamCreateWithFlags(&stream, hipStreamNonBlocking); - cudaStat1 = cudaStreamCreateWithFlags(&stream, cudaStreamNonBlocking); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: status = hipsparseCreate(&handle); - status = cusparseCreate(&handle); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: status = hipsparseSetStream(handle, stream); - status = cusparseSetStream(handle, stream); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - /* step 2: configuration of matrix A and C */ - // CHECK: status = hipsparseCreateMatDescr(&descrA); - status = cusparseCreateMatDescr(&descrA); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - /* A is base-1*/ - // CHECK: hipsparseSetMatIndexBase(descrA, HIPSPARSE_INDEX_BASE_ONE); - cusparseSetMatIndexBase(descrA, CUSPARSE_INDEX_BASE_ONE); - // CHECK: hipsparseSetMatType(descrA, HIPSPARSE_MATRIX_TYPE_GENERAL); - cusparseSetMatType(descrA, CUSPARSE_MATRIX_TYPE_GENERAL); - // CHECK: status = hipsparseCreateMatDescr(&descrC); - status = cusparseCreateMatDescr(&descrC); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - /* C is base-0 */ - // CHECK: hipsparseSetMatIndexBase(descrC, HIPSPARSE_INDEX_BASE_ZERO); - cusparseSetMatIndexBase(descrC, CUSPARSE_INDEX_BASE_ZERO); - // CHECK: hipsparseSetMatType(descrC, HIPSPARSE_MATRIX_TYPE_GENERAL); - cusparseSetMatType(descrC, CUSPARSE_MATRIX_TYPE_GENERAL); - - printCsr(m, n, nnzA, descrA, csrValA, csrRowPtrA, csrColIndA, "A"); - // CHECK: cudaStat1 = hipMalloc((void**)&d_csrRowPtrA, sizeof(int)*(m + 1)); - cudaStat1 = cudaMalloc((void**)&d_csrRowPtrA, sizeof(int)*(m + 1)); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_csrColIndA, sizeof(int)*nnzA); - cudaStat1 = cudaMalloc((void**)&d_csrColIndA, sizeof(int)*nnzA); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_csrValA, sizeof(float)*nnzA); - cudaStat1 = cudaMalloc((void**)&d_csrValA, sizeof(float)*nnzA); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_csrRowPtrC, sizeof(int)*(m + 1)); - cudaStat1 = cudaMalloc((void**)&d_csrRowPtrC, sizeof(int)*(m + 1)); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_csrRowPtrA, csrRowPtrA, sizeof(int)*(m + 1), hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_csrRowPtrA, csrRowPtrA, sizeof(int)*(m + 1), cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_csrColIndA, csrColIndA, sizeof(int)*nnzA, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_csrColIndA, csrColIndA, sizeof(int)*nnzA, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_csrValA, csrValA, sizeof(float)*nnzA, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_csrValA, csrValA, sizeof(float)*nnzA, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 3: query workspace */ - // TODO: status = hipsparseSpruneCsr2csr_bufferSizeExt( - status = cusparseSpruneCsr2csr_bufferSizeExt( - handle, - m, - n, - nnzA, - descrA, - d_csrValA, - d_csrRowPtrA, - d_csrColIndA, - &threshold, - descrC, - d_csrValC, - d_csrRowPtrC, - d_csrColIndC, - &lworkInBytes); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - printf("lworkInBytes (prune) = %lld \n", (long long)lworkInBytes); - // CHECK: if (NULL != d_work) { hipFree(d_work); } - if (NULL != d_work) { cudaFree(d_work); } - // cudaStat1 = hipMalloc((void**)&d_work, lworkInBytes); - cudaStat1 = cudaMalloc((void**)&d_work, lworkInBytes); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 4: compute csrRowPtrC and nnzC */ - // TODO: status = hipsparseSpruneCsr2csrNnz( - status = cusparseSpruneCsr2csrNnz( - handle, - m, - n, - nnzA, - descrA, - d_csrValA, - d_csrRowPtrA, - d_csrColIndA, - &threshold, - descrC, - d_csrRowPtrC, - &nnzC, /* host */ - d_work); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: cudaStat1 = hipDeviceSynchronize(); - cudaStat1 = cudaDeviceSynchronize(); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - printf("nnzC = %d\n", nnzC); - if (0 == nnzC) { - printf("C is empty \n"); - return 0; - } - /* step 5: compute csrColIndC and csrValC */ - // CHECK: cudaStat1 = hipMalloc((void**)&d_csrColIndC, sizeof(int) * nnzC); - cudaStat1 = cudaMalloc((void**)&d_csrColIndC, sizeof(int) * nnzC); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_csrValC, sizeof(float) * nnzC); - cudaStat1 = cudaMalloc((void**)&d_csrValC, sizeof(float) * nnzC); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // TODO: status = hipsparseSpruneCsr2csr( - status = cusparseSpruneCsr2csr( - handle, - m, - n, - nnzA, - descrA, - d_csrValA, - d_csrRowPtrA, - d_csrColIndA, - &threshold, - descrC, - d_csrValC, - d_csrRowPtrC, - d_csrColIndC, - d_work); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: cudaStat1 = hipDeviceSynchronize(); - cudaStat1 = cudaDeviceSynchronize(); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 6: output C */ - csrRowPtrC = (int*)malloc(sizeof(int)*(m + 1)); - csrColIndC = (int*)malloc(sizeof(int)*nnzC); - csrValC = (float*)malloc(sizeof(float)*nnzC); - assert(NULL != csrRowPtrC); - assert(NULL != csrColIndC); - assert(NULL != csrValC); - // CHECK: cudaStat1 = hipMemcpy(csrRowPtrC, d_csrRowPtrC, sizeof(int)*(m + 1), hipMemcpyDeviceToHost); - cudaStat1 = cudaMemcpy(csrRowPtrC, d_csrRowPtrC, sizeof(int)*(m + 1), cudaMemcpyDeviceToHost); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(csrColIndC, d_csrColIndC, sizeof(int)*nnzC, hipMemcpyDeviceToHost); - cudaStat1 = cudaMemcpy(csrColIndC, d_csrColIndC, sizeof(int)*nnzC, cudaMemcpyDeviceToHost); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(csrValC, d_csrValC, sizeof(float)*nnzC, hipMemcpyDeviceToHost); - cudaStat1 = cudaMemcpy(csrValC, d_csrValC, sizeof(float)*nnzC, cudaMemcpyDeviceToHost); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - printCsr(m, n, nnzC, descrC, csrValC, csrRowPtrC, csrColIndC, "C"); - /* free resources */ - // CHECK: if (d_csrRowPtrA) hipFree(d_csrRowPtrA); - if (d_csrRowPtrA) cudaFree(d_csrRowPtrA); - // CHECK: if (d_csrColIndA) hipFree(d_csrColIndA); - if (d_csrColIndA) cudaFree(d_csrColIndA); - // CHECK: if (d_csrValA) hipFree(d_csrValA); - if (d_csrValA) cudaFree(d_csrValA); - // CHECK: if (d_csrRowPtrC) hipFree(d_csrRowPtrC); - if (d_csrRowPtrC) cudaFree(d_csrRowPtrC); - // CHECK: if (d_csrColIndC) hipFree(d_csrColIndC); - if (d_csrColIndC) cudaFree(d_csrColIndC); - // CHECK: if (d_csrValC) hipFree(d_csrValC); - if (d_csrValC) cudaFree(d_csrValC); - if (csrRowPtrC) free(csrRowPtrC); - if (csrColIndC) free(csrColIndC); - if (csrValC) free(csrValC); - // CHECK: if (handle) hipsparseDestroy(handle); - if (handle) cusparseDestroy(handle); - // CHECK: if (stream) hipStreamDestroy(stream); - if (stream) cudaStreamDestroy(stream); - // CHECK: if (descrA) hipsparseDestroyMatDescr(descrA); - if (descrA) cusparseDestroyMatDescr(descrA); - // CHECK: if (descrC) hipsparseDestroyMatDescr(descrC); - if (descrC) cusparseDestroyMatDescr(descrC); - // CHECK: hipDeviceReset(); - cudaDeviceReset(); - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_06.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_06.cu deleted file mode 100644 index 872750a5d5..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_06.cu +++ /dev/null @@ -1,269 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -#include -#include -#include -// CHECK: #include -#include -// CHECK: #include -#include - -void printMatrix(int m, int n, const float*A, int lda, const char* name) -{ - for (int row = 0; row < m; row++) { - for (int col = 0; col < n; col++) { - float Areg = A[row + col * lda]; - printf("%s(%d,%d) = %f\n", name, row + 1, col + 1, Areg); - } - } -} - -void printCsr( - int m, - int n, - int nnz, - // CHECK: const hipsparseMatDescr_t descrA, - const cusparseMatDescr_t descrA, - const float *csrValA, - const int *csrRowPtrA, - const int *csrColIndA, - const char* name) -{ - // CHECK: const int base = (hipsparseGetMatIndexBase(descrA) != HIPSPARSE_INDEX_BASE_ONE) ? 0 : 1; - const int base = (cusparseGetMatIndexBase(descrA) != CUSPARSE_INDEX_BASE_ONE) ? 0 : 1; - - printf("matrix %s is %d-by-%d, nnz=%d, base=%d, output base-1\n", name, m, n, nnz, base); - for (int row = 0; row < m; row++) { - const int start = csrRowPtrA[row] - base; - const int end = csrRowPtrA[row + 1] - base; - for (int colidx = start; colidx < end; colidx++) { - const int col = csrColIndA[colidx] - base; - const float Areg = csrValA[colidx]; - printf("%s(%d,%d) = %f\n", name, row + 1, col + 1, Areg); - } - } -} - -int main(int argc, char*argv[]) -{ - // CHECK: hipsparseHandle_t handle = NULL; - cusparseHandle_t handle = NULL; - // CHECK: hipStream_t stream = NULL; - cudaStream_t stream = NULL; - // CHECK: hipsparseMatDescr_t descrC = NULL; - cusparseMatDescr_t descrC = NULL; - pruneInfo_t info = NULL; - // CHECK: hipsparseStatus_t status = HIPSPARSE_STATUS_SUCCESS; - cusparseStatus_t status = CUSPARSE_STATUS_SUCCESS; - // CHECK: hipError_t cudaStat1 = hipSuccess; - // CHECK: hipError_t cudaStat2 = hipSuccess; - // CHECK: hipError_t cudaStat3 = hipSuccess; - // CHECK: hipError_t cudaStat4 = hipSuccess; - // CHECK: hipError_t cudaStat5 = hipSuccess; - cudaError_t cudaStat1 = cudaSuccess; - cudaError_t cudaStat2 = cudaSuccess; - cudaError_t cudaStat3 = cudaSuccess; - cudaError_t cudaStat4 = cudaSuccess; - cudaError_t cudaStat5 = cudaSuccess; - const int m = 4; - const int n = 4; - const int lda = m; - /* - * | 1 0 2 -3 | - * | 0 4 0 0 | - * A = | 5 0 6 7 | - * | 0 8 0 9 | - * - */ - const float A[lda*n] = { 1, 0, 5, 0, 0, 4, 0, 8, 2, 0, 6, 0, -3, 0, 7, 9 }; - int* csrRowPtrC = NULL; - int* csrColIndC = NULL; - float* csrValC = NULL; - - float *d_A = NULL; - int *d_csrRowPtrC = NULL; - int *d_csrColIndC = NULL; - float *d_csrValC = NULL; - - size_t lworkInBytes = 0; - char *d_work = NULL; - - int nnzC = 0; - - float percentage = 50; /* 50% of nnz */ - - printf("example of pruneDense2csrByPercentage \n"); - - printf("prune out %.1f percentage of A \n", percentage); - - printMatrix(m, n, A, lda, "A"); - - /* step 1: create cusparse handle, bind a stream */ - // CHECK: cudaStat1 = hipStreamCreateWithFlags(&stream, hipStreamNonBlocking); - cudaStat1 = cudaStreamCreateWithFlags(&stream, cudaStreamNonBlocking); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: status = hipsparseCreate(&handle); - status = cusparseCreate(&handle); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: status = hipsparseSetStream(handle, stream); - status = cusparseSetStream(handle, stream); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // TODO: status = hipsparseCreatePruneInfo(&info); - status = cusparseCreatePruneInfo(&info); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - /* step 2: configuration of matrix C */ - // CHECK: status = hipsparseCreateMatDescr(&descrC); - status = cusparseCreateMatDescr(&descrC); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: hipsparseSetMatIndexBase(descrC, HIPSPARSE_INDEX_BASE_ZERO); - cusparseSetMatIndexBase(descrC, CUSPARSE_INDEX_BASE_ZERO); - // CHECK: hipsparseSetMatType(descrC, HIPSPARSE_MATRIX_TYPE_GENERAL); - cusparseSetMatType(descrC, CUSPARSE_MATRIX_TYPE_GENERAL); - // CHECK: cudaStat1 = hipMalloc((void**)&d_A, sizeof(float)*lda*n); - cudaStat1 = cudaMalloc((void**)&d_A, sizeof(float)*lda*n); - // CHECK: cudaStat2 = hipMalloc((void**)&d_csrRowPtrC, sizeof(int)*(m + 1)); - cudaStat2 = cudaMalloc((void**)&d_csrRowPtrC, sizeof(int)*(m + 1)); - // CHECK: assert(hipSuccess == cudaStat1); - // CHECK: assert(hipSuccess == cudaStat2); - assert(cudaSuccess == cudaStat1); - assert(cudaSuccess == cudaStat2); - // CHECK: cudaStat1 = hipMemcpy(d_A, A, sizeof(float)*lda*n, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_A, A, sizeof(float)*lda*n, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - /* step 3: query workspace */ - // TODO: status = hipsparseSpruneDense2csrByPercentage_bufferSizeExt( - status = cusparseSpruneDense2csrByPercentage_bufferSizeExt( - handle, - m, - n, - d_A, - lda, - percentage, - descrC, - d_csrValC, - d_csrRowPtrC, - d_csrColIndC, - info, - &lworkInBytes); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - printf("lworkInBytes = %lld \n", (long long)lworkInBytes); - // CHECK: if (NULL != d_work) { hipFree(d_work); } - if (NULL != d_work) { cudaFree(d_work); } - // CHECK: cudaStat1 = hipMalloc((void**)&d_work, lworkInBytes); - cudaStat1 = cudaMalloc((void**)&d_work, lworkInBytes); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 4: compute csrRowPtrC and nnzC */ - // TODO: status = hipsparseSpruneDense2csrNnzByPercentage( - status = cusparseSpruneDense2csrNnzByPercentage( - handle, - m, - n, - d_A, - lda, - percentage, - descrC, - d_csrRowPtrC, - &nnzC, /* host */ - info, - d_work); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: cudaStat1 = hipDeviceSynchronize(); - cudaStat1 = cudaDeviceSynchronize(); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - printf("nnzC = %d\n", nnzC); - if (0 == nnzC) { - printf("C is empty \n"); - return 0; - } - - /* step 5: compute csrColIndC and csrValC */ - // CHECK: cudaStat1 = hipMalloc((void**)&d_csrColIndC, sizeof(int) * nnzC); - cudaStat1 = cudaMalloc((void**)&d_csrColIndC, sizeof(int) * nnzC); - // CHECK: cudaStat2 = hipMalloc((void**)&d_csrValC, sizeof(float) * nnzC); - cudaStat2 = cudaMalloc((void**)&d_csrValC, sizeof(float) * nnzC); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: assert(hipSuccess == cudaStat2); - assert(cudaSuccess == cudaStat2); - // TODO: status = hipsparseSpruneDense2csrByPercentage( - status = cusparseSpruneDense2csrByPercentage( - handle, - m, - n, - d_A, - lda, - percentage, - descrC, - d_csrValC, - d_csrRowPtrC, - d_csrColIndC, - info, - d_work); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: cudaStat1 = hipDeviceSynchronize(); - cudaStat1 = cudaDeviceSynchronize(); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 7: output C */ - csrRowPtrC = (int*)malloc(sizeof(int)*(m + 1)); - csrColIndC = (int*)malloc(sizeof(int)*nnzC); - csrValC = (float*)malloc(sizeof(float)*nnzC); - assert(NULL != csrRowPtrC); - assert(NULL != csrColIndC); - assert(NULL != csrValC); - // CHECK: cudaStat1 = hipMemcpy(csrRowPtrC, d_csrRowPtrC, sizeof(int)*(m + 1), hipMemcpyDeviceToHost); - cudaStat1 = cudaMemcpy(csrRowPtrC, d_csrRowPtrC, sizeof(int)*(m + 1), cudaMemcpyDeviceToHost); - // CHECK: cudaStat2 = hipMemcpy(csrColIndC, d_csrColIndC, sizeof(int)*nnzC, hipMemcpyDeviceToHost); - cudaStat2 = cudaMemcpy(csrColIndC, d_csrColIndC, sizeof(int)*nnzC, cudaMemcpyDeviceToHost); - // CHECK: cudaStat3 = hipMemcpy(csrValC, d_csrValC, sizeof(float)*nnzC, hipMemcpyDeviceToHost); - cudaStat3 = cudaMemcpy(csrValC, d_csrValC, sizeof(float)*nnzC, cudaMemcpyDeviceToHost); - // CHECK: assert(hipSuccess == cudaStat1); - // CHECK: assert(hipSuccess == cudaStat2); - // CHECK: assert(hipSuccess == cudaStat3); - assert(cudaSuccess == cudaStat1); - assert(cudaSuccess == cudaStat2); - assert(cudaSuccess == cudaStat3); - - printCsr(m, n, nnzC, descrC, csrValC, csrRowPtrC, csrColIndC, "C"); - - /* free resources */ - // CHECK: if (d_A) hipFree(d_A); - if (d_A) cudaFree(d_A); - // CHECK: if (d_csrRowPtrC) hipFree(d_csrRowPtrC); - if (d_csrRowPtrC) cudaFree(d_csrRowPtrC); - // CHECK: if (d_csrColIndC) hipFree(d_csrColIndC); - if (d_csrColIndC) cudaFree(d_csrColIndC); - // CHECK: if (d_csrValC) hipFree(d_csrValC); - if (d_csrValC) cudaFree(d_csrValC); - - if (csrRowPtrC) free(csrRowPtrC); - if (csrColIndC) free(csrColIndC); - if (csrValC) free(csrValC); - // CHECK: if (handle) hipsparseDestroy(handle); - if (handle) cusparseDestroy(handle); - // CHECK: if (stream) hipStreamDestroy(stream); - if (stream) cudaStreamDestroy(stream); - // CHECK: if (descrC) hipsparseDestroyMatDescr(descrC); - if (descrC) cusparseDestroyMatDescr(descrC); - // TODO: if (info) hipsparseDestroyPruneInfo(info); - if (info) cusparseDestroyPruneInfo(info); - // CHECK: hipDeviceReset(); - cudaDeviceReset(); - return 0; -} - diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_07.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_07.cu deleted file mode 100644 index cc938d7da4..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_07.cu +++ /dev/null @@ -1,302 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -#include -#include -#include -// CHECK: #include -#include -// CHECK: #include -#include - -void printCsr( - int m, - int n, - int nnz, - // CHECK: const hipsparseMatDescr_t descrA, - const cusparseMatDescr_t descrA, - const float *csrValA, - const int *csrRowPtrA, - const int *csrColIndA, - const char* name) -{ - // CHECK: const int base = (hipsparseGetMatIndexBase(descrA) != HIPSPARSE_INDEX_BASE_ONE) ? 0 : 1; - const int base = (cusparseGetMatIndexBase(descrA) != CUSPARSE_INDEX_BASE_ONE) ? 0 : 1; - - printf("matrix %s is %d-by-%d, nnz=%d, base=%d, output base-1\n", name, m, n, nnz, base); - for (int row = 0; row < m; row++) { - const int start = csrRowPtrA[row] - base; - const int end = csrRowPtrA[row + 1] - base; - for (int colidx = start; colidx < end; colidx++) { - const int col = csrColIndA[colidx] - base; - const float Areg = csrValA[colidx]; - printf("%s(%d,%d) = %f\n", name, row + 1, col + 1, Areg); - } - } -} - -int main(int argc, char*argv[]) -{ - // CHECK: hipsparseHandle_t handle = NULL; - cusparseHandle_t handle = NULL; - // CHECK: hipStream_t stream = NULL; - cudaStream_t stream = NULL; - // CHECK: hipsparseMatDescr_t descrA = NULL; - cusparseMatDescr_t descrA = NULL; - // CHECK: hipsparseMatDescr_t descrC = NULL; - cusparseMatDescr_t descrC = NULL; - pruneInfo_t info = NULL; - // CHECK: hipsparseStatus_t status = HIPSPARSE_STATUS_SUCCESS; - cusparseStatus_t status = CUSPARSE_STATUS_SUCCESS; - // CHECK: hipError_t cudaStat1 = hipSuccess; - cudaError_t cudaStat1 = cudaSuccess; - const int m = 4; - const int n = 4; - const int nnzA = 9; - /* - * | 1 0 2 -3 | - * | 0 4 0 0 | - * A = | 5 0 6 7 | - * | 0 8 0 9 | - * - */ - - const int csrRowPtrA[m + 1] = { 1, 4, 5, 8, 10 }; - const int csrColIndA[nnzA] = { 1, 3, 4, 2, 1, 3, 4, 2, 4 }; - const float csrValA[nnzA] = { 1, 2, -3, 4, 5, 6, 7, 8, 9 }; - - int* csrRowPtrC = NULL; - int* csrColIndC = NULL; - float* csrValC = NULL; - - int *d_csrRowPtrA = NULL; - int *d_csrColIndA = NULL; - float *d_csrValA = NULL; - - int *d_csrRowPtrC = NULL; - int *d_csrColIndC = NULL; - float *d_csrValC = NULL; - - size_t lworkInBytes = 0; - char *d_work = NULL; - - int nnzC = 0; - - float percentage = 20; /* remove 20% of nonzeros */ - - printf("example of pruneCsr2csrByPercentage \n"); - - printf("prune %.1f percent of nonzeros \n", percentage); - - /* step 1: create cusparse handle, bind a stream */ - // CHECK: cudaStat1 = hipStreamCreateWithFlags(&stream, hipStreamNonBlocking); - cudaStat1 = cudaStreamCreateWithFlags(&stream, cudaStreamNonBlocking); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: status = hipsparseCreate(&handle); - status = cusparseCreate(&handle); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: status = hipsparseSetStream(handle, stream); - status = cusparseSetStream(handle, stream); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // TODO: status = hipsparseCreatePruneInfo(&info); - status = cusparseCreatePruneInfo(&info); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - /* step 2: configuration of matrix C */ - // CHECK: status = hipsparseCreateMatDescr(&descrA); - status = cusparseCreateMatDescr(&descrA); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - /* A is base-1*/ - // CHECK: hipsparseSetMatIndexBase(descrA, HIPSPARSE_INDEX_BASE_ONE); - cusparseSetMatIndexBase(descrA, CUSPARSE_INDEX_BASE_ONE); - // CHECK: hipsparseSetMatType(descrA, HIPSPARSE_MATRIX_TYPE_GENERAL); - cusparseSetMatType(descrA, CUSPARSE_MATRIX_TYPE_GENERAL); - // CHECK: status = hipsparseCreateMatDescr(&descrC); - status = cusparseCreateMatDescr(&descrC); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - /* C is base-0 */ - // CHECK: hipsparseSetMatIndexBase(descrC, HIPSPARSE_INDEX_BASE_ZERO); - cusparseSetMatIndexBase(descrC, CUSPARSE_INDEX_BASE_ZERO); - // CHECK: hipsparseSetMatType(descrC, HIPSPARSE_MATRIX_TYPE_GENERAL); - cusparseSetMatType(descrC, CUSPARSE_MATRIX_TYPE_GENERAL); - - printCsr(m, n, nnzA, descrA, csrValA, csrRowPtrA, csrColIndA, "A"); - // CHECK: cudaStat1 = hipMalloc((void**)&d_csrRowPtrA, sizeof(int)*(m + 1)); - cudaStat1 = cudaMalloc((void**)&d_csrRowPtrA, sizeof(int)*(m + 1)); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_csrColIndA, sizeof(int)*nnzA); - cudaStat1 = cudaMalloc((void**)&d_csrColIndA, sizeof(int)*nnzA); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_csrValA, sizeof(float)*nnzA); - cudaStat1 = cudaMalloc((void**)&d_csrValA, sizeof(float)*nnzA); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_csrRowPtrC, sizeof(int)*(m + 1)); - cudaStat1 = cudaMalloc((void**)&d_csrRowPtrC, sizeof(int)*(m + 1)); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_csrRowPtrA, csrRowPtrA, sizeof(int)*(m + 1), hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_csrRowPtrA, csrRowPtrA, sizeof(int)*(m + 1), cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_csrColIndA, csrColIndA, sizeof(int)*nnzA, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_csrColIndA, csrColIndA, sizeof(int)*nnzA, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_csrValA, csrValA, sizeof(float)*nnzA, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_csrValA, csrValA, sizeof(float)*nnzA, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 3: query workspace */ - // TODO: status = hipsparseSpruneCsr2csrByPercentage_bufferSizeExt( - status = cusparseSpruneCsr2csrByPercentage_bufferSizeExt( - handle, - m, - n, - nnzA, - descrA, - d_csrValA, - d_csrRowPtrA, - d_csrColIndA, - percentage, - descrC, - d_csrValC, - d_csrRowPtrC, - d_csrColIndC, - info, - &lworkInBytes); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - printf("lworkInBytes = %lld \n", (long long)lworkInBytes); - // CHECK: if (NULL != d_work) { hipFree(d_work); } - if (NULL != d_work) { cudaFree(d_work); } - // CHECK: cudaStat1 = hipMalloc((void**)&d_work, lworkInBytes); - cudaStat1 = cudaMalloc((void**)&d_work, lworkInBytes); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 4: compute csrRowPtrC and nnzC */ - // TODO: status = hipsparseSpruneCsr2csrNnzByPercentage( - status = cusparseSpruneCsr2csrNnzByPercentage( - handle, - m, - n, - nnzA, - descrA, - d_csrValA, - d_csrRowPtrA, - d_csrColIndA, - percentage, - descrC, - d_csrRowPtrC, - &nnzC, /* host */ - info, - d_work); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: cudaStat1 = hipDeviceSynchronize(); - cudaStat1 = cudaDeviceSynchronize(); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - printf("nnzC = %d\n", nnzC); - if (0 == nnzC) { - printf("C is empty \n"); - return 0; - } - - /* step 5: compute csrColIndC and csrValC */ - // CHECK: cudaStat1 = hipMalloc((void**)&d_csrColIndC, sizeof(int) * nnzC); - cudaStat1 = cudaMalloc((void**)&d_csrColIndC, sizeof(int) * nnzC); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_csrValC, sizeof(float) * nnzC); - cudaStat1 = cudaMalloc((void**)&d_csrValC, sizeof(float) * nnzC); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // TODO: status = hipsparseSpruneCsr2csrByPercentage( - status = cusparseSpruneCsr2csrByPercentage( - handle, - m, - n, - nnzA, - descrA, - d_csrValA, - d_csrRowPtrA, - d_csrColIndA, - percentage, - descrC, - d_csrValC, - d_csrRowPtrC, - d_csrColIndC, - info, - d_work); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: cudaStat1 = hipDeviceSynchronize(); - cudaStat1 = cudaDeviceSynchronize(); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 6: output C */ - csrRowPtrC = (int*)malloc(sizeof(int)*(m + 1)); - csrColIndC = (int*)malloc(sizeof(int)*nnzC); - csrValC = (float*)malloc(sizeof(float)*nnzC); - assert(NULL != csrRowPtrC); - assert(NULL != csrColIndC); - assert(NULL != csrValC); - // CHECK: cudaStat1 = hipMemcpy(csrRowPtrC, d_csrRowPtrC, sizeof(int)*(m + 1), hipMemcpyDeviceToHost); - cudaStat1 = cudaMemcpy(csrRowPtrC, d_csrRowPtrC, sizeof(int)*(m + 1), cudaMemcpyDeviceToHost); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(csrColIndC, d_csrColIndC, sizeof(int)*nnzC, hipMemcpyDeviceToHost); - cudaStat1 = cudaMemcpy(csrColIndC, d_csrColIndC, sizeof(int)*nnzC, cudaMemcpyDeviceToHost); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(csrValC, d_csrValC, sizeof(float)*nnzC, hipMemcpyDeviceToHost); - cudaStat1 = cudaMemcpy(csrValC, d_csrValC, sizeof(float)*nnzC, cudaMemcpyDeviceToHost); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - printCsr(m, n, nnzC, descrC, csrValC, csrRowPtrC, csrColIndC, "C"); - - /* free resources */ - // CHECK: if (d_csrRowPtrA) hipFree(d_csrRowPtrA); - if (d_csrRowPtrA) cudaFree(d_csrRowPtrA); - // CHECK: if (d_csrColIndA) hipFree(d_csrColIndA); - if (d_csrColIndA) cudaFree(d_csrColIndA); - // CHECK: if (d_csrValA) hipFree(d_csrValA); - if (d_csrValA) cudaFree(d_csrValA); - // CHECK: if (d_csrRowPtrC) hipFree(d_csrRowPtrC); - if (d_csrRowPtrC) cudaFree(d_csrRowPtrC); - // CHECK: if (d_csrColIndC) hipFree(d_csrColIndC); - if (d_csrColIndC) cudaFree(d_csrColIndC); - // CHECK: if (d_csrValC) hipFree(d_csrValC); - if (d_csrValC) cudaFree(d_csrValC); - - if (csrRowPtrC) free(csrRowPtrC); - if (csrColIndC) free(csrColIndC); - if (csrValC) free(csrValC); - // CHECK: if (handle) hipsparseDestroy(handle); - if (handle) cusparseDestroy(handle); - // CHECK: if (stream) hipStreamDestroy(stream); - if (stream) cudaStreamDestroy(stream); - // CHECK: if (descrA) hipsparseDestroyMatDescr(descrA); - if (descrA) cusparseDestroyMatDescr(descrA); - // CHECK: if (descrC) hipsparseDestroyMatDescr(descrC); - if (descrC) cusparseDestroyMatDescr(descrC); - // TODO: if (info) hipsparseDestroyPruneInfo(info); - if (info) cusparseDestroyPruneInfo(info); - // CHECK: hipDeviceReset(); - cudaDeviceReset(); - - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_08.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_08.cu deleted file mode 100644 index 2c826935ef..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_08.cu +++ /dev/null @@ -1,413 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -#include -#include -#include -// CHECK: #include -#include -// CHECK: #include -#include -// CHECK: #include -#include - -// NOTE: CUDA 10.0 - -/* - * compute | b - A*x|_inf - */ -void residaul_eval( - int n, - const float *dl, - const float *d, - const float *du, - const float *b, - const float *x, - float *r_nrminf_ptr) -{ - float r_nrminf = 0; - for (int i = 0; i < n; i++) { - float dot = 0; - if (i > 0) { - dot += dl[i] * x[i - 1]; - } - dot += d[i] * x[i]; - if (i < (n - 1)) { - dot += du[i] * x[i + 1]; - } - float ri = b[i] - dot; - r_nrminf = (r_nrminf > fabs(ri)) ? r_nrminf : fabs(ri); - } - - *r_nrminf_ptr = r_nrminf; -} - -int main(int argc, char*argv[]) -{ - // CHECK: hipsparseHandle_t cusparseH = NULL; - cusparseHandle_t cusparseH = NULL; - // CHECK: hipblasHandle_t cublasH = NULL; - cublasHandle_t cublasH = NULL; - // CHECK: hipStream_t stream = NULL; - cudaStream_t stream = NULL; - // CHECK: hipsparseStatus_t status = HIPSPARSE_STATUS_SUCCESS; - cusparseStatus_t status = CUSPARSE_STATUS_SUCCESS; - // CHECK: hipblasStatus_t cublasStat = HIPBLAS_STATUS_SUCCESS; - cublasStatus_t cublasStat = CUBLAS_STATUS_SUCCESS; - // CHECK: hipError_t cudaStat1 = hipSuccess; - cudaError_t cudaStat1 = cudaSuccess; - - const int n = 3; - const int batchSize = 2; - /* - * | 1 6 0 | | 1 | | -0.603960 | - * A1 =| 4 2 7 |, b1 = | 2 |, x1 = | 0.267327 | - * | 0 5 3 | | 3 | | 0.554455 | - * - * | 8 13 0 | | 4 | | -0.063291 | - * A2 =| 11 9 14 |, b2 = | 5 |, x2 = | 0.346641 | - * | 0 12 10 | | 6 | | 0.184031 | - */ - - /* - * A = (dl, d, du), B and X are in aggregate format - */ - const float dl[n * batchSize] = { 0, 4, 5, 0, 11, 12 }; - const float d[n * batchSize] = { 1, 2, 3, 8, 9, 10 }; - const float du[n * batchSize] = { 6, 7, 0, 13, 14, 0 }; - const float B[n * batchSize] = { 1, 2, 3, 4, 5, 6 }; - float X[n * batchSize]; /* Xj = Aj \ Bj */ - -/* device memory - * (d_dl0, d_d0, d_du0) is aggregate format - * (d_dl, d_d, d_du) is interleaved format - */ - float *d_dl0 = NULL; - float *d_d0 = NULL; - float *d_du0 = NULL; - float *d_dl = NULL; - float *d_d = NULL; - float *d_du = NULL; - float *d_B = NULL; - float *d_X = NULL; - - size_t lworkInBytes = 0; - char *d_work = NULL; - - /* - * algo = 0: cuThomas (unstable) - * algo = 1: LU with pivoting (stable) - * algo = 2: QR (stable) - */ - const int algo = 2; - - const float h_one = 1; - const float h_zero = 0; - - printf("example of gtsv (interleaved format) \n"); - printf("choose algo = 0,1,2 to select different algorithms \n"); - printf("n = %d, batchSize = %d, algo = %d \n", n, batchSize, algo); - - /* step 1: create cusparse/cublas handle, bind a stream */ - // CHECK: cudaStat1 = hipStreamCreateWithFlags(&stream, hipStreamNonBlocking); - cudaStat1 = cudaStreamCreateWithFlags(&stream, cudaStreamNonBlocking); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: status = hipsparseCreate(&cusparseH); - status = cusparseCreate(&cusparseH); - //CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: status = hipsparseSetStream(cusparseH, stream); - status = cusparseSetStream(cusparseH, stream); - //CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: cublasStat = hipblasCreate(&cublasH); - cublasStat = cublasCreate(&cublasH); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - // CHECK: cublasStat = hipblasSetStream(cublasH, stream); - cublasStat = cublasSetStream(cublasH, stream); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - - /* step 2: allocate device memory */ - // CHECK: cudaStat1 = hipMalloc((void**)&d_dl0, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_dl0, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_d0, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_d0, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_du0, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_du0, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_dl, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_dl, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_d, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_d, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_du, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_du, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_B, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_B, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_X, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_X, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 3: prepare data in device, interleaved format */ - // CHECK: cudaStat1 = hipMemcpy(d_dl0, dl, sizeof(float)*n*batchSize, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_dl0, dl, sizeof(float)*n*batchSize, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_d0, d, sizeof(float)*n*batchSize, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_d0, d, sizeof(float)*n*batchSize, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_du0, du, sizeof(float)*n*batchSize, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_du0, du, sizeof(float)*n*batchSize, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_B, B, sizeof(float)*n*batchSize, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_B, B, sizeof(float)*n*batchSize, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: hipDeviceSynchronize(); - cudaDeviceSynchronize(); - /* convert dl to interleaved format - * dl = transpose(dl0) - */ - // CHECK: cublasStat = hipblasSgeam( - // CHECK: HIPBLAS_OP_T, - // CHECK: HIPBLAS_OP_T, - cublasStat = cublasSgeam( - cublasH, - CUBLAS_OP_T, /* transa */ - CUBLAS_OP_T, /* transb, don't care */ - batchSize, /* number of rows of dl */ - n, /* number of columns of dl */ - &h_one, - d_dl0, /* dl0 is n-by-batchSize */ - n, /* leading dimension of dl0 */ - &h_zero, - NULL, - n, /* don't cae */ - d_dl, /* dl is batchSize-by-n */ - batchSize /* leading dimension of dl */ - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - /* convert d to interleaved format - * d = transpose(d0) - */ - // CHECK: cublasStat = hipblasSgeam( - // CHECK: HIPBLAS_OP_T, - // CHECK: HIPBLAS_OP_T, - cublasStat = cublasSgeam( - cublasH, - CUBLAS_OP_T, /* transa */ - CUBLAS_OP_T, /* transb, don't care */ - batchSize, /* number of rows of d */ - n, /* number of columns of d */ - &h_one, - d_d0, /* d0 is n-by-batchSize */ - n, /* leading dimension of d0 */ - &h_zero, - NULL, - n, /* don't cae */ - d_d, /* d is batchSize-by-n */ - batchSize /* leading dimension of d */ - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - - /* convert du to interleaved format - * du = transpose(du0) - */ - // CHECK: cublasStat = hipblasSgeam( - // CHECK: HIPBLAS_OP_T, - // CHECK: HIPBLAS_OP_T, - cublasStat = cublasSgeam( - cublasH, - CUBLAS_OP_T, /* transa */ - CUBLAS_OP_T, /* transb, don't care */ - batchSize, /* number of rows of du */ - n, /* number of columns of du */ - &h_one, - d_du0, /* du0 is n-by-batchSize */ - n, /* leading dimension of du0 */ - &h_zero, - NULL, - n, /* don't cae */ - d_du, /* du is batchSize-by-n */ - batchSize /* leading dimension of du */ - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - - /* convert B to interleaved format - * X = transpose(B) - */ - // CHECK: cublasStat = hipblasSgeam( - // CHECK: HIPBLAS_OP_T, - // CHECK: HIPBLAS_OP_T, - cublasStat = cublasSgeam( - cublasH, - CUBLAS_OP_T, /* transa */ - CUBLAS_OP_T, /* transb, don't care */ - batchSize, /* number of rows of X */ - n, /* number of columns of X */ - &h_one, - d_B, /* B is n-by-batchSize */ - n, /* leading dimension of B */ - &h_zero, - NULL, - n, /* don't cae */ - d_X, /* X is batchSize-by-n */ - batchSize /* leading dimension of X */ - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - /* step 4: prepare workspace */ - // NOTE: CUDA 10.0 - // TODO: status = hipsparseSgtsvInterleavedBatch_bufferSizeExt( - status = cusparseSgtsvInterleavedBatch_bufferSizeExt( - cusparseH, - algo, - n, - d_dl, - d_d, - d_du, - d_X, - batchSize, - &lworkInBytes); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - printf("lworkInBytes = %lld \n", (long long)lworkInBytes); - // CHECK: cudaStat1 = hipMalloc((void**)&d_work, lworkInBytes); - cudaStat1 = cudaMalloc((void**)&d_work, lworkInBytes); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 5: solve Aj*xj = bj */ - // NOTE: CUDA 10.0 - // TODO: status = hipsparseSgtsvInterleavedBatch( - status = cusparseSgtsvInterleavedBatch( - cusparseH, - algo, - n, - d_dl, - d_d, - d_du, - d_X, - batchSize, - d_work); - // CHECK: cudaStat1 = hipDeviceSynchronize(); - cudaStat1 = cudaDeviceSynchronize(); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 6: convert X back to aggregate format */ - /* B = transpose(X) */ - // CHECK: cublasStat = hipblasSgeam( - // CHECK: HIPBLAS_OP_T, - // CHECK: HIPBLAS_OP_T, - cublasStat = cublasSgeam( - cublasH, - CUBLAS_OP_T, /* transa */ - CUBLAS_OP_T, /* transb, don't care */ - n, /* number of rows of B */ - batchSize, /* number of columns of B */ - &h_one, - d_X, /* X is batchSize-by-n */ - batchSize, /* leading dimension of X */ - &h_zero, - NULL, - n, /* don't cae */ - d_B, /* B is n-by-batchSize */ - n /* leading dimension of B */ - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - // CHECK: hipDeviceSynchronize(); - cudaDeviceSynchronize(); - - /* step 7: residual evaluation */ - // CHECK: cudaStat1 = hipMemcpy(X, d_B, sizeof(float)*n*batchSize, hipMemcpyDeviceToHost); - cudaStat1 = cudaMemcpy(X, d_B, sizeof(float)*n*batchSize, cudaMemcpyDeviceToHost); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: hipDeviceSynchronize(); - cudaDeviceSynchronize(); - printf("==== x1 = inv(A1)*b1 \n"); - for (int j = 0; j < n; j++) { - printf("x1[%d] = %f\n", j, X[j]); - } - - float r1_nrminf; - residaul_eval( - n, - dl, - d, - du, - B, - X, - &r1_nrminf - ); - printf("|b1 - A1*x1| = %E\n", r1_nrminf); - - printf("\n==== x2 = inv(A2)*b2 \n"); - for (int j = 0; j < n; j++) { - printf("x2[%d] = %f\n", j, X[n + j]); - } - - float r2_nrminf; - residaul_eval( - n, - dl + n, - d + n, - du + n, - B + n, - X + n, - &r2_nrminf - ); - printf("|b2 - A2*x2| = %E\n", r2_nrminf); - - /* free resources */ - // CHECK: if (d_dl0) hipFree(d_dl0); - if (d_dl0) cudaFree(d_dl0); - // CHECK: if (d_d0) hipFree(d_d0); - if (d_d0) cudaFree(d_d0); - // CHECK: if (d_du0) hipFree(d_du0); - if (d_du0) cudaFree(d_du0); - // CHECK: if (d_dl) hipFree(d_dl); - if (d_dl) cudaFree(d_dl); - // CHECK: if (d_d) hipFree(d_d); - if (d_d) cudaFree(d_d); - // CHECK: if (d_du) hipFree(d_du); - if (d_du) cudaFree(d_du); - // CHECK: if (d_B) hipFree(d_B); - if (d_B) cudaFree(d_B); - // CHECK: if (d_X) hipFree(d_X); - if (d_X) cudaFree(d_X); - // CHECK: if (cusparseH) hipsparseDestroy(cusparseH); - if (cusparseH) cusparseDestroy(cusparseH); - // CHECK: if (cublasH) hipblasDestroy(cublasH); - if (cublasH) cublasDestroy(cublasH); - // CHECK: if (stream) hipStreamDestroy(stream); - if (stream) cudaStreamDestroy(stream); - // CHECK: hipDeviceReset(); - cudaDeviceReset(); - - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_09.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_09.cu deleted file mode 100644 index 3bcbd96bb0..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_09.cu +++ /dev/null @@ -1,414 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -#include -#include -#include -// CHECK: #include -#include -// CHECK: #include -#include -// CHECK: #include -#include - -// NOTE: CUDA 10.0 - -/* - * compute | b - A*x|_inf - */ -void residaul_eval( - int n, - const float *dl, - const float *d, - const float *du, - const float *b, - const float *x, - float *r_nrminf_ptr) -{ - float r_nrminf = 0; - for (int i = 0; i < n; i++) { - float dot = 0; - if (i > 0) { - dot += dl[i] * x[i - 1]; - } - dot += d[i] * x[i]; - if (i < (n - 1)) { - dot += du[i] * x[i + 1]; - } - float ri = b[i] - dot; - r_nrminf = (r_nrminf > fabs(ri)) ? r_nrminf : fabs(ri); - } - - *r_nrminf_ptr = r_nrminf; -} - -int main(int argc, char*argv[]) -{ - // CHECK: hipsparseHandle_t cusparseH = NULL; - cusparseHandle_t cusparseH = NULL; - // CHECK: hipblasHandle_t cublasH = NULL; - cublasHandle_t cublasH = NULL; - // CHECK: hipStream_t stream = NULL; - cudaStream_t stream = NULL; - // CHECK: hipsparseStatus_t status = HIPSPARSE_STATUS_SUCCESS; - cusparseStatus_t status = CUSPARSE_STATUS_SUCCESS; - // CHECK: hipblasStatus_t cublasStat = HIPBLAS_STATUS_SUCCESS; - cublasStatus_t cublasStat = CUBLAS_STATUS_SUCCESS; - // CHECK: hipError_t cudaStat1 = hipSuccess; - cudaError_t cudaStat1 = cudaSuccess; - - const int n = 3; - const int batchSize = 2; - /* - * | 1 6 0 | | 1 | | -0.603960 | - * A1 =| 4 2 7 |, b1 = | 2 |, x1 = | 0.267327 | - * | 0 5 3 | | 3 | | 0.554455 | - * - * | 8 13 0 | | 4 | | -0.063291 | - * A2 =| 11 9 14 |, b2 = | 5 |, x2 = | 0.346641 | - * | 0 12 10 | | 6 | | 0.184031 | - */ - - /* - * A = (dl, d, du), B and X are in aggregate format - */ - const float dl[n * batchSize] = { 0, 4, 5, 0, 11, 12 }; - const float d[n * batchSize] = { 1, 2, 3, 8, 9, 10 }; - const float du[n * batchSize] = { 6, 7, 0, 13, 14, 0 }; - const float B[n * batchSize] = { 1, 2, 3, 4, 5, 6 }; - float X[n * batchSize]; /* Xj = Aj \ Bj */ - -/* device memory - * (d_dl0, d_d0, d_du0) is aggregate format - * (d_dl, d_d, d_du) is interleaved format - */ - float *d_dl0 = NULL; - float *d_d0 = NULL; - float *d_du0 = NULL; - float *d_dl = NULL; - float *d_d = NULL; - float *d_du = NULL; - float *d_B = NULL; - float *d_X = NULL; - - size_t lworkInBytes = 0; - char *d_work = NULL; - - /* - * algo = 0: cuThomas (unstable) - * algo = 1: LU with pivoting (stable) - * algo = 2: QR (stable) - */ - const int algo = 2; - - const float h_one = 1; - const float h_zero = 0; - - printf("example of gtsv (interleaved format) \n"); - printf("choose algo = 0,1,2 to select different algorithms \n"); - printf("n = %d, batchSize = %d, algo = %d \n", n, batchSize, algo); - - /* step 1: create cusparse/cublas handle, bind a stream */ - // CHECK: cudaStat1 = hipStreamCreateWithFlags(&stream, hipStreamNonBlocking); - cudaStat1 = cudaStreamCreateWithFlags(&stream, cudaStreamNonBlocking); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: status = hipsparseCreate(&cusparseH); - status = cusparseCreate(&cusparseH); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: status = hipsparseSetStream(cusparseH, stream); - status = cusparseSetStream(cusparseH, stream); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: cublasStat = hipblasCreate(&cublasH); - cublasStat = cublasCreate(&cublasH); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - // CHECK: cublasStat = hipblasSetStream(cublasH, stream); - cublasStat = cublasSetStream(cublasH, stream); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - - /* step 2: allocate device memory */ - // CHECK: cudaStat1 = hipMalloc((void**)&d_dl0, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_dl0, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_d0, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_d0, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_du0, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_du0, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_dl, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_dl, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_d, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_d, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_du, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_du, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_B, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_B, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_X, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_X, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 3: prepare data in device, interleaved format */ - // CHECK: cudaStat1 = hipMemcpy(d_dl0, dl, sizeof(float)*n*batchSize, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_dl0, dl, sizeof(float)*n*batchSize, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_d0, d, sizeof(float)*n*batchSize, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_d0, d, sizeof(float)*n*batchSize, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_du0, du, sizeof(float)*n*batchSize, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_du0, du, sizeof(float)*n*batchSize, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_B, B, sizeof(float)*n*batchSize, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_B, B, sizeof(float)*n*batchSize, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: hipDeviceSynchronize(); - cudaDeviceSynchronize(); - /* convert dl to interleaved format - * dl = transpose(dl0) - */ - // CHECK: cublasStat = hipblasSgeam( - // CHECK: HIPBLAS_OP_T, - // CHECK: HIPBLAS_OP_T, - cublasStat = cublasSgeam( - cublasH, - CUBLAS_OP_T, /* transa */ - CUBLAS_OP_T, /* transb, don't care */ - batchSize, /* number of rows of dl */ - n, /* number of columns of dl */ - &h_one, - d_dl0, /* dl0 is n-by-batchSize */ - n, /* leading dimension of dl0 */ - &h_zero, - NULL, - n, /* don't care */ - d_dl, /* dl is batchSize-by-n */ - batchSize /* leading dimension of dl */ - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - /* convert d to interleaved format - * d = transpose(d0) - */ - // CHECK: cublasStat = hipblasSgeam( - // CHECK: HIPBLAS_OP_T - // CHECK: HIPBLAS_OP_T - cublasStat = cublasSgeam( - cublasH, - CUBLAS_OP_T, /* transa */ - CUBLAS_OP_T, /* transb, don't care */ - batchSize, /* number of rows of d */ - n, /* number of columns of d */ - &h_one, - d_d0, /* d0 is n-by-batchSize */ - n, /* leading dimension of d0 */ - &h_zero, - NULL, - n, /* don't cae */ - d_d, /* d is batchSize-by-n */ - batchSize /* leading dimension of d */ - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - - /* convert du to interleaved format - * du = transpose(du0) - */ - // CHECK: cublasStat = hipblasSgeam( - // CHECK: HIPBLAS_OP_T - // CHECK: HIPBLAS_OP_T - cublasStat = cublasSgeam( - cublasH, - CUBLAS_OP_T, /* transa */ - CUBLAS_OP_T, /* transb, don't care */ - batchSize, /* number of rows of du */ - n, /* number of columns of du */ - &h_one, - d_du0, /* du0 is n-by-batchSize */ - n, /* leading dimension of du0 */ - &h_zero, - NULL, - n, /* don't cae */ - d_du, /* du is batchSize-by-n */ - batchSize /* leading dimension of du */ - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - - /* convert B to interleaved format - * X = transpose(B) - */ - // CHECK: cublasStat = hipblasSgeam( - // CHECK: HIPBLAS_OP_T - // CHECK: HIPBLAS_OP_T - cublasStat = cublasSgeam( - cublasH, - CUBLAS_OP_T, /* transa */ - CUBLAS_OP_T, /* transb, don't care */ - batchSize, /* number of rows of X */ - n, /* number of columns of X */ - &h_one, - d_B, /* B is n-by-batchSize */ - n, /* leading dimension of B */ - &h_zero, - NULL, - n, /* don't cae */ - d_X, /* X is batchSize-by-n */ - batchSize /* leading dimension of X */ - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - /* step 4: prepare workspace */ - // NOTE: CUDA 10.0 - // TODO: status = hipsparseSgtsvInterleavedBatch_bufferSizeExt( - status = cusparseSgtsvInterleavedBatch_bufferSizeExt( - cusparseH, - algo, - n, - d_dl, - d_d, - d_du, - d_X, - batchSize, - &lworkInBytes); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - printf("lworkInBytes = %lld \n", (long long)lworkInBytes); - // CHECK: cudaStat1 = hipMalloc((void**)&d_work, lworkInBytes); - cudaStat1 = cudaMalloc((void**)&d_work, lworkInBytes); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 5: solve Aj*xj = bj */ - // NOTE: CUDA 10.0 - // TODO: status = hipsparseSgtsvInterleavedBatch( - status = cusparseSgtsvInterleavedBatch( - cusparseH, - algo, - n, - d_dl, - d_d, - d_du, - d_X, - batchSize, - d_work); - // CHECK: cudaStat1 = hipDeviceSynchronize(); - cudaStat1 = cudaDeviceSynchronize(); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 6: convert X back to aggregate format */ - /* B = transpose(X) */ - // CHECK: cublasStat = hipblasSgeam( - // CHECK: HIPBLAS_OP_T - // CHECK: HIPBLAS_OP_T - cublasStat = cublasSgeam( - cublasH, - CUBLAS_OP_T, /* transa */ - CUBLAS_OP_T, /* transb, don't care */ - n, /* number of rows of B */ - batchSize, /* number of columns of B */ - &h_one, - d_X, /* X is batchSize-by-n */ - batchSize, /* leading dimension of X */ - &h_zero, - NULL, - n, /* don't cae */ - d_B, /* B is n-by-batchSize */ - n /* leading dimension of B */ - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - // CHECK: hipDeviceSynchronize(); - cudaDeviceSynchronize(); - - /* step 7: residual evaluation */ - // CHECK: cudaStat1 = hipMemcpy(X, d_B, sizeof(float)*n*batchSize, hipMemcpyDeviceToHost); - cudaStat1 = cudaMemcpy(X, d_B, sizeof(float)*n*batchSize, cudaMemcpyDeviceToHost); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: hipDeviceSynchronize(); - cudaDeviceSynchronize(); - - printf("==== x1 = inv(A1)*b1 \n"); - for (int j = 0; j < n; j++) { - printf("x1[%d] = %f\n", j, X[j]); - } - - float r1_nrminf; - residaul_eval( - n, - dl, - d, - du, - B, - X, - &r1_nrminf - ); - printf("|b1 - A1*x1| = %E\n", r1_nrminf); - - printf("\n==== x2 = inv(A2)*b2 \n"); - for (int j = 0; j < n; j++) { - printf("x2[%d] = %f\n", j, X[n + j]); - } - - float r2_nrminf; - residaul_eval( - n, - dl + n, - d + n, - du + n, - B + n, - X + n, - &r2_nrminf - ); - printf("|b2 - A2*x2| = %E\n", r2_nrminf); - - /* free resources */ - // CHECK: if (d_dl0) hipFree(d_dl0); - if (d_dl0) cudaFree(d_dl0); - // CHECK: if (d_d0) hipFree(d_d0); - if (d_d0) cudaFree(d_d0); - // CHECK: if (d_du0) hipFree(d_du0); - if (d_du0) cudaFree(d_du0); - // CHECK: if (d_dl) hipFree(d_dl); - if (d_dl) cudaFree(d_dl); - // CHECK: if (d_d) hipFree(d_d); - if (d_d) cudaFree(d_d); - // CHECK: if (d_du) hipFree(d_du); - if (d_du) cudaFree(d_du); - // CHECK: if (d_B) hipFree(d_B); - if (d_B) cudaFree(d_B); - // CHECK: if (d_X) hipFree(d_X); - if (d_X) cudaFree(d_X); - // CHECK: if (cusparseH) hipsparseDestroy(cusparseH); - if (cusparseH) cusparseDestroy(cusparseH); - // CHECK: if (cublasH) hipblasDestroy(cublasH); - if (cublasH) cublasDestroy(cublasH); - // CHECK: if (stream) hipStreamDestroy(stream); - if (stream) cudaStreamDestroy(stream); - // CHECK: hipDeviceReset(); - cudaDeviceReset(); - - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_10.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_10.cu deleted file mode 100644 index 2ab2d605de..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_10.cu +++ /dev/null @@ -1,507 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -#include -#include -#include -// CHECK: #include -#include -// CHECK: #include -#include -// CHECK: #include -#include - -// NOTE: CUDA 10.0 - -/* - * compute | b - A*x|_inf - */ -void residaul_eval( - int n, - const float *ds, - const float *dl, - const float *d, - const float *du, - const float *dw, - const float *b, - const float *x, - float *r_nrminf_ptr) -{ - float r_nrminf = 0; - for (int i = 0; i < n; i++) { - float dot = 0; - if (i > 1) { - dot += ds[i] * x[i - 2]; - } - if (i > 0) { - dot += dl[i] * x[i - 1]; - } - dot += d[i] * x[i]; - if (i < (n - 1)) { - dot += du[i] * x[i + 1]; - } - if (i < (n - 2)) { - dot += dw[i] * x[i + 2]; - } - float ri = b[i] - dot; - r_nrminf = (r_nrminf > fabs(ri)) ? r_nrminf : fabs(ri); - } - - *r_nrminf_ptr = r_nrminf; -} - -int main(int argc, char*argv[]) -{ - // CHECK: hipsparseHandle_t cusparseH = NULL; - cusparseHandle_t cusparseH = NULL; - // CHECK: hipblasHandle_t cublasH = NULL; - cublasHandle_t cublasH = NULL; - // CHECK: hipStream_t stream = NULL; - cudaStream_t stream = NULL; - // CHECK: hipsparseStatus_t status = HIPSPARSE_STATUS_SUCCESS; - cusparseStatus_t status = CUSPARSE_STATUS_SUCCESS; - // CHECK: hipblasStatus_t cublasStat = HIPBLAS_STATUS_SUCCESS; - cublasStatus_t cublasStat = CUBLAS_STATUS_SUCCESS; - // CHECK: hipError_t cudaStat1 = hipSuccess; - cudaError_t cudaStat1 = cudaSuccess; - - const int n = 4; - const int batchSize = 2; - - /* - * | 1 8 13 0 | | 1 | | -0.0592 | - * A1 =| 5 2 9 14 |, b1 = | 2 |, x1 = | 0.3428 | - * | 11 6 3 10 | | 3 | | -0.1295 | - * | 0 12 7 4 | | 4 | | 0.1982 | - * - * | 15 22 27 0 | | 5 | | -0.0012 | - * A2 =| 19 16 23 28 |, b2 = | 6 |, x2 = | 0.2792 | - * | 25 20 17 24 | | 7 | | -0.0416 | - * | 0 26 21 18 | | 8 | | 0.0898 | - */ - - /* - * A = (ds, dl, d, du, dw), B and X are in aggregate format - */ - const float ds[n * batchSize] = { 0, 0, 11, 12, 0, 0, 25, 26 }; - const float dl[n * batchSize] = { 0, 5, 6, 7, 0, 19, 20, 21 }; - const float d[n * batchSize] = { 1, 2, 3, 4, 15, 16, 17, 18 }; - const float du[n * batchSize] = { 8, 9, 10, 0, 22, 23, 24, 0 }; - const float dw[n * batchSize] = { 13,14, 0, 0, 27, 28, 0, 0 }; - const float B[n * batchSize] = { 1, 2, 3, 4, 5, 6, 7, 8 }; - float X[n * batchSize]; /* Xj = Aj \ Bj */ - -/* device memory - * (d_ds0, d_dl0, d_d0, d_du0, d_dw0) is aggregate format - * (d_ds, d_dl, d_d, d_du, d_dw) is interleaved format - */ - float *d_ds0 = NULL; - float *d_dl0 = NULL; - float *d_d0 = NULL; - float *d_du0 = NULL; - float *d_dw0 = NULL; - float *d_ds = NULL; - float *d_dl = NULL; - float *d_d = NULL; - float *d_du = NULL; - float *d_dw = NULL; - float *d_B = NULL; - float *d_X = NULL; - - size_t lworkInBytes = 0; - char *d_work = NULL; - - const float h_one = 1; - const float h_zero = 0; - - int algo = 0; /* QR factorization */ - - printf("example of gpsv (interleaved format) \n"); - printf("n = %d, batchSize = %d\n", n, batchSize); - - /* step 1: create cusparse/cublas handle, bind a stream */ - // CHECK: cudaStat1 = hipStreamCreateWithFlags(&stream, hipStreamNonBlocking); - cudaStat1 = cudaStreamCreateWithFlags(&stream, cudaStreamNonBlocking); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: status = hipsparseCreate(&cusparseH); - status = cusparseCreate(&cusparseH); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: status = hipsparseSetStream(cusparseH, stream); - status = cusparseSetStream(cusparseH, stream); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: cublasStat = hipblasCreate(&cublasH); - cublasStat = cublasCreate(&cublasH); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - // CHECK: cublasStat = hipblasSetStream(cublasH, stream); - cublasStat = cublasSetStream(cublasH, stream); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - /* step 2: allocate device memory */ - // CHECK: cudaStat1 = hipMalloc((void**)&d_ds0, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_ds0, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_dl0, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_dl0, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_d0, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_d0, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_du0, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_du0, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_dw0, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_dw0, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_ds, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_ds, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_dl, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_dl, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_d, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_d, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_du, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_du, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_dw, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_dw, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_B, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_B, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_X, sizeof(float)*n*batchSize); - cudaStat1 = cudaMalloc((void**)&d_X, sizeof(float)*n*batchSize); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - /* step 3: prepare data in device, interleaved format */ - // CHECK: cudaStat1 = hipMemcpy(d_ds0, ds, sizeof(float)*n*batchSize, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_ds0, ds, sizeof(float)*n*batchSize, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_dl0, dl, sizeof(float)*n*batchSize, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_dl0, dl, sizeof(float)*n*batchSize, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_d0, d, sizeof(float)*n*batchSize, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_d0, d, sizeof(float)*n*batchSize, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_du0, du, sizeof(float)*n*batchSize, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_du0, du, sizeof(float)*n*batchSize, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_dw0, dw, sizeof(float)*n*batchSize, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_dw0, dw, sizeof(float)*n*batchSize, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_B, B, sizeof(float)*n*batchSize, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_B, B, sizeof(float)*n*batchSize, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: hipDeviceSynchronize(); - cudaDeviceSynchronize(); - /* convert ds to interleaved format - * ds = transpose(ds0) */ - // CHECK: cublasStat = hipblasSgeam( - // CHECK: HIPBLAS_OP_T, - // CHECK: HIPBLAS_OP_T, - cublasStat = cublasSgeam( - cublasH, - CUBLAS_OP_T, /* transa */ - CUBLAS_OP_T, /* transb, don't care */ - batchSize, /* number of rows of ds */ - n, /* number of columns of ds */ - &h_one, - d_ds0, /* ds0 is n-by-batchSize */ - n, /* leading dimension of ds0 */ - &h_zero, - NULL, - n, /* don't cae */ - d_ds, /* ds is batchSize-by-n */ - batchSize); /* leading dimension of ds */ - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - /* convert dl to interleaved format - * dl = transpose(dl0) - */ - // CHECK: cublasStat = hipblasSgeam( - // CHECK: HIPBLAS_OP_T, - // CHECK: HIPBLAS_OP_T, - cublasStat = cublasSgeam( - cublasH, - CUBLAS_OP_T, /* transa */ - CUBLAS_OP_T, /* transb, don't care */ - batchSize, /* number of rows of dl */ - n, /* number of columns of dl */ - &h_one, - d_dl0, /* dl0 is n-by-batchSize */ - n, /* leading dimension of dl0 */ - &h_zero, - NULL, - n, /* don't cae */ - d_dl, /* dl is batchSize-by-n */ - batchSize /* leading dimension of dl */ - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - - /* convert d to interleaved format - * d = transpose(d0) - */ - // CHECK: cublasStat = hipblasSgeam( - // CHECK: HIPBLAS_OP_T, - // CHECK: HIPBLAS_OP_T, - cublasStat = cublasSgeam( - cublasH, - CUBLAS_OP_T, /* transa */ - CUBLAS_OP_T, /* transb, don't care */ - batchSize, /* number of rows of d */ - n, /* number of columns of d */ - &h_one, - d_d0, /* d0 is n-by-batchSize */ - n, /* leading dimension of d0 */ - &h_zero, - NULL, - n, /* don't cae */ - d_d, /* d is batchSize-by-n */ - batchSize /* leading dimension of d */ - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - - /* convert du to interleaved format - * du = transpose(du0) - */ - // CHECK: cublasStat = hipblasSgeam( - // CHECK: HIPBLAS_OP_T, - // CHECK: HIPBLAS_OP_T, - cublasStat = cublasSgeam( - cublasH, - CUBLAS_OP_T, /* transa */ - CUBLAS_OP_T, /* transb, don't care */ - batchSize, /* number of rows of du */ - n, /* number of columns of du */ - &h_one, - d_du0, /* du0 is n-by-batchSize */ - n, /* leading dimension of du0 */ - &h_zero, - NULL, - n, /* don't cae */ - d_du, /* du is batchSize-by-n */ - batchSize /* leading dimension of du */ - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - /* convert dw to interleaved format - * dw = transpose(dw0) - */ - // CHECK: cublasStat = hipblasSgeam( - // CHECK: HIPBLAS_OP_T, - // CHECK: HIPBLAS_OP_T, - cublasStat = cublasSgeam( - cublasH, - CUBLAS_OP_T, /* transa */ - CUBLAS_OP_T, /* transb, don't care */ - batchSize, /* number of rows of dw */ - n, /* number of columns of dw */ - &h_one, - d_dw0, /* dw0 is n-by-batchSize */ - n, /* leading dimension of dw0 */ - &h_zero, - NULL, - n, /* don't cae */ - d_dw, /* dw is batchSize-by-n */ - batchSize /* leading dimension of dw */ - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - - /* convert B to interleaved format - * X = transpose(B) - */ - // CHECK: cublasStat = hipblasSgeam( - // CHECK: HIPBLAS_OP_T, - // CHECK: HIPBLAS_OP_T, - cublasStat = cublasSgeam( - cublasH, - CUBLAS_OP_T, /* transa */ - CUBLAS_OP_T, /* transb, don't care */ - batchSize, /* number of rows of X */ - n, /* number of columns of X */ - &h_one, - d_B, /* B is n-by-batchSize */ - n, /* leading dimension of B */ - &h_zero, - NULL, - n, /* don't cae */ - d_X, /* X is batchSize-by-n */ - batchSize /* leading dimension of X */ - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - - /* step 4: prepare workspace */ - // NOTE: CUDA 10.0 - // TODO: status = hipsparseSgpsvInterleavedBatch_bufferSizeExt( - status = cusparseSgpsvInterleavedBatch_bufferSizeExt( - cusparseH, - algo, - n, - d_ds, - d_dl, - d_d, - d_du, - d_dw, - d_X, - batchSize, - &lworkInBytes); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - printf("lworkInBytes = %lld \n", (long long)lworkInBytes); - // CHECK: cudaStat1 = hipMalloc((void**)&d_work, lworkInBytes); - cudaStat1 = cudaMalloc((void**)&d_work, lworkInBytes); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - /* step 5: solve Aj*xj = bj */ - // NOTE: CUDA 10.0 - // TODO: status = hipsparseSgpsvInterleavedBatch( - status = cusparseSgpsvInterleavedBatch( - cusparseH, - algo, - n, - d_ds, - d_dl, - d_d, - d_du, - d_dw, - d_X, - batchSize, - d_work); - // CHECK: cudaStat1 = hipDeviceSynchronize(); - cudaStat1 = cudaDeviceSynchronize(); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 6: convert X back to aggregate format */ - /* B = transpose(X) */ - // CHECK: cublasStat = hipblasSgeam( - // CHECK: HIPBLAS_OP_T, - // CHECK: HIPBLAS_OP_T, - cublasStat = cublasSgeam( - cublasH, - CUBLAS_OP_T, /* transa */ - CUBLAS_OP_T, /* transb, don't care */ - n, /* number of rows of B */ - batchSize, /* number of columns of B */ - &h_one, - d_X, /* X is batchSize-by-n */ - batchSize, /* leading dimension of X */ - &h_zero, - NULL, - n, /* don't cae */ - d_B, /* B is n-by-batchSize */ - n /* leading dimension of B */ - ); - // CHECK: assert(HIPBLAS_STATUS_SUCCESS == cublasStat); - assert(CUBLAS_STATUS_SUCCESS == cublasStat); - // CHECK: hipDeviceSynchronize(); - cudaDeviceSynchronize(); - - /* step 7: residual evaluation */ - // CHECK: cudaStat1 = hipMemcpy(X, d_B, sizeof(float)*n*batchSize, hipMemcpyDeviceToHost); - cudaStat1 = cudaMemcpy(X, d_B, sizeof(float)*n*batchSize, cudaMemcpyDeviceToHost); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: hipDeviceSynchronize(); - cudaDeviceSynchronize(); - - printf("==== x1 = inv(A1)*b1 \n"); - for (int j = 0; j < n; j++) { - printf("x1[%d] = %f\n", j, X[j]); - } - - float r1_nrminf; - residaul_eval( - n, - ds, - dl, - d, - du, - dw, - B, - X, - &r1_nrminf - ); - printf("|b1 - A1*x1| = %E\n", r1_nrminf); - printf("\n==== x2 = inv(A2)*b2 \n"); - for (int j = 0; j < n; j++) { - printf("x2[%d] = %f\n", j, X[n + j]); - } - - float r2_nrminf; - residaul_eval( - n, - ds + n, - dl + n, - d + n, - du + n, - dw + n, - B + n, - X + n, - &r2_nrminf - ); - printf("|b2 - A2*x2| = %E\n", r2_nrminf); - - /* free resources */ - // CHECK: if (d_ds0) hipFree(d_ds0); - if (d_ds0) cudaFree(d_ds0); - // CHECK: if (d_dl0) hipFree(d_dl0); - if (d_dl0) cudaFree(d_dl0); - // CHECK: if (d_d0) hipFree(d_d0); - if (d_d0) cudaFree(d_d0); - // CHECK: if (d_du0) hipFree(d_du0); - if (d_du0) cudaFree(d_du0); - // CHECK: if (d_dw0) hipFree(d_dw0); - if (d_dw0) cudaFree(d_dw0); - // CHECK: if (d_ds) hipFree(d_ds); - if (d_ds) cudaFree(d_ds); - // CHECK: if (d_dl) hipFree(d_dl); - if (d_dl) cudaFree(d_dl); - // CHECK: if (d_d) hipFree(d_d); - if (d_d) cudaFree(d_d); - // CHECK: if (d_du) hipFree(d_du); - if (d_du) cudaFree(d_du); - // CHECK: if (d_dw) hipFree(d_dw); - if (d_dw) cudaFree(d_dw); - // CHECK: if (d_B) hipFree(d_B); - if (d_B) cudaFree(d_B); - // CHECK: if (d_X) hipFree(d_X); - if (d_X) cudaFree(d_X); - // CHECK: if (cusparseH) hipsparseDestroy(cusparseH); - if (cusparseH) cusparseDestroy(cusparseH); - // CHECK: if (cublasH) hipblasDestroy(cublasH); - if (cublasH) cublasDestroy(cublasH); - // CHECK: if (stream) hipStreamDestroy(stream); - if (stream) cudaStreamDestroy(stream); - // CHECK: hipDeviceReset(); - cudaDeviceReset(); - - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_11.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_11.cu deleted file mode 100644 index 868f3be69e..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_11.cu +++ /dev/null @@ -1,327 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -#include -#include -#include -// CHECK: #include -#include -// CHECK: #include -#include - -// NOTE: CUDA 10.0 - -/* compute | b - A*x|_inf */ -void residaul_eval( - int n, - // CHECK: const hipsparseMatDescr_t descrA, - const cusparseMatDescr_t descrA, - const float *csrVal, - const int *csrRowPtr, - const int *csrColInd, - const float *b, - const float *x, - float *r_nrminf_ptr) -{ - // CHECK: const int base = (hipsparseGetMatIndexBase(descrA) != HIPSPARSE_INDEX_BASE_ONE) ? 0 : 1; - const int base = (cusparseGetMatIndexBase(descrA) != CUSPARSE_INDEX_BASE_ONE) ? 0 : 1; - // CHECK: const int lower = (HIPSPARSE_FILL_MODE_LOWER == hipsparseGetMatFillMode(descrA)) ? 1 : 0; - const int lower = (CUSPARSE_FILL_MODE_LOWER == cusparseGetMatFillMode(descrA)) ? 1 : 0; - // CHECK: const int unit = (HIPSPARSE_DIAG_TYPE_UNIT == hipsparseGetMatDiagType(descrA)) ? 1 : 0; - const int unit = (CUSPARSE_DIAG_TYPE_UNIT == cusparseGetMatDiagType(descrA)) ? 1 : 0; - - float r_nrminf = 0; - for (int row = 0; row < n; row++) { - const int start = csrRowPtr[row] - base; - const int end = csrRowPtr[row + 1] - base; - float dot = 0; - for (int colidx = start; colidx < end; colidx++) { - const int col = csrColInd[colidx] - base; - float Aij = csrVal[colidx]; - float xj = x[col]; - if ((row == col) && unit) { - Aij = 1.0; - } - int valid = (row >= col) && lower || - (row <= col) && !lower; - if (valid) { - dot += Aij * xj; - } - } - float ri = b[row] - dot; - r_nrminf = (r_nrminf > fabs(ri)) ? r_nrminf : fabs(ri); - } - *r_nrminf_ptr = r_nrminf; -} - -int main(int argc, char*argv[]) -{ - // CHECK: hipsparseHandle_t handle = NULL; - cusparseHandle_t handle = NULL; - // CHECK: hipStream_t stream = NULL; - cudaStream_t stream = NULL; - // CHECK: hipsparseMatDescr_t descrA = NULL; - cusparseMatDescr_t descrA = NULL; - // NOTE: CUDA 10.0 - // TODO: csrsm2Info_t info = NULL; - csrsm2Info_t info = NULL; - // CHECK: hipsparseStatus_t status = HIPSPARSE_STATUS_SUCCESS; - cusparseStatus_t status = CUSPARSE_STATUS_SUCCESS; - // CHECK: hipError_t cudaStat1 = hipSuccess; - cudaError_t cudaStat1 = cudaSuccess; - const int nrhs = 2; - const int n = 4; - const int nnzA = 9; - // CHECK: const hipsparseSolvePolicy_t policy = HIPSPARSE_SOLVE_POLICY_NO_LEVEL; - const cusparseSolvePolicy_t policy = CUSPARSE_SOLVE_POLICY_NO_LEVEL; - const float h_one = 1.0; - /* - * | 1 0 2 -3 | - * | 0 4 0 0 | - * A = | 5 0 6 7 | - * | 0 8 0 9 | - * - * Regard A as a lower triangle matrix L with non-unit diagonal. - * | 1 5 | | 1 5 | - * Given B = | 2 6 |, X = L \ B = | 0.5 1.5 | - * | 3 7 | | -0.3333 -3 | - * | 4 8 | | 0 -0.4444 | - */ - const int csrRowPtrA[n + 1] = { 1, 4, 5, 8, 10 }; - const int csrColIndA[nnzA] = { 1, 3, 4, 2, 1, 3, 4, 2, 4 }; - const float csrValA[nnzA] = { 1, 2, -3, 4, 5, 6, 7, 8, 9 }; - const float B[n*nrhs] = { 1,2,3,4,5,6,7,8 }; - float X[n*nrhs]; - - int *d_csrRowPtrA = NULL; - int *d_csrColIndA = NULL; - float *d_csrValA = NULL; - float *d_B = NULL; - - size_t lworkInBytes = 0; - char *d_work = NULL; - - const int algo = 0; /* non-block version */ - - printf("example of csrsm2 \n"); - - /* step 1: create cusparse handle, bind a stream */ - // CHECK: cudaStat1 = hipStreamCreateWithFlags(&stream, hipStreamNonBlocking); - cudaStat1 = cudaStreamCreateWithFlags(&stream, cudaStreamNonBlocking); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: status = hipsparseCreate(&handle); - status = cusparseCreate(&handle); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - status = cusparseSetStream(handle, stream); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - // NOTE: CUDA 10.0 - // TODO: status = hipsparseCreateCsrsm2Info(&info); - status = cusparseCreateCsrsm2Info(&info); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - /* step 2: configuration of matrix A */ - status = cusparseCreateMatDescr(&descrA); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - /* A is base-1*/ - // CHECK: hipsparseSetMatIndexBase(descrA, HIPSPARSE_INDEX_BASE_ONE); - cusparseSetMatIndexBase(descrA, CUSPARSE_INDEX_BASE_ONE); - // CHECK: hipsparseSetMatType(descrA, HIPSPARSE_MATRIX_TYPE_GENERAL); - cusparseSetMatType(descrA, CUSPARSE_MATRIX_TYPE_GENERAL); - /* A is lower triangle */ - // CHECK: hipsparseSetMatFillMode(descrA, HIPSPARSE_FILL_MODE_LOWER); - cusparseSetMatFillMode(descrA, CUSPARSE_FILL_MODE_LOWER); - /* A has non unit diagonal */ - // CHECK: hipsparseSetMatDiagType(descrA, HIPSPARSE_DIAG_TYPE_NON_UNIT); - cusparseSetMatDiagType(descrA, CUSPARSE_DIAG_TYPE_NON_UNIT); - // CHECK: cudaStat1 = hipMalloc((void**)&d_csrRowPtrA, sizeof(int)*(n + 1)); - cudaStat1 = cudaMalloc((void**)&d_csrRowPtrA, sizeof(int)*(n + 1)); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_csrColIndA, sizeof(int)*nnzA); - cudaStat1 = cudaMalloc((void**)&d_csrColIndA, sizeof(int)*nnzA); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_csrValA, sizeof(float)*nnzA); - cudaStat1 = cudaMalloc((void**)&d_csrValA, sizeof(float)*nnzA); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMalloc((void**)&d_B, sizeof(float)*n*nrhs); - cudaStat1 = cudaMalloc((void**)&d_B, sizeof(float)*n*nrhs); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_csrRowPtrA, csrRowPtrA, sizeof(int)*(n + 1), hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_csrRowPtrA, csrRowPtrA, sizeof(int)*(n + 1), cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_csrColIndA, csrColIndA, sizeof(int)*nnzA, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_csrColIndA, csrColIndA, sizeof(int)*nnzA, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_csrValA, csrValA, sizeof(float)*nnzA, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_csrValA, csrValA, sizeof(float)*nnzA, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: cudaStat1 = hipMemcpy(d_B, B, sizeof(float)*n*nrhs, hipMemcpyHostToDevice); - cudaStat1 = cudaMemcpy(d_B, B, sizeof(float)*n*nrhs, cudaMemcpyHostToDevice); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 3: query workspace */ - // NOTE: CUDA 10.0 - // TODO: status = hipsparseScsrsm2_bufferSizeExt( - // CHECK: HIPSPARSE_OPERATION_NON_TRANSPOSE, - // CHECK: HIPSPARSE_OPERATION_NON_TRANSPOSE, - status = cusparseScsrsm2_bufferSizeExt( - handle, - algo, - CUSPARSE_OPERATION_NON_TRANSPOSE, /* transA */ - CUSPARSE_OPERATION_NON_TRANSPOSE, /* transB */ - n, - nrhs, - nnzA, - &h_one, - descrA, - d_csrValA, - d_csrRowPtrA, - d_csrColIndA, - d_B, - n, /* ldb */ - info, - policy, - &lworkInBytes); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - - printf("lworkInBytes = %lld \n", (long long)lworkInBytes); - // CHECK: if (NULL != d_work) { hipFree(d_work); } - if (NULL != d_work) { cudaFree(d_work); } - // CHECK: cudaStat1 = hipMalloc((void**)&d_work, lworkInBytes); - cudaStat1 = cudaMalloc((void**)&d_work, lworkInBytes); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 4: analysis */ - // NOTE: CUDA 10.0 - // TODO: status = hipsparseScsrsm2_analysis( - // CHECK: HIPSPARSE_OPERATION_NON_TRANSPOSE, - // CHECK: HIPSPARSE_OPERATION_NON_TRANSPOSE, - status = cusparseScsrsm2_analysis( - handle, - algo, - CUSPARSE_OPERATION_NON_TRANSPOSE, /* transA */ - CUSPARSE_OPERATION_NON_TRANSPOSE, /* transB */ - n, - nrhs, - nnzA, - &h_one, - descrA, - d_csrValA, - d_csrRowPtrA, - d_csrColIndA, - d_B, - n, /* ldb */ - info, - policy, - d_work); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - /* step 5: solve L * X = B */ - // NOTE: CUDA 10.0 - // TODO: status = hipsparseScsrsm2_solve( - // CHECK: HIPSPARSE_OPERATION_NON_TRANSPOSE, - // CHECK: HIPSPARSE_OPERATION_NON_TRANSPOSE, - status = cusparseScsrsm2_solve( - handle, - algo, - CUSPARSE_OPERATION_NON_TRANSPOSE, /* transA */ - CUSPARSE_OPERATION_NON_TRANSPOSE, /* transB */ - n, - nrhs, - nnzA, - &h_one, - descrA, - d_csrValA, - d_csrRowPtrA, - d_csrColIndA, - d_B, - n, /* ldb */ - info, - policy, - d_work); - // CHECK: assert(HIPSPARSE_STATUS_SUCCESS == status); - assert(CUSPARSE_STATUS_SUCCESS == status); - // CHECK: cudaStat1 = hipDeviceSynchronize(); - cudaStat1 = cudaDeviceSynchronize(); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - - /* step 6:measure residual B - A*X */ - // CHECK: cudaStat1 = hipMemcpy(X, d_B, sizeof(float)*n*nrhs, hipMemcpyDeviceToHost); - cudaStat1 = cudaMemcpy(X, d_B, sizeof(float)*n*nrhs, cudaMemcpyDeviceToHost); - // CHECK: assert(hipSuccess == cudaStat1); - assert(cudaSuccess == cudaStat1); - // CHECK: hipDeviceSynchronize(); - cudaDeviceSynchronize(); - - printf("==== x1 = inv(A)*b1 \n"); - for (int j = 0; j < n; j++) { - printf("x1[%d] = %f\n", j, X[j]); - } - float r1_nrminf; - residaul_eval( - n, - descrA, - csrValA, - csrRowPtrA, - csrColIndA, - B, - X, - &r1_nrminf - ); - printf("|b1 - A*x1| = %E\n", r1_nrminf); - - printf("==== x2 = inv(A)*b2 \n"); - for (int j = 0; j < n; j++) { - printf("x2[%d] = %f\n", j, X[n + j]); - } - float r2_nrminf; - residaul_eval( - n, - descrA, - csrValA, - csrRowPtrA, - csrColIndA, - B + n, - X + n, - &r2_nrminf - ); - printf("|b2 - A*x2| = %E\n", r2_nrminf); - - /* free resources */ - // CHECK: if (d_csrRowPtrA) hipFree(d_csrRowPtrA); - if (d_csrRowPtrA) cudaFree(d_csrRowPtrA); - // CHECK: if (d_csrColIndA) hipFree(d_csrColIndA); - if (d_csrColIndA) cudaFree(d_csrColIndA); - // CHECK: if (d_csrValA) hipFree(d_csrValA); - if (d_csrValA) cudaFree(d_csrValA); - // CHECK: if (d_B) hipFree(d_B); - if (d_B) cudaFree(d_B); - // CHECK: if (handle) hipsparseDestroy(handle); - if (handle) cusparseDestroy(handle); - // CHECK: if (stream) hipStreamDestroy(stream); - if (stream) cudaStreamDestroy(stream); - // CHECK: if (descrA) hipsparseDestroyMatDescr(descrA); - if (descrA) cusparseDestroyMatDescr(descrA); - // NOTE: CUDA 10.0 - // TODO: if (info) hipsparseDestroyCsrsm2Info(info); - if (info) cusparseDestroyCsrsm2Info(info); - // CHECK: hipDeviceReset(); - cudaDeviceReset(); - - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_12.cu b/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_12.cu deleted file mode 100644 index e6a2178053..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/libraries/cuSPARSE/cuSPARSE_12.cu +++ /dev/null @@ -1,410 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -// CHECK: #include -// CHECK: #include -// CHECK: #include -#include -#include -#include -#include -#include -#include - -#define Min(x,y) ((x)<(y)?(x):(y)) -#define Max(x,y) ((x)>(y)?(x):(y)) -#define Abs(x) ((x)>(0)?(x):-(x)) -// CHECK: static void CudaCheckCore(hipError_t code, const char *file, int line) { -static void CudaCheckCore(cudaError_t code, const char *file, int line) { - // CHECK: if (code != hipSuccess) { - if (code != cudaSuccess) { - // CHECK: fprintf(stderr,"Cuda Error %d : %s %s %d\n", code, hipGetErrorString(code), file, line); - fprintf(stderr,"Cuda Error %d : %s %s %d\n", code, cudaGetErrorString(code), file, line); - exit(code); - } -} - -#define CudaCheck( test ) { CudaCheckCore((test), __FILE__, __LINE__); } -// CHECK: #define CudaCheckAfterCall() { CudaCheckCore((hipGetLastError()), __FILE__, __LINE__); } -#define CudaCheckAfterCall() { CudaCheckCore((cudaGetLastError()), __FILE__, __LINE__); } - -// CHECK: static const char * GetErrorString(hipsparseStatus_t error) { -static const char * GetErrorString(cusparseStatus_t error) { - switch (error) { - // CHECK: case HIPSPARSE_STATUS_SUCCESS: - case CUSPARSE_STATUS_SUCCESS: - return "The operation completed successfully."; - // CHECK: case HIPSPARSE_STATUS_NOT_INITIALIZED: - case CUSPARSE_STATUS_NOT_INITIALIZED: - return "The cuSPARSE library was not initialized. This is usually caused by the lack of a prior call, an error in the CUDA Runtime API called by the cuSPARSE routine, or an error in the hardware setup.\n" \ - "To correct: call cusparseCreate() prior to the function call; and check that the hardware, an appropriate version of the driver, and the cuSPARSE library are correctly installed."; - // CHECK: case HIPSPARSE_STATUS_ALLOC_FAILED: - case CUSPARSE_STATUS_ALLOC_FAILED: - return "Resource allocation failed inside the cuSPARSE library. This is usually caused by a cudaMalloc() failure.\n"\ - "To correct: prior to the function call, deallocate previously allocated memory as much as possible."; - // CHECK: case HIPSPARSE_STATUS_INVALID_VALUE: - case CUSPARSE_STATUS_INVALID_VALUE: - return "An unsupported value or parameter was passed to the function (a negative vector size, for example).\n"\ - "To correct: ensure that all the parameters being passed have valid values."; - // CHECK: case HIPSPARSE_STATUS_ARCH_MISMATCH: - case CUSPARSE_STATUS_ARCH_MISMATCH: - return "The function requires a feature absent from the device architecture; usually caused by the lack of support for atomic operations or double precision.\n"\ - "To correct: compile and run the application on a device with appropriate compute capability, which is 1.1 for 32-bit atomic operations and 1.3 for double precision."; - // CHECK: case HIPSPARSE_STATUS_MAPPING_ERROR: - case CUSPARSE_STATUS_MAPPING_ERROR: - return "An access to GPU memory space failed, which is usually caused by a failure to bind a texture.\n"\ - "To correct: prior to the function call, unbind any previously bound textures."; - // CHECK: case HIPSPARSE_STATUS_EXECUTION_FAILED: - case CUSPARSE_STATUS_EXECUTION_FAILED: - return "The GPU program failed to execute. This is often caused by a launch failure of the kernel on the GPU, which can be caused by multiple reasons.\n"\ - "To correct: check that the hardware, an appropriate version of the driver, and the cuSPARSE library are correctly installed."; - // CHECK: case HIPSPARSE_STATUS_INTERNAL_ERROR: - case CUSPARSE_STATUS_INTERNAL_ERROR: - return "An internal cuSPARSE operation failed. This error is usually caused by a cudaMemcpyAsync() failure.\n"\ - "To correct: check that the hardware, an appropriate version of the driver, and the cuSPARSE library are correctly installed. Also, check that the memory passed as a parameter to the routine is not being deallocated prior to the routine’s completion."; - // CHECK: case HIPSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED: - // CHECK: "To correct: check that the fields in hipsparseMatDescr_t descrA were set correctly."; - case CUSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED: - return "The matrix type is not supported by this function. This is usually caused by passing an invalid matrix descriptor to the function.\n"\ - "To correct: check that the fields in cusparseMatDescr_t descrA were set correctly."; - } - return ""; -} - -// CHECK: static void CudaSparseCheckCore(hipsparseStatus_t code, const char *file, int line) { -static void CudaSparseCheckCore(cusparseStatus_t code, const char *file, int line) { - // CHECK: if (code != HIPSPARSE_STATUS_SUCCESS) { - if (code != CUSPARSE_STATUS_SUCCESS) { - fprintf(stderr,"Cuda Error %d : %s %s %d\n", code, GetErrorString(code), file, line); - exit(code); - } -} - -#define CudaSparseCheck( test ) { CudaSparseCheckCore((test), __FILE__, __LINE__); } - -// Alloc and copy -template -ObjectType* allocAndCopy(const ObjectType src[], const int size) { - ObjectType* dest = NULL; - // CHECK: CudaCheck( hipMalloc(&dest,size*sizeof(ObjectType)) ); - CudaCheck( cudaMalloc(&dest,size*sizeof(ObjectType)) ); - // CHECK: CudaCheck( hipMemcpy(dest, src, size*sizeof(ObjectType), hipMemcpyHostToDevice ) ); - CudaCheck( cudaMemcpy(dest, src, size*sizeof(ObjectType), cudaMemcpyHostToDevice ) ); - return dest; -} - -template -ObjectType* alloc(const int size) { - ObjectType* dest = NULL; - // CHECK: CudaCheck( hipMalloc(&dest,size*sizeof(ObjectType)) ); - CudaCheck( cudaMalloc(&dest,size*sizeof(ObjectType)) ); - return dest; -} - -template -ObjectType* allocAndCopyPart(const ObjectType src[], const int size, const int allocSize) { - ObjectType* dest = NULL; - assert(size <= allocSize); - // CHECK: CudaCheck( hipMalloc(&dest,allocSize*sizeof(ObjectType)) ); - // CHECK: CudaCheck( hipMemcpy(dest, src, size*sizeof(ObjectType), hipMemcpyHostToDevice ) ); - // CHECK: CudaCheck( hipMemset(&dest[size],0,(allocSize-size)*sizeof(ObjectType)) ); - CudaCheck( cudaMalloc(&dest,allocSize*sizeof(ObjectType)) ); - CudaCheck( cudaMemcpy(dest, src, size*sizeof(ObjectType), cudaMemcpyHostToDevice ) ); - CudaCheck( cudaMemset(&dest[size],0,(allocSize-size)*sizeof(ObjectType)) ); - return dest; -} - -// COO part -#include - -struct Ijv { - int i, j; - double v; -}; - -bool IjvComp(const Ijv& v1, const Ijv& v2) { - return v1.i < v2.i || (v1.i == v2.i && v1.j < v2.j); -} - -struct COOArrays { - int m; - int nnz; - double *val;/*values(NNZ)*/ - int *rowind;/*i(NNZ)*/ - int *colind;/*j(NNZ)*/ - - COOArrays() { - val = NULL; - rowind = NULL; - colind = NULL; - } - - ~COOArrays() { - delete[] val; - delete[] rowind; - delete[] colind; - } - - void sortToRowMajor() { - Ijv* ijvs = new Ijv[nnz]; - for(int idxCopy = 0 ; idxCopy < nnz ; ++idxCopy){ - ijvs[idxCopy].i = rowind[idxCopy]; - ijvs[idxCopy].j = colind[idxCopy]; - ijvs[idxCopy].v = val[idxCopy]; - } - std::sort(ijvs, ijvs+nnz, IjvComp); - for(int idxCopy = 0 ; idxCopy < nnz ; ++idxCopy){ - rowind[idxCopy] = ijvs[idxCopy].i; - colind[idxCopy] = ijvs[idxCopy].j; - val[idxCopy] = ijvs[idxCopy].v; - } - delete[] ijvs; - } -}; - -void compute_COO(COOArrays& coo, double *x , double *y ) { - for(int idxVal = 0 ; idxVal < coo.nnz ; ++idxVal){ - y[coo.rowind[idxVal]] += x[coo.colind[idxVal]] * coo.val[idxVal]; - } -} - -// COO part -struct CRSArrays { - int m; //< the dim of the matrix - int nnz;//< the number of nnz (== ia[m]) - double *cu_csrValA; //< the values (of size NNZ) - int *cu_csrRowPtrA;//< the usual rowptr (of size m+1) - int *cu_csrColIndA;//< the colidx of each NNZ (of size nnz) - // CHECK: hipStream_t streamId; - // CHECK: hipsparseHandle_t cusparseHandle; - cudaStream_t streamId; - cusparseHandle_t cusparseHandle; - - CRSArrays() { - cu_csrValA = NULL; - cu_csrRowPtrA = NULL; - cu_csrColIndA = NULL; - // Create sparse handle (needed to call sparse functions - streamId = 0; - // CHECK-NOT: hipsparseHandle = 0; - cusparseHandle = 0; - // CHECK: CudaSparseCheck(hipsparseCreate(&cusparseHandle)); - // CHECK: CudaSparseCheck(hipsparseSetStream(cusparseHandle, streamId)); - CudaSparseCheck(cusparseCreate(&cusparseHandle)); - CudaSparseCheck(cusparseSetStream(cusparseHandle, streamId)); - } - - ~CRSArrays() { - // CHECK: CudaCheck(hipFree(cu_csrValA)); - // CHECK: CudaCheck(hipFree(cu_csrRowPtrA)); - // CHECK: CudaCheck(hipFree(cu_csrColIndA)); - CudaCheck(cudaFree(cu_csrValA)); - CudaCheck(cudaFree(cu_csrRowPtrA)); - CudaCheck(cudaFree(cu_csrColIndA)); - // Destroy sparse handle - // CHECK: CudaSparseCheck(hipsparseDestroy(cusparseHandle)); - CudaSparseCheck(cusparseDestroy(cusparseHandle)); - } -}; - -void COO_to_CRS(COOArrays& coo, CRSArrays* crs) { - // We need COO to be sorted by row (and column) - coo.sortToRowMajor(); - crs->m = coo.m; - crs->nnz = coo.nnz; - // Convert COO to CSR (it is just for the rows idx) - crs->cu_csrRowPtrA = alloc(coo.m+1); - { - int* cu_cooRowIndA = allocAndCopy(coo.rowind, coo.nnz); - // CHECK: CudaSparseCheck(hipsparseXcoo2csr(crs->cusparseHandle, cu_cooRowIndA, - // CHECK: coo.nnz, coo.m, crs->cu_csrRowPtrA, HIPSPARSE_INDEX_BASE_ZERO)); - CudaSparseCheck(cusparseXcoo2csr(crs->cusparseHandle, cu_cooRowIndA, - coo.nnz, coo.m, crs->cu_csrRowPtrA, CUSPARSE_INDEX_BASE_ZERO)); - // CHECK: CudaCheck(hipFree(cu_cooRowIndA)); - CudaCheck(cudaFree(cu_cooRowIndA)); - } - // Copy cols idx and values that are unchanged - crs->cu_csrValA = allocAndCopy(coo.val, coo.nnz); - crs->cu_csrColIndA = allocAndCopy(coo.colind, coo.nnz); -} - -double compute_CRS( CRSArrays& crs, double *x , double *y) { - // For blas 2 gemv y = alpha.x.A + Beta.y - const double alpha = 1.0; - const double beta = 0.0; - // Copy input - double* cu_x = allocAndCopy(x, crs.m); - double* cu_y = allocAndCopy(y, crs.m); - // Init matrix properties - // CHECK: hipsparseMatDescr_t descr = 0; - cusparseMatDescr_t descr = 0; - // CHECK: CudaSparseCheck(hipsparseCreateMatDescr(&descr)); - CudaSparseCheck(cusparseCreateMatDescr(&descr)); - // CHECK: hipsparseSetMatType(descr,HIPSPARSE_MATRIX_TYPE_GENERAL); - cusparseSetMatType(descr,CUSPARSE_MATRIX_TYPE_GENERAL); - // CHECK: hipsparseSetMatIndexBase(descr,HIPSPARSE_INDEX_BASE_ZERO); - cusparseSetMatIndexBase(descr,CUSPARSE_INDEX_BASE_ZERO); - // Compute gemv - float gemvComputeTume = 0; - { - // CHECK: hipEvent_t startTime, stopTime; - // CHECK: hipEventCreate(&startTime); - // CHECK: hipEventCreate(&stopTime); - // CHECK: hipEventRecord(startTime, crs.streamId); - cudaEvent_t startTime, stopTime; - cudaEventCreate(&startTime); - cudaEventCreate(&stopTime); - cudaEventRecord(startTime, crs.streamId); - // CHECK: CudaSparseCheck(hipsparseDcsrmv(crs.cusparseHandle, HIPSPARSE_OPERATION_NON_TRANSPOSE, - CudaSparseCheck(cusparseDcsrmv(crs.cusparseHandle, CUSPARSE_OPERATION_NON_TRANSPOSE, - crs.m, crs.m, crs.nnz, &alpha, - descr, crs.cu_csrValA, crs.cu_csrRowPtrA, - crs.cu_csrColIndA, cu_x, &beta, cu_y)); - // CHECK: hipEventRecord(stopTime, crs.streamId); - // CHECK: hipEventSynchronize(stopTime); - // CHECK: hipEventElapsedTime(&gemvComputeTume, startTime, stopTime); - cudaEventRecord(stopTime, crs.streamId); - cudaEventSynchronize(stopTime); - cudaEventElapsedTime(&gemvComputeTume, startTime, stopTime); - gemvComputeTume /=1000.0; - } - // Get back result - // CHECK: CudaCheck( hipMemcpy(y, cu_y, crs.m*sizeof(double), hipMemcpyDeviceToHost ) ); - CudaCheck( cudaMemcpy(y, cu_y, crs.m*sizeof(double), cudaMemcpyDeviceToHost ) ); - // Dealloc vectors - // CHECK: CudaCheck(hipFree(cu_x)); - // CHECK: CudaCheck(hipFree(cu_y)); - CudaCheck(cudaFree(cu_x)); - CudaCheck(cudaFree(cu_y)); - return gemvComputeTume; -} - -// BCSR part -struct BCRSArrays { - int m; - int nnz; - int nbBlocks; - int nbBlockRow; - int blockSize; - int* cu_bsrRowPtrC; - int* cu_bsrColIndC; - double* cu_bsrValC; - // CHECK: hipStream_t streamId; - cudaStream_t streamId; - // CHECK: hipsparseHandle_t cusparseHandle; - cusparseHandle_t cusparseHandle; - - BCRSArrays() { - cu_bsrRowPtrC = NULL; - cu_bsrColIndC = NULL; - cu_bsrValC = NULL; - // Create sparse handle (needed to call sparse functions - streamId = 0; - // CHECK: CudaSparseCheck(hipsparseCreate(&cusparseHandle)); - // CHECK: CudaSparseCheck(hipsparseSetStream(cusparseHandle, streamId)); - CudaSparseCheck(cusparseCreate(&cusparseHandle)); - CudaSparseCheck(cusparseSetStream(cusparseHandle, streamId)); - } - - ~BCRSArrays() { - // CHECK: CudaCheck(hipFree(cu_bsrRowPtrC)); - // CHECK: CudaCheck(hipFree(cu_bsrColIndC)); - // CHECK: CudaCheck(hipFree(cu_bsrValC)); - CudaCheck(cudaFree(cu_bsrRowPtrC)); - CudaCheck(cudaFree(cu_bsrColIndC)); - CudaCheck(cudaFree(cu_bsrValC)); - // Destroy sparse handle - // CHECK: CudaSparseCheck(hipsparseDestroy(cusparseHandle)); - CudaSparseCheck(cusparseDestroy(cusparseHandle)); - } -}; - -void CRS_to_BCRS(CRSArrays& csr, BCRSArrays* bcrs, const int blockSize) { - bcrs->m = csr.m; - bcrs->nnz = csr.nnz; - bcrs->blockSize = blockSize; - bcrs->nbBlockRow = (csr.m + blockSize-1)/blockSize; - // CHECK: hipMalloc((void**)&bcrs->cu_bsrRowPtrC, sizeof(int) *(bcrs->nbBlockRow+1)); - cudaMalloc((void**)&bcrs->cu_bsrRowPtrC, sizeof(int) *(bcrs->nbBlockRow+1)); - // CHECK: hipsparseMatDescr_t descr = 0; - cusparseMatDescr_t descr = 0; - // CHECK: CudaSparseCheck(hipsparseCreateMatDescr(&descr)); - // CHECK: hipsparseSetMatType(descr,HIPSPARSE_MATRIX_TYPE_GENERAL); - // CHECK: hipsparseSetMatIndexBase(descr,HIPSPARSE_INDEX_BASE_ZERO); - CudaSparseCheck(cusparseCreateMatDescr(&descr)); - cusparseSetMatType(descr,CUSPARSE_MATRIX_TYPE_GENERAL); - cusparseSetMatIndexBase(descr,CUSPARSE_INDEX_BASE_ZERO); - int nbNnzBlocks; - // NOTE: cusparseXcsr2bsrNnz and CUSPARSE_DIRECTION_COLUMN (of type cusparseDirection_t) are yet unsupported by HIP - // CHECK-NOT: hipsparseXcsr2bsrNnz(bcrs->cusparseHandle, HIPSPARSE_DIRECTION_COLUMN, csr.m, csr.m, descr, csr.cu_csrRowPtrA, csr.cu_csrColIndA, - cusparseXcsr2bsrNnz(bcrs->cusparseHandle, CUSPARSE_DIRECTION_COLUMN, csr.m, csr.m, descr, csr.cu_csrRowPtrA, csr.cu_csrColIndA, - blockSize, descr, bcrs->cu_bsrRowPtrC, &nbNnzBlocks); - { - int firstBlockIdx, lastBlockIdx; - // CHECK: hipMemcpy(&lastBlockIdx, bcrs->cu_bsrRowPtrC+bcrs->nbBlockRow, sizeof(int), hipMemcpyDeviceToHost); - // CHECK: hipMemcpy(&firstBlockIdx, bcrs->cu_bsrRowPtrC, sizeof(int), hipMemcpyDeviceToHost); - cudaMemcpy(&lastBlockIdx, bcrs->cu_bsrRowPtrC+bcrs->nbBlockRow, sizeof(int), cudaMemcpyDeviceToHost); - cudaMemcpy(&firstBlockIdx, bcrs->cu_bsrRowPtrC, sizeof(int), cudaMemcpyDeviceToHost); - assert(firstBlockIdx == 0); // we are in base 0 - assert(nbNnzBlocks == lastBlockIdx - firstBlockIdx); - } - bcrs->nbBlocks = nbNnzBlocks; - // CHECK: CudaCheck(hipMalloc((void**)&bcrs->cu_bsrColIndC, sizeof(int)*nbNnzBlocks)); - // CHECK: CudaCheck(hipMalloc((void**)&bcrs->cu_bsrValC, sizeof(double)*(blockSize*blockSize)*nbNnzBlocks)); - CudaCheck(cudaMalloc((void**)&bcrs->cu_bsrColIndC, sizeof(int)*nbNnzBlocks)); - CudaCheck(cudaMalloc((void**)&bcrs->cu_bsrValC, sizeof(double)*(blockSize*blockSize)*nbNnzBlocks)); - // NOTE: cusparseDcsr2bsr and CUSPARSE_DIRECTION_COLUMN (of type cusparseDirection_t) are yet unsupported by HIP - // CHECK-NOT: hipsparseDcsr2bsr(bcrs->cusparseHandle, HIPSPARSE_DIRECTION_COLUMN, - cusparseDcsr2bsr(bcrs->cusparseHandle, CUSPARSE_DIRECTION_COLUMN, - csr.m, csr.m, descr, csr.cu_csrValA, csr.cu_csrRowPtrA, csr.cu_csrColIndA, blockSize, descr, bcrs->cu_bsrValC, bcrs->cu_bsrRowPtrC, bcrs->cu_bsrColIndC); -} - -double compute_BSR(BCRSArrays& bcsr, double *x , double *y){ - // For blas 2 gemv y = alpha.x.A + Beta.y - const double alpha = 1.0; - const double beta = 0.0; - // Copy input - const int sizeMultipleBlockSize = ((bcsr.m+bcsr.blockSize-1)/bcsr.blockSize)*bcsr.blockSize; - double* cu_x = allocAndCopyPart(x, bcsr.m, sizeMultipleBlockSize); - double* cu_y = allocAndCopyPart(y, bcsr.m, sizeMultipleBlockSize); - // Init matrix properties - // CHECK: hipsparseMatDescr_t descr = 0; - // CHECK: CudaSparseCheck(hipsparseCreateMatDescr(&descr)); - // CHECK: hipsparseSetMatType(descr,HIPSPARSE_MATRIX_TYPE_GENERAL); - // CHECK: hipsparseSetMatIndexBase(descr,HIPSPARSE_INDEX_BASE_ZERO); - cusparseMatDescr_t descr = 0; - CudaSparseCheck(cusparseCreateMatDescr(&descr)); - cusparseSetMatType(descr,CUSPARSE_MATRIX_TYPE_GENERAL); - cusparseSetMatIndexBase(descr,CUSPARSE_INDEX_BASE_ZERO); - // Compute gemv - float gemvComputeTume = 0; - { - // CHECK: hipEvent_t startTime, stopTime; - // CHECK: hipEventCreate(&startTime); - // CHECK: hipEventCreate(&stopTime); - // CHECK: hipEventRecord(startTime, bcsr.streamId); - cudaEvent_t startTime, stopTime; - cudaEventCreate(&startTime); - cudaEventCreate(&stopTime); - cudaEventRecord(startTime, bcsr.streamId); - // CHECK: cusparseDbsrmv(bcsr.cusparseHandle, HIPSPARSE_DIRECTION_COLUMN, HIPSPARSE_OPERATION_NON_TRANSPOSE, - cusparseDbsrmv(bcsr.cusparseHandle, CUSPARSE_DIRECTION_COLUMN, CUSPARSE_OPERATION_NON_TRANSPOSE, - bcsr.nbBlockRow, bcsr.m, bcsr.nbBlocks, &alpha, descr, - bcsr.cu_bsrValC, bcsr.cu_bsrRowPtrC, bcsr.cu_bsrColIndC, bcsr.blockSize, - cu_x, &beta, cu_y); - // CHECK: hipEventRecord(stopTime, bcsr.streamId); - // CHECK: hipEventSynchronize(stopTime); - // CHECK: hipEventElapsedTime(&gemvComputeTume, startTime, stopTime); - cudaEventRecord(stopTime, bcsr.streamId); - cudaEventSynchronize(stopTime); - cudaEventElapsedTime(&gemvComputeTume, startTime, stopTime); - gemvComputeTume /=1000.0; - } - // Get back result - // CHECK: CudaCheck( hipMemcpy(y, cu_y, bcsr.m*sizeof(double), hipMemcpyDeviceToHost ) ); - CudaCheck( cudaMemcpy(y, cu_y, bcsr.m*sizeof(double), cudaMemcpyDeviceToHost ) ); - // Dealloc vectors - // CHECK: CudaCheck(hipFree(cu_x)); - // CHECK: CudaCheck(hipFree(cu_y)); - CudaCheck(cudaFree(cu_x)); - CudaCheck(cudaFree(cu_y)); - return gemvComputeTume; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/namespace/ns_kernel_launch.cu b/hipamd/tests/hipify-clang/unit_tests/namespace/ns_kernel_launch.cu deleted file mode 100644 index 0d9fa1cf3f..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/namespace/ns_kernel_launch.cu +++ /dev/null @@ -1,28 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -// CHECK: #include -#include - -__global__ void test_0() { - int a = 10; -} - -namespace first { - __global__ void test_1() { - int b = 20; - } - namespace second { - __global__ void test_2() { - int c = 30; - } - } -} - -int main() { - // CHECK: hipLaunchKernelGGL(::test_0, dim3(1), dim3(1), 0, 0); - ::test_0<<<1, 1>>>(); - // CHECK: hipLaunchKernelGGL(first::test_1, dim3(1), dim3(1), 0, 0); - first::test_1<<<1, 1>>>(); - // CHECK: hipLaunchKernelGGL(first::second::test_2, dim3(1), dim3(1), 0, 0); - first::second::test_2<<<1, 1>>>(); - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/pp/pp_if_else_conditionals.cu b/hipamd/tests/hipify-clang/unit_tests/pp/pp_if_else_conditionals.cu deleted file mode 100644 index 51bfeb6017..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/pp/pp_if_else_conditionals.cu +++ /dev/null @@ -1,30 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args "--skip-excluded-preprocessor-conditional-blocks" %clang_args -// CHECK: #include - -#include - -__global__ void axpy_kernel(float a, float* x, float* y) { - y[threadIdx.x] = a * x[threadIdx.x]; -} - -void axpy(float a, float* x, float* y) { - -#ifdef SOME_MACRO - // CHECK: axpy_kernel <<<1, 1>>> (a, y, x); - axpy_kernel <<<1, 1>>> (a, y, x); -#endif - -#ifndef SOME_MACRO - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(2), 0, 0, a, y, x); - axpy_kernel <<<1, 2>>> (a, y, x); -#endif - -#ifdef SOME_MACRO - // CHECK: axpy_kernel <<<1, 3>>> (a, y, x); - axpy_kernel <<<1, 3>>> (a, y, x); -#else - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(4), 0, 0, a, x, y); - axpy_kernel <<<1, 4>>> (a, x, y); -#endif - -} \ No newline at end of file diff --git a/hipamd/tests/hipify-clang/unit_tests/pp/pp_if_else_conditionals_01.cu b/hipamd/tests/hipify-clang/unit_tests/pp/pp_if_else_conditionals_01.cu deleted file mode 100644 index 310d896054..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/pp/pp_if_else_conditionals_01.cu +++ /dev/null @@ -1,52 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args "--skip-excluded-preprocessor-conditional-blocks" %clang_args -// CHECK: #include - -__global__ void axpy_kernel(float a, float* x, float* y) { - y[threadIdx.x] = a * x[threadIdx.x]; -} - -void axpy(float a, float* x, float* y) { -float* y_new = nullptr; -#ifdef SOME_MACRO - y_new = x; - // CHECK: axpy_kernel <<<1, 1>>> (a, y_new, x); - axpy_kernel <<<1, 1>>> (a, y_new, x); -#endif - -#ifndef SOME_MACRO - y_new = y; - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(2), 0, 0, a, y_new, x); - axpy_kernel <<<1, 2>>> (a, y_new, x); -#endif - -#ifdef SOME_MACRO - // CHECK: axpy_kernel <<<1, 3>>> (a, y, x); - axpy_kernel <<<1, 3>>> (a, y, x); -#else - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(4), 0, 0, a, x, y); - axpy_kernel <<<1, 4>>> (a, x, y); -#endif - -#ifdef SOME_MACRO - // CHECK: axpy_kernel <<<1, 5>>> (a, y, x); - axpy_kernel <<<1, 5>>> (a, y, x); -#elif defined SOME_MACRO_1 - // CHECK: axpy_kernel <<<1, 6>>> (a, x, y); - axpy_kernel <<<1, 6>>> (a, x, y); -#else - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(7), 0, 0, a, x, y); - axpy_kernel <<<1, 7>>> (a, x, y); -#endif - -#ifndef SOME_MACRO - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(8), 0, 0, a, y, x); - axpy_kernel <<<1, 8>>> (a, y, x); -#elif !defined(SOME_MACRO_1) - // CHECK: axpy_kernel <<<1, 9>>> (a, x, y); - axpy_kernel <<<1, 9>>> (a, x, y); -#else - // CHECK: axpy_kernel <<<1, 10>>> (a, x, y); - axpy_kernel <<<1, 10>>> (a, x, y); -#endif - -} \ No newline at end of file diff --git a/hipamd/tests/hipify-clang/unit_tests/pp/pp_if_else_conditionals_01_LLVM_10.cu b/hipamd/tests/hipify-clang/unit_tests/pp/pp_if_else_conditionals_01_LLVM_10.cu deleted file mode 100644 index a5c7c41745..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/pp/pp_if_else_conditionals_01_LLVM_10.cu +++ /dev/null @@ -1,52 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -// CHECK: #include - -__global__ void axpy_kernel(float a, float* x, float* y) { - y[threadIdx.x] = a * x[threadIdx.x]; -} - -void axpy(float a, float* x, float* y) { -float* y_new = nullptr; -#ifdef SOME_MACRO - y_new = x; - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(1), 0, 0, a, y_new, x); - axpy_kernel <<<1, 1>>> (a, y_new, x); -#endif - -#ifndef SOME_MACRO - y_new = y; - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(2), 0, 0, a, y_new, x); - axpy_kernel <<<1, 2>>> (a, y_new, x); -#endif - -#ifdef SOME_MACRO - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(3), 0, 0, a, y, x); - axpy_kernel <<<1, 3>>> (a, y, x); -#else - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(4), 0, 0, a, x, y); - axpy_kernel <<<1, 4>>> (a, x, y); -#endif - -#ifdef SOME_MACRO - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(5), 0, 0, a, y, x); - axpy_kernel <<<1, 5>>> (a, y, x); -#elif defined SOME_MACRO_1 - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(6), 0, 0, a, x, y); - axpy_kernel <<<1, 6>>> (a, x, y); -#else - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(7), 0, 0, a, x, y); - axpy_kernel <<<1, 7>>> (a, x, y); -#endif - -#ifndef SOME_MACRO - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(8), 0, 0, a, y, x); - axpy_kernel <<<1, 8>>> (a, y, x); -#elif !defined(SOME_MACRO_1) - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(9), 0, 0, a, x, y); - axpy_kernel <<<1, 9>>> (a, x, y); -#else - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(10), 0, 0, a, x, y); - axpy_kernel <<<1, 10>>> (a, x, y); -#endif - -} \ No newline at end of file diff --git a/hipamd/tests/hipify-clang/unit_tests/pp/pp_if_else_conditionals_LLVM_10.cu b/hipamd/tests/hipify-clang/unit_tests/pp/pp_if_else_conditionals_LLVM_10.cu deleted file mode 100644 index 06ce48ebef..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/pp/pp_if_else_conditionals_LLVM_10.cu +++ /dev/null @@ -1,30 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -// CHECK: #include - -#include - -__global__ void axpy_kernel(float a, float* x, float* y) { - y[threadIdx.x] = a * x[threadIdx.x]; -} - -void axpy(float a, float* x, float* y) { - -#ifdef SOME_MACRO - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(1), 0, 0, a, y, x); - axpy_kernel <<<1, 1>>> (a, y, x); -#endif - -#ifndef SOME_MACRO - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(2), 0, 0, a, y, x); - axpy_kernel <<<1, 2>>> (a, y, x); -#endif - -#ifdef SOME_MACRO - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(3), 0, 0, a, y, x); - axpy_kernel <<<1, 3>>> (a, y, x); -#else - // CHECK: hipLaunchKernelGGL(axpy_kernel, dim3(1), dim3(4), 0, 0, a, x, y); - axpy_kernel <<<1, 4>>> (a, x, y); -#endif - -} \ No newline at end of file diff --git a/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/0_MatrixTranspose/MatrixTranspose.cpp b/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/0_MatrixTranspose/MatrixTranspose.cpp deleted file mode 100644 index 2bf196c0cd..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/0_MatrixTranspose/MatrixTranspose.cpp +++ /dev/null @@ -1,130 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -/* -Copyright (c) 2015-present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include - -// CHECK: #include -#include - -#define WIDTH 1024 - -#define NUM (WIDTH * WIDTH) - -#define THREADS_PER_BLOCK_X 4 -#define THREADS_PER_BLOCK_Y 4 -#define THREADS_PER_BLOCK_Z 1 - -// Device (Kernel) function, it must be void -__global__ void matrixTranspose(float* out, float* in, const int width) { - int x = blockDim.x * blockIdx.x + threadIdx.x; - int y = blockDim.y * blockIdx.y + threadIdx.y; - out[y * width + x] = in[x * width + y]; -} - -// CPU implementation of matrix transpose -void matrixTransposeCPUReference(float* output, float* input, const unsigned int width) { - for (unsigned int j = 0; j < width; j++) { - for (unsigned int i = 0; i < width; i++) { - output[i * width + j] = input[j * width + i]; - } - } -} - -int main() { - float* Matrix; - float* TransposeMatrix; - float* cpuTransposeMatrix; - - float* gpuMatrix; - float* gpuTransposeMatrix; - - // CHECK: hipDeviceProp_t devProp; - cudaDeviceProp devProp; - // CHECK: hipGetDeviceProperties(&devProp, 0); - cudaGetDeviceProperties(&devProp, 0); - - std::cout << "Device name " << devProp.name << std::endl; - - int i; - int errors; - - Matrix = (float*)malloc(NUM * sizeof(float)); - TransposeMatrix = (float*)malloc(NUM * sizeof(float)); - cpuTransposeMatrix = (float*)malloc(NUM * sizeof(float)); - - // initialize the input data - for (i = 0; i < NUM; i++) { - Matrix[i] = (float)i * 10.0f; - } - - // allocate the memory on the device side - // CHECK: hipMalloc((void**)&gpuMatrix, NUM * sizeof(float)); - cudaMalloc((void**)&gpuMatrix, NUM * sizeof(float)); - // CHECK: hipMalloc((void**)&gpuTransposeMatrix, NUM * sizeof(float)); - cudaMalloc((void**)&gpuTransposeMatrix, NUM * sizeof(float)); - - // Memory transfer from host to device - // CHECK: hipMemcpy(gpuMatrix, Matrix, NUM * sizeof(float), hipMemcpyHostToDevice); - cudaMemcpy(gpuMatrix, Matrix, NUM * sizeof(float), cudaMemcpyHostToDevice); - - // Lauching kernel from host - - dim3 dimGrid(WIDTH / THREADS_PER_BLOCK_X, WIDTH / THREADS_PER_BLOCK_Y); - dim3 dimBlock(THREADS_PER_BLOCK_X, THREADS_PER_BLOCK_Y); - // CHECK: hipLaunchKernelGGL(matrixTranspose, dim3(dimGrid), dim3(dimBlock), 0, 0, gpuTransposeMatrix, gpuMatrix, WIDTH); - matrixTranspose <<>>(gpuTransposeMatrix, gpuMatrix, WIDTH); - - // Memory transfer from device to host - // CHECK: hipMemcpy(TransposeMatrix, gpuTransposeMatrix, NUM * sizeof(float), hipMemcpyDeviceToHost); - cudaMemcpy(TransposeMatrix, gpuTransposeMatrix, NUM * sizeof(float), cudaMemcpyDeviceToHost); - - // CPU MatrixTranspose computation - matrixTransposeCPUReference(cpuTransposeMatrix, Matrix, WIDTH); - - // verify the results - errors = 0; - double eps = 1.0E-6; - for (i = 0; i < NUM; i++) { - if (std::abs(TransposeMatrix[i] - cpuTransposeMatrix[i]) > eps) { - errors++; - } - } - if (errors != 0) { - printf("FAILED: %d errors\n", errors); - } else { - printf("PASSED!\n"); - } - - // free the resources on device side - // CHECK: hipFree(gpuMatrix); - cudaFree(gpuMatrix); - // CHECK: hipFree(gpuTransposeMatrix); - cudaFree(gpuTransposeMatrix); - - // free the resources on host side - free(Matrix); - free(TransposeMatrix); - free(cpuTransposeMatrix); - - return errors; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/11_texture_driver/tex2dKernel.cpp b/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/11_texture_driver/tex2dKernel.cpp deleted file mode 100644 index d5dffd0b09..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/11_texture_driver/tex2dKernel.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -/* -Copyright (c) 2015-present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -// CHECK: #include -#include -// CHECK-NOT: #include -#include - -// CHECK: extern texture tex; -extern texture tex; - -extern "C" __global__ void tex2dKernel(float* outputData, int width, int height) { - int x = blockDim.x * blockIdx.x + threadIdx.x; - int y = blockDim.y * blockIdx.y + threadIdx.y; - outputData[y * width + x] = tex2D(tex, x, y); -} diff --git a/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/11_texture_driver/texture2dDrv.cpp b/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/11_texture_driver/texture2dDrv.cpp deleted file mode 100644 index e7953dc862..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/11_texture_driver/texture2dDrv.cpp +++ /dev/null @@ -1,169 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -/* -Copyright (c) 2015-present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -// CHECK: #include -#include -#include -#include -#include - -#define fileName "tex2dKernel.code" -// CHECK: texture tex; -texture tex; -bool testResult = false; - -// CHECK: hipError_t status = cmd; -// CHECK: if (status != hipSuccess) { -// CHECK: std::cout << "error: #" << status << " (" << hipGetErrorString(status) -#define CUDACHECK(cmd) \ - { \ - cudaError_t status = cmd; \ - if (status != cudaSuccess) { \ - std::cout << "error: #" << status << " (" << cudaGetErrorString(status) \ - << ") at line:" << __LINE__ << ": " << #cmd << std::endl; \ - abort(); \ - } \ - } - -bool runTest(int argc, char** argv) { - unsigned int width = 256; - unsigned int height = 256; - unsigned int size = width * height * sizeof(float); - float* hData = (float*)malloc(size); - memset(hData, 0, size); - for (int i = 0; i < height; i++) { - for (int j = 0; j < width; j++) { - hData[i * width + j] = i * width + j; - } - } - // CHECK: hipModule_t Module; - CUmodule Module; - // CHECK: hipModuleLoad(&Module, fileName); - cuModuleLoad(&Module, fileName); - - // CHECK: hipArray * array; - CUarray array; - // CHECK: HIP_ARRAY_DESCRIPTOR desc; - CUDA_ARRAY_DESCRIPTOR desc; - // CHECK: desc.Format = HIP_AD_FORMAT_FLOAT; - desc.Format = CU_AD_FORMAT_FLOAT; - desc.NumChannels = 1; - desc.Width = width; - desc.Height = height; - // CHECK: hipArrayCreate(&array, &desc); - cuArrayCreate(&array, &desc); - - // CHECK: hip_Memcpy2D copyParam; - CUDA_MEMCPY2D copyParam; - memset(©Param, 0, sizeof(copyParam)); - // CHECK: copyParam.dstMemoryType = hipMemoryTypeArray; - copyParam.dstMemoryType = CU_MEMORYTYPE_ARRAY; - copyParam.dstArray = array; - // CHECK: copyParam.srcMemoryType = hipMemoryTypeHost; - copyParam.srcMemoryType = CU_MEMORYTYPE_HOST; - copyParam.srcHost = hData; - copyParam.srcPitch = width * sizeof(float); - copyParam.WidthInBytes = copyParam.srcPitch; - copyParam.Height = height; - // CHECK: hipMemcpyParam2D(©Param); - cuMemcpy2D(©Param); - - // CHECK: textureReference* texref; - CUtexref_st* texref; - // CHECK: hipModuleGetTexRef(&texref, Module, "tex"); - cuModuleGetTexRef(&texref, Module, "tex"); - // CHECK: hipTexRefSetAddressMode(texref, 0, hipAddressModeWrap); - cuTexRefSetAddressMode(texref, 0, CU_TR_ADDRESS_MODE_WRAP); - // CHECK: hipTexRefSetAddressMode(texref, 1, hipAddressModeWrap); - cuTexRefSetAddressMode(texref, 1, CU_TR_ADDRESS_MODE_WRAP); - // CHECK: hipTexRefSetFilterMode(texref, hipFilterModePoint); - cuTexRefSetFilterMode(texref, CU_TR_FILTER_MODE_POINT); - // CHECK: hipTexRefSetFlags(texref, 0); - cuTexRefSetFlags(texref, 0); - // CHECK: hipTexRefSetFormat(texref, HIP_AD_FORMAT_FLOAT, 1); - cuTexRefSetFormat(texref, CU_AD_FORMAT_FLOAT, 1); - // CHECK: hipTexRefSetArray(texref, array, HIP_TRSA_OVERRIDE_FORMAT); - cuTexRefSetArray(texref, array, CU_TRSA_OVERRIDE_FORMAT); - - float* dData = NULL; - // CHECK: hipMalloc((void**)&dData, size); - cudaMalloc((void**)&dData, size); - - struct { - void* _Ad; - unsigned int _Bd; - unsigned int _Cd; - } args; - args._Ad = (void*) dData; - args._Bd = width; - args._Cd = height; - - size_t sizeTemp = sizeof(args); - - // CHECK: void* config[] = {HIP_LAUNCH_PARAM_BUFFER_POINTER, &args, HIP_LAUNCH_PARAM_BUFFER_SIZE, - // CHECK: &sizeTemp, HIP_LAUNCH_PARAM_END}; - void* config[] = {CU_LAUNCH_PARAM_BUFFER_POINTER, &args, CU_LAUNCH_PARAM_BUFFER_SIZE, - &sizeTemp, CU_LAUNCH_PARAM_END}; - - // CHECK: hipFunction_t Function; - CUfunction Function; - // CHECK: hipModuleGetFunction(&Function, Module, "tex2dKernel"); - cuModuleGetFunction(&Function, Module, "tex2dKernel"); - - int temp1 = width / 16; - int temp2 = height / 16; - // CHECK: hipModuleLaunchKernel(Function, 16, 16, 1, temp1, temp2, 1, 0, 0, NULL, (void**)&config); - cuLaunchKernel(Function, 16, 16, 1, temp1, temp2, 1, 0, 0, NULL, (void**)&config); - // CHECK: hipDeviceSynchronize(); - cudaDeviceSynchronize(); - - float* hOutputData = (float*)malloc(size); - memset(hOutputData, 0, size); - // CHECK: hipMemcpy(hOutputData, dData, size, hipMemcpyDeviceToHost); - cudaMemcpy(hOutputData, dData, size, cudaMemcpyDeviceToHost); - - for (int i = 0; i < height; i++) { - for (int j = 0; j < width; j++) { - if (hData[i * width + j] != hOutputData[i * width + j]) { - printf("Difference [ %d %d ]:%f ----%f\n", i, j, hData[i * width + j], - hOutputData[i * width + j]); - testResult = false; - break; - } - } - } - // CHECK: hipFree(dData); - cudaFree(dData); - // CHECK: hipFreeArray(hipArray_t(array)); - cudaFreeArray(cudaArray_t(array)); - return true; -} - -int main(int argc, char** argv) { - // CHECK: hipInit(0); - cuInit(0); - testResult = runTest(argc, argv); - printf("%s ...\n", testResult ? "PASSED" : "FAILED"); - exit(testResult ? EXIT_SUCCESS : EXIT_FAILURE); - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/13_occupancy/occupancy.cpp b/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/13_occupancy/occupancy.cpp deleted file mode 100644 index d4277e133c..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/13_occupancy/occupancy.cpp +++ /dev/null @@ -1,198 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -/* -Copyright (c) 2015-present Advanced Micro Devices, Inc. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANNTY OF ANY KIND, EXPRESS OR -IMPLIED, INNCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANNY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER INN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR INN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -// CHECK: #include "hip/hip_runtime.h" -#include "cuda_runtime.h" -#include -#define NUM 1000000 - -// CHECK: if (status != hipSuccess) { -#define CUDA_CHECK(status) \ - if (status != cudaSuccess) { \ - std::cout << "Got Status: " << status << " at Line: " << __LINE__ << std::endl; \ - exit(0); \ - } - -// Device (Kernel) function -__global__ void multiply(float* C, float* A, float* B, int N) { - int tx = blockDim.x*blockIdx.x+threadIdx.x; - if (tx < N) { - C[tx] = A[tx] * B[tx]; - } -} - -// CPU implementation -void multiplyCPU(float* C, float* A, float* B, int N) { - for(unsigned int i=0; i>> (C, A, B, NUM); - - // Record the stop event - // CHECK: CUDA_CHECK(hipEventRecord(stop, NULL)); - CUDA_CHECK(cudaEventRecord(stop, NULL)); - // CHECK: CUDA_CHECK(hipEventSynchronize(stop)); - CUDA_CHECK(cudaEventSynchronize(stop)); - - // CHECK: CUDA_CHECK(hipEventElapsedTime(&eventMs, start, stop)); - CUDA_CHECK(cudaEventElapsedTime(&eventMs, start, stop)); - printf("kernel Execution time = %6.3fms\n", eventMs); - - // Calculate Occupancy - int numBlock = 0; - // CHECK: CUDA_CHECK(hipOccupancyMaxActiveBlocksPerMultiprocessor(&numBlock, multiply, blockSize, 0)); - CUDA_CHECK(cudaOccupancyMaxActiveBlocksPerMultiprocessor(&numBlock, multiply, blockSize, 0)); - - if(devProp.maxThreadsPerMultiProcessor) { - std::cout << "Theoretical Occupancy is " << (double)numBlock* blockSize/devProp.maxThreadsPerMultiProcessor * 100 << "%" << std::endl; - } -} - -int main() { - float *A, *B, *C0, *C1, *cpuC; - float *Ad, *Bd, *C0d, *C1d; - int errors=0; - - // Initialize the input data - A = (float*)malloc(NUM * sizeof(float)); - B = (float*)malloc(NUM * sizeof(float)); - C0 = (float*)malloc(NUM * sizeof(float)); - C1 = (float*)malloc(NUM * sizeof(float)); - cpuC = (float*)malloc(NUM * sizeof(float)); - - for(int i=0; i< NUM; i++) { - A[i] = i; - B[i] = i; - } - - // Allocate the memory on the device side - // CHECK: CUDA_CHECK(hipMalloc((void**)&Ad, NUM * sizeof(float))); - CUDA_CHECK(cudaMalloc((void**)&Ad, NUM * sizeof(float))); - // CHECK: CUDA_CHECK(hipMalloc((void**)&Bd, NUM * sizeof(float))); - CUDA_CHECK(cudaMalloc((void**)&Bd, NUM * sizeof(float))); - // CHECK: CUDA_CHECK(hipMalloc((void**)&C0d, NUM * sizeof(float))); - CUDA_CHECK(cudaMalloc((void**)&C0d, NUM * sizeof(float))); - // CHECK: CUDA_CHECK(hipMalloc((void**)&C1d, NUM * sizeof(float))); - CUDA_CHECK(cudaMalloc((void**)&C1d, NUM * sizeof(float))); - - // Memory transfer from host to device - // CHECK: CUDA_CHECK(hipMemcpy(Ad,A,NUM * sizeof(float), hipMemcpyHostToDevice)); - CUDA_CHECK(cudaMemcpy(Ad,A,NUM * sizeof(float), cudaMemcpyHostToDevice)); - // CHECK: CUDA_CHECK(hipMemcpy(Bd,B,NUM * sizeof(float), hipMemcpyHostToDevice)); - CUDA_CHECK(cudaMemcpy(Bd,B,NUM * sizeof(float), cudaMemcpyHostToDevice)); - - // Kernel launch with manual/default block size - launchKernel(C0d, Ad, Bd, 1); - - // Kernel launch with the block size suggested by cudaOccupancyMaxPotentialBlockSize - launchKernel(C1d, Ad, Bd, 0); - - // Memory transfer from device to host - // CHECK: CUDA_CHECK(hipMemcpy(C0,C0d, NUM * sizeof(float), hipMemcpyDeviceToHost)); - CUDA_CHECK(cudaMemcpy(C0,C0d, NUM * sizeof(float), cudaMemcpyDeviceToHost)); - // CHECK: CUDA_CHECK(hipMemcpy(C1,C1d, NUM * sizeof(float), hipMemcpyDeviceToHost)); - CUDA_CHECK(cudaMemcpy(C1,C1d, NUM * sizeof(float), cudaMemcpyDeviceToHost)); - - // CPU computation - multiplyCPU(cpuC, A, B, NUM); - - // Verify the results - double eps = 1.0E-6; - - for (int i = 0; i < NUM; i++) { - if (std::abs(C0[i] - cpuC[i]) > eps) { - errors++; - } - } - - if (errors != 0) { - printf("\nManual Test FAILED: %d errors\n", errors); - errors=0; - } else { - printf("\nManual Test PASSED!\n"); - } - - for (int i = 0; i < NUM; i++) { - if (std::abs(C1[i] - cpuC[i]) > eps) { - errors++; - } - } - - if (errors != 0) { - printf("\n Automatic Test FAILED: %d errors\n", errors); - } else { - printf("\nAutomatic Test PASSED!\n"); - } - - // CHECK: CUDA_CHECK(hipFree(Ad)); - CUDA_CHECK(cudaFree(Ad)); - // CHECK: CUDA_CHECK(hipFree(Bd)); - CUDA_CHECK(cudaFree(Bd)); - // CHECK: CUDA_CHECK(hipFree(C0d)); - CUDA_CHECK(cudaFree(C0d)); - // CHECK: CUDA_CHECK(hipFree(C1d)); - CUDA_CHECK(cudaFree(C1d)); - - free(A); - free(B); - free(C0); - free(C1); - free(cpuC); -} diff --git a/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/1_hipEvent/hipEvent.cpp b/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/1_hipEvent/hipEvent.cpp deleted file mode 100644 index 323be01ff1..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/1_hipEvent/hipEvent.cpp +++ /dev/null @@ -1,181 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -/* -Copyright (c) 2015-present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include - -// CHECK: #include -#include - -#define WIDTH 1024 - -#define NUM (WIDTH * WIDTH) - -#define THREADS_PER_BLOCK_X 4 -#define THREADS_PER_BLOCK_Y 4 -#define THREADS_PER_BLOCK_Z 1 - -// Device (Kernel) function, it must be void -__global__ void matrixTranspose(float* out, float* in, const int width) { - int x = blockDim.x * blockIdx.x + threadIdx.x; - int y = blockDim.y * blockIdx.y + threadIdx.y; - out[y * width + x] = in[x * width + y]; -} - -// CPU implementation of matrix transpose -void matrixTransposeCPUReference(float* output, float* input, const unsigned int width) { - for (unsigned int j = 0; j < width; j++) { - for (unsigned int i = 0; i < width; i++) { - output[i * width + j] = input[j * width + i]; - } - } -} - -int main() { - float* Matrix; - float* TransposeMatrix; - float* cpuTransposeMatrix; - - float* gpuMatrix; - float* gpuTransposeMatrix; - - // CHECK: hipDeviceProp_t devProp; - cudaDeviceProp devProp; - // CHECK: hipGetDeviceProperties(&devProp, 0); - cudaGetDeviceProperties(&devProp, 0); - - std::cout << "Device name " << devProp.name << std::endl; - - // CHECK: hipEvent_t start, stop; - cudaEvent_t start, stop; - // CHECK: hipEventCreate(&start); - cudaEventCreate(&start); - // CHECK: hipEventCreate(&stop); - cudaEventCreate(&stop); - float eventMs = 1.0f; - - int i; - int errors; - - Matrix = (float*)malloc(NUM * sizeof(float)); - TransposeMatrix = (float*)malloc(NUM * sizeof(float)); - cpuTransposeMatrix = (float*)malloc(NUM * sizeof(float)); - - // initialize the input data - for (i = 0; i < NUM; i++) { - Matrix[i] = (float)i * 10.0f; - } - - // allocate the memory on the device side - // CHECK: hipMalloc((void**)&gpuMatrix, NUM * sizeof(float)); - cudaMalloc((void**)&gpuMatrix, NUM * sizeof(float)); - // CHECK: hipMalloc((void**)&gpuTransposeMatrix, NUM * sizeof(float)); - cudaMalloc((void**)&gpuTransposeMatrix, NUM * sizeof(float)); - - // Record the start event - // CHECK: hipEventRecord(start, NULL); - cudaEventRecord(start, NULL); - - // Memory transfer from host to device - // CHECK: hipMemcpy(gpuMatrix, Matrix, NUM * sizeof(float), hipMemcpyHostToDevice); - cudaMemcpy(gpuMatrix, Matrix, NUM * sizeof(float), cudaMemcpyHostToDevice); - - // Record the stop event - // CHECK: hipEventRecord(stop, NULL); - cudaEventRecord(stop, NULL); - // CHECK: hipEventSynchronize(stop); - cudaEventSynchronize(stop); - // CHECK: hipEventElapsedTime(&eventMs, start, stop); - cudaEventElapsedTime(&eventMs, start, stop); - - printf("hipMemcpyHostToDevice time taken = %6.3fms\n", eventMs); - - // Record the start event - // CHECK: hipEventRecord(start, NULL); - cudaEventRecord(start, NULL); - - // Lauching kernel from host - - dim3 dimGrid(WIDTH / THREADS_PER_BLOCK_X, WIDTH / THREADS_PER_BLOCK_Y); - dim3 dimBlock(THREADS_PER_BLOCK_X, THREADS_PER_BLOCK_Y); - // CHECK: hipLaunchKernelGGL(matrixTranspose, dim3(dimGrid), dim3(dimBlock), 0, 0, gpuTransposeMatrix, gpuMatrix, WIDTH); - matrixTranspose <<>>(gpuTransposeMatrix, gpuMatrix, WIDTH); - - // Record the stop event - // CHECK: hipEventRecord(stop, NULL); - cudaEventRecord(stop, NULL); - // CHECK: hipEventSynchronize(stop); - cudaEventSynchronize(stop); - - // CHECK: hipEventElapsedTime(&eventMs, start, stop); - cudaEventElapsedTime(&eventMs, start, stop); - - printf("kernel Execution time = %6.3fms\n", eventMs); - - // Record the start event - // CHECK: hipEventRecord(start, NULL); - cudaEventRecord(start, NULL); - - // Memory transfer from device to host - // CHECK: hipMemcpy(TransposeMatrix, gpuTransposeMatrix, NUM * sizeof(float), hipMemcpyDeviceToHost); - cudaMemcpy(TransposeMatrix, gpuTransposeMatrix, NUM * sizeof(float), cudaMemcpyDeviceToHost); - - // Record the stop event - // CHECK: hipEventRecord(stop, NULL); - cudaEventRecord(stop, NULL); - // CHECK: hipEventSynchronize(stop); - cudaEventSynchronize(stop); - // CHECK: hipEventElapsedTime(&eventMs, start, stop); - cudaEventElapsedTime(&eventMs, start, stop); - - printf("hipMemcpyDeviceToHost time taken = %6.3fms\n", eventMs); - - // CPU MatrixTranspose computation - matrixTransposeCPUReference(cpuTransposeMatrix, Matrix, WIDTH); - - // verify the results - errors = 0; - double eps = 1.0E-6; - for (i = 0; i < NUM; i++) { - if (std::abs(TransposeMatrix[i] - cpuTransposeMatrix[i]) > eps) { - errors++; - } - } - if (errors != 0) { - printf("FAILED: %d errors\n", errors); - } else { - printf("PASSED!\n"); - } - - // free the resources on device side - // CHECK: hipFree(gpuMatrix); - cudaFree(gpuMatrix); - // CHECK: hipFree(gpuTransposeMatrix); - cudaFree(gpuTransposeMatrix); - - // free the resources on host side - free(Matrix); - free(TransposeMatrix); - free(cpuTransposeMatrix); - - return errors; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/2_Profiler/Profiler.cpp b/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/2_Profiler/Profiler.cpp deleted file mode 100644 index 4a1b28001f..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/2_Profiler/Profiler.cpp +++ /dev/null @@ -1,250 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -/* -Copyright (c) 2015-present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -// NOTE: Profiler API is under development. -// NOTE: This is NOT WORKING example. -// TODO: Get rid of HIP_SCOPED_MARKER, HIP_BEGIN_MARKER, HIP_END_MARKER, declared in hip/hip_profile.h or -// TODO: find out a way to hipify it in particular place (signatures are to obtain). - -#include - -// CHECK: #include -#include -// CHECK: #include -#include - -#define WIDTH 1024 - -#define NUM (WIDTH * WIDTH) - -#define THREADS_PER_BLOCK_X 4 -#define THREADS_PER_BLOCK_Y 4 -#define THREADS_PER_BLOCK_Z 1 - -#define ITERATIONS 10 - -// Cmdline parms to control start and stop triggers -int startTriggerIteration = -1; -int stopTriggerIteration = -1; - -// Device (Kernel) function, it must be void -__global__ void matrixTranspose(float* out, float* in, const int width) { - int x = blockDim.x * blockIdx.x + threadIdx.x; - int y = blockDim.y * blockIdx.y + threadIdx.y; - out[y * width + x] = in[x * width + y]; -} - -// CPU implementation of matrix transpose -void matrixTransposeCPUReference(float* output, float* input, const unsigned int width) { - for (unsigned int j = 0; j < width; j++) { - for (unsigned int i = 0; i < width; i++) { - output[i * width + j] = input[j * width + i]; - } - } -} - -// Use a separate function to demonstrate how to use function name as part of scoped marker: -void runGPU(float* Matrix, float* TransposeMatrix, float* gpuMatrix, float* gpuTransposeMatrix) { - // __func__ is a standard C++ macro which expands to the name of the function, in this case - // "runGPU" -// TODO: Find out signatures to generate the following: -// HIP_SCOPED_MARKER(__func__, "MyGroup"); - - for (int i = 0; i < ITERATIONS; i++) { - if (i == startTriggerIteration) { - // CHECK: hipProfilerStart(); - cudaProfilerStart(); - } - if (i == stopTriggerIteration) { - // CHECK: hipProfilerStop(); - cudaProfilerStop(); - } - - float eventMs = 0.0f; - - // CHECK: hipEvent_t start, stop; - cudaEvent_t start, stop; - // CHECK: hipEventCreate(&start); - cudaEventCreate(&start); - // CHECK: hipEventCreate(&stop); - cudaEventCreate(&stop); - - // Record the start event - // CHECK: hipEventRecord(start, NULL); - cudaEventRecord(start, NULL); - - // Memory transfer from host to device - // CHECK: hipMemcpy(gpuMatrix, Matrix, NUM * sizeof(float), hipMemcpyHostToDevice); - cudaMemcpy(gpuMatrix, Matrix, NUM * sizeof(float), cudaMemcpyHostToDevice); - - // Record the stop event - // CHECK: hipEventRecord(stop, NULL); - cudaEventRecord(stop, NULL); - // CHECK: hipEventSynchronize(stop); - cudaEventSynchronize(stop); - - // CHECK: hipEventElapsedTime(&eventMs, start, stop); - cudaEventElapsedTime(&eventMs, start, stop); - - // CHECK: printf("hipMemcpyHostToDevice time taken = %6.3fms\n", eventMs); - printf("cudaMemcpyHostToDevice time taken = %6.3fms\n", eventMs); - - // Record the start event - // CHECK: hipEventRecord(start, NULL); - cudaEventRecord(start, NULL); - - // Lauching kernel from host - dim3 dimGrid(WIDTH / THREADS_PER_BLOCK_X, WIDTH / THREADS_PER_BLOCK_Y); - dim3 dimBlock(THREADS_PER_BLOCK_X, THREADS_PER_BLOCK_Y); - // CHECK: hipLaunchKernelGGL(matrixTranspose, dim3(dimGrid), dim3(dimBlock), 0, 0, gpuTransposeMatrix, gpuMatrix, WIDTH); - matrixTranspose <<>> (gpuTransposeMatrix, gpuMatrix, WIDTH); - - // Record the stop event - // CHECK: hipEventRecord(stop, NULL); - cudaEventRecord(stop, NULL); - // CHECK: hipEventSynchronize(stop); - cudaEventSynchronize(stop); - // CHECK: hipEventElapsedTime(&eventMs, start, stop); - cudaEventElapsedTime(&eventMs, start, stop); - - printf("kernel Execution time = %6.3fms\n", eventMs); - - // Record the start event - // CHECK: hipEventRecord(start, NULL); - cudaEventRecord(start, NULL); - - // Memory transfer from device to host - // CHECK: hipMemcpy(TransposeMatrix, gpuTransposeMatrix, NUM * sizeof(float), hipMemcpyDeviceToHost); - cudaMemcpy(TransposeMatrix, gpuTransposeMatrix, NUM * sizeof(float), cudaMemcpyDeviceToHost); - - // Record the stop event - // CHECK: hipEventRecord(stop, NULL); - cudaEventRecord(stop, NULL); - // CHECK: hipEventSynchronize(stop); - cudaEventSynchronize(stop); - - // CHECK: hipEventElapsedTime(&eventMs, start, stop); - cudaEventElapsedTime(&eventMs, start, stop); - - // CHECK: printf("hipMemcpyDeviceToHost time taken = %6.3fms\n", eventMs); - printf("cudaMemcpyDeviceToHost time taken = %6.3fms\n", eventMs); - } -}; - -int main(int argc, char* argv[]) { - if (argc >= 2) { - startTriggerIteration = atoi(argv[1]); - printf("info : will start tracing at iteration:%d\n", startTriggerIteration); - } - if (argc >= 3) { - stopTriggerIteration = atoi(argv[2]); - printf("info : will stop tracing at iteration:%d\n", stopTriggerIteration); - } - - float* Matrix; - float* TransposeMatrix; - float* cpuTransposeMatrix; - - float* gpuMatrix; - float* gpuTransposeMatrix; - - // CHECK: hipDeviceProp_t devProp; - cudaDeviceProp devProp; - // CHECK: hipGetDeviceProperties(&devProp, 0); - cudaGetDeviceProperties(&devProp, 0); - - std::cout << "Device name " << devProp.name << std::endl; - - { - // Show example of how to create a "scoped marker". - // The scoped marker records the time spent inside the { scope } of the marker - the begin - // timestamp is at the beginning of the code scope, and the end is recorded when the SCOPE - // exits. This can be viewed in CodeXL timeline relative to other GPU and CPU events. This - // marker captures the time spent in setup including host allocation, initialization, and - // device memory allocation. -// TODO: Find out signatures to generate the following: -// HIP_SCOPED_MARKER("Setup", "MyGroup"); - - Matrix = (float*)malloc(NUM * sizeof(float)); - TransposeMatrix = (float*)malloc(NUM * sizeof(float)); - cpuTransposeMatrix = (float*)malloc(NUM * sizeof(float)); - - // initialize the input data - for (int i = 0; i < NUM; i++) { - Matrix[i] = (float)i * 10.0f; - } - - // allocate the memory on the device side - // CHECK: hipMalloc((void**)&gpuMatrix, NUM * sizeof(float)); - cudaMalloc((void**)&gpuMatrix, NUM * sizeof(float)); - // CHECK: hipMalloc((void**)&gpuTransposeMatrix, NUM * sizeof(float)); - cudaMalloc((void**)&gpuTransposeMatrix, NUM * sizeof(float)); - - // FYI, the scoped-marker will be destroyed here when the scope exits, and will record its - // "end" timestamp. - } - - runGPU(Matrix, TransposeMatrix, gpuMatrix, gpuTransposeMatrix); - - // show how to use explicit begin/end markers: - // We begin the timed region with HIP_BEGIN_MARKER, passing in the markerName and group: - // The region will stop when HIP_END_MARKER is called - // This is another way to mark begin/end - as an alternative to scoped markers. -// TODO: Find out signatures to generate the following: -// HIP_BEGIN_MARKER("Check&TearDown", "MyGroup"); - - int errors = 0; - - // CPU MatrixTranspose computation - matrixTransposeCPUReference(cpuTransposeMatrix, Matrix, WIDTH); - - // verify the results - double eps = 1.0E-6; - for (int i = 0; i < NUM; i++) { - if (std::abs(TransposeMatrix[i] - cpuTransposeMatrix[i]) > eps) { - errors++; - } - } - if (errors != 0) { - printf("FAILED: %d errors\n", errors); - } else { - printf("PASSED!\n"); - } - - // free the resources on device side - // CHECK: hipFree(gpuMatrix); - cudaFree(gpuMatrix); - // CHECK: hipFree(gpuTransposeMatrix); - cudaFree(gpuTransposeMatrix); - - // free the resources on host side - free(Matrix); - free(TransposeMatrix); - free(cpuTransposeMatrix); - - // This ends the last marker started in this thread, in this case "Check&TearDown" -// TODO: Find out signatures to generate the following: -// HIP_END_MARKER(); - - return errors; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/7_streams/stream.cpp b/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/7_streams/stream.cpp deleted file mode 100644 index b7fadbf936..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/7_streams/stream.cpp +++ /dev/null @@ -1,153 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -/* -Copyright (c) 2015-present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include -// CHECK: #include -#include - -#define WIDTH 32 - -#define NUM (WIDTH * WIDTH) - -#define THREADS_PER_BLOCK_X 4 -#define THREADS_PER_BLOCK_Y 4 -#define THREADS_PER_BLOCK_Z 1 - -using namespace std; - -__global__ void matrixTranspose_static_shared(float* out, float* in, - const int width) { - // CHECK-NOT: HIP_DYNAMIC_SHARED(float, sharedMem); - // CHECK: __shared__ float sharedMem[WIDTH * WIDTH]; - __shared__ float sharedMem[WIDTH * WIDTH]; - - int x = blockDim.x * blockIdx.x + threadIdx.x; - int y = blockDim.y * blockIdx.y + threadIdx.y; - - sharedMem[y * width + x] = in[x * width + y]; - - __syncthreads(); - - out[y * width + x] = sharedMem[y * width + x]; -} - -__global__ void matrixTranspose_dynamic_shared(float* out, float* in, - const int width) { - // declare dynamic shared memory - // CHECK-NOT: extern __shared__ - // CHECK: HIP_DYNAMIC_SHARED(int, sharedMem) - extern __shared__ int sharedMem[]; - - int x = blockDim.x * blockIdx.x + threadIdx.x; - int y = blockDim.y * blockIdx.y + threadIdx.y; - - sharedMem[y * width + x] = in[x * width + y]; - - __syncthreads(); - - out[y * width + x] = sharedMem[y * width + x]; -} - -void MultipleStream(float** data, float* randArray, float** gpuTransposeMatrix, - float** TransposeMatrix, int width) { - const int num_streams = 2; - // CHECK: hipStream_t streams[num_streams]; - cudaStream_t streams[num_streams]; - - // CHECK: for (int i = 0; i < num_streams; i++) hipStreamCreate(&streams[i]); - for (int i = 0; i < num_streams; i++) cudaStreamCreate(&streams[i]); - - for (int i = 0; i < num_streams; i++) { - // CHECK: hipMalloc((void**)&data[i], NUM * sizeof(float)); - cudaMalloc((void**)&data[i], NUM * sizeof(float)); - // CHECK: hipMemcpyAsync(data[i], randArray, NUM * sizeof(float), hipMemcpyHostToDevice, streams[i]); - cudaMemcpyAsync(data[i], randArray, NUM * sizeof(float), cudaMemcpyHostToDevice, streams[i]); - } - - dim3 dimGrid(WIDTH / THREADS_PER_BLOCK_X, WIDTH / THREADS_PER_BLOCK_Y); - dim3 dimBlock(THREADS_PER_BLOCK_X, THREADS_PER_BLOCK_Y); - // CHECK: hipLaunchKernelGGL(matrixTranspose_static_shared, dim3(dimGrid), dim3(dimBlock), 0, streams[0], gpuTransposeMatrix[0], data[0], width); - matrixTranspose_static_shared <<>>(gpuTransposeMatrix[0], data[0], width); - // CHECK: hipLaunchKernelGGL(matrixTranspose_dynamic_shared, dim3(dimGrid), dim3(dimBlock), 0, streams[1], gpuTransposeMatrix[1], data[1], width); - matrixTranspose_dynamic_shared <<>>(gpuTransposeMatrix[1], data[1], width); - - for (int i = 0; i < num_streams; i++) - // CHECK: hipMemcpyAsync(TransposeMatrix[i], gpuTransposeMatrix[i], NUM * sizeof(float), hipMemcpyDeviceToHost, streams[i]); - cudaMemcpyAsync(TransposeMatrix[i], gpuTransposeMatrix[i], NUM * sizeof(float), cudaMemcpyDeviceToHost, streams[i]); -} - -int main() { - // CHECK: hipSetDevice(0); - cudaSetDevice(0); - - float *data[2], *TransposeMatrix[2], *gpuTransposeMatrix[2], *randArray; - - int width = WIDTH; - - randArray = (float*)malloc(NUM * sizeof(float)); - - TransposeMatrix[0] = (float*)malloc(NUM * sizeof(float)); - TransposeMatrix[1] = (float*)malloc(NUM * sizeof(float)); - - // CHECK: hipMalloc((void**)&gpuTransposeMatrix[0], NUM * sizeof(float)); - cudaMalloc((void**)&gpuTransposeMatrix[0], NUM * sizeof(float)); - // CHECK: hipMalloc((void**)&gpuTransposeMatrix[1], NUM * sizeof(float)); - cudaMalloc((void**)&gpuTransposeMatrix[1], NUM * sizeof(float)); - - for (int i = 0; i < NUM; i++) { - randArray[i] = (float)i * 1.0f; - } - - MultipleStream(data, randArray, gpuTransposeMatrix, TransposeMatrix, width); - - // CHECK: hipDeviceSynchronize(); - cudaDeviceSynchronize(); - - // verify the results - int errors = 0; - double eps = 1.0E-6; - for (int i = 0; i < NUM; i++) { - if (std::abs(TransposeMatrix[0][i] - TransposeMatrix[1][i]) > eps) { - printf("%d stream0: %f stream1 %f\n", i, TransposeMatrix[0][i], TransposeMatrix[1][i]); - errors++; - } - } - if (errors != 0) { - printf("FAILED: %d errors\n", errors); - } else { - printf("stream PASSED!\n"); - } - - free(randArray); - for (int i = 0; i < 2; i++) { - // CHECK: hipFree(data[i]); - cudaFree(data[i]); - // CHECK: hipFree(gpuTransposeMatrix[i]); - cudaFree(gpuTransposeMatrix[i]); - free(TransposeMatrix[i]); - } - - // CHECK: hipDeviceReset(); - cudaDeviceReset(); - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/8_peer2peer/peer2peer.cpp b/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/8_peer2peer/peer2peer.cpp deleted file mode 100644 index be2ec7399d..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/samples/2_Cookbook/8_peer2peer/peer2peer.cpp +++ /dev/null @@ -1,225 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -/* -Copyright (c) 2015-present Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include -// CHECK: #include -#include -#include -#define WIDTH 32 - -#define NUM (WIDTH * WIDTH) - -#define THREADS_PER_BLOCK_X 4 -#define THREADS_PER_BLOCK_Y 4 -#define THREADS_PER_BLOCK_Z 1 - -using namespace std; - -#define KNRM "\x1B[0m" -#define KRED "\x1B[31m" - -#define failed(...) \ - printf("%serror: ", KRED); \ - printf(__VA_ARGS__); \ - printf("\n"); \ - printf("error: TEST FAILED\n%s", KNRM); \ - abort(); - -// CHECK: hipError_t localError = error; -// CHECK: if ((localError != hipSuccess) && (localError != hipErrorPeerAccessAlreadyEnabled) && -// CHECK: (localError != hipErrorPeerAccessNotEnabled )) { -// CHECK: printf("%serror: '%s'(%d) from %s at %s:%d%s\n", KRED, hipGetErrorString(localError), -#define CUDACHECK(error) \ - { \ - cudaError_t localError = error; \ - if ((localError != cudaSuccess) && (localError != cudaErrorPeerAccessAlreadyEnabled) && \ - (localError != cudaErrorPeerAccessNotEnabled )) { \ - printf("%serror: '%s'(%d) from %s at %s:%d%s\n", KRED, cudaGetErrorString(localError), \ - localError, #error, __FILE__, __LINE__, KNRM); \ - failed("API returned error code."); \ - } \ - } - -void checkPeer2PeerSupport() { - int gpuCount; - int canAccessPeer; - // CHECK: CUDACHECK(hipGetDeviceCount(&gpuCount)); - CUDACHECK(cudaGetDeviceCount(&gpuCount)); - for (int currentGpu = 0; currentGpu < gpuCount; currentGpu++) { - // CHECK: CUDACHECK(hipSetDevice(currentGpu)); - CUDACHECK(cudaSetDevice(currentGpu)); - for (int peerGpu = 0; peerGpu < currentGpu; peerGpu++) { - if (currentGpu != peerGpu) { - // CHECK: CUDACHECK(hipDeviceCanAccessPeer(&canAccessPeer, currentGpu, peerGpu)); - CUDACHECK(cudaDeviceCanAccessPeer(&canAccessPeer, currentGpu, peerGpu)); - printf("currentGpu#%d canAccessPeer: peerGpu#%d=%d\n", currentGpu, peerGpu, - canAccessPeer); - } - // CHECK: CUDACHECK(hipSetDevice(peerGpu)); - CUDACHECK(cudaSetDevice(peerGpu)); - // CHECK: CUDACHECK(hipDeviceReset()); - CUDACHECK(cudaDeviceReset()); - } - // CHECK: CUDACHECK(hipSetDevice(currentGpu)); - CUDACHECK(cudaSetDevice(currentGpu)); - // CHECK: CUDACHECK(hipDeviceReset()); - CUDACHECK(cudaDeviceReset()); - } -} - -void enablePeer2Peer(int currentGpu, int peerGpu) { - int canAccessPeer; - // Must be on a multi-gpu system: - assert(currentGpu != peerGpu); - // CHECK: CUDACHECK(hipSetDevice(currentGpu)); - CUDACHECK(cudaSetDevice(currentGpu)); - // CHECK: hipDeviceCanAccessPeer(&canAccessPeer, currentGpu, peerGpu); - cudaDeviceCanAccessPeer(&canAccessPeer, currentGpu, peerGpu); - if (canAccessPeer == 1) { - // CHECK: CUDACHECK(hipDeviceEnablePeerAccess(peerGpu, 0)); - CUDACHECK(cudaDeviceEnablePeerAccess(peerGpu, 0)); - } else - printf("peer2peer transfer not possible between the selected gpu devices"); -} - -void disablePeer2Peer(int currentGpu, int peerGpu) { - int canAccessPeer; - // Must be on a multi-gpu system: - assert(currentGpu != peerGpu); - // CHECK: CUDACHECK(hipSetDevice(currentGpu)); - CUDACHECK(cudaSetDevice(currentGpu)); - // CHECK: hipDeviceCanAccessPeer(&canAccessPeer, currentGpu, peerGpu); - cudaDeviceCanAccessPeer(&canAccessPeer, currentGpu, peerGpu); - if (canAccessPeer == 1) { - // CHECK: CUDACHECK(hipDeviceDisablePeerAccess(peerGpu)); - CUDACHECK(cudaDeviceDisablePeerAccess(peerGpu)); - } else - printf("peer2peer disable not required"); -} - -__global__ void matrixTranspose_static_shared(float* out, float* in, - const int width) { - // CHECK-NOT: HIP_DYNAMIC_SHARED(float, sharedMem); - // CHECK: __shared__ float sharedMem[WIDTH * WIDTH]; - __shared__ float sharedMem[WIDTH * WIDTH]; - int x = blockDim.x * blockIdx.x + threadIdx.x; - int y = blockDim.y * blockIdx.y + threadIdx.y; - sharedMem[y * width + x] = in[x * width + y]; - __syncthreads(); - out[y * width + x] = sharedMem[y * width + x]; -} - -__global__ void matrixTranspose_dynamic_shared(float* out, float* in, - const int width) { - // declare dynamic shared memory - // CHECK-NOT: extern __shared__ - // CHECK: HIP_DYNAMIC_SHARED(float, sharedMem) - extern __shared__ float sharedMem[]; - int x = blockDim.x * blockIdx.x + threadIdx.x; - int y = blockDim.y * blockIdx.y + threadIdx.y; - sharedMem[y * width + x] = in[x * width + y]; - __syncthreads(); - out[y * width + x] = sharedMem[y * width + x]; -} - -int main() { - checkPeer2PeerSupport(); - int gpuCount; - int currentGpu, peerGpu; - // CHECK: CUDACHECK(hipGetDeviceCount(&gpuCount)); - CUDACHECK(cudaGetDeviceCount(&gpuCount)); - if (gpuCount < 2) { - printf("Peer2Peer application requires atleast 2 gpu devices"); - return 0; - } - currentGpu = 0; - peerGpu = (currentGpu + 1); - printf("currentGpu=%d peerGpu=%d (Total no. of gpu = %d)\n", currentGpu, peerGpu, gpuCount); - float *data[2], *TransposeMatrix[2], *gpuTransposeMatrix[2], *randArray; - int width = WIDTH; - randArray = (float*)malloc(NUM * sizeof(float)); - for (int i = 0; i < NUM; i++) { - randArray[i] = (float)i * 1.0f; - } - enablePeer2Peer(currentGpu, peerGpu); - // CHECK: CUDACHECK(hipSetDevice(currentGpu)); - CUDACHECK(cudaSetDevice(currentGpu)); - TransposeMatrix[0] = (float*)malloc(NUM * sizeof(float)); - // CHECK: hipMalloc((void**)&gpuTransposeMatrix[0], NUM * sizeof(float)); - cudaMalloc((void**)&gpuTransposeMatrix[0], NUM * sizeof(float)); - // CHECK: hipMalloc((void**)&data[0], NUM * sizeof(float)); - cudaMalloc((void**)&data[0], NUM * sizeof(float)); - // CHECK: hipMemcpy(data[0], randArray, NUM * sizeof(float), hipMemcpyHostToDevice); - cudaMemcpy(data[0], randArray, NUM * sizeof(float), cudaMemcpyHostToDevice); - dim3 dimGrid(WIDTH / THREADS_PER_BLOCK_X, WIDTH / THREADS_PER_BLOCK_Y); - dim3 dimBlock(THREADS_PER_BLOCK_X, THREADS_PER_BLOCK_Y); - // CHECK: hipLaunchKernelGGL(matrixTranspose_static_shared, dim3(dimGrid), dim3(dimBlock), 0, 0, gpuTransposeMatrix[0], data[0], width); - matrixTranspose_static_shared <<>>(gpuTransposeMatrix[0], data[0], width); - // CHECK: CUDACHECK(hipSetDevice(peerGpu)); - CUDACHECK(cudaSetDevice(peerGpu)); - TransposeMatrix[1] = (float*)malloc(NUM * sizeof(float)); - // CHECK: hipMalloc((void**)&gpuTransposeMatrix[1], NUM * sizeof(float)); - cudaMalloc((void**)&gpuTransposeMatrix[1], NUM * sizeof(float)); - // CHECK: hipMalloc((void**)&data[1], NUM * sizeof(float)); - cudaMalloc((void**)&data[1], NUM * sizeof(float)); - // CHECK: hipMemcpy(data[1], gpuTransposeMatrix[0], NUM * sizeof(float), hipMemcpyDeviceToDevice); - cudaMemcpy(data[1], gpuTransposeMatrix[0], NUM * sizeof(float), cudaMemcpyDeviceToDevice); - // CHECK: hipLaunchKernelGGL(matrixTranspose_dynamic_shared, dim3(dimGrid), dim3(dimBlock), sizeof(float) * WIDTH * WIDTH, 0, gpuTransposeMatrix[1], data[1], width); - matrixTranspose_dynamic_shared <<>>(gpuTransposeMatrix[1], data[1], width); - // CHECK: hipMemcpy(TransposeMatrix[1], gpuTransposeMatrix[1], NUM * sizeof(float), hipMemcpyDeviceToHost); - cudaMemcpy(TransposeMatrix[1], gpuTransposeMatrix[1], NUM * sizeof(float), cudaMemcpyDeviceToHost); - // CHECK: hipDeviceSynchronize(); - cudaDeviceSynchronize(); - disablePeer2Peer(currentGpu, peerGpu); - // verify the results - int errors = 0; - double eps = 1.0E-6; - for (int i = 0; i < NUM; i++) { - if (std::abs(randArray[i] - TransposeMatrix[1][i]) > eps) { - printf("%d cpu: %f gpu peered data %f\n", i, randArray[i], TransposeMatrix[1][i]); - errors++; - } - } - if (errors != 0) { - printf("FAILED: %d errors\n", errors); - } else { - printf("Peer2Peer PASSED!\n"); - } - free(randArray); - for (int i = 0; i < 2; i++) { - // CHECK: hipFree(data[i]); - cudaFree(data[i]); - // CHECK: hipFree(gpuTransposeMatrix[i]); - cudaFree(gpuTransposeMatrix[i]); - free(TransposeMatrix[i]); - } - // CHECK: CUDACHECK(hipSetDevice(peerGpu)); - CUDACHECK(cudaSetDevice(peerGpu)); - // CHECK: CUDACHECK(hipDeviceReset()); - CUDACHECK(cudaDeviceReset()); - // CHECK: CUDACHECK(hipSetDevice(currentGpu)); - CUDACHECK(cudaSetDevice(currentGpu)); - // CHECK: CUDACHECK(hipDeviceReset()); - CUDACHECK(cudaDeviceReset()); - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/samples/MallocManaged.cpp b/hipamd/tests/hipify-clang/unit_tests/samples/MallocManaged.cpp deleted file mode 100644 index d9122160b1..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/samples/MallocManaged.cpp +++ /dev/null @@ -1,45 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args -// CHECK: #include -#include - -__global__ -void add(int n, float *x, float *y) -{ - int index = blockIdx.x * blockDim.x + threadIdx.x; - int stride = blockDim.x * gridDim.x; - for (int i = index; i < n; i += stride) - y[i] = x[i] + y[i]; -} - -int main(int argc, char *argv[]) -{ - int numElements = 10; - bool testResult = true; - float *A, *B; - // CHECK: hipMallocManaged(&A, numElements * sizeof(float)); - cudaMallocManaged(&A, numElements * sizeof(float)); - // CHECK: hipMallocManaged(&B, numElements * sizeof(float)); - cudaMallocManaged(&B, numElements * sizeof(float)); - for (int i = 0; i < numElements; i++) { - A[i] = 1.0f; - B[i] = 2.0f; - } - int blockSize = 256; - int numBlocks = (numElements + blockSize - 1) / blockSize; - dim3 dimGrid(numBlocks, 1, 1); - dim3 dimBlock(blockSize, 1, 1); - // CHECK: hipLaunchKernelGGL(add, dim3(dimGrid), dim3(dimBlock), 0, 0, numElements, A, B); - add<<>>(numElements, A, B); - // CHECK: hipDeviceSynchronize(); - cudaDeviceSynchronize(); - float maxError = 0.0f; - for (int i = 0; i < numElements; i++) - maxError = fmax(maxError, fabs(B[i]-3.0f)); - // CHECK: hipFree(A); - cudaFree(A); - // CHECK: hipFree(B); - cudaFree(B); - if(maxError == 0.0f) - return 0; - return -1; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/samples/allocators.cu b/hipamd/tests/hipify-clang/unit_tests/samples/allocators.cu deleted file mode 100644 index 4d33e315bf..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/samples/allocators.cu +++ /dev/null @@ -1,53 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -#pragma once -// CHECK: #include -#include -#include - -/** - * Allocate GPU memory for `count` elements of type `T`. - */ -template -static T* gpuMalloc(size_t count) { - T* ret = nullptr; - // CHECK: hipMalloc(&ret, count * sizeof(T)); - cudaMalloc(&ret, count * sizeof(T)); - return ret; -} - -template -__global__ void add(int n, T* x, T* y) { - int index = blockIdx.x * blockDim.x + threadIdx.x; - int stride = blockDim.x * gridDim.x; - for (int i = index; i < n; i += stride) - y[i] = x[i] + y[i]; -} - -int main(int argc, char* argv[]) { - size_t numElements = 50; - float *A = gpuMalloc(numElements); - float* B = gpuMalloc(numElements); - for (int i = 0; i < numElements; ++i) { - A[i] = 1.0f; - B[i] = 2.0f; - } - int blockSize = 512; - int numBlocks = (numElements + blockSize - 1) / blockSize; - dim3 dimGrid(numBlocks, 1, 1); - dim3 dimBlock(blockSize, 1, 1); - // CHECK: hipLaunchKernelGGL(HIP_KERNEL_NAME(add), dim3(dimGrid), dim3(dimBlock), 0, 0, numElements, A, B); - add<<>>(numElements, A, B); - // CHECK: hipDeviceSynchronize(); - cudaDeviceSynchronize(); - float maxError = 0.0f; - for (int i = 0; i < numElements; ++i) - maxError = fmax(maxError, fabs(B[i] - 3.0f)); - // CHECK: hipFree(A); - cudaFree(A); - // CHECK: hipFree(B); - cudaFree(B); - if (maxError == 0.0f) - return 0; - return -1; - } diff --git a/hipamd/tests/hipify-clang/unit_tests/samples/axpy.cu b/hipamd/tests/hipify-clang/unit_tests/samples/axpy.cu deleted file mode 100644 index c09c372967..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/samples/axpy.cu +++ /dev/null @@ -1,97 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -#include - -// CHECK: #include -#include - -#define TOKEN_PASTE(X, Y) X ## Y -#define ARG_LIST_AS_MACRO a, device_x, device_y -#define KERNEL_CALL_AS_MACRO axpy<<<1, kDataLen>>> -#define KERNEL_NAME_MACRO axpy - -// CHECK: #define COMPLETE_LAUNCH hipLaunchKernelGGL(HIP_KERNEL_NAME(axpy), dim3(1), dim3(kDataLen), 0, 0, a, device_x, device_y) -#define COMPLETE_LAUNCH axpy<<<1, kDataLen>>>(a, device_x, device_y) - - -template -__global__ void axpy(T a, T *x, T *y) { - y[threadIdx.x] = a * x[threadIdx.x]; -} - -__global__ void empty() { -} - -int main(int argc, char* argv[]) { - const int kDataLen = 4; - - float a = 2.0f; - float host_x[kDataLen] = {1.0f, 2.0f, 3.0f, 4.0f}; - float host_y[kDataLen]; - - // Copy input data to device. - float* device_x; - float* device_y; - - // CHECK: hipMalloc(&device_x, kDataLen * sizeof(float)); - cudaMalloc(&device_x, kDataLen * sizeof(float)); - -#ifdef HERRING - // CHECK: hipMalloc(&device_y, kDataLen * sizeof(float)); - cudaMalloc(&device_y, kDataLen * sizeof(float)); -#else - // CHECK: hipMalloc(&device_y, kDataLen * sizeof(double)); - cudaMalloc(&device_y, kDataLen * sizeof(double)); -#endif - - // CHECK: hipMemcpy(device_x, host_x, kDataLen * sizeof(float), hipMemcpyHostToDevice); - cudaMemcpy(device_x, host_x, kDataLen * sizeof(float), cudaMemcpyHostToDevice); - - // Launch the kernel in numerous different strange ways to exercise the prerocessor. - // CHECK: hipLaunchKernelGGL(HIP_KERNEL_NAME(axpy), dim3(1), dim3(kDataLen), 0, 0, a, device_x, device_y); - axpy<<<1, kDataLen>>>(a, device_x, device_y); - - // CHECK: hipLaunchKernelGGL(HIP_KERNEL_NAME(axpy), dim3(1), dim3(kDataLen), 0, 0, a, device_x, device_y); - axpy<<<1, kDataLen>>>(a, device_x, device_y); - - // CHECK: hipLaunchKernelGGL(HIP_KERNEL_NAME(axpy), dim3(1), dim3(kDataLen), 0, 0, a, TOKEN_PASTE(device, _x), device_y); - axpy<<<1, kDataLen>>>(a, TOKEN_PASTE(device, _x), device_y); - - // CHECK: hipLaunchKernelGGL(HIP_KERNEL_NAME(axpy), dim3(1), dim3(kDataLen), 0, 0, ARG_LIST_AS_MACRO); - axpy<<<1, kDataLen>>>(ARG_LIST_AS_MACRO); - - // CHECK: hipLaunchKernelGGL(HIP_KERNEL_NAME(KERNEL_NAME_MACRO), dim3(1), dim3(kDataLen), 0, 0, ARG_LIST_AS_MACRO); - KERNEL_NAME_MACRO<<<1, kDataLen>>>(ARG_LIST_AS_MACRO); - - // CHECK: hipLaunchKernelGGL(HIP_KERNEL_NAME(axpy), dim3(1), dim3(kDataLen), 0, 0, ARG_LIST_AS_MACRO); - KERNEL_CALL_AS_MACRO(ARG_LIST_AS_MACRO); - - // CHECK: hipLaunchKernelGGL(empty, dim3(1), dim3(kDataLen), 0, 0); - empty<<<1, kDataLen>>> ( ); - - // CHECK: hipLaunchKernelGGL(empty, dim3(1), dim3(kDataLen), 0, 0); - empty<<<1, kDataLen, 0>>>(); - - // CHECK: hipLaunchKernelGGL(empty, dim3(1), dim3(kDataLen), 0, 0); - empty<<<1, kDataLen, 0, 0>>>(); - - // CHECK: COMPLETE_LAUNCH; - COMPLETE_LAUNCH; - - - // Copy output data to host. - // CHECK: hipDeviceSynchronize(); - cudaDeviceSynchronize(); - - // CHECK: hipMemcpy(host_y, device_y, kDataLen * sizeof(float), hipMemcpyDeviceToHost); - cudaMemcpy(host_y, device_y, kDataLen * sizeof(float), cudaMemcpyDeviceToHost); - - // Print the results. - for (int i = 0; i < kDataLen; ++i) { - std::cout << "y[" << i << "] = " << host_y[i] << "\n"; - } - - // CHECK: hipDeviceReset(); - cudaDeviceReset(); - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/samples/coalescing.cu b/hipamd/tests/hipify-clang/unit_tests/samples/coalescing.cu deleted file mode 100644 index ec4645d673..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/samples/coalescing.cu +++ /dev/null @@ -1,117 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -// To measure effects of memory coalescing. Coalescing.cu -// B. Wilkinson Jan 30, 2011 - -#include -#include -#include -// CHECK: #include -#include - -#define BlockSize 16 // Size of blocks, 32 x 32 threads, fixed, used globally - -__global__ void gpu_Comput (int *h, int N, int T) { - -// Array loaded with global thread ID that acesses that location - - int col = threadIdx.x + blockDim.x * blockIdx.x; - int row = threadIdx.y + blockDim.y * blockIdx.y; - - int threadID = col + row * N; - int index = row + col * N; // sequentially down each row - - for (int t = 0; t < T; t++) // loop to repeat to reduce other time effects - h[index] = threadID; // load array with flattened global thread ID -} - -void printArray(int *h, int N) { - - printf("Results of computation, every N/8 numbers, eight numbers\n"); - - for (int row = 0; row < N; row += N/8) { - for (int col = 0; col < N; col += N/8) - printf("%6d ", h[col + row * N]); - printf("\n"); - } -} - -int main(int argc, char *argv[]) { - - int T = 100; // number of iterations, entered at keyboard - int B = 1; // number of blocks, entered at keyboard - char key; - - int *h, *dev_h; // ptr to array holding numbers on host and device - // CHECK: hipEvent_t start, stop; - cudaEvent_t start, stop; // cuda events to measure time - float elapsed_time_ms1; - // CHECK: hipEventCreate( &start ); - // CHECK: hipEventCreate( &stop ); - cudaEventCreate( &start ); - cudaEventCreate( &stop ); - -/* ------------------------- Keyboard input -----------------------------------*/ - -do { // loop to repeat complete program - - printf("Grid Structure 2-D grid, 2-D blocks\n"); - printf("Blocks fixed at 16 x 16 threads, 512 threads, max for compute cap. 1.x\n"); - printf("Enter number of blocks in grid, each dimension, currently %d\n",B); - scanf("%d",&B); - printf("Enter number of iterations, currently %d\n",T); - scanf("%d",&T); - - int N = B * BlockSize; // size of data array, given input data - - printf("Array size (and total grid-block size) %d x %d\n", N, N); - - dim3 Block(BlockSize, BlockSize); //Block structure, 32 x 32 max - dim3 Grid(B, B); //Grid structure, B x B - -/* ------------------------- Allocate Memory-----------------------------------*/ - - int size = N * N * sizeof(int); // number of bytes in total in array - h = (int*) malloc(size); // Array on host - // CHECK: hipMalloc((void**)&dev_h, size); - cudaMalloc((void**)&dev_h, size); // allocate device memory - -/* ------------------------- GPU Computation -----------------------------------*/ - - // CHECK: hipEventRecord( start, 0 ); - cudaEventRecord( start, 0 ); - // CHECK: hipLaunchKernelGGL(gpu_Comput, dim3(Grid), dim3(Block), 0, 0, dev_h, N, T); - gpu_Comput<<< Grid, Block >>>(dev_h, N, T); - // CHECK: hipEventRecord( stop, 0 ); - // CHECK: hipEventSynchronize( stop ); - // CHECK: hipEventElapsedTime( &elapsed_time_ms1, start, stop ); - cudaEventRecord( stop, 0 ); // instrument code to measue end time - cudaEventSynchronize( stop ); // wait for all work done by threads - cudaEventElapsedTime( &elapsed_time_ms1, start, stop ); - // CHECK: hipMemcpy(h,dev_h, size ,hipMemcpyDeviceToHost); - cudaMemcpy(h,dev_h, size ,cudaMemcpyDeviceToHost); //Get results to check - - printArray(h,N); - printf("\nTime to calculate results on GPU: %f ms.\n", elapsed_time_ms1); - -/* -------------------------REPEAT PROGRAM INPUT-----------------------------------*/ - - printf("\nEnter c to repeat, return to terminate\n"); - - scanf("%c",&key); - scanf("%c",&key); - -} while (key == 'c'); // loop of complete program - -/* -------------- clean up ---------------------------------------*/ - -free(h); - // CHECK: hipFree(dev_h); - cudaFree(dev_h); - // CHECK: hipEventDestroy(start); - // CHECK: hipEventDestroy(stop); - cudaEventDestroy(start); - cudaEventDestroy(stop); - - return 0; -} diff --git a/hipamd/tests/hipify-clang/unit_tests/samples/cudaRegister.cu b/hipamd/tests/hipify-clang/unit_tests/samples/cudaRegister.cu deleted file mode 100644 index 2cc754300a..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/samples/cudaRegister.cu +++ /dev/null @@ -1,106 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -/* -Copyright (c) 2015-2016 Advanced Micro Devices, Inc. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#include -#include -#include -#include -#include - -#define LEN 1024 -#define SIZE LEN * sizeof(float) -#define ITER 1024*1024 - -// CHECK: if(status != hipSuccess) { -#define check(msg, status){ \ -if(status != cudaSuccess) { \ - printf("%s failed. \n", #msg); \ -} \ -} - -__global__ void Inc1(float *Ad, float *Bd){ - int tx = threadIdx.x + blockIdx.x * blockDim.x; - if(tx < 1 ){ - for(int i=0;i>>(Ad, Bd); - A[0] = -(ITER*1.0f); - std::cout<<"Same cache line before completion: \t"<< A[0]<>>(Ad, Bd); - A[0] = -(ITER*1.0f); - std::cout<<"Diff cache line before completion: \t"< -// CHECK: #include -#include - -__global__ void dynamicReverse(int *d, int n) -{ - // Dynamic shared memory - // CHECK-NOT: extern __shared__ - // CHECK: HIP_DYNAMIC_SHARED(int, s); - extern __shared__ int s[]; - int t = threadIdx.x; - int tr = n-t-1; - s[t] = d[t]; - __syncthreads(); - d[t] = s[tr]; -} - -int main(void) -{ - const int n = 64; - int a[n], r[n], d[n]; - - for (int i = 0; i < n; i++) { - a[i] = i; - r[i] = n-i-1; - d[i] = 0; - } - - int *d_d; - // CHECK: hipMalloc(&d_d, n * sizeof(int)); - cudaMalloc(&d_d, n * sizeof(int)); - // run version with dynamic shared memory - // CHECK: hipMemcpy(d_d, a, n*sizeof(int), hipMemcpyHostToDevice); - cudaMemcpy(d_d, a, n*sizeof(int), cudaMemcpyHostToDevice); - // CHECK: hipLaunchKernelGGL(dynamicReverse, dim3(1), dim3(n), n*sizeof(int), 0, d_d, n); - dynamicReverse<<<1,n,n*sizeof(int)>>>(d_d, n); - // CHECK: hipMemcpy(d, d_d, n*sizeof(int), hipMemcpyDeviceToHost); - cudaMemcpy(d, d_d, n*sizeof(int), cudaMemcpyDeviceToHost); - for (int i = 0; i < n; i++) - if (d[i] != r[i]) printf("Error: d[%d]!=r[%d] (%d, %d)n", i, i, d[i], r[i]); -} diff --git a/hipamd/tests/hipify-clang/unit_tests/samples/intro.cu b/hipamd/tests/hipify-clang/unit_tests/samples/intro.cu deleted file mode 100644 index 5ae5479aa9..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/samples/intro.cu +++ /dev/null @@ -1,174 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -#include -#include -#include -// CHECK: #include -#include - -#define K_THREADS 64 -#define K_INDEX() ((gridDim.x * blockIdx.y + blockIdx.x) * blockDim.x + threadIdx.x) -#define RND() ((rand() & 0x7FFF) / float(0x8000)) -#define ERRORCHECK() cErrorCheck(__FILE__, __LINE__) - -// CHECK: hipEvent_t t##_start, t##_end; \ -// CHECK: hipEventCreate(&t##_start); \ -// CHECK: hipEventCreate(&t##_end); -#define TIMER_CREATE(t) \ - cudaEvent_t t##_start, t##_end; \ - cudaEventCreate(&t##_start); \ - cudaEventCreate(&t##_end); - -// CHECK: hipEventRecord(t##_start); \ -// CHECK: hipEventSynchronize(t##_start); -#define TIMER_START(t) \ - cudaEventRecord(t##_start); \ - cudaEventSynchronize(t##_start); \ - -// CHECK: hipEventRecord(t##_start); \ -// CHECK: hipEventSynchronize(t##_start); \ -// CHECK: hipEventRecord(t##_end); \ -// CHECK: hipEventSynchronize(t##_end); \ -// CHECK: hipEventElapsedTime(&t, t##_start, t##_end); -#define TIMER_END(t) \ - cudaEventRecord(t##_start); \ - cudaEventSynchronize(t##_start); \ - cudaEventRecord(t##_end); \ - cudaEventSynchronize(t##_end); \ - cudaEventElapsedTime(&t, t##_start, t##_end); - - -inline void cErrorCheck(const char *file, int line) { -// CHECK: hipDeviceSynchronize(); -// CHECK: hipError_t err = hipGetLastError(); -// CHECK: if (err != hipSuccess) { -// CHECK: printf("Error: %s\n", hipGetErrorString(err)); - cudaThreadSynchronize(); - cudaError_t err = cudaGetLastError(); - if (err != cudaSuccess) { - printf("Error: %s\n", cudaGetErrorString(err)); - printf(" @ %s: %d\n", file, line); - exit(-1); - } -} - -inline dim3 K_GRID(int n, int threads = K_THREADS) { - int blocks = (int)ceilf(sqrtf((float)n/threads)); - dim3 grid(blocks, blocks); - return grid; -} - -typedef struct data { - int n; - float4 *r, *v, *f; -} data; - -data cpu, gpu; - -#define N 20 - -__global__ void repulsion(data gpu); -__global__ void integration(data gpu); - - -int main() { - printf("Cuda Test 1\n"); - - int count = 0; - // CHECK: hipGetDeviceCount(&count); - cudaGetDeviceCount(&count); - printf(" %d CUDA devices found\n", count); - if(!count) { - ::exit(EXIT_FAILURE); - } - // CHECK: hipFree(0); - cudaFree(0); - - cpu.n = N; - - cpu.r = (float4*)malloc(N * sizeof(float4)); - cpu.v = (float4*)malloc(N * sizeof(float4)); - cpu.f = (float4*)malloc(N * sizeof(float4)); - - for(int i = 0; i < N; ++i) { - cpu.v[i] = make_float4(0,0,0,0); - cpu.r[i] = make_float4(RND(), RND(), RND(), 0); - cpu.f[i] = make_float4(0,0.01,0,0); - } - - gpu = cpu; - // CHECK: hipMalloc(&gpu.r, N * sizeof(float4)); - // CHECK: hipMalloc(&gpu.v, N * sizeof(float4)); - // CHECK: hipMalloc(&gpu.f, N * sizeof(float4)); - cudaMalloc(&gpu.r, N * sizeof(float4)); - cudaMalloc(&gpu.v, N * sizeof(float4)); - cudaMalloc(&gpu.f, N * sizeof(float4)); - // CHECK: hipMemcpy(gpu.r, cpu.r, cpu.n * sizeof(float4), hipMemcpyHostToDevice); - // CHECK: hipMemcpy(gpu.v, cpu.v, cpu.n * sizeof(float4), hipMemcpyHostToDevice); - // CHECK: hipMemcpy(gpu.f, cpu.f, cpu.n * sizeof(float4), hipMemcpyHostToDevice); - cudaMemcpy(gpu.r, cpu.r, cpu.n * sizeof(float4), cudaMemcpyHostToDevice); - cudaMemcpy(gpu.v, cpu.v, cpu.n * sizeof(float4), cudaMemcpyHostToDevice); - cudaMemcpy(gpu.f, cpu.f, cpu.n * sizeof(float4), cudaMemcpyHostToDevice); - - ERRORCHECK(); - float rep; - TIMER_CREATE(rep); - TIMER_START(rep); - // CHECK: hipLaunchKernelGGL(integration, dim3(K_GRID(cpu.n)), dim3(K_THREADS), 0, 0, gpu); - integration <<< K_GRID(cpu.n), K_THREADS >>>(gpu); - - TIMER_END(rep); - printf("Took: %f ms\n", rep); - ERRORCHECK(); - // CHECK: hipMemcpy(cpu.r, gpu.r, cpu.n * sizeof(float4), hipMemcpyDeviceToHost); - // CHECK: hipMemcpy(cpu.v, gpu.v, cpu.n * sizeof(float4), hipMemcpyDeviceToHost); - // CHECK: hipMemcpy(cpu.f, gpu.f, cpu.n * sizeof(float4), hipMemcpyDeviceToHost); - cudaMemcpy(cpu.r, gpu.r, cpu.n * sizeof(float4), cudaMemcpyDeviceToHost); - cudaMemcpy(cpu.v, gpu.v, cpu.n * sizeof(float4), cudaMemcpyDeviceToHost); - cudaMemcpy(cpu.f, gpu.f, cpu.n * sizeof(float4), cudaMemcpyDeviceToHost); - // CHECK: hipHostFree(cpu.r); - // CHECK: hipHostFree(cpu.v); - // CHECK: hipHostFree(cpu.f); - cudaFreeHost(cpu.r); - cudaFreeHost(cpu.v); - cudaFreeHost(cpu.f); - // CHECK: hipFree(gpu.r); - // CHECK: hipFree(gpu.v); - // CHECK: hipFree(gpu.f); - cudaFree(gpu.r); - cudaFree(gpu.v); - cudaFree(gpu.f); - // CHECK: hipDeviceReset(); - cudaDeviceReset(); - - printf("Results: \n"); - for(int i = 0; i < N; ++i) { - printf("%f, %f, %f \n", cpu.r[i].x, cpu.r[i].y, cpu.r[i].z); - } - - printf("Ready...\n"); - return 0; -} - -__global__ void repulsion(data gpu) { - int idx = K_INDEX(); - if(idx < N) { - gpu.r[idx].x = 1; - gpu.r[idx].y = 1; - gpu.r[idx].z = 1; - } -} - -#define MULT4(v, s) v.x *= s; v.y *= s; v.z *= s; v.w *= s; -#define ADD4(v1, v2) v1.x += v2.x; v1.y += v2.y; v1.z += v2.z; v1.w += v2.w; - -__global__ void integration(data gpu) { - int i = K_INDEX(); - if(i < N) { - MULT4(gpu.f[i], 0.01); - MULT4(gpu.v[i], 0.01); - ADD4(gpu.v[i], gpu.f[i]); - ADD4(gpu.r[i], gpu.v[i]); - gpu.f[i] = make_float4(0,0,0,0); - } -} diff --git a/hipamd/tests/hipify-clang/unit_tests/samples/square.cu b/hipamd/tests/hipify-clang/unit_tests/samples/square.cu deleted file mode 100644 index b415c15495..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/samples/square.cu +++ /dev/null @@ -1,112 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -/* -Copyright (c) 2015-2016 Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ -#include -#include - -#define CHECK(cmd) \ -{\ - cudaError_t error = cmd;\ - if (error != cudaSuccess) { \ - fprintf(stderr, "error: '%s'(%d) at %s:%d\n", cudaGetErrorString(error), error,__FILE__, __LINE__); \ - exit(EXIT_FAILURE);\ - }\ -} - - -/* - * Square each element in the array A and write to array C. - */ -template -__global__ void -vector_square(T *C_d, const T *A_d, size_t N) -{ - size_t offset = (blockIdx.x * blockDim.x + threadIdx.x); - size_t stride = blockDim.x * gridDim.x; - - for (size_t i=offset; i>> (C_d, A_d, N); - - printf ("info: copy Device2Host\n"); - // CHECK: CHECK ( hipMemcpy(C_h, C_d, Nbytes, hipMemcpyDeviceToHost)); - CHECK ( cudaMemcpy(C_h, C_d, Nbytes, cudaMemcpyDeviceToHost)); - - printf ("info: check result\n"); - for (size_t i=0; i -// CHECK: #include -#include - -__global__ void staticReverse(int *d, int n) -{ - // CHECK-NOT: HIP_DYNAMIC_SHARED(int, s); - // CHECK: __shared__ int s[64]; - __shared__ int s[64]; - int t = threadIdx.x; - int tr = n-t-1; - s[t] = d[t]; - // Will not conttinue until all threads completed. - __syncthreads(); - d[t] = s[tr]; -} - -int main(void) -{ - const int n = 64; - int a[n], r[n], d[n]; - - for (int i = 0; i < n; i++) { - a[i] = i; - r[i] = n-i-1; - d[i] = 0; - } - - int *d_d; - // CHECK: hipMalloc(&d_d, n * sizeof(int)); - cudaMalloc(&d_d, n * sizeof(int)); - // run version with static shared memory - // CHECK: hipMemcpy(d_d, a, n*sizeof(int), hipMemcpyHostToDevice); - cudaMemcpy(d_d, a, n*sizeof(int), cudaMemcpyHostToDevice); - // CHECK: hipLaunchKernelGGL(staticReverse, dim3(1), dim3(n), 0, 0, d_d, n); - staticReverse<<<1,n>>>(d_d, n); - // CHECK: hipMemcpy(d, d_d, n*sizeof(int), hipMemcpyDeviceToHost); - cudaMemcpy(d, d_d, n*sizeof(int), cudaMemcpyDeviceToHost); - for (int i = 0; i < n; i++) - if (d[i] != r[i]) printf("Error: d[%d]!=r[%d] (%d, %d)n", i, i, d[i], r[i]); -} diff --git a/hipamd/tests/hipify-clang/unit_tests/samples/vec_add.cu b/hipamd/tests/hipify-clang/unit_tests/samples/vec_add.cu deleted file mode 100644 index a6d8950e0b..0000000000 --- a/hipamd/tests/hipify-clang/unit_tests/samples/vec_add.cu +++ /dev/null @@ -1,89 +0,0 @@ -// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args - -// Kernel definition -__global__ void vecAdd(float* A, float* B, float* C) -{ - int i = threadIdx.x; - A[i] = 0; - B[i] = i; - C[i] = A[i] + B[i]; -} -// CHECK: #include -#include -#define SIZE 10 -#define KERNELINVOKES 5000000 -int vecadd(int gpudevice, int rank) -{ - int devcheck(int, int); - devcheck(gpudevice, rank); - float A[SIZE], B[SIZE], C[SIZE]; - // Kernel invocation - float *devPtrA; - float *devPtrB; - float *devPtrC; - int memsize = SIZE * sizeof(float); - // CHECK: hipMalloc((void**)&devPtrA, memsize); - // CHECK: hipMalloc((void**)&devPtrB, memsize); - // CHECK: hipMalloc((void**)&devPtrC, memsize); - cudaMalloc((void**)&devPtrA, memsize); - cudaMalloc((void**)&devPtrB, memsize); - cudaMalloc((void**)&devPtrC, memsize); - // CHECK: hipMemcpy(devPtrA, A, memsize, hipMemcpyHostToDevice); - // CHECK: hipMemcpy(devPtrB, B, memsize, hipMemcpyHostToDevice); - cudaMemcpy(devPtrA, A, memsize, cudaMemcpyHostToDevice); - cudaMemcpy(devPtrB, B, memsize, cudaMemcpyHostToDevice); - for (int i = 0; i>>(devPtrA, devPtrB, devPtrC); - } - // CHECK: hipMemcpy(C, devPtrC, memsize, hipMemcpyDeviceToHost); - cudaMemcpy(C, devPtrC, memsize, cudaMemcpyDeviceToHost); - // calculate only up to gpudevice to show the unique output - // of each rank's kernel launch - for (int i = 0; i= device_count) - { - printf("gpudevice >= device_count ... exiting\n"); - exit(1); - } - // CHECK: hipError_t cudareturn; - // CHECK: hipDeviceProp_t deviceProp; - // CHECK: hipGetDeviceProperties(&deviceProp, gpudevice); - cudaError_t cudareturn; - cudaDeviceProp deviceProp; - cudaGetDeviceProperties(&deviceProp, gpudevice); - if (deviceProp.warpSize <= 1) - { - printf("rank %d: warning, CUDA Device Emulation (CPU) detected, exiting\n", rank); - exit(1); - } - // CHECK: cudareturn = hipSetDevice(gpudevice); - cudareturn = cudaSetDevice(gpudevice); - // CHECK: if (cudareturn == hipErrorInvalidDevice) - if (cudareturn == cudaErrorInvalidDevice) - { - // CHECK: perror("hipSetDevice returned hipErrorInvalidDevice"); - perror("cudaSetDevice returned cudaErrorInvalidDevice"); - } - else - { - // CHECK: hipGetDevice(&device); - cudaGetDevice(&device); - printf("rank %d: cudaGetDevice()=%d\n", rank, device); - } -}