diff --git a/projects/clr/hipamd/CMakeLists.txt b/projects/clr/hipamd/CMakeLists.txt index 9153f08d93..4982fb93f6 100755 --- a/projects/clr/hipamd/CMakeLists.txt +++ b/projects/clr/hipamd/CMakeLists.txt @@ -1,4 +1,5 @@ -# Copyright (C) 2016-2021 Advanced Micro Devices, Inc. All Rights Reserved. +# Copyright (c) 2020-2021 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 @@ -17,498 +18,269 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -cmake_minimum_required(VERSION 3.10) -project(hip) +cmake_minimum_required(VERSION 3.5.1) -# sample command for hip-rocclr runtime, you'll need to have rocclr built -# For shared lib of hip-rocclr runtime -# For release version -# cmake -DCMAKE_PREFIX_PATH="$ROCclr_DIR/build;/opt/rocm/" -DCMAKE_INSTALL_PREFIX= .. -# For debug version -# cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH="$ROCclr_DIR/build;/opt/rocm/" -DCMAKE_INSTALL_PREFIX= .. -# For static lib of hip-rocclr runtime -# For release version -# cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_PREFIX_PATH="$ROCclr_DIR/build;/opt/rocm/" -DCMAKE_INSTALL_PREFIX= .. -# For debug version -# cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH="$ROCclr_DIR/build;/opt/rocm/" -DCMAKE_INSTALL_PREFIX= .. -# If you don't specify CMAKE_INSTALL_PREFIX, hip-rocclr runtime will be installed to "/opt/rocm/hip". +include(GNUInstallDirs) -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +if(ADDRESS_SANITIZER) + set(ASAN_LINKER_FLAGS "-fsanitize=address") + set(ASAN_COMPILER_FLAGS "-fno-omit-frame-pointer -fsanitize=address") -############################# -# Options -############################# -option(BUILD_HIPIFY_CLANG "Enable building the CUDA->HIP converter" OFF) -option(__HIP_ENABLE_PCH "Enable/Disable pre-compiled hip headers" ON) -option(__HIP_ENABLE_RTC "Enable/Disable pre-processed hiprtc shared lib" ON) - -if(__HIP_ENABLE_PCH) - set(_pchStatus 1) -else() - set(_pchStatus 0) -endif() - -############################# -# Setup config generation -############################# -string(TIMESTAMP _timestamp UTC) -set(_versionInfo "# Auto-generated by cmake\n") -set(_buildInfo "# Auto-generated by cmake on ${_timestamp} UTC\n") -macro(add_to_config _configfile _variable) - set(${_configfile} "${${_configfile}}${_variable}=${${_variable}}\n") -endmacro() - -############################# -# Setup version information -############################# -# hipconfig is a perl script and is not trivially invokable on Windows. -if(NOT WIN32) -# Determine HIP_BASE_VERSION -set(ENV{HIP_PATH} "") -execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bin/hipconfig --version - OUTPUT_VARIABLE HIP_BASE_VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE) -string(REPLACE "." ";" VERSION_LIST ${HIP_BASE_VERSION}) -list(GET VERSION_LIST 0 HIP_VERSION_MAJOR) -list(GET VERSION_LIST 1 HIP_VERSION_MINOR) -set(HIP_VERSION_GITDATE 0) -endif() - -find_package(Git) - -# FIXME: Two different version strings used. -# Below we use UNIX commands, not compatible with Windows. -if(GIT_FOUND AND (NOT WIN32)) - # get date information based on UTC - # use the last two digits of year + week number + day in the week as HIP_VERSION_GITDATE - # use the commit date, instead of build date - # add xargs to remove strange trailing newline character - execute_process(COMMAND ${GIT_EXECUTABLE} show -s --format=@%ct - COMMAND xargs - COMMAND date -f - --utc +%y%U%w - RESULT_VARIABLE git_result - OUTPUT_VARIABLE git_output - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - OUTPUT_STRIP_TRAILING_WHITESPACE) - if(git_result EQUAL 0) - set(HIP_VERSION_GITDATE ${git_output}) - endif() - - # get commit short hash - execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - RESULT_VARIABLE git_result - OUTPUT_VARIABLE git_output - OUTPUT_STRIP_TRAILING_WHITESPACE) - if(git_result EQUAL 0) - set(HIP_VERSION_GITHASH ${git_output}) - endif() - - # get commit count - execute_process(COMMAND ${GIT_EXECUTABLE} rev-list --count HEAD - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - RESULT_VARIABLE git_result - OUTPUT_VARIABLE git_output - OUTPUT_STRIP_TRAILING_WHITESPACE) - if(git_result EQUAL 0) - set(HIP_VERSION_GITCOUNT ${git_output}) - endif() - - set(HIP_VERSION_PATCH ${HIP_VERSION_GITDATE}-${HIP_VERSION_GITHASH}) - - if(DEFINED ENV{ROCM_LIBPATCH_VERSION}) - set(HIP_PACKAGING_VERSION_PATCH ${HIP_VERSION_GITDATE}.${HIP_VERSION_GITCOUNT}.$ENV{ROCM_LIBPATCH_VERSION}) - else() - set(HIP_PACKAGING_VERSION_PATCH ${HIP_VERSION_GITDATE}.${HIP_VERSION_GITCOUNT}-${HIP_VERSION_GITHASH}) - endif() -else() - # FIXME: Some parts depend on this being set. - set(HIP_PACKAGING_VERSION_PATCH "0") -endif() - -## Debian package specific variables -if ( DEFINED ENV{CPACK_DEBIAN_PACKAGE_RELEASE} ) - set ( CPACK_DEBIAN_PACKAGE_RELEASE $ENV{CPACK_DEBIAN_PACKAGE_RELEASE} ) -else() - set ( CPACK_DEBIAN_PACKAGE_RELEASE "local" ) -endif() -message (STATUS "Using CPACK_DEBIAN_PACKAGE_RELEASE ${CPACK_DEBIAN_PACKAGE_RELEASE}" ) - -## RPM package specific variables -if ( DEFINED ENV{CPACK_RPM_PACKAGE_RELEASE} ) - set ( CPACK_RPM_PACKAGE_RELEASE $ENV{CPACK_RPM_PACKAGE_RELEASE} ) -else() - set ( CPACK_RPM_PACKAGE_RELEASE "local" ) -endif() - -## 'dist' breaks manual builds on debian systems due to empty Provides -execute_process( COMMAND rpm --eval %{?dist} - RESULT_VARIABLE PROC_RESULT - OUTPUT_VARIABLE EVAL_RESULT - OUTPUT_STRIP_TRAILING_WHITESPACE ) - -if ( PROC_RESULT EQUAL "0" AND NOT EVAL_RESULT STREQUAL "" ) - string ( APPEND CPACK_RPM_PACKAGE_RELEASE "%{?dist}" ) -endif() -message(STATUS "CPACK_RPM_PACKAGE_RELEASE: ${CPACK_RPM_PACKAGE_RELEASE}") - -add_to_config(_versionInfo HIP_PACKAGING_VERSION_PATCH) -add_to_config(_versionInfo CPACK_DEBIAN_PACKAGE_RELEASE) -add_to_config(_versionInfo CPACK_RPM_PACKAGE_RELEASE) - -add_to_config(_versionInfo HIP_VERSION_MAJOR) -add_to_config(_versionInfo HIP_VERSION_MINOR) -add_to_config(_versionInfo HIP_VERSION_PATCH) - -set (HIP_LIB_VERSION_MAJOR ${HIP_VERSION_MAJOR}) -set (HIP_LIB_VERSION_MINOR ${HIP_VERSION_MINOR}) -if (${ROCM_PATCH_VERSION} ) - set (HIP_LIB_VERSION_PATCH ${ROCM_PATCH_VERSION}) -else () - set (HIP_LIB_VERSION_PATCH ${HIP_VERSION_PATCH}) -endif () -set (HIP_LIB_VERSION_STRING "${HIP_LIB_VERSION_MAJOR}.${HIP_LIB_VERSION_MINOR}.${HIP_LIB_VERSION_PATCH}") -if (DEFINED ENV{ROCM_RPATH}) - set (CMAKE_INSTALL_RPATH "$ENV{ROCM_RPATH}") - set (CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) - set (CMAKE_SKIP_BUILD_RPATH TRUE) -endif () - -# overwrite HIP_VERSION_PATCH for packaging -set(HIP_VERSION ${HIP_VERSION_MAJOR}.${HIP_VERSION_MINOR}.${HIP_PACKAGING_VERSION_PATCH}) - -# Remove when CI is updated -if(HIP_PLATFORM STREQUAL "rocclr") - set(HIP_PLATFORM "amd") -endif() -############################# -# Configure variables -############################# -# Determine HIP_PLATFORM -if(NOT DEFINED HIP_PLATFORM) - if(NOT DEFINED ENV{HIP_PLATFORM}) - execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bin/hipconfig --platform - OUTPUT_VARIABLE HIP_PLATFORM - OUTPUT_STRIP_TRAILING_WHITESPACE) + if(NOT CMAKE_COMPILER_IS_GNUCC) + if(BUILD_SHARED_LIBS) + set(ASAN_LINKER_FLAGS "${ASAN_LINKER_FLAGS} -shared-libsan") else() - set(HIP_PLATFORM $ENV{HIP_PLATFORM} CACHE STRING "HIP Platform") + set(ASAN_LINKER_FLAGS "${ASAN_LINKER_FLAGS} -static-libsan") endif() -endif() -message(STATUS "HIP Platform: " ${HIP_PLATFORM}) + endif() -if(HIP_PLATFORM STREQUAL "nvidia") - set(HIP_RUNTIME "cuda" CACHE STRING "HIP Runtime") - set(HIP_COMPILER "nvcc" CACHE STRING "HIP Compiler") -elseif(HIP_PLATFORM STREQUAL "amd") - set(HIP_RUNTIME "rocclr" CACHE STRING "HIP Runtime") - set(HIP_COMPILER "clang" CACHE STRING "HIP Compiler") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ASAN_COMPILER_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ASAN_COMPILER_FLAGS}") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${ASAN_LINKER_FLAGS} -s") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${ASAN_LINKER_FLAGS}") +endif() + +option(BUILD_SHARED_LIBS "Build the shared library" ON) + +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") +find_package(ROCclr) + +if(BUILD_SHARED_LIBS) + add_library(amdhip64 SHARED) + # Windows doesn't have a strip utility, so CMAKE_STRIP won't be set. + if((CMAKE_BUILD_TYPE STREQUAL "Release") AND NOT ("${CMAKE_STRIP}" STREQUAL "")) + add_custom_command(TARGET amdhip64 POST_BUILD COMMAND ${CMAKE_STRIP} $) + endif() else() - message(FATAL_ERROR "Unexpected HIP_PLATFORM: " ${HIP_PLATFORM}) + add_library(amdhip64 STATIC $) endif() -message(STATUS "HIP Runtime: " ${HIP_RUNTIME}) -message(STATUS "HIP Compiler: " ${HIP_COMPILER}) +set_target_properties(amdhip64 PROPERTIES + CXX_STANDARD 14 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF + POSITION_INDEPENDENT_CODE ON + # Workaround for many places in the HIP project + # having hardcoded references to build/lib/libamdhip64.so + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) -add_to_config(_buildInfo HIP_RUNTIME) -add_to_config(_buildInfo HIP_COMPILER) - -# Set default build type -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release") -endif() - -# Determine HIP install path -if (UNIX) - set(HIP_DEFAULT_INSTALL_PREFIX "/opt/rocm/hip") -endif() -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX ${HIP_DEFAULT_INSTALL_PREFIX} CACHE PATH "Installation path for HIP" FORCE) -endif() - -if(DEV_LOG_ENABLE MATCHES "yes") - add_definitions(-DDEV_LOG_ENABLE) -endif() - -# Set default install path as "/opt/rocm/hip", can override the path from cmake build. -set(CPACK_INSTALL_PREFIX ${HIP_DEFAULT_INSTALL_PREFIX} CACHE PATH "Package Installation path for HIP") - -if(IS_ABSOLUTE ${CMAKE_INSTALL_PREFIX}) - message(STATUS "HIP will be installed in: " ${CMAKE_INSTALL_PREFIX}) +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set_target_properties(amdhip64 PROPERTIES OUTPUT_NAME "amdhip64") else() - message(FATAL_ERROR "Don't know where to install HIP. Please specify absolute path using -DCMAKE_INSTALL_PREFIX") + set_target_properties(amdhip64 PROPERTIES OUTPUT_NAME "amdhip32") endif() -if (NOT DEFINED ROCM_PATH ) - set ( ROCM_PATH "/opt/rocm" CACHE STRING "Default ROCM installation directory." ) -endif () -message (STATUS "ROCM Installation path(ROCM_PATH): ${ROCM_PATH}") - -# set the installation path for the installer package -set(CPACK_SET_DESTDIR ON CACHE BOOL "Installer package will install hip to CMAKE_INSTALL_PREFIX instead of CPACK_PACKAGING_INSTALL_PREFIX") -if (NOT CPACK_SET_DESTDIR) - set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/rocm/hip" CACHE PATH "Default installation path of hcc installer package") -endif (NOT CPACK_SET_DESTDIR) - -############################# -# Build steps -############################# -set(BIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin) -set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib) -set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include) -set(CONFIG_PACKAGE_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/hip) -set(CONFIG_LANG_PACKAGE_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/hip-lang) - -# Build clang hipify if enabled -if (BUILD_HIPIFY_CLANG) - add_subdirectory(hipify-clang) +# Disable versioning for Windows +# as currently HIP_LIB_VERSION_STRING and HIP_LIB_VERSION_MAJOR +# are not being populated +if(NOT WIN32) + if(BUILD_SHARED_LIBS) + set_target_properties(amdhip64 PROPERTIES + VERSION ${HIP_LIB_VERSION_STRING} + SOVERSION ${HIP_LIB_VERSION_MAJOR}) + endif() endif() -# Workaround for current versioning logic not being compatible with Windows +target_sources(amdhip64 PRIVATE + src/cl_gl.cpp + src/cl_lqdflash_amd.cpp + src/fixme.cpp + src/hip_activity.cpp + src/hip_code_object.cpp + src/hip_context.cpp + src/hip_device_runtime.cpp + src/hip_device.cpp + src/hip_error.cpp + src/hip_event.cpp + src/hip_fatbin.cpp + src/hip_global.cpp + src/hip_graph_internal.cpp + src/hip_graph.cpp + src/hip_hmm.cpp + src/hip_intercept.cpp + src/hip_memory.cpp + src/hip_module.cpp + src/hip_peer.cpp + src/hip_platform.cpp + src/hip_profile.cpp + src/hip_rtc.cpp + src/hip_stream_ops.cpp + src/hip_stream.cpp + src/hip_surface.cpp + src/hip_texture.cpp) + if(WIN32) - set(HIP_VERSION_MAJOR 0) - set(HIP_VERSION_MINOR 0) - set(HIP_VERSION_GITDATE 0) + target_sources(amdhip64 PRIVATE + src/cl_d3d9.cpp + src/cl_d3d10.cpp + src/cl_d3d11.cpp) endif() -# Generate hip_version.h -set(_versionInfoHeader -"// Auto-generated by cmake\n -#ifndef HIP_VERSION_H -#define HIP_VERSION_H\n -#define HIP_VERSION_MAJOR ${HIP_VERSION_MAJOR} -#define HIP_VERSION_MINOR ${HIP_VERSION_MINOR} -#define HIP_VERSION_PATCH ${HIP_VERSION_GITDATE} -#define HIP_VERSION (HIP_VERSION_MAJOR * 100 + HIP_VERSION_MINOR)\n -#define __HIP_HAS_GET_PCH ${_pchStatus}\n -#endif\n -") -file(WRITE "${PROJECT_BINARY_DIR}/include/hip/hip_version.h" ${_versionInfoHeader}) - -if(HIP_RUNTIME STREQUAL "rocclr") - add_subdirectory(src/hipamd) +if(BUILD_SHARED_LIBS) + if(WIN32) + target_sources(amdhip64 PRIVATE src/amdhip.def) + else() + target_link_libraries(amdhip64 PRIVATE "-Wl,--version-script=${CMAKE_CURRENT_LIST_DIR}/src/hip_hcc.map.in") + set_target_properties(amdhip64 PROPERTIES LINK_DEPENDS "${CMAKE_CURRENT_LIST_DIR}/src/hip_hcc.map.in") + endif() endif() -# Generate .hipInfo -file(WRITE "${PROJECT_BINARY_DIR}/.hipInfo" ${_buildInfo}) +target_include_directories(amdhip64 + PRIVATE + ${PROJECT_SOURCE_DIR}/src/hipamd/include + ${PROJECT_SOURCE_DIR}/include + ${PROJECT_BINARY_DIR}/include) -# Generate .hipVersion -file(WRITE "${PROJECT_BINARY_DIR}/.hipVersion" ${_versionInfo}) +target_compile_definitions(amdhip64 PRIVATE __HIP_PLATFORM_AMD__) -# Build doxygen documentation -find_program(DOXYGEN_EXE doxygen) -if(DOXYGEN_EXE) - add_custom_target(doc COMMAND HIP_PATH=${CMAKE_CURRENT_SOURCE_DIR} ${DOXYGEN_EXE} ${CMAKE_CURRENT_SOURCE_DIR}/docs/doxygen-input/doxy.cfg - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/docs) +target_link_libraries(amdhip64 PRIVATE ${CMAKE_DL_LIBS}) +# Additional dependencies for hipRTC +if(WIN32) + target_link_libraries(amdhip64 PRIVATE Dbghelp.lib) +endif() + +# Note in static case we cannot link against rocclr. +# If we would, we'd also have to export rocclr and have hipcc pass it to the linker. +if(BUILD_SHARED_LIBS) + target_link_libraries(amdhip64 PRIVATE rocclr) +else() + target_compile_definitions(amdhip64 PRIVATE $) + target_include_directories(amdhip64 PRIVATE $) +endif() + +# Short-Term solution for pre-compiled headers for online compilation +# Enable pre compiled header +if(__HIP_ENABLE_PCH) + find_package(LLVM REQUIRED CONFIG + PATHS + /opt/rocm/llvm) + # find_package(LLVM) returns the lib/cmake/llvm location. We require the root. + set(HIP_LLVM_ROOT "${LLVM_DIR}/../../..") + + # execute_process(COMMAND sh -c "${CMAKE_CURRENT_SOURCE_DIR}/../bin/hip_embed_pch.sh ${PROJECT_BINARY_DIR}/include ${PROJECT_SOURCE_DIR}/include ${HIP_LLVM_ROOT}" COMMAND_ECHO STDERR RESULT_VARIABLE EMBED_PCH_RC) + execute_process(COMMAND sh -c "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/hip_embed_pch.sh ${PROJECT_BINARY_DIR}/include ${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/src/hipamd/include ${HIP_LLVM_ROOT}" COMMAND_ECHO STDERR RESULT_VARIABLE EMBED_PCH_RC) + if (EMBED_PCH_RC AND NOT EMBED_PCH_RC EQUAL 0) + message(FATAL_ERROR "Failed to embed PCH") + endif() + + target_compile_definitions(amdhip64 PRIVATE __HIP_ENABLE_PCH) + target_sources(amdhip64 PRIVATE ${CMAKE_BINARY_DIR}/hip_pch.o) +endif() + +# Enable preprocessed hiprtc-builtins library +if(__HIP_ENABLE_RTC) + find_package(LLVM REQUIRED CONFIG + PATHS + /opt/rocm/llvm) + # find_package(LLVM) returns the lib/cmake/llvm location. We require the root. + set(HIP_LLVM_ROOT "${LLVM_DIR}/../../..") + + if(WIN32) + set(HIPRTC_LIB_NAME "hiprtc-builtins64_${HIP_LIB_VERSION_MAJOR}${HIP_LIB_VERSION_MINOR}.dll") + else() + set(HIPRTC_LIB_NAME "libhiprtc-builtins.so.${HIP_LIB_VERSION_MAJOR}.${HIP_LIB_VERSION_MINOR}") + endif() + execute_process( + COMMAND sh -c "mkdir -p ${PROJECT_BINARY_DIR}/lib; ${CMAKE_CURRENT_SOURCE_DIR}/../../bin/hip_embed_pch.sh ${PROJECT_BINARY_DIR}/include ${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/src/hipamd/include ${HIP_LLVM_ROOT} -r ${PROJECT_BINARY_DIR}/lib/${HIPRTC_LIB_NAME}" + COMMAND_ECHO STDERR + RESULT_VARIABLE EMBED_RTC_RC + ) + if (EMBED_RTC_RC AND NOT EMBED_RTC_RC EQUAL 0) + message(FATAL_ERROR "Failed to create hiprtc shared lib") + endif() + install(FILES ${PROJECT_BINARY_DIR}/lib/${HIPRTC_LIB_NAME} DESTINATION lib) endif() ############################# -# Install steps +# Profiling API support ############################# +# Generate profiling API macros/structures header +set(PROF_API_STR "${PROJECT_BINARY_DIR}/include/hip/amd_detail/hip_prof_str.h") +set(PROF_API_HDR "${PROJECT_SOURCE_DIR}/include/hip/hip_runtime_api.h") +set(PROF_API_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src") +set(PROF_API_GEN "${CMAKE_CURRENT_SOURCE_DIR}/src/hip_prof_gen.py") +set(PROF_API_LOG "${PROJECT_BINARY_DIR}/hip_prof_gen.log.txt") -# Install .hipInfo -install(FILES ${PROJECT_BINARY_DIR}/.hipInfo DESTINATION lib) +find_package(PythonInterp REQUIRED) +add_custom_command(OUTPUT ${PROF_API_STR} + COMMAND ${PYTHON_EXECUTABLE} ${PROF_API_GEN} -v -t --priv ${OPT_PROF_API} ${PROF_API_HDR} ${PROF_API_SRC} ${PROF_API_STR} + OUTPUT_FILE ${PROF_API_LOG} + DEPENDS ${PROF_API_HDR} ${PROF_API_GEN} + COMMENT "Generating profiling primitives: ${PROF_API_STR}") -# Install .hipVersion -install(FILES ${PROJECT_BINARY_DIR}/.hipVersion DESTINATION bin) +add_custom_target(gen-prof-api-str-header ALL + DEPENDS ${PROF_API_STR} + SOURCES ${PROF_API_HDR}) -# Install src, bin, include & cmake if necessary -execute_process(COMMAND test ${CMAKE_INSTALL_PREFIX} -ef ${CMAKE_CURRENT_SOURCE_DIR} - RESULT_VARIABLE INSTALL_SOURCE) -if(NOT ${INSTALL_SOURCE} EQUAL 0) - install(DIRECTORY bin DESTINATION . USE_SOURCE_PERMISSIONS) +set_target_properties(amdhip64 PROPERTIES PUBLIC_HEADER ${PROF_API_STR}) - # The following two lines will be removed after upstream updation - install(CODE "MESSAGE(\"Removing ${CMAKE_INSTALL_PREFIX}/include\")") - install(CODE "file(REMOVE_RECURSE ${CMAKE_INSTALL_PREFIX}/include)") +option(USE_PROF_API ON "Enable roctracer integration") +# Enable profiling API +if(USE_PROF_API) + find_path(PROF_API_HEADER_DIR prof_protocol.h + HINTS + ${PROF_API_HEADER_PATH} + PATHS + ${ROCM_PATH}/roctracer + PATH_SUFFIXES + include/ext) - install(DIRECTORY include DESTINATION .) - install(DIRECTORY src/hipamd/include/hip/ DESTINATION include/hip/) - install(DIRECTORY cmake DESTINATION .) + if(NOT PROF_API_HEADER_DIR) + message(WARNING "Profiling API header not found. Disabling roctracer integration. Use -DPROF_API_HEADER_PATH=") + else() + target_compile_definitions(amdhip64 PUBLIC USE_PROF_API=1) + target_include_directories(amdhip64 PUBLIC ${PROF_API_HEADER_DIR}) + message(STATUS "Profiling API: ${PROF_API_HEADER_DIR}") + endif() endif() -# Install generated headers -# FIXME: Associate with individual targets. -if(HIP_PLATFORM STREQUAL "amd") -install(FILES ${PROJECT_BINARY_DIR}/include/hip/amd_detail/hip_prof_str.h - DESTINATION include/hip/amd_detail) -endif() -install(FILES ${PROJECT_BINARY_DIR}/include/hip/hip_version.h - DESTINATION include/hip) +add_dependencies(amdhip64 gen-prof-api-str-header) + +add_custom_command(TARGET amdhip64 POST_BUILD COMMAND + ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/.hipInfo ${PROJECT_BINARY_DIR}/lib/.hipInfo) +add_custom_command(TARGET amdhip64 POST_BUILD COMMAND + ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/include ${PROJECT_BINARY_DIR}/include) + +add_library(host INTERFACE) +target_link_libraries(host INTERFACE amdhip64) + +add_library(device INTERFACE) +target_link_libraries(device INTERFACE host) + +INSTALL(TARGETS amdhip64 host device + EXPORT hip-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +INSTALL(EXPORT hip-targets DESTINATION ${CONFIG_PACKAGE_INSTALL_DIR} NAMESPACE hip::) + +INSTALL(TARGETS amdhip64 host device + EXPORT hip-lang-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +INSTALL(EXPORT hip-lang-targets DESTINATION ${CONFIG_LANG_PACKAGE_INSTALL_DIR} NAMESPACE hip-lang::) -############################# -# hip-config -############################# -# Packaging invokes UNIX commands, which are not available on Windows. if(NOT WIN32) include(CMakePackageConfigHelpers) configure_package_config_file( - hip-config.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/hip-config.cmake - INSTALL_DESTINATION ${CONFIG_PACKAGE_INSTALL_DIR} - PATH_VARS LIB_INSTALL_DIR INCLUDE_INSTALL_DIR BIN_INSTALL_DIR - ) + ${PROJECT_SOURCE_DIR}/hip-lang-config.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/hip-lang-config.cmake + INSTALL_DESTINATION ${CONFIG_LANG_PACKAGE_INSTALL_DIR} + PATH_VARS LIB_INSTALL_DIR INCLUDE_INSTALL_DIR BIN_INSTALL_DIR) write_basic_package_version_file( - ${CMAKE_CURRENT_BINARY_DIR}/hip-config-version.cmake - VERSION "${HIP_VERSION_MAJOR}.${HIP_VERSION_MINOR}.${HIP_VERSION_GITDATE}" - COMPATIBILITY SameMajorVersion - ) + ${CMAKE_CURRENT_BINARY_DIR}/hip-lang-config-version.cmake + VERSION "${HIP_VERSION_MAJOR}.${HIP_VERSION_MINOR}.${HIP_VERSION_GITDATE}" + COMPATIBILITY SameMajorVersion) install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/hip-config.cmake - ${CMAKE_CURRENT_BINARY_DIR}/hip-config-version.cmake + ${CMAKE_CURRENT_BINARY_DIR}/hip-lang-config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/hip-lang-config-version.cmake DESTINATION - ${CONFIG_PACKAGE_INSTALL_DIR} + ${CONFIG_LANG_PACKAGE_INSTALL_DIR}/ ) - -############################# -# Packaging steps -############################# -# Package: hip_base -set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hip-base) -configure_file(packaging/hip-base.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) -configure_file(packaging/hip-base.postinst ${BUILD_DIR}/postinst @ONLY) -configure_file(packaging/hip-base.prerm ${BUILD_DIR}/prerm @ONLY) - -add_custom_target(pkg_hip_base 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} ) - -# Packaging needs to wait for hipify-clang to build if it's enabled... -if (BUILD_HIPIFY_CLANG) - add_dependencies(pkg_hip_base hipify-clang) endif() - -if(HIP_RUNTIME STREQUAL "rocclr") - set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/rocclr) - configure_file(packaging/hip-rocclr.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) - configure_file(packaging/hip-rocclr.postinst ${BUILD_DIR}/postinst @ONLY) - configure_file(packaging/hip-rocclr.prerm ${BUILD_DIR}/prerm @ONLY) - add_custom_target(hip_on_rocclr 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} ) -endif() - -# Package: hip_nvcc -set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hip-nvcc) -configure_file(packaging/hip-nvcc.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) -add_custom_target(pkg_hip_nvcc 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}) - -# Package: hip_doc -set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hip-doc) -configure_file(packaging/hip-doc.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) -add_custom_target(pkg_hip_doc 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}) - -# Package: hip_samples -set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hip_samples) -configure_file(packaging/hip-samples.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) -add_custom_target(pkg_hip_samples 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}) - -# Package: all -if(POLICY CMP0037) - cmake_policy(PUSH) - cmake_policy(SET CMP0037 OLD) -endif() - -if(HIP_RUNTIME STREQUAL "rocclr") - add_custom_target(package - WORKING_DIRECTORY ${PROJECT_BINARY_DIR} - DEPENDS pkg_hip_base hip_on_rocclr pkg_hip_nvcc pkg_hip_doc pkg_hip_samples) -endif() - -if(POLICY CMP0037) - cmake_policy(POP) -endif() -endif() - -############################# -# Code analysis -############################# -# Target: cppcheck -find_program(CPPCHECK_EXE cppcheck) -if(CPPCHECK_EXE) - add_custom_target(cppcheck COMMAND ${CPPCHECK_EXE} --force --quiet --enable=warning,performance,portability,information,missingInclude src include -I /opt/rocm/include/hcc -I /opt/rocm/include --suppress=*:/opt/rocm/include/hcc/hc.hpp - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) -endif() - -############################# -# Code formatting -############################# -# Target: clangformat -find_program(CLANGFORMAT_EXE clang-format PATHS ${HCC_HOME}/bin) -if(CLANGFORMAT_EXE) - file(GLOB_RECURSE FORMAT_SOURCE_FILE_LIST *.cpp *.hpp *.h) - add_custom_target(clangformat COMMAND ${CLANGFORMAT_EXE} -style=file -i ${FORMAT_SOURCE_FILE_LIST} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) -endif() - -############################# -# Testing steps -############################# -# HIT is not compatible with Windows -if(NOT WIN32) -set(HIP_ROOT_DIR ${CMAKE_CURRENT_BINARY_DIR}) -set(HIP_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR}) -if(HIP_PLATFORM STREQUAL "nvidia") - execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/include" "${HIP_ROOT_DIR}/include" RESULT_VARIABLE RUN_HIT ERROR_QUIET) -endif() -execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/src/hipamd/include/hip/" "${HIP_ROOT_DIR}/include/hip/" RESULT_VARIABLE RUN_HIT ERROR_QUIET) -execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/cmake" "${HIP_ROOT_DIR}/cmake" RESULT_VARIABLE RUN_HIT ERROR_QUIET) -if(${RUN_HIT} EQUAL 0) - execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/bin" "${HIP_ROOT_DIR}/bin" RESULT_VARIABLE RUN_HIT ERROR_QUIET) -endif() -if(HIP_CATCH_TEST EQUAL "1") - enable_testing() - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tests/catch) -else() - if(${RUN_HIT} EQUAL 0) - set(CMAKE_MODULE_PATH "${HIP_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH}) - include(${HIP_SRC_PATH}/tests/hit/HIT.cmake) - include(${HIP_SRC_PATH}/tests/Tests.cmake) - else() - message(STATUS "Testing targets will not be available. To enable them please ensure that the HIP installation directory is writeable. Use -DCMAKE_INSTALL_PREFIX to specify a suitable location") - endif() -endif() -endif() - -############################# -# Code analysis -############################# -# Target: clang -if(HIP_HIPCC_EXECUTABLE) - add_custom_target(analyze - COMMAND ${HIP_HIPCC_EXECUTABLE} -fvisibility=hidden -fvisibility-inlines-hidden --analyze --analyzer-outputtext -isystem /opt/rocm/include -Wno-unused-command-line-argument -I/opt/rocm/include -c src/*.cpp -Iinclude/ -I./ - WORKING_DIRECTORY ${HIP_SRC_PATH}) - if(CPPCHECK_EXE) - add_dependencies(analyze cppcheck) - endif() -endif() - -# vim: ts=4:sw=4:expandtab:smartindent diff --git a/projects/clr/hipamd/CONTRIBUTING.md b/projects/clr/hipamd/CONTRIBUTING.md deleted file mode 100644 index d0815a418d..0000000000 --- a/projects/clr/hipamd/CONTRIBUTING.md +++ /dev/null @@ -1,156 +0,0 @@ -# Contributor Guidelines - -## Make Tips -When building HIP, you will likely want to build and install to a local user-accessible directory (rather than /opt/rocm). -This can be easily be done by setting the -DCMAKE_INSTALL_PREFIX variable when running cmake. Typical use case is to -set CMAKE_INSTALL_PREFIX to your HIP git root, and then ensure HIP_PATH points to this directory. For example - -``` -cmake .. -DCMAKE_INSTALL_PREFIX=.. -make install - -export HIP_PATH= -``` - -After making HIP, don't forget the "make install" step ! - - - -## Adding a new HIP API - - - Add a translation to the hipify-clang tool ; many examples abound. - - For stat tracking purposes, place the API into an appropriate stat category ("dev", "mem", "stream", etc). - - Add a inlined NVIDIA implementation for the function in include/hip/nvidia_detail/hip_runtime_api.h. - - These are typically headers - - Add an HIP_ROCclr definition and Doxygen comments for the function in include/amd_detail/hip_runtime_api.h - - Source implementation typically go in hip/rocclr/hip_*.cpp. The implementation involve calls to HIP runtime (ie for hipStream_t). - -## Check HIP-Clang version -In some cases new HIP-Clang features are tied to specified releases, and it can be useful to check the current version is sufficiently new enough to support the desired feature. - -HIP runtime version - -``` -> cat /opt/rocm/hip/bin/.hipVersion -# Auto-generated by cmake -HIP_VERSION_MAJOR=3 -HIP_VERSION_MINOR=9 -HIP_VERSION_PATCH=20345-519ef3f2 -``` - -HIP-Clang compiler version - -``` -$ /opt/rocm/llvm/bin/clang -v -clang version 11.0.0 (/src/external/llvm-project/clang 075fedd3fd2f4d9d8cca79d0cd51f64c5ef21432) -Target: x86_64-unknown-linux-gnu -Thread model: posix -InstalledDir: /opt/rocm/llvm/bin -Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7 -Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0 -Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8 -Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9 -Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9 -Candidate multilib: .;@m64 -Candidate multilib: 32;@m32 -Candidate multilib: x32;@mx32 -Selected multilib: .;@m64 -``` - -## Unit Testing Environment - -HIP includes unit tests in the tests/src directory. -When adding a new HIP feature, add a new unit test as well. -See [tests/README.md](README.md) for more information. - -## Development Flow - -Directed tests provide a great place to develop new features alongside the associated test. - -For applications and benchmarks outside the directed test environment, developments should use a two-step development flow: -- #1. Compile, link, and install HIP/ROCclr. See [Installation](README.md#Installation) notes. -- #2. Relink the target application to include changes in HIP runtime file. - -## Environment Variables -- **HIP_PATH** : Location of HIP include, src, bin, lib directories. -- **HCC_ROCCLR_HOME** : Path to HIP/ROCclr directory, used on AMD platforms. Default /opt/rocm/rocclr. -- **HSA_PATH** : Path to HSA include, lib. Default /opt/rocm/hsa. -- **CUDA_PATH* : On nvcc system, this points to root of CUDA installation. - -## Contribution guidelines ## - -Features (ie functions, classes, types) defined in hip*.h should resemble CUDA APIs. -The HIP interface is designed to be very familiar for CUDA programmers. - -Differences or limitations of HIP APIs as compared to CUDA APIs should be clearly documented and described. - -### Coding Guidelines (in brief) -- Code Indentation: - - Tabs should be expanded to spaces. - - Use 4 spaces indentation. -- Capitalization and Naming - - Prefer camelCase for HIP interfaces and internal symbols. Note HCC uses _ for separator. - This guideline is not yet consistently followed in HIP code - eventual compliance is aspirational. - - Member variables should begin with a leading "_". This allows them to be easily distinguished from other variables or functions. - -- {} placement - - For functions, the opening { should be placed on a new line. - - For if/else blocks, the opening { is placed on same line as the if/else. Use a space to separate {/" from if/else. Example -''' - if (foo) { - doFoo() - } else { - doFooElse(); - } -''' - - namespace should be on same line as { and separated by a space. - - Single-line if statement should still use {/} pair (even though C++ does not require). -- Miscellaneous - - All references in function parameter lists should be const. - - "ihip" = internal hip structures. These should not be exposed through the HIP API. - - Keyword TODO refers to a note that should be addressed in long-term. Could be style issue, software architecture, or known bugs. - - FIXME refers to a short-term bug that needs to be addressed. - -- HIP_INIT_API() should be placed at the start of each top-level HIP API. This function will make sure the HIP runtime is initialized, - and also constructs an appropriate API string for tracing and CodeXL marker tracing. The arguments to HIP_INIT_API should match - those of the parent function. -- ihipLogStatus should only be called from top-level HIP APIs,and should be called to log and return the error code. The error code - is used by the GetLastError and PeekLastError functions - if a HIP API simply returns, then the error will not be logged correctly. - -- All HIP environment variables should begin with the keyword HIP_ - Environment variables should be long enough to describe their purpose but short enough so they can be remembered - perhaps 10-20 characters, with 3-4 parts separated by underscores. - To see the list of current environment variables, along with their values, set HIP_PRINT_ENV and run any hip applications on ROCm platform . - HIPCC or other tools may support additional environment variables which should follow the above convention. - - -### Presubmit Testing: -Before checking in or submitting a pull request, run all directed tests (see tests/README.md) and all Rodinia tests. -Ensure pass results match starting point: - -```shell - > cd examples/ - > ./run_all.sh -``` - - -### Checkin messages -Follow existing best practice for writing a good Git commit message. Some tips: - http://chris.beams.io/posts/git-commit/ - https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message - -In particular : - - Use imperative voice, ie "Fix this bug", "Refactor the XYZ routine", "Update the doc". - Not : "Fixing the bug", "Fixed the bug", "Bug fix", etc. - - Subject should summarize the commit. Do not end subject with a period. Use a blank line - after the subject. - - - -## Doxygen Editing Guidelines - -- bugs should be marked with @bugs near the code where the bug might be fixed. The @bug message will appear in the API description and also in the -doxygen bug list. - -## Other Tips: -### Markdown Editing -Recommended to use an offline Markdown viewer to review documentation, such as Markdown Preview Plus extension in Chrome browser, or Remarkable. diff --git a/projects/clr/hipamd/INSTALL.md b/projects/clr/hipamd/INSTALL.md deleted file mode 100644 index 5136004918..0000000000 --- a/projects/clr/hipamd/INSTALL.md +++ /dev/null @@ -1,124 +0,0 @@ -## Table of Contents - - - -- [Installing pre-built packages](#installing-pre-built-packages) - * [Prerequisites](#prerequisites) - * [AMD Platform](#amd-platform) - * [NVIDIA Platform](#nvidia-platform) -- [Building HIP from source](#building-hip-from-source) - * [Build ROCclr](#build-rocclr) - * [Build HIP](#build-hip) - * [Default paths and environment variables](#default-paths-and-environment-variables) -- [Verify your installation](#verify-your-installation) - - -# Installing pre-built packages - -HIP can be easily installed using pre-built binary packages using the package manager for your platform. - -## Prerequisites -HIP code can be developed either on AMD ROCm platform using HIP-Clang compiler, or a CUDA platform with nvcc installed. - -## AMD Platform - -``` -sudo apt install mesa-common-dev -sudo apt install clang -sudo apt install comgr -sudo apt-get -y install rocm-dkms -``` -Public link for Rocm installation -https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html - -HIP-Clang is the compiler for compiling HIP programs on AMD platform. - -HIP-Clang can be built manually: -``` -git clone -b rocm-4.3.x https://github.com/RadeonOpenCompute/llvm-project.git -cd llvm-project -mkdir -p build && cd build -cmake -DCMAKE_INSTALL_PREFIX=/opt/rocm/llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=1 -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" -DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt" ../llvm -make -j -sudo make install -``` - -Rocm device library can be manually built as following, -``` -export PATH=/opt/rocm/llvm/bin:$PATH -git clone -b rocm-4.3.x https://github.com/RadeonOpenCompute/ROCm-Device-Libs.git -cd ROCm-Device-Libs -mkdir -p build && cd build -CC=clang CXX=clang++ cmake -DLLVM_DIR=/opt/rocm/llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_WERROR=1 -DLLVM_ENABLE_ASSERTIONS=1 -DCMAKE_INSTALL_PREFIX=/opt/rocm .. -make -j -sudo make install -``` - -## NVIDIA Platform - -HIP-nvcc is the compiler for HIP program compilation on NVIDIA platform. - -* Add the ROCm package server to your system as per the OS-specific guide available [here](https://rocm.github.io/ROCmInstall.html#installing-from-amd-rocm-repositories). -* Install the "hip-nvcc" package. This will install CUDA SDK and the HIP porting layer. -``` -apt-get install hip-nvcc -``` - -* Default paths and environment variables: - * By default HIP looks for CUDA SDK in /usr/local/cuda (can be overriden by setting CUDA_PATH env variable). - * By default HIP is installed into /opt/rocm/hip (can be overridden by setting HIP_PATH environment variable). - * Optionally, consider adding /opt/rocm/bin to your path to make it easier to use the tools. - -# Building HIP from source - -## Build ROCclr - -ROCclr is defined on AMD platform that HIP use Radeon Open Compute Common Language Runtime (ROCclr), which is a virtual device interface that HIP runtimes interact with different backends. -See https://github.com/ROCm-Developer-Tools/ROCclr - -``` -git clone -b rocm-4.3.x https://github.com/ROCm-Developer-Tools/ROCclr.git -export ROCclr_DIR="$(readlink -f ROCclr)" -git clone -b rocm-4.3.x https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime.git -export OPENCL_DIR="$(readlink -f ROCm-OpenCL-Runtime)" -cd "$ROCclr_DIR" -mkdir -p build;cd build -cmake -DOPENCL_DIR="$OPENCL_DIR" -DCMAKE_INSTALL_PREFIX=/opt/rocm/rocclr .. -make -j -sudo make install -``` - -## Build HIP - -``` -git clone -b rocm-4.3.x https://github.com/ROCm-Developer-Tools/HIP.git -export HIP_DIR="$(readlink -f HIP)" -cd "$HIP_DIR" -mkdir -p build; cd build -cmake -DCMAKE_PREFIX_PATH="$ROCclr_DIR/build;/opt/rocm/" -DCMAKE_INSTALL_PREFIX= .. -make -j -sudo make install -Note: If you don't specify CMAKE_INSTALL_PREFIX, hip-rocclr runtime will be installed to "/opt/rocm/hip". -``` - -## Default paths and environment variables - - * By default HIP looks for HSA in /opt/rocm/hsa (can be overridden by setting HSA_PATH environment variable). - * By default HIP is installed into /opt/rocm/hip (can be overridden by setting HIP_PATH environment variable). - * By default HIP looks for clang in /opt/rocm/llvm/bin (can be overridden by setting HIP_CLANG_PATH environment variable) - * By default HIP looks for device library in /opt/rocm/lib (can be overridden by setting DEVICE_LIB_PATH environment variable). - * Optionally, consider adding /opt/rocm/bin to your PATH to make it easier to use the tools. - * Optionally, set HIPCC_VERBOSE=7 to output the command line for compilation. - -After installation, make sure HIP_PATH is pointed to /where/to/install/hip - -# Verify your installation - -Run hipconfig (instructions below assume default installation path) : -```shell -/opt/rocm/bin/hipconfig --full -``` - - -Compile and run the [square sample](https://github.com/ROCm-Developer-Tools/HIP/tree/main/samples/0_Intro/square). - diff --git a/projects/clr/hipamd/Jenkinsfile b/projects/clr/hipamd/Jenkinsfile deleted file mode 100644 index 471cca8319..0000000000 --- a/projects/clr/hipamd/Jenkinsfile +++ /dev/null @@ -1,442 +0,0 @@ -#!/usr/bin/env groovy -// Copyright (C) 2017-2021 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. - -// Generated from snippet generator 'properties; set job properties' -properties([buildDiscarder(logRotator( - artifactDaysToKeepStr: '', - artifactNumToKeepStr: '', - daysToKeepStr: '', - numToKeepStr: '10')), - disableConcurrentBuilds(), - parameters([booleanParam( name: 'push_image_to_docker_hub', defaultValue: false, description: 'Push hip & hcc image to rocm docker-hub' )]), - [$class: 'CopyArtifactPermissionProperty', projectNames: '*'] - ]) - -//////////////////////////////////////////////////////////////////////// -// -- AUXILLARY HELPER FUNCTIONS - -//////////////////////////////////////////////////////////////////////// -// Return build number of upstream job -@NonCPS -int get_upstream_build_num( ) -{ - def upstream_cause = currentBuild.rawBuild.getCause( hudson.model.Cause$UpstreamCause ) - if( upstream_cause == null) - return 0 - - return upstream_cause.getUpstreamBuild() -} - -//////////////////////////////////////////////////////////////////////// -// Return project name of upstream job -@NonCPS -String get_upstream_build_project( ) -{ - def upstream_cause = currentBuild.rawBuild.getCause( hudson.model.Cause$UpstreamCause ) - if( upstream_cause == null) - return null - - return upstream_cause.getUpstreamProject() -} - -//////////////////////////////////////////////////////////////////////// -// Construct the docker build image name -String docker_build_image_name( ) -{ - return "build-ubuntu-16.04" -} - -//////////////////////////////////////////////////////////////////////// -// Construct the relative path of the build directory -String build_directory_rel( String build_config ) -{ - if( build_config.equalsIgnoreCase( 'release' ) ) - { - return "build/release" - } - else - { - return "build/debug" - } -} - -//////////////////////////////////////////////////////////////////////// -// Lots of images are created above; no apparent way to delete images:tags with docker global variable -def docker_clean_images( String org, String image_name ) -{ - // Check if any images exist first grepping for image names - int docker_images = sh( script: "docker images | grep \"${org}/${image_name}\"", returnStatus: true ) - - // The script returns a 0 for success (images were found ) - if( docker_images == 0 ) - { - // Deleting images can fail, if other projects have built on top of that image and are now dependent on it. - // This should not be treated as a hip build failure. This requires cleanup at a later time, possibly through - // another job - try - { - // Best attempt to run bash script to clean images - // deleting images based on hash seems to be more stable than through name:tag values because of tags - sh "docker images | grep \"${org}/${image_name}\" | awk '{print \$1 \":\" \$2}' | xargs docker rmi" - } - catch( err ) - { - println 'Failed to cleanup a few images; probably the images are used as a base for other images' - currentBuild.result = 'SUCCESS' - } - } -} - -//////////////////////////////////////////////////////////////////////// -// -- BUILD RELATED FUNCTIONS - -//////////////////////////////////////////////////////////////////////// -// Checkout source code, source dependencies and update version number numbers -// Returns a relative path to the directory where the source exists in the workspace -String checkout_and_version( String platform ) -{ - String source_dir_rel = "src" - String source_hip_rel = "${source_dir_rel}/hip" - - stage("${platform} clone") - { - dir( "${source_hip_rel}" ) - { - // checkout hip - checkout([ - $class: 'GitSCM', - branches: scm.branches, - doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations, - extensions: scm.extensions + [[$class: 'CleanCheckout']], - userRemoteConfigs: scm.userRemoteConfigs - ]) - } - } - - return source_hip_rel -} - - -//////////////////////////////////////////////////////////////////////// -// This creates the docker image that we use to build the project in -// The docker images contains all dependencies, including OS platform, to build -def docker_build_image( String platform, String org, String optional_build_parm, String source_hip_rel, String from_image ) -{ - String build_image_name = docker_build_image_name( ) - String dockerfile_name = "dockerfile-build-ubuntu-16.04" - def build_image = null - - stage("${platform} build image") - { - dir("${source_hip_rel}") - { - def user_uid = sh( script: 'id -u', returnStdout: true ).trim() - - // Docker 17.05 introduced the ability to use ARG values in FROM statements - // Docker inspect failing on FROM statements with ARG https://issues.jenkins-ci.org/browse/JENKINS-44836 - // build_image = docker.build( "${org}/${build_image_name}:latest", "--pull -f docker/${dockerfile_name} --build-arg user_uid=${user_uid} --build-arg base_image=${from_image} ." ) - - // JENKINS-44836 workaround by using a bash script instead of docker.build() - sh "docker build -t ${org}/${build_image_name}:latest -f docker/${dockerfile_name} ${optional_build_parm} --build-arg user_uid=${user_uid} --build-arg base_image=${from_image} ." - build_image = docker.image( "${org}/${build_image_name}:latest" ) - } - } - - return build_image -} - -//////////////////////////////////////////////////////////////////////// -// This encapsulates the cmake configure, build and package commands -// Leverages docker containers to encapsulate the build in a fixed environment -def docker_build_inside_image( def build_image, String inside_args, String platform, String optional_configure, String build_config, String source_hip_rel, String build_dir_rel ) -{ - String source_hip_abs = pwd() + "/" + source_hip_rel - - build_image.inside( inside_args ) - { - stage("${platform} make ${build_config}") - { - // The rm command needs to run as sudo because the test steps below create files owned by root - sh """#!/usr/bin/env bash - set -x - rm -rf ${build_dir_rel} - mkdir -p ${build_dir_rel} - cd ${build_dir_rel} - cmake -DCMAKE_BUILD_TYPE=${build_config} -DCMAKE_INSTALL_PREFIX=staging ${optional_configure} ${source_hip_abs} - make -j\$(nproc) - """ - } - - // Cap the maximum amount of testing, in case of hangs - // Excluding hipMultiThreadDevice-pyramid & hipMemoryAllocateCoherentDriver tests from automation; due to its flakiness which requires some investigation - timeout(time: 1, unit: 'HOURS') - { - stage("${platform} unit testing") - { - sh """#!/usr/bin/env bash - set -x - cd ${build_dir_rel} - make install -j\$(nproc) - make build_tests -i -j\$(nproc) - ctest --output-on-failure -E "(hipMultiThreadDevice-pyramid|hipMemoryAllocateCoherentDriver)" - """ - // If unit tests output a junit or xunit file in the future, jenkins can parse that file - // to display test results on the dashboard - // junit "${build_dir_rel}/*.xml" - } - } - - // Only create packages from hcc based builds - if( platform.toLowerCase( ).startsWith( 'rocm-' ) ) - { - stage("${platform} packaging") - { - sh """#!/usr/bin/env bash - set -x - cd ${build_dir_rel} - make package - """ - - // No matter the base platform, all packages have the same name - // Only upload 1 set of packages, so we don't have a race condition uploading packages - if( platform.toLowerCase( ).startsWith( 'rocm-head' ) ) - { - archiveArtifacts artifacts: "${build_dir_rel}/*.deb", fingerprint: true - archiveArtifacts artifacts: "${build_dir_rel}/*.rpm", fingerprint: true - } - } - } - } - - return void -} - -//////////////////////////////////////////////////////////////////////// -// This builds a fresh docker image FROM a clean base image, with no build dependencies included -// Uploads the new docker image to internal artifactory -String docker_upload_artifactory( String hcc_ver, String artifactory_org, String from_image, String source_hip_rel, String build_dir_rel ) -{ - def hip_install_image = null - String image_name = "hip-${hcc_ver}-ubuntu-16.04" - - stage( 'artifactory' ) - { - println "artifactory_org: ${artifactory_org}" - - // We copy the docker files into the bin directory where the .deb lives so that it's a clean build everytime - sh "cp -r ${source_hip_rel}/docker/* ${build_dir_rel}" - - // Docker 17.05 introduced the ability to use ARG values in FROM statements - // Docker inspect failing on FROM statements with ARG https://issues.jenkins-ci.org/browse/JENKINS-44836 - // hip_install_image = docker.build( "${artifactory_org}/${image_name}:${env.BUILD_NUMBER}", "--pull -f ${build_dir_rel}/dockerfile-hip-ubuntu-16.04 --build-arg base_image=${from_image} ${build_dir_rel}" ) - - // JENKINS-44836 workaround by using a bash script instead of docker.build() - sh "docker build -t ${artifactory_org}/${image_name} --pull -f ${build_dir_rel}/dockerfile-hip-ubuntu-16.04 --build-arg base_image=${from_image} ${build_dir_rel}" - hip_install_image = docker.image( "${artifactory_org}/${image_name}" ) - - // The connection to artifactory can fail sometimes, but this should not be treated as a build fail - try - { - // Don't push pull requests to artifactory, these tend to accumulate over time - if( env.BRANCH_NAME.toLowerCase( ).startsWith( 'pr-' ) ) - { - println 'Pull Request (PR-xxx) detected; NOT pushing to artifactory' - } - else - { - docker.withRegistry('http://compute-artifactory:5001', 'artifactory-cred' ) - { - hip_install_image.push( "${env.BUILD_NUMBER}" ) - hip_install_image.push( 'latest' ) - } - } - } - catch( err ) - { - currentBuild.result = 'SUCCESS' - } - } - - return image_name -} - -//////////////////////////////////////////////////////////////////////// -// Uploads the new docker image to the public docker-hub -def docker_upload_dockerhub( String local_org, String image_name, String remote_org ) -{ - stage( 'docker-hub' ) - { - // Do not treat failures to push to docker-hub as a build fail - try - { - sh """#!/usr/bin/env bash - set -x - echo inside sh - docker tag ${local_org}/${image_name} ${remote_org}/${image_name} - """ - - docker_hub_image = docker.image( "${remote_org}/${image_name}" ) - - docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-cred' ) - { - docker_hub_image.push( "${env.BUILD_NUMBER}" ) - docker_hub_image.push( 'latest' ) - } - } - catch( err ) - { - currentBuild.result = 'SUCCESS' - } - } -} - -//////////////////////////////////////////////////////////////////////// -// -- MAIN -// Following this line is the start of MAIN of this Jenkinsfile -String build_config = 'Release' -String job_name = env.JOB_NAME.toLowerCase( ) - -// The following launches 3 builds in parallel: rocm-head, rocm-3.3.x and cuda-10.x -parallel rocm_3_3: -{ - node('hip-rocm') - { - String hcc_ver = 'rocm-3.3.x' - String from_image = 'ci_test_nodes/rocm-3.3.x/ubuntu-16.04:latest' - String inside_args = '--device=/dev/kfd --device=/dev/dri --group-add=video' - - // Checkout source code, dependencies and version files - String source_hip_rel = checkout_and_version( hcc_ver ) - - // Create/reuse a docker image that represents the hip build environment - def hip_build_image = docker_build_image( hcc_ver, 'hip', '', source_hip_rel, from_image ) - - // Print system information for the log - hip_build_image.inside( inside_args ) - { - sh """#!/usr/bin/env bash - set -x - /opt/rocm/bin/rocm_agent_enumerator -t ALL - /opt/rocm/bin/hcc --version - """ - } - - // Conctruct a binary directory path based on build config - String build_hip_rel = build_directory_rel( build_config ); - - // Build hip inside of the build environment - docker_build_inside_image( hip_build_image, inside_args, hcc_ver, '', build_config, source_hip_rel, build_hip_rel ) - - // Clean docker build image - docker_clean_images( 'hip', docker_build_image_name( ) ) - - // After a successful build, upload a docker image of the results - /* - String hip_image_name = docker_upload_artifactory( hcc_ver, job_name, from_image, source_hip_rel, build_hip_rel ) - if( params.push_image_to_docker_hub ) - { - docker_upload_dockerhub( job_name, hip_image_name, 'rocm' ) - docker_clean_images( 'rocm', hip_image_name ) - } - docker_clean_images( job_name, hip_image_name ) - */ - } -}, -rocm_head: -{ - node('hip-rocm') - { - String hcc_ver = 'rocm-head' - String from_image = 'ci_test_nodes/rocm-head/ubuntu-16.04:latest' - String inside_args = '--device=/dev/kfd --device=/dev/dri --group-add=video' - - // Checkout source code, dependencies and version files - String source_hip_rel = checkout_and_version( hcc_ver ) - - // Create/reuse a docker image that represents the hip build environment - def hip_build_image = docker_build_image( hcc_ver, 'hip', '', source_hip_rel, from_image ) - - // Print system information for the log - hip_build_image.inside( inside_args ) - { - sh """#!/usr/bin/env bash - set -x - /opt/rocm/bin/rocm_agent_enumerator -t ALL - /opt/rocm/bin/hcc --version - """ - } - - // Conctruct a binary directory path based on build config - String build_hip_rel = build_directory_rel( build_config ); - - // Build hip inside of the build environment - docker_build_inside_image( hip_build_image, inside_args, hcc_ver, '', build_config, source_hip_rel, build_hip_rel ) - - // Clean docker image - docker_clean_images( 'hip', docker_build_image_name( ) ) - - // After a successful build, upload a docker image of the results - /* - String hip_image_name = docker_upload_artifactory( hcc_ver, job_name, from_image, source_hip_rel, build_hip_rel ) - if( params.push_image_to_docker_hub ) - { - docker_upload_dockerhub( job_name, hip_image_name, 'rocm' ) - docker_clean_images( 'rocm', hip_image_name ) - } - docker_clean_images( job_name, hip_image_name ) - */ - } -}, -cuda_10_x: -{ - node('hip-cuda') - { - //////////////////////////////////////////////////////////////////////// - // Block of string constants customizing behavior for cuda - String nvcc_ver = 'cuda-10.x' - String from_image = 'ci_test_nodes/cuda-10.x/ubuntu-16.04:latest' - String inside_args = '--gpus all'; - - // Checkout source code, dependencies and version files - String source_hip_rel = checkout_and_version( nvcc_ver ) - - // Create/reuse a docker image that represents the hip build environment - def hip_build_image = docker_build_image( nvcc_ver, 'hip', '', source_hip_rel, from_image ) - - // Print system information for the log - hip_build_image.inside( inside_args ) - { - sh """#!/usr/bin/env bash - set -x - nvidia-smi - nvcc --version - """ - } - - // Conctruct a binary directory path based on build config - String build_hip_rel = build_directory_rel( build_config ); - - // Build hip inside of the build environment - docker_build_inside_image( hip_build_image, inside_args, nvcc_ver, "-DHIP_NVCC_FLAGS=--Wno-deprecated-gpu-targets", build_config, source_hip_rel, build_hip_rel ) - - // Clean docker image - docker_clean_images( 'hip', docker_build_image_name( ) ) - } -} diff --git a/projects/clr/hipamd/RELEASE.md b/projects/clr/hipamd/RELEASE.md deleted file mode 100644 index 939ee48c86..0000000000 --- a/projects/clr/hipamd/RELEASE.md +++ /dev/null @@ -1,216 +0,0 @@ -# Release notes - -We have attempted to document known bugs and limitations - in particular the [HIP Kernel Language](docs/markdown/hip_kernel_language.md) document uses the phrase "Under Development", and the [HIP Runtime API bug list](http://rocm-developer-tools.github.io/HIP/bug.html) lists known bugs. - - -=================================================================================================== - - -## Revision History: - -=================================================================================================== -Release: 1.5 -Date: -- Support threadIdx, blockIdx, blockDim directly (no need for hipify conversions in kernels.) HIP - Kernel syntax is now identical to CUDA kernel syntax - no need for extra parms or conversions. -- Refactor launch syntax. HIP now extracts kernels from the executable and launches them using the - existing module interface. Kernels dispatch no longer flows through HCC. Result is faster - kernel launches and with less resource usage (no signals required). -- Remove requirement for manual "serializers" previously required when passing complex structures - into kernels. -- Remove need for manual destructors -- Provide printf in device code -- Support for globals when using module API -- hipify-clang now supports using newer versions of clang -- HIP texture support equivalent to CUDA texture driver APIs -- Updates to hipify-perl, hipify-clang and documentation - - -=================================================================================================== -Release: 1.4 -Date: 2017.10.06 -- Improvements to HIP event management -- Added new HIP_TRACE_API options -- Enabled device side assert support -- Several bug fixes including hipMallocArray, hipTexture fetch -- Support for RHEL/CentOS 7.4 -- Updates to hipify-perl, hipify-clang and documentation - - -=================================================================================================== -Release: 1.3 -Date: 2017.08.16 -- hipcc now auto-detects amdgcn arch. No need to specify the arch when building for same system. -- HIP texture support (run-time APIs) -- Implemented __threadfence_support -- Improvements in HIP context management logic -- Bug fixes in several APIs including hipDeviceGetPCIBusId, hipEventDestroy, hipMemcpy2DAsync -- Updates to hipify-clang and documentation -- HIP development now fully open and on GitHub. Developers should submit pull requests. - - -=================================================================================================== -Release: 1.2 -Date: 2017.06.29 -- new APIs: hipMemcpy2DAsync, hipMallocPitch, hipHostMallocCoherent, hipHostMallocNonCoherent -- added support for building hipify-clang using clang 3.9 -- hipify-clang updates for CUDA 8.0 runtime+driver support -- renamed hipify to hipify-perl -- initial implementation of hipify-cmakefile -- several documentation updates & bug fixes -- support for abort() function in device code - - -=================================================================================================== -Release: 1.0.17102 -Date: 2017.03.07 -- Lots of improvements to hipify-clang. -- Added HIP package config for cmake. -- Several bug fixes and documentation updates. - - -=================================================================================================== -Release: 1.0.17066 -Date: 2017.02.11 -- Improved support for math device functions. -- Added several half math device functions. -- Enabled support for CUDA 8.0 in hipify-clang. -- Lots of bug fixes and documentation updates. - - -=================================================================================================== -Release: 1.0.17015 -Date: 2017.01.06 -- Several improvements to the hipify-clang infrastructure. -- Refactored module and function APIs. -- HIP now defaults to linking against the shared runtime library. -- Documentation updates. - - -=================================================================================================== -Release: 1.0.16502 -Date: 2016.12.13 -- Added several fast math and packaged math instrincs -- Improved debug and profiler documentation -- Support for building and linking to HIP shared library -- Several improvements to hipify-clang -- Several bug fixes - - -=================================================================================================== -Release: 1.0.16461 -Date: 2016.11.14 -- Significant changes to the HIP Profiling APIs. Refer to the documentation for details -- Improvements to P2P support -- New API: hipDeviceGetByPCIBusId -- Several bug fixes in NV path -- hipModuleLaunch now works for multi-dim kernels - - -=================================================================================================== -Release:1.0 -Date: 2016.11.8 -- Initial implementation for FindHIP.cmake -- HIP library now installs as a static library by default -- Added support for HIP context and HIP module APIs -- Major changes to HIP signal & memory management implementation -- Support for complex data type and math functions -- clang-hipify is now known as hipify-clang -- Added several new HIP samples -- Preliminary support for new APIs: hipMemcpyToSymbol, hipDeviceGetLimit, hipRuntimeGetVersion -- Added support for async memcpy driver API (for example hipMemcpyHtoDAsync) -- Support for memory management device functions: malloc, free, memcpy & memset -- Removed deprecated HIP runtime header locations. Please include "hip/hip_runtime.h" instead of "hip_runtime.h". You can use `find . -type f -exec sed -i 's:#include "hip_runtime.h":#include "hip/hip_runtime.h":g' {} +` to replace all such references - - -=================================================================================================== -Release:0.92.00 -Date: 2016.8.14 -- hipLaunchKernel supports one-dimensional grid and/or block dims, without explicit cast to dim3 type (actually in 0.90.00) -- fp16 software support -- Support for Hawaii dGPUs using environment variable ROCM_TARGET=hawaii -- Support hipArray -- Improved profiler support -- Documentation updates -- Improvements to clang-hipify - - -=================================================================================================== -Release:0.90.00 -Date: 2016.06.29 -- Support dynamic shared memory allocations -- Min HCC compiler version is > 16186. -- Expanded math functions (device and host). Document unsupported functions. -- hipFree with null pointer initializes runtime and returns success. -- Improve error code reporting on nvcc. -- Add hipPeekAtError for nvcc. - - -=================================================================================================== -Release:0.86.00 -Date: 2016.06.06 -- Add clang-hipify : clang-based hipify tool. Improved parsing of source code, and automates - creation of hipLaunchParm variable. -- Implement memory register / unregister commands (hipHostRegister, hipHostUnregister) -- Add cross-linking support between G++ and HCC, in particular for interfaces that use - standard C++ libraries (ie std::vectors, std::strings). HIPCC now uses libstdc++ by default on the HCC - compilation path. -- More samples including gpu-burn, SHOC, nbody, rtm. See [HIP-Examples](https://github.com/ROCm-Developer-Tools/HIP-Examples) - - -=================================================================================================== -Release:0.84.01 -Date: 2016.04.25 -- Refactor HIP make and install system: - - Move to CMake. Refer to the installation section in README.md for details. - - Split source into multiple modular .cpp and .h files. - - Create static library and link. - - Set HIP_PATH to install. -- Make hipDevice and hipStream thread-safe. - - Preferred hipStream usage is still to create new streams for each new thread, but it works even if you don;t. -- Improve automated platform detection: If AMD GPU is installed and detected by driver, default HIP_PLATFORM to hcc. -- HIP_TRACE_API now prints arguments to the HIP function (in addition to name of function). -- Deprecate hipDeviceGetProp (Replace with hipGetDeviceProp) -- Deprecate hipMallocHost (Replace with hipHostMalloc) -- Deprecate hipFreeHost (Replace with hipHostFree) -- The mixbench benchmark tool for measuring operational intensity now has a HIP target, in addition to CUDA and OpenCL. Let the comparisons begin. :) -See here for more : https://github.com/ekondis/mixbench. - - -=================================================================================================== -Release:0.82.00 -Date: 2016.03.07 -- Bump minimum required HCC workweek to 16074. -- Bump minimum required ROCK-Kernel-Driver and ROCR-Runtime to Developer Preview 2. -- Enable multi-GPU support. - * Use hipSetDevice to select a device for subsequent kernel calls and memory allocations. - * CUDA_VISIBLE_DEVICES / HIP_VISIBLE_DEVICE environment variable selects devices visible to the runtime. -- Support hipStreams – send sequences of copy and kernel commands to a device. - * Asynchronous copies supported. -- Optimize memory copy operations. -- Support hipPointerGetAttribute – can determine if a pointer is host or device. -- Enable atomics to local memory. -- Support for LC Direct-To-ISA path. -- Improved free memory reporting. - * hipMemGetInfo (report full memory used in current process). - * hipDeviceReset (deletes all memory allocated by current process). - - -=================================================================================================== -Release:0.80.01 -Date: 2016.02.18 -- Improve reporting and support for device-side math functions. -- Update Runtime Documentation. -- Improve implementations of cross-lane operations (_ballot, _any, _all). -- Provide shuffle intrinsics (performance optimization in-progress). -- Support hipDeviceAttribute for querying "one-shot" device attributes, as an alternative to hipGetDeviceProperties. - - -=================================================================================================== -Release:0.80.00 -Date: 2016.01.25 - -Initial release with GPUOpen Launch. - - - diff --git a/projects/clr/hipamd/bin/findcode.sh b/projects/clr/hipamd/bin/findcode.sh deleted file mode 100755 index 5fed5f80f1..0000000000 --- a/projects/clr/hipamd/bin/findcode.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# Copyright (c) 2016-2021 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. - -SEARCH_DIRS=$@ - -find $SEARCH_DIRS -name '*.cu' -find $SEARCH_DIRS -name '*.cpp' -o -name '*.cxx' -o -name '*.c' -o -name '*.cc' -find $SEARCH_DIRS -name '*.cuh' -find $SEARCH_DIRS -name '*.h' -o -name '*.hpp' -o -name '*.inc' -o -name '*.inl' -o -name '*.hxx' -o -name '*.hdl' diff --git a/projects/clr/hipamd/bin/finduncodep.sh b/projects/clr/hipamd/bin/finduncodep.sh deleted file mode 100755 index 8e6f207c7f..0000000000 --- a/projects/clr/hipamd/bin/finduncodep.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# Copyright (c) 2016-2021 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. - -SEARCH_DIR=$1 - -find $SEARCH_DIR -not -name '*.cu' -and -not -name '*.cpp' -and -not -name '*.cxx' -and -not -name '*.c' -and -not -name '*.cc' -and -not -name '*.cuh' -and -not -name '*.h' -and -not -name '*.hpp' -and -not -name '*.inc' -and -not -name '*.inl' -and -not -name '*.hxx' -and -not -name '*.hdl' diff --git a/projects/clr/hipamd/bin/hip_embed_pch.sh b/projects/clr/hipamd/bin/hip_embed_pch.sh deleted file mode 100755 index b8ececf36c..0000000000 --- a/projects/clr/hipamd/bin/hip_embed_pch.sh +++ /dev/null @@ -1,191 +0,0 @@ -#!/bin/bash -# Copyright (c) 2020-2021 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. - -printUsage() { - echo - echo "Usage: $(basename "$0") HIP_BUILD_INC_DIR HIP_INC_DIR HIP_AMD_INC_DIR LLVM_DIR [option] [RTC_LIB_OUTPUT]" - echo - echo "Options:" - echo " -p, --generate_pch Generate pre-compiled header (default)" - echo " -r, --generate_rtc Generate preprocessor expansion (hiprtc_header.o)" - echo " -h, --help Prints this help" - echo - echo - return 0 -} - -if [ "$1" == "" ]; then - printUsage - exit 0 -fi - -HIP_BUILD_INC_DIR="$1" -HIP_INC_DIR="$2" -HIP_AMD_INC_DIR="$3" -LLVM_DIR="$4" -# By default, generate pch -TARGET="generatepch" - -while [ "$5" != "" ]; -do - case "$5" in - -h | --help ) - printUsage ; exit 0 ;; - -p | --generate_pch ) - TARGET="generatepch" ; break ;; - -r | --generate_rtc ) - TARGET="generatertc" ; break ;; - *) - echo " UNEXPECTED ERROR Parm : [$4] ">&2 ; exit 20 ;; - esac - shift 1 -done - -# Allow hiprtc lib name to be set by argument 7 -if [[ "$6" != "" ]]; then - rtc_shared_lib_out="$6" -else - if [[ "$OSTYPE" == cygwin ]]; then - rtc_shared_lib_out=hiprtc-builtins64.dll - else - rtc_shared_lib_out=libhiprtc-builtins.so - fi -fi - -if [[ "$OSTYPE" == cygwin || "$OSTYPE" == msys ]]; then - isWindows=1 - tmpdir=. -else - isWindows=0 - tmpdir=/tmp -fi - -# Expected first argument $1 to be output file name. -create_hip_macro_file() { -cat >$1 <$tmp/hip_pch.h <$tmp/hip_pch.mcin <$tmp/pch.cui && - - cat $tmp/hip_macros.h >> $tmp/pch.cui && - - $LLVM_DIR/bin/clang -cc1 -O3 -emit-pch -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-linux-gnu -fcuda-is-device -std=c++17 -fgnuc-version=4.2.1 -o $tmp/hip.pch -x hip-cpp-output - <$tmp/pch.cui && - - $LLVM_DIR/bin/llvm-mc -o hip_pch.o $tmp/hip_pch.mcin --filetype=obj && - - rm -rf $tmp -} - -generate_rtc_header() { - tmp=$tmpdir/hip_rtc.$$ - mkdir -p $tmp - local macroFile="$tmp/hip_macros.h" - local headerFile="$tmp/hipRTC_header.h" - local mcinFile="$tmp/hipRTC_header.mcin" - - create_hip_macro_file $macroFile - -cat >$headerFile < $mcinFile - if [[ $isWindows -eq 0 ]]; then - echo " .type __hipRTC_header,@object" >> $mcinFile - echo " .type __hipRTC_header_size,@object" >> $mcinFile - fi -cat >>$mcinFile <> $tmp/hiprtc && - $LLVM_DIR/bin/llvm-mc -o $tmp/hiprtc_header.o $tmp/hipRTC_header.mcin --filetype=obj && - $LLVM_DIR/bin/clang $tmp/hiprtc_header.o -o $rtc_shared_lib_out -shared && - $LLVM_DIR/bin/clang -O3 --rocm-path=$HIP_INC_DIR/.. -std=c++14 -nogpulib -nogpuinc -emit-llvm -c -o $tmp/tmp.bc --cuda-device-only -D__HIPCC_RTC__ --offload-arch=gfx906 -x hip-cpp-output $tmp/hiprtc && - rm -rf $tmp -} - -case $TARGET in - (generatertc) generate_rtc_header ;; - (generatepch) generate_pch ;; - (*) die "Invalid target $TARGET" ;; -esac - diff --git a/projects/clr/hipamd/bin/hipcc b/projects/clr/hipamd/bin/hipcc deleted file mode 100755 index 55460fa8a3..0000000000 --- a/projects/clr/hipamd/bin/hipcc +++ /dev/null @@ -1,772 +0,0 @@ -#!/usr/bin/perl -w -# Copyright (c) 2015-2021 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. - -# Need perl > 5.10 to use logic-defined or -use 5.006; use v5.10.1; -use File::Basename; -use File::Temp qw/ :mktemp /; -use Cwd; -use Cwd 'abs_path'; - -# HIP compiler driver -# Will call clang or nvcc (depending on target) and pass the appropriate include and library options for -# the target compiler and HIP infrastructure. - -# Will pass-through options to the target compiler. The tools calling HIPCC must ensure the compiler -# options are appropriate for the target compiler. - -# Environment variable HIP_PLATFORM is to detect amd/nvidia path: -# HIP_PLATFORM='nvidia' or HIP_PLATFORM='amd'. -# If HIP_PLATFORM is not set hipcc will attempt auto-detect based on if nvcc is found. -# -# Other environment variable controls: -# HIP_PATH : Path to HIP directory, default is one dir level above location of this script. -# CUDA_PATH : Path to CUDA SDK (default /usr/local/cuda). Used on NVIDIA platforms only. -# HSA_PATH : Path to HSA dir (defaults to ../../hsa relative to abs_path -# of this script). Used on AMD platforms only. -# HIP_ROCCLR_HOME : Path to HIP/ROCclr directory. Used on AMD platforms only. -# HIP_CLANG_PATH : Path to HIP-Clang (default to ../../llvm/bin relative to this -# script's abs_path). Used on AMD platforms only. - -if(scalar @ARGV == 0){ - print "No Arguments passed, exiting ...\n"; - exit(-1); -} - -$verbose = $ENV{'HIPCC_VERBOSE'} // 0; -# Verbose: 0x1=commands, 0x2=paths, 0x4=hipcc args - -$HIPCC_COMPILE_FLAGS_APPEND=$ENV{'HIPCC_COMPILE_FLAGS_APPEND'}; -$HIPCC_LINK_FLAGS_APPEND=$ENV{'HIPCC_LINK_FLAGS_APPEND'}; - -# Known HIP target names. -@knownTargets = ('gfx700', 'gfx701', 'gfx702', 'gfx703', 'gfx704', 'gfx705', - 'gfx801', 'gfx802', 'gfx803', 'gfx805', 'gfx810', - 'gfx900', 'gfx902', 'gfx904', 'gfx906', 'gfx908', 'gfx909', 'gfx90a', - 'gfx1010', 'gfx1011', 'gfx1012', 'gfx1030', 'gfx1031', 'gfx1032'); -# Known Features -@knownFeatures = ('sramecc-', 'sramecc+', 'xnack-', 'xnack+'); - -$HIP_LIB_PATH=$ENV{'HIP_LIB_PATH'}; -$DEVICE_LIB_PATH=$ENV{'DEVICE_LIB_PATH'}; -$HIP_CLANG_HCC_COMPAT_MODE=$ENV{'HIP_CLANG_HCC_COMPAT_MODE'}; # HCC compatibility mode -$HIP_COMPILE_CXX_AS_HIP=$ENV{'HIP_COMPILE_CXX_AS_HIP'} // "1"; - -#--- -# Temporary directories -my @tmpDirs = (); - -#--- -# Create a new temporary directory and return it -sub get_temp_dir { - my $tmpdir = mkdtemp("/tmp/hipccXXXXXXXX"); - push (@tmpDirs, $tmpdir); - return $tmpdir; -} - -#--- -# Delete all created temporary directories -sub delete_temp_dirs { - if (@tmpDirs) { - system ('rm -rf ' . join (' ', @tmpDirs)); - } - return 0; -} - -my $base_dir; -BEGIN { - $base_dir = dirname(Cwd::realpath(__FILE__) ); -} -use lib "$base_dir/"; -use hipvars; - -$isWindows = $hipvars::isWindows; -$HIP_RUNTIME = $hipvars::HIP_RUNTIME; -$HIP_PLATFORM = $hipvars::HIP_PLATFORM; -$HIP_COMPILER = $hipvars::HIP_COMPILER; -$HIP_CLANG_PATH = $hipvars::HIP_CLANG_PATH; -$CUDA_PATH = $hipvars::CUDA_PATH; -$HIP_PATH = $hipvars::HIP_PATH; -$ROCM_PATH = $hipvars::ROCM_PATH; -$HIP_VERSION = $hipvars::HIP_VERSION; -$HSA_PATH = $hipvars::HSA_PATH; -$HIP_ROCCLR_HOME = $hipvars::HIP_ROCCLR_HOME; - -if ($HIP_PLATFORM eq "amd") { - # If using ROCclr runtime, need to find HIP_ROCCLR_HOME - if (!defined $DEVICE_LIB_PATH and -e "$HIP_ROCCLR_HOME/lib/bitcode") { - $DEVICE_LIB_PATH = "$HIP_ROCCLR_HOME/lib/bitcode"; - } - $HIP_INCLUDE_PATH = "$HIP_ROCCLR_HOME/include"; - if (!defined $HIP_LIB_PATH) { - $HIP_LIB_PATH = "$HIP_ROCCLR_HOME/lib"; - } - - if (!defined $DEVICE_LIB_PATH) { - if (-e "$ROCM_PATH/amdgcn/bitcode") { - $DEVICE_LIB_PATH = "$ROCM_PATH/amdgcn/bitcode"; - } - else { - # This path is to support an older build of the device library - # TODO: To be removed in the future. - $DEVICE_LIB_PATH = "$ROCM_PATH/lib"; - } - } -} - -if ($verbose & 0x2) { - print ("HIP_PATH=$HIP_PATH\n"); - print ("HIP_PLATFORM=$HIP_PLATFORM\n"); - print ("HIP_COMPILER=$HIP_COMPILER\n"); - print ("HIP_RUNTIME=$HIP_RUNTIME\n"); -} - -# set if user explicitly requests -stdlib=libc++. (else we default to libstdc++ for better interop with g++): -$setStdLib = 0; # TODO - set to 0 - -$default_amdgpu_target = 1; - -if ($HIP_PLATFORM eq "amd") { - $HIPCC="\"$HIP_CLANG_PATH/clang++\""; - - # If $HIPCC clang++ is not compiled, use clang instead - if ( ! -e $HIPCC ) { - $HIPCC="\"$HIP_CLANG_PATH/clang\""; - $HIPLDFLAGS = "--driver-mode=g++"; - } - - $HIP_CLANG_VERSION = `$HIPCC --version`; - $HIP_CLANG_VERSION=~/.*clang version (\S+).*/; - $HIP_CLANG_VERSION=$1; - - if (! defined $HIP_CLANG_INCLUDE_PATH) { - $HIP_CLANG_INCLUDE_PATH = abs_path("$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/include"); - } - if (! defined $HIP_INCLUDE_PATH) { - $HIP_INCLUDE_PATH = "$HIP_PATH/include"; - } - if (! defined $HIP_LIB_PATH) { - $HIP_LIB_PATH = "$HIP_PATH/lib"; - } - if ($verbose & 0x2) { - print ("ROCM_PATH=$ROCM_PATH\n"); - if (defined $HIP_ROCCLR_HOME) { - print ("HIP_ROCCLR_HOME=$HIP_ROCCLR_HOME\n"); - } - print ("HIP_CLANG_PATH=$HIP_CLANG_PATH\n"); - print ("HIP_CLANG_INCLUDE_PATH=$HIP_CLANG_INCLUDE_PATH\n"); - print ("HIP_INCLUDE_PATH=$HIP_INCLUDE_PATH\n"); - print ("HIP_LIB_PATH=$HIP_LIB_PATH\n"); - print ("DEVICE_LIB_PATH=$DEVICE_LIB_PATH\n"); - } - - if ($isWindows) { - $HIPCXXFLAGS .= " -std=c++14 -fms-extensions -fms-compatibility"; - } else { - $HIPCXXFLAGS .= " -std=c++11"; - } - $HIPCXXFLAGS .= " -isystem \"$HIP_CLANG_INCLUDE_PATH/..\""; - $HIPCFLAGS .= " -isystem \"$HIP_CLANG_INCLUDE_PATH/..\""; - $HIPLDFLAGS .= " -L\"$HIP_LIB_PATH\""; - if ($isWindows) { - $HIPLDFLAGS .= " -lamdhip64"; - } - if ($HIP_CLANG_HCC_COMPAT_MODE) { - ## Allow __fp16 as function parameter and return type. - $HIPCXXFLAGS .= " -Xclang -fallow-half-arguments-and-returns -D__HIP_HCC_COMPAT_MODE__=1"; - } - - if (not $isWindows) { - $HSA_PATH=$ENV{'HSA_PATH'} // "$ROCM_PATH/hsa"; - $HIPCXXFLAGS .= " -isystem $HSA_PATH/include"; - $HIPCFLAGS .= " -isystem $HSA_PATH/include"; - } - -} elsif ($HIP_PLATFORM eq "nvidia") { - $CUDA_PATH=$ENV{'CUDA_PATH'} // '/usr/local/cuda'; - $HIP_INCLUDE_PATH = "$HIP_PATH/include"; - if ($verbose & 0x2) { - print ("CUDA_PATH=$CUDA_PATH\n"); - } - - $HIPCC="$CUDA_PATH/bin/nvcc"; - $HIPCXXFLAGS .= " -Wno-deprecated-gpu-targets "; - $HIPCXXFLAGS .= " -isystem $CUDA_PATH/include"; - $HIPCFLAGS .= " -isystem $CUDA_PATH/include"; - - $HIPLDFLAGS = " -Wno-deprecated-gpu-targets -lcuda -lcudart -L$CUDA_PATH/lib64"; -} else { - printf ("error: unknown HIP_PLATFORM = '$HIP_PLATFORM'"); - printf (" or HIP_COMPILER = '$HIP_COMPILER'"); - exit (-1); -} - -# Add paths to common HIP includes: -$HIPCXXFLAGS .= " -isystem \"$HIP_INCLUDE_PATH\"" ; -$HIPCFLAGS .= " -isystem \"$HIP_INCLUDE_PATH\"" ; - -my $compileOnly = 0; -my $needCXXFLAGS = 0; # need to add CXX flags to compile step -my $needCFLAGS = 0; # need to add C flags to compile step -my $needLDFLAGS = 1; # need to add LDFLAGS to compile step. -my $fileTypeFlag = 0; # to see if -x flag is mentioned -my $hasC = 0; # options contain a c-style file -my $hasCXX = 0; # options contain a cpp-style file (NVCC must force recognition as GPU file) -my $hasCU = 0; # options contain a cu-style file (HCC must force recognition as GPU file) -my $hasHIP = 0; # options contain a hip-style file (HIP-Clang must pass offloading options) -my $printHipVersion = 0; # print HIP version -my $printCXXFlags = 0; # print HIPCXXFLAGS -my $printLDFlags = 0; # print HIPLDFLAGS -my $runCmd = 1; -my $buildDeps = 0; -my $linkType = 1; -my $setLinkType = 0; -my $hsacoVersion = 0; -my $funcSupp = 0; # enable function support -my $rdc = 0; # whether -fgpu-rdc is on - -my @options = (); -my @inputs = (); - -if ($verbose & 0x4) { - print "hipcc-args: ", join (" ", @ARGV), "\n"; -} - -# Handle code object generation -my $ISACMD=""; -if($HIP_PLATFORM eq "nvidia"){ - $ISACMD .= "$HIP_PATH/bin/hipcc -ptx "; - if($ARGV[0] eq "--genco"){ - foreach $isaarg (@ARGV[1..$#ARGV]){ - $ISACMD .= " "; - $ISACMD .= $isaarg; - } - if ($verbose & 0x1) { - print "hipcc-cmd: ", $ISACMD, "\n"; - } - system($ISACMD) and die(); - exit(0); - } -} - -# TODO: convert toolArgs to an array rather than a string -my $toolArgs = ""; # arguments to pass to the clang or nvcc tool -my $optArg = ""; # -O args - -# TODO: hipcc uses --amdgpu-target for historical reasons. It should be replaced -# by clang option --offload-arch. -my @targetOpts = ('--offload-arch=', '--amdgpu-target='); - -my $targetsStr = ""; -my $skipOutputFile = 0; # file followed by -o should not contibute in picking compiler flags -my $prevArg = ""; # previous argument - -foreach $arg (@ARGV) -{ - # Save $arg, it can get changed in the loop. - $trimarg = $arg; - # TODO: figure out why this space removal is wanted. - # TODO: If someone has gone to the effort of quoting the spaces to the shell - # TODO: why are we removing it here? - $trimarg =~ s/^\s+|\s+$//g; # Remive whitespace - my $swallowArg = 0; - my $escapeArg = 1; - if ($arg eq '-c' or $arg eq '--genco' or $arg eq '-E') { - $compileOnly = 1; - $needLDFLAGS = 0; - } - - if ($skipOutputFile) { - # TODO: handle filename with shell metacharacters - $toolArgs .= " $arg"; - $prevArg = $arg; - $skipOutputFile = 0; - next; - } - - if ($arg eq '-o') { - $needLDFLAGS = 1; - $skipOutputFile = 1; - } - - if(($trimarg eq '-stdlib=libc++') and ($setStdLib eq 0)) - { - $HIPCXXFLAGS .= " -stdlib=libc++"; - $setStdLib = 1; - } - - # Check target selection option: --offload-arch= and --amdgpu-target=... - foreach my $targetOpt (@targetOpts) { - if (substr($arg, 0, length($targetOpt)) eq $targetOpt) { - # If targets string is not empty, add a comma before adding new target option value. - $targetsStr .= ($targetsStr ? ',' : ''); - $targetsStr .= substr($arg, length($targetOpt)); - $default_amdgpu_target = 0; - # Collect the GPU arch options and pass them to clang later. - if ($HIP_PLATFORM eq "amd") { - $swallowArg = 1; - } - } - } - - if (($arg =~ /--genco/) and $HIP_PLATFORM eq 'amd' ) { - $arg = "--cuda-device-only"; - } - - if($trimarg eq '--version') { - $printHipVersion = 1; - } - if($trimarg eq '--short-version') { - $printHipVersion = 1; - $runCmd = 0; - } - if($trimarg eq '--cxxflags') { - $printCXXFlags = 1; - $runCmd = 0; - } - if($trimarg eq '--ldflags') { - $printLDFlags = 1; - $runCmd = 0; - } - if($trimarg eq '-M') { - $compileOnly = 1; - $buildDeps = 1; - } - if($trimarg eq '-use_fast_math') { - $HIPCXXFLAGS .= " -DHIP_FAST_MATH "; - $HIPCFLAGS .= " -DHIP_FAST_MATH "; - } - if(($trimarg eq '-use-staticlib') and ($setLinkType eq 0)) - { - $linkType = 0; - $setLinkType = 1; - $swallowArg = 1; - } - if(($trimarg eq '-use-sharedlib') and ($setLinkType eq 0)) - { - $linkType = 1; - $setLinkType = 1; - } - if($arg =~ m/^-O/) - { - $optArg = $arg; - } - if($arg =~ '--amdhsa-code-object-version=') - { - $arg =~ s/--amdhsa-code-object-version=//; - $hsacoVersion = $arg; - $swallowArg = 1; - } - - # nvcc does not handle standard compiler options properly - # This can prevent hipcc being used as standard CXX/C Compiler - # To fix this we need to pass -Xcompiler for options - if (($arg eq '-fPIC' or $arg =~ '-Wl,') and $HIP_COMPILER eq 'nvcc') - { - $HIPCXXFLAGS .= " -Xcompiler ".$arg; - $swallowArg = 1; - } - - ## process linker response file for hip-clang - ## extract object files from static library and pass them directly to - ## hip-clang in command line. - ## ToDo: Remove this after hip-clang switch to lto and lld is able to - ## handle clang-offload-bundler bundles. - if (($arg =~ m/^-Wl,@/ or $arg =~ m/^@/) and - $HIP_PLATFORM eq 'amd') { - my @split_arg = (split /\@/, $arg); # arg will have options type(-Wl,@ or @) and filename - my $file = $split_arg[1]; - open my $in, "<:encoding(utf8)", $file or die "$file: $!"; - my $new_arg = ""; - my $tmpdir = get_temp_dir (); - my $new_file = "$tmpdir/response_file"; - open my $out, ">", $new_file or die "$new_file: $!"; - while (my $line = <$in>) { - chomp $line; - if ($line =~ m/\.a$/ || $line =~ m/\.lo$/) { - my $libFile = $line; - my $path = abs_path($line); - my @objs = split ('\n', `cd $tmpdir; ar xv $path`); - ## Check if all files in .a are object files. - my $allIsObj = 1; - my $realObjs = ""; - foreach my $obj (@objs) { - chomp $obj; - $obj =~ s/^x - //; - $obj = "$tmpdir/$obj"; - my $fileType = `file $obj`; - my $isObj = ($fileType =~ m/ELF/ or $fileType =~ m/COFF/); - $allIsObj = ($allIsObj and $isObj); - if ($isObj) { - $realObjs = ($realObjs . " " . $obj); - } else { - push (@inputs, $obj); - $new_arg = "$new_arg $obj"; - } - } - chomp $realObjs; - if ($allIsObj) { - print $out "$line\n"; - } elsif ($realObjs) { - my($libBaseName, $libDir, $libExt) = fileparse($libFile); - $libBaseName = mktemp($libBaseName . "XXXX") . $libExt; - system("cd $tmpdir; ar c $libBaseName $realObjs"); - print $out "$tmpdir/$libBaseName\n"; - } - } elsif ($line =~ m/\.o$/) { - my $fileType = `file $line`; - my $isObj = ($fileType =~ m/ELF/ or $fileType =~ m/COFF/); - if ($isObj) { - print $out "$line\n"; - } else { - push (@inputs, $line); - $new_arg = "$new_arg $line"; - } - } else { - print $out "$line\n"; - } - } - close $in; - close $out; - $arg = "$new_arg $split_arg[0]\@$new_file"; - $escapeArg = 0; - } elsif (($arg =~ m/\.a$/ || $arg =~ m/\.lo$/) && - $HIP_PLATFORM eq 'amd') { - ## process static library for hip-clang - ## extract object files from static library and pass them directly to - ## hip-clang. - ## ToDo: Remove this after hip-clang switch to lto and lld is able to - ## handle clang-offload-bundler bundles. - my $new_arg = ""; - my $tmpdir = get_temp_dir (); - my $libFile = $arg; - my $path = abs_path($arg); - my @objs = split ('\n', `cd $tmpdir; ar xv $path`); - ## Check if all files in .a are object files. - my $allIsObj = 1; - my $realObjs = ""; - foreach my $obj (@objs) { - chomp $obj; - $obj =~ s/^x - //; - $obj = "$tmpdir/$obj"; - my $fileType = `file $obj`; - my $isObj = ($fileType =~ m/ELF/ or $fileType =~ m/COFF/); - if ($fileType =~ m/ELF/) { - my $sections = `readelf -e -W $obj`; - $isObj = !($sections =~ m/__CLANG_OFFLOAD_BUNDLE__/); - } - $allIsObj = ($allIsObj and $isObj); - if ($isObj) { - $realObjs = ($realObjs . " " . $obj); - } else { - push (@inputs, $obj); - if ($new_arg ne "") { - $new_arg .= " "; - } - $new_arg .= "$obj"; - } - } - chomp $realObjs; - if ($allIsObj) { - $new_arg = $arg; - } elsif ($realObjs) { - my($libBaseName, $libDir, $libExt) = fileparse($libFile); - $libBaseName = mktemp($libBaseName . "XXXX") . $libExt; - system("cd $tmpdir; ar c $libBaseName $realObjs"); - $new_arg .= " $tmpdir/$libBaseName"; - } - $arg = "$new_arg"; - $escapeArg = 0; - if ($toolArgs =~ m/-Xlinker$/) { - $toolArgs = substr $toolArgs, 0, -8; - chomp $toolArgs; - } - } elsif ($arg eq '-x') { - $fileTypeFlag = 1; - } elsif (($arg eq 'c' and $prevArg eq '-x') or ($arg eq '-xc')) { - $fileTypeFlag = 1; - $hasC = 1; - $hasCXX = 0; - $hasHIP = 0; - } elsif (($arg eq 'c++' and $prevArg eq '-x') or ($arg eq '-xc++')) { - $fileTypeFlag = 1; - $hasC = 0; - $hasCXX = 1; - $hasHIP = 0; - } elsif (($arg eq 'hip' and $prevArg eq '-x') or ($arg eq '-xhip')) { - $fileTypeFlag = 1; - $hasC = 0; - $hasCXX = 0; - $hasHIP = 1; - } elsif ($arg =~ m/^-/) { - # options start with - - if ($arg eq '-fgpu-rdc') { - $rdc = 1; - } elsif ($arg eq '-fno-gpu-rdc') { - $rdc = 0; - } - - # Process HIPCC options here: - if ($arg =~ m/^--hipcc/) { - $swallowArg = 1; - #if $arg eq "--hipcc_profile") { # Example argument here, hipcc - # - #} - if ($arg eq "--hipcc-func-supp") { - $funcSupp = 1; - } elsif ($arg eq "--hipcc-no-func-supp") { - $funcSupp = 0; - } - } else { - push (@options, $arg); - } - #print "O: <$arg>\n"; - } elsif ($prevArg ne '-o') { - # input files and libraries - # Skip guessing if `-x {c|c++|hip}` is already specified. - - # Add proper file extension before each file type - # File Extension -> Flag - # .c -> -x c - # .cpp/.cxx/.cc/.cu/.cuh/.hip -> -x hip - if ($fileTypeFlag eq 0) { - if ($arg =~ /\.c$/) { - $hasC = 1; - $needCFLAGS = 1; - $toolArgs .= " -x c"; - } elsif (($arg =~ /\.cpp$/) or ($arg =~ /\.cxx$/) or ($arg =~ /\.cc$/) or ($arg =~ /\.C$/)) { - $needCXXFLAGS = 1; - if ($HIP_COMPILE_CXX_AS_HIP eq '0' or $HIP_PLATFORM ne "amd") { - $hasCXX = 1; - } elsif ($HIP_PLATFORM eq "amd") { - $hasHIP = 1; - $toolArgs .= " -x hip"; - } - } elsif ((($arg =~ /\.cu$/ or $arg =~ /\.cuh$/) and $HIP_COMPILE_CXX_AS_HIP ne '0') or ($arg =~ /\.hip$/)) { - $needCXXFLAGS = 1; - if ($HIP_PLATFORM eq "amd") { - $hasHIP = 1; - $toolArgs .= " -x hip"; - } else { - $hasCU = 1; - } - } - } - if ($hasC) { - $needCFLAGS = 1; - } elsif ($hasCXX or $hasHIP) { - $needCXXFLAGS = 1; - } - push (@inputs, $arg); - #print "I: <$arg>\n"; - } - # Produce a version of $arg where characters significant to the shell are - # quoted. One could quote everything of course but don't bother for - # common characters such as alphanumerics. - # Do the quoting here because sometimes the $arg is changed in the loop - # Important to have all of '-Xlinker' in the set of unquoted characters. - if (not $isWindows and $escapeArg) { # Windows needs different quoting, ignore for now - $arg =~ s/[^-a-zA-Z0-9_=+,.\/]/\\$&/g; - } - $toolArgs .= " $arg" unless $swallowArg; - $prevArg = $arg; -} - -if($HIP_PLATFORM eq "amd"){ - # No AMDGPU target specified at commandline. So look for HCC_AMDGPU_TARGET - if($default_amdgpu_target eq 1) { - if (defined $ENV{HCC_AMDGPU_TARGET}) { - $targetsStr = $ENV{HCC_AMDGPU_TARGET}; - } elsif (not $isWindows) { - # Else try using rocm_agent_enumerator - $ROCM_AGENT_ENUM = "${ROCM_PATH}/bin/rocm_agent_enumerator"; - $targetsStr = `${ROCM_AGENT_ENUM} -t GPU`; - $targetsStr =~ s/\n/,/g; - } - $default_amdgpu_target = 0; - } - - # Parse the targets collected in targetStr and set corresponding compiler options. - my @targets = split(',', $targetsStr); - $GPU_ARCH_OPT = " --offload-arch="; - - foreach my $val (@targets) { - # Ignore 'gfx000' target reported by rocm_agent_enumerator. - if ($val ne 'gfx000') { - my @procAndFeatures = split(':', $val); - $len = scalar @procAndFeatures; - my $procName; - if($len ge 1 and $len le 3) { # proc and features - $procName = $procAndFeatures[0]; - for my $i (1 .. $#procAndFeatures) { - if (grep($procAndFeatures[$i], @knownFeatures) eq 0) { - print "Warning: The Feature: $procAndFeatures[$i] is unknown. Correct compilation is not guaranteed.\n"; - } - } - } else { - $procName = $val; - } - $GPU_ARCH_ARG = $GPU_ARCH_OPT . $val; - $HIPLDARCHFLAGS .= $GPU_ARCH_ARG; - if ($HIP_PLATFORM eq 'amd' and $hasHIP) { - $HIPCXXFLAGS .= $GPU_ARCH_ARG; - } - - # If the specified target is not in the list of known target names, emit a warning. - if (grep($procName, @knownTargets) eq 0) { - print "Warning: The specified HIP target: $val is unknown. Correct compilation is not guaranteed.\n"; - } - } - } - if ($hsacoVersion > 0) { - if ($compileOnly eq 0) { - $HIPLDFLAGS .= " -mcode-object-version=$hsacoVersion"; - } else { - $HIPCXXFLAGS .= " -mcode-object-version=$hsacoVersion"; - } - } - - # rocm_agent_enumerator failed! Throw an error and die if linking is required - if ($default_amdgpu_target eq 1 and $compileOnly eq 0) { - print "No valid AMD GPU target was either specified or found. Please specify a valid target using --offload-arch=.\n" and die(); - } - - $ENV{HCC_EXTRA_LIBRARIES}="\n"; -} - -if ($hasCXX and $HIP_PLATFORM eq 'nvidia') { - $HIPCXXFLAGS .= " -x cu"; -} - -if ($buildDeps and $HIP_PLATFORM eq 'nvidia') { - $HIPCXXFLAGS .= " -M -D__CUDACC__"; - $HIPCFLAGS .= " -M -D__CUDACC__"; -} - -if ($buildDeps and $HIP_PLATFORM eq 'amd') { - $HIPCXXFLAGS .= " --cuda-host-only"; -} - -# Add --hip-link only if it is compile only and -fgpu-rdc is on. -if ($rdc and !$compileOnly and $HIP_PLATFORM eq 'amd') { - $HIPLDFLAGS .= " --hip-link"; - $HIPLDFLAGS .= $HIPLDARCHFLAGS; -} - -# hipcc currrently requires separate compilation of source files, ie it is not possible to pass -# CPP files combined with .O files -# Reason is that NVCC uses the file extension to determine whether to compile in CUDA mode or -# pass-through CPP mode. - -if ($HIP_PLATFORM eq "amd") { - # Set default optimization level to -O3 for hip-clang. - if ($optArg eq "") { - $HIPCXXFLAGS .= " -O3"; - $HIPCFLAGS .= " -O3"; - $HIPLDFLAGS .= " -O3"; - } - if (!$funcSupp and $optArg ne "-O0" and $hasHIP) { - $HIPCXXFLAGS .= " -mllvm -amdgpu-early-inline-all=true -mllvm -amdgpu-function-calls=false"; - if ($needLDFLAGS and not $needCXXFLAGS) { - $HIPLDFLAGS .= " -mllvm -amdgpu-early-inline-all=true -mllvm -amdgpu-function-calls=false"; - } - } - - if ($hasHIP) { - if ($DEVICE_LIB_PATH ne "$ROCM_PATH/amdgcn/bitcode") { - $HIPCXXFLAGS .= " --hip-device-lib-path=\"$DEVICE_LIB_PATH\""; - } - $HIPCXXFLAGS .= " -fhip-new-launch-api"; - } - if (not $isWindows) { - $HIPLDFLAGS .= " -lgcc_s -lgcc -lpthread -lm -lrt"; - } - - if (not $isWindows and not $compileOnly) { - if ($linkType eq 0) { - $toolArgs .= " -L$HIP_LIB_PATH -lamdhip64 -L$ROCM_PATH/lib -lhsa-runtime64 -ldl -lnuma "; - } else { - $toolArgs .= " -Wl,--enable-new-dtags -Wl,--rpath=$HIP_LIB_PATH:$ROCM_PATH/lib -lamdhip64 "; - } - # To support __fp16 and _Float16, explicitly link with compiler-rt - $toolArgs .= " -L$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/lib/linux -lclang_rt.builtins-x86_64 " - } -} - -if ($HIPCC_COMPILE_FLAGS_APPEND) { - $HIPCXXFLAGS .= " $HIPCC_COMPILE_FLAGS_APPEND"; - $HIPCFLAGS .= " $HIPCC_COMPILE_FLAGS_APPEND"; -} -if ($HIPCC_LINK_FLAGS_APPEND) { - $HIPLDFLAGS .= " $HIPCC_LINK_FLAGS_APPEND"; -} - -# TODO: convert CMD to an array rather than a string -my $CMD="$HIPCC"; - -if ($needCFLAGS) { - $CMD .= " $HIPCFLAGS"; -} - -if ($needCXXFLAGS) { - $CMD .= " $HIPCXXFLAGS"; -} - -if ($needLDFLAGS and not $compileOnly) { - $CMD .= " $HIPLDFLAGS"; -} -$CMD .= " $toolArgs"; - -if ($verbose & 0x1) { - print "hipcc-cmd: ", $CMD, "\n"; -} - -if ($printHipVersion) { - if ($runCmd) { - print "HIP version: " - } - print $HIP_VERSION, "\n"; -} -if ($printCXXFlags) { - print $HIPCXXFLAGS; -} -if ($printLDFlags) { - print $HIPLDFLAGS; -} -if ($runCmd) { - system ("$CMD"); - if ($? == -1) { - print "failed to execute: $!\n"; - exit($?); - } - elsif ($? & 127) { - printf "child died with signal %d, %s coredump\n", - ($? & 127), ($? & 128) ? 'with' : 'without'; - exit($?); - } - else { - $CMD_EXIT_CODE = $? >> 8; - } - $? or delete_temp_dirs (); - exit($CMD_EXIT_CODE); -} - -# vim: ts=4:sw=4:expandtab:smartindent diff --git a/projects/clr/hipamd/bin/hipcc_cmake_linker_helper b/projects/clr/hipamd/bin/hipcc_cmake_linker_helper deleted file mode 100755 index ff501c3967..0000000000 --- a/projects/clr/hipamd/bin/hipcc_cmake_linker_helper +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# Copyright (c) 2017-2021 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. - -SOURCE="${BASH_SOURCE[0]}" -HIP_PATH="$( command cd -P "$( dirname "$SOURCE" )/.." && pwd )" -HIP_COMPILER=$(eval "$HIP_PATH/bin/hipconfig --compiler") -if [ "$HIP_COMPILER" = "hcc" ]; then - HCC_HOME=$1 $HIP_PATH/bin/hipcc "${@:2}" -elif [ "$HIP_COMPILER" = "clang" ]; then - HIP_CLANG_PATH=$1 $HIP_PATH/bin/hipcc "${@:2}" -else - $HIP_PATH/bin/hipcc "${@:1}" -fi \ No newline at end of file diff --git a/projects/clr/hipamd/bin/hipconfig b/projects/clr/hipamd/bin/hipconfig deleted file mode 100755 index 7c5655a9be..0000000000 --- a/projects/clr/hipamd/bin/hipconfig +++ /dev/null @@ -1,256 +0,0 @@ -#!/usr/bin/perl -w -# Copyright (c) 2015-2021 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. - -# Need perl > 5.10 to use logic-defined or -use 5.006; use v5.10.1; -use Getopt::Long; -use Cwd; - -# Return name of HIP compiler - either 'clang' or 'nvcc' -# -use Getopt::Long; -use File::Basename; - -my $base_dir; -BEGIN { - $base_dir = dirname( Cwd::realpath(__FILE__) ); -} -use lib "$base_dir/"; -use hipvars; - -$isWindows = $hipvars::isWindows; -$HIP_RUNTIME = $hipvars::HIP_RUNTIME; -$HIP_PLATFORM = $hipvars::HIP_PLATFORM; -$HIP_COMPILER = $hipvars::HIP_COMPILER; -$HIP_CLANG_PATH = $hipvars::HIP_CLANG_PATH; -$CUDA_PATH = $hipvars::CUDA_PATH; -$HIP_PATH = $hipvars::HIP_PATH; -$ROCM_PATH = $hipvars::ROCM_PATH; -$HIP_VERSION = $hipvars::HIP_VERSION; -$HSA_PATH = $hipvars::HSA_PATH; - -Getopt::Long::Configure ( qw{bundling no_ignore_case}); -GetOptions( - "help|h" => \$p_help - ,"path|p" => \$p_path - ,"rocmpath|R" => \$p_rocmpath - ,"compiler|c" => \$p_compiler - ,"platform|P" => \$p_platform - ,"runtime|r" => \$p_runtime - ,"hipclangpath|l" => \$p_hipclangpath - ,"cpp_config|cxx_config|C" => \$p_cpp_config - ,"full|f|info" => \$p_full, - ,"version|v" => \$p_version, - ,"check" => \$p_check, - ,"newline|n" => \$p_newline -); - -if ($HIP_COMPILER eq "clang") { - $HIP_CLANG_VERSION = ""; - if($isWindows) { - $HIP_CLANG_VERSION = `\"$HIP_CLANG_PATH/clang++\" --version`; - } else { - $HIP_CLANG_VERSION = `$HIP_CLANG_PATH/clang++ --version`; - } - $HIP_CLANG_VERSION=~/.*clang version (\S+).*/; - $HIP_CLANG_VERSION=$1; - - $CPP_CONFIG = " -D__HIP_PLATFORM_HCC__= -D__HIP_PLATFORM_AMD__="; - - $HIP_PATH_INCLUDE = $HIP_PATH."/include"; - $HIP_CLANG_INCLUDE = $HIP_CLANG_PATH."/../lib/clang/".$HIP_CLANG_VERSION; - if($isWindows) { - $CPP_CONFIG .= " -I\"$HIP_PATH_INCLUDE\" -I\"$HIP_CLANG_INCLUDE\""; - } else { - $CPP_CONFIG .= " -I$HIP_PATH_INCLUDE -I$HIP_CLANG_INCLUDE -I$HSA_PATH/include"; - } -} -if ($HIP_PLATFORM eq "nvidia") { - $CPP_CONFIG = " -D__HIP_PLATFORM_NVCC__= -D__HIP_PLATFORM_NVIDIA__= -I$HIP_PATH/include -I$CUDA_PATH/include"; -}; - -if ($p_help) { - print "usage: hipconfig [OPTIONS]\n"; - print " --path, -p : print HIP_PATH (use env var if set, else determine from hipconfig path)\n"; - print " --rocmpath, -R : print ROCM_PATH (use env var if set, else determine from hip path or /opt/rocm)\n"; - print " --cpp_config, -C : print C++ compiler options\n"; - print " --compiler, -c : print compiler (clang or nvcc)\n"; - print " --platform, -P : print platform (amd or nvidia)\n"; - print " --runtime, -r : print runtime (rocclr or cuda)\n"; - print " --hipclangpath, -l : print HIP_CLANG_PATH\n"; - print " --full, -f : print full config\n"; - print " --version, -v : print hip version\n"; - print " --check : check configuration\n"; - print " --newline, -n : print newline\n"; - print " --help, -h : print help message\n"; - exit(); -} - -if ($p_path) { - print "$HIP_PATH"; - $printed = 1; -} - -if ($p_rocmpath) { - print "$ROCM_PATH"; - $printed = 1; -} - -if ($p_cpp_config) { - print $CPP_CONFIG; - $printed = 1; -} - -if ($p_compiler) { - print $HIP_COMPILER; - $printed = 1; -} - -if ($p_platform) { - print $HIP_PLATFORM; - $printed = 1; -} - -if ($p_runtime) { - print $HIP_RUNTIME; - $printed = 1; -} - -if ($p_hipclangpath) { - if (defined $HIP_CLANG_PATH) { - print $HIP_CLANG_PATH; - } - $printed = 1; -} - -if ($p_version) { - print $HIP_VERSION; - $printed = 1; -} - -if (!$printed or $p_full) { - print "HIP version : ", $HIP_VERSION, "\n\n"; - print "== hipconfig\n"; - print "HIP_PATH : ", $HIP_PATH, "\n"; - print "ROCM_PATH : ", $ROCM_PATH, "\n"; - print "HIP_COMPILER : ", $HIP_COMPILER, "\n"; - print "HIP_PLATFORM : ", $HIP_PLATFORM, "\n"; - print "HIP_RUNTIME : ", $HIP_RUNTIME, "\n"; - print "CPP_CONFIG : ", $CPP_CONFIG, "\n"; - if ($HIP_PLATFORM eq "amd") - { - print "\n" ; - if ($HIP_COMPILER eq "clang") - { - print "== hip-clang\n"; - if (not $isWindows) { - print ("HSA_PATH : $HSA_PATH\n"); - } - print ("HIP_CLANG_PATH : $HIP_CLANG_PATH\n"); - if ($isWindows) { - system("\"$HIP_CLANG_PATH/clang++\" --version"); - system("\"$HIP_CLANG_PATH/llc\" --version"); - printf("hip-clang-cxxflags : "); - $win_output = `perl \"$HIP_PATH/bin/hipcc\" --cxxflags`; - printf("$win_output \n"); - printf("hip-clang-ldflags : "); - $win_output = `perl \"$HIP_PATH/bin/hipcc\" --ldflags`; - printf("$win_output \n"); - } else { - system("$HIP_CLANG_PATH/clang++ --version"); - system("$HIP_CLANG_PATH/llc --version"); - print ("hip-clang-cxxflags : "); - system("$HIP_PATH/bin/hipcc --cxxflags"); - printf("\n"); - print ("hip-clang-ldflags : "); - system("$HIP_PATH/bin/hipcc --ldflags"); - printf("\n"); - } - } else { - print ("Unexpected HIP_COMPILER: $HIP_COMPILER\n"); - } - } - if ($HIP_PLATFORM eq "nvidia") { - print "\n" ; - print "== nvcc\n"; - #print "CUDA_PATH :", $CUDA_PATH"; - system("nvcc --version"); - - } - print "\n" ; - - print "=== Environment Variables\n"; - if ($isWindows) { - print ("PATH=$ENV{PATH}\n"); - system("set | findstr /B /C:\"HIP\" /C:\"HSA\" /C:\"CUDA\" /C:\"LD_LIBRARY_PATH\""); - } else { - system("echo PATH=\$PATH"); - system("env | egrep '^HIP|^HSA|^CUDA|^LD_LIBRARY_PATH'"); - } - - - print "\n" ; - if ($isWindows) { - print "== Windows Display Drivers\n"; - print "Hostname : "; system ("hostname"); - system ("wmic path win32_VideoController get AdapterCompatibility,InstalledDisplayDrivers,Name | findstr /B /C:\"Advanced Micro Devices\""); - } else { - print "== Linux Kernel\n"; - print "Hostname : "; system ("hostname"); - system ("uname -a"); - } - - if (-e "/usr/bin/lsb_release") { - system ("/usr/bin/lsb_release -a"); - } - - print "\n" ; - $printed = 1; -} - - -if ($p_check) { - print "\nCheck system installation:\n"; - - printf ("%-70s", "check hipconfig in PATH..."); - # Safer to use which hipconfig instead of invoking hipconfig - if (system ("which hipconfig > /dev/null 2>&1") != 0) { - print "FAIL\n"; - } else { - printf "good\n"; - } - - if ($HIP_PLATFORM eq "amd") { - $LD_LIBRARY_PATH=$ENV{'LD_LIBRARY_PATH'}; - printf("%-70s", "check LD_LIBRARY_PATH ($LD_LIBRARY_PATH) contains HSA_PATH ($HSA_PATH)..."); - if (index($LD_LIBRARY_PATH, $HSA_PATH) == -1) { - print "FAIL\n"; - } else { - printf "good\n"; - } - - # TODO - check hipcc / nvcc found and executable. - } -} - -if ($p_newline) { - print "\n"; -} diff --git a/projects/clr/hipamd/bin/hipconvertinplace-perl.sh b/projects/clr/hipamd/bin/hipconvertinplace-perl.sh deleted file mode 100755 index 50639206b4..0000000000 --- a/projects/clr/hipamd/bin/hipconvertinplace-perl.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# Copyright (c) 2017-2021 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. - -#usage : hipconvertinplace-perl.sh DIRNAME [hipify-perl options] - -#hipify "inplace" all code files in specified directory. -# This can be quite handy when dealing with an existing CUDA code base since the script -# preserves the existing directory structure. - -# For each code file, this script will: -# - If ".prehip file does not exist, copy the original code to a new file with extension ".prehip". Then hipify the code file. -# - If ".prehip" file exists, this is used as input to hipify. -# (this is useful for testing improvements to the hipify-perl toolset). - - -SCRIPT_DIR=`dirname $0` -SEARCH_DIR=$1 -shift -$SCRIPT_DIR/hipify-perl -inplace -print-stats "$@" `$SCRIPT_DIR/findcode.sh $SEARCH_DIR` diff --git a/projects/clr/hipamd/bin/hipconvertinplace.sh b/projects/clr/hipamd/bin/hipconvertinplace.sh deleted file mode 100755 index e224c9894a..0000000000 --- a/projects/clr/hipamd/bin/hipconvertinplace.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -# Copyright (c) 2016-2021 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. - -#usage : hipconvertinplace.sh DIRNAME [hipify options] [--] [clang options] - -#hipify "inplace" all code files in specified directory. -# This can be quite handy when dealing with an existing CUDA code base since the script -# preserves the existing directory structure. - -SCRIPT_DIR=`dirname $0` -SEARCH_DIR=$1 - -hipify_args='' -while (( "$#" )); do - shift - if [ "$1" != "--" ]; then - hipify_args="$hipify_args $1" - else - shift - break - fi -done -clang_args="$@" - -$SCRIPT_DIR/hipify-clang -inplace -print-stats $hipify_args `$SCRIPT_DIR/findcode.sh $SEARCH_DIR` -- -x cuda $clang_args diff --git a/projects/clr/hipamd/bin/hipdemangleatp b/projects/clr/hipamd/bin/hipdemangleatp deleted file mode 100755 index d739d9fd97..0000000000 --- a/projects/clr/hipamd/bin/hipdemangleatp +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# Copyright (c) 2016-2021 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. - -# usage: hipdemangleatp.sh ATP_FILE - -# HIP kernels -kernels=$(grep grid_launch_parm $1 | cut -d" " -f1 | sort | uniq) -for mangled_sym in $kernels; do - real_sym=$(c++filt -p $(c++filt _$mangled_sym | cut -d: -f3 | sed 's/_functor//g' | sed 's/ /\\\ /g')) - #echo "$mangled_sym => $real_sym" >> $1.log - sed -i "s/$mangled_sym/$real_sym/g" $1 -done - -# HC kernels -kernels=$(grep cxxamp_trampoline $1 | cut -d" " -f1 | sort | uniq) -for mangled_sym in $kernels; do - real_sym=$(echo $mangled_sym | sed "s/^/_/g; s/_EC_/$/g" | c++filt -p | cut -d\( -f1 | cut -d" " -f1 --complement | sed 's/ /\\\ /g') - #echo "$mangled_sym => $real_sym" >> $1.log - sed -i "s/$mangled_sym/$real_sym/g" $1 -done diff --git a/projects/clr/hipamd/bin/hipexamine-perl.sh b/projects/clr/hipamd/bin/hipexamine-perl.sh deleted file mode 100755 index 48d802741f..0000000000 --- a/projects/clr/hipamd/bin/hipexamine-perl.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# Copyright (c) 2017-2021 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. - -#usage : hipexamine-perl.sh DIRNAME [hipify-perl options] - -# Generate HIP stats (LOC, CUDA->API conversions, missing functionality) for all the code files -# in the specified directory. - - -SCRIPT_DIR=`dirname $0` -SEARCH_DIR=$1 -shift -$SCRIPT_DIR/hipify-perl -no-output -print-stats "$@" `$SCRIPT_DIR/findcode.sh $SEARCH_DIR` diff --git a/projects/clr/hipamd/bin/hipexamine.sh b/projects/clr/hipamd/bin/hipexamine.sh deleted file mode 100755 index dcc529c223..0000000000 --- a/projects/clr/hipamd/bin/hipexamine.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -# Copyright (c) 2016-2021 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. - -#usage : hipexamine.sh DIRNAME [hipify options] [--] [clang options] - -# Generate CUDA->HIP conversion statistics for all the code files in the specified directory. - -SCRIPT_DIR=`dirname $0` -SEARCH_DIR=$1 - -hipify_args='' -while (( "$#" )); do - shift - if [ "$1" != "--" ]; then - hipify_args="$hipify_args $1" - else - shift - break - fi -done -clang_args="$@" - -$SCRIPT_DIR/hipify-clang -examine $hipify_args `$SCRIPT_DIR/findcode.sh $SEARCH_DIR` -- -x cuda $clang_args diff --git a/projects/clr/hipamd/bin/hipify-cmakefile b/projects/clr/hipamd/bin/hipify-cmakefile deleted file mode 100755 index e58c030923..0000000000 --- a/projects/clr/hipamd/bin/hipify-cmakefile +++ /dev/null @@ -1,279 +0,0 @@ -#!/usr/bin/perl -w -## -# Copyright (c) 2015-2021 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. -## -#usage hipify-cmakefile [OPTIONS] INPUT_FILE -use Getopt::Long; - -GetOptions( - "print-stats" => \$print_stats # print the command-line, like a header. - , "quiet-warnings" => \$quiet_warnings # don't print warnings on unknown CUDA functions. - , "no-output" => \$no_output # don't write any translated output to stdout. - , "inplace" => \$inplace # modify input file inplace, save backup in ".prehip" file. - , "n" => \$n # combination of print_stats + no-output. -); - -$print_stats = 1 if $n; -$no_output = 1 if $n; - -@warn_whitelist = (); - -#--- -#Stats tracking code: -@statNames = ( "macro", "include", "option", "other" ); - -#--- -#Compute total of all individual counts: -sub totalStats { - my %count = %{ shift() }; - - my $total = 0; - foreach $key ( keys %count ) { - $total += $count{$key}; - } - - return $total; -} - -#--- -sub printStats { - my $label = shift(); - my @statNames = @{ shift() }; - my %counts = %{ shift() }; - my $warnings = shift(); - my $loc = shift(); - - my $total = totalStats( \%counts ); - - printf STDERR "%s %d CUDA->HIP refs( ", $label, $total; - - foreach $stat (@statNames) { - printf STDERR "%s:%d ", $stat, $counts{$stat}; - } - - printf STDERR ") warn:%d LOC:%d", $warnings, $loc; -} - -#--- -# Add adder stats to dest. Used to add stats for current file to a running total for all files: -sub addStats { - my $dest_ref = shift(); - my %adder = %{ shift() }; - - foreach $key ( keys %adder ) { - $dest_ref->{$key} += $adder{$key}; - } -} - -#--- -sub clearStats { - my $dest_ref = shift(); - my @statNames = @{ shift() }; - - foreach $stat (@statNames) { - $dest_ref->{$stat} = 0; - } -} - -# count of transforms in all files: -my %tt; -clearStats( \%tt, \@statNames ); - -my $fileCount = @ARGV; -my $fileName = ""; - -while (@ARGV) { - $fileName = shift(@ARGV); - if ($inplace) { - my $file_prehip = "$fileName" . ".prehip"; - my $infile; - my $outfile; - if ( -e $file_prehip ) { - $infile = $file_prehip; - $outfile = $fileName; - } - else { - system("cp $fileName $file_prehip"); - $infile = $file_prehip; - $outfile = $fileName; - } - open( INFILE, "<", $infile ) or die "error: could not open $infile"; - open( OUTFILE, ">", $outfile ) or die "error: could not open $outfile"; - $OUTFILE = OUTFILE; - } - else { - open( INFILE, "<", $fileName ) or die "error: could not open $fileName"; - $OUTFILE = STDOUT; - } - - # count of transforms in this file, init to 0 here: - my %ft; - clearStats( \%ft, \@statNames ); - - my $lineCount = 0; - - undef $/; # Read whole file at once, so we can match newlines. - while () { - - # Replace find_package(CUDA) with find_package(HIP) - $ft{'include'} += s/\bfind_package[ ]*\([ ]*CUDA[ ]*[0-9.]*/find_package(HIP/ig; - - # Replace macros - $ft{'macro'} += s/\bCUDA_ADD_EXECUTABLE/HIP_ADD_EXECUTABLE/ig; - $ft{'macro'} += s/\bCUDA_ADD_LIBRARY/HIP_ADD_LIBRARY/ig; - $ft{'macro'} += s/\bCUDA_INCLUDE_DIRECTORIES/HIP_INCLUDE_DIRECTORIES/ig; - - # Replace options - $ft{'option'} += s/\bCUDA_NVCC_FLAGS/HIP_NVCC_FLAGS/ig; - $ft{'option'} += s/\bCUDA_HOST_COMPILATION_CPP/HIP_HOST_COMPILATION_CPP/ig; - $ft{'option'} += s/\bCUDA_SOURCE_PROPERTY_FORMAT/HIP_SOURCE_PROPERTY_FORMAT/ig; - - # Replace variables - $ft{'other'} += s/\bCUDA_FOUND/HIP_FOUND/ig; - $ft{'other'} += s/\bCUDA_VERSION/HIP_VERSION/ig; - $ft{'other'} += s/\bCUDA_TOOLKIT_ROOT_DIR/HIP_ROOT_DIR/ig; - - unless ($quiet_warnings) { - - #print STDERR "Check WARNINGs\n"; - # copy into array of lines, process line-by-line to show warnings: - my @lines = split /\n/, $_; - my $tmp = $_; # copies the whole file, could be a little smarter here... - my $line_num = 0; - - foreach (@lines) { - $line_num++; - - # remove any whitelisted words: - foreach $w (@warn_whitelist) { - s/\b$w\b/ZAP/; - } - - $s = warnUnsupportedSpecialFunctions($line_num); - $warnings += $s; - } - - $_ = $tmp; - } - - #-------- - # Print it! - unless ($no_output) { - print $OUTFILE "$_"; - } - $lineCount = $_ =~ tr/\n//; - } - - my $totalConverted = totalStats( \%ft ); - - if ( ( $totalConverted + $warnings ) and $print_stats ) { - printStats( "info: converted", \@statNames, \%ft, $warnings, $lineCount ); - print STDERR " in '$fileName'\n"; - print STDERR "You may need to hand-edit '$fileName' to add steps to build correctly on HCC path\n"; - } - - # Update totals for all files: - addStats( \%tt, \%ft ); - $Twarnings += $warnings; - $TlineCount += $lineCount; -} - -#-- Print total stats for all files processed: -if ( $print_stats and ( $fileCount > 1 ) ) { - print STDERR "\n"; - printStats( "info: TOTAL-converted", \@statNames, \%tt, $Twarnings, $TlineCount ); - print STDERR "\n"; -} - -#--- -sub warnUnsupportedSpecialFunctions { - my $line_num = shift; - my $m = 0; - - foreach $func ( - # macros: - "CUDA_ADD_CUFFT_TO_TARGET", - "CUDA_ADD_CUBLAS_TO_TARGET", - #"CUDA_ADD_EXECUTABLE", - #"CUDA_ADD_LIBRARY", - "CUDA_BUILD_CLEAN_TARGET", - "CUDA_COMPILE", - "CUDA_COMPILE_PTX", - "CUDA_COMPILE_FATBIN", - "CUDA_COMPILE_CUBIN", - "CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME", - #"CUDA_INCLUDE_DIRECTORIES", - "CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS", - "CUDA_SELECT_NVCC_ARCH_FLAGS", - "CUDA_WRAP_SRCS", - - # options: - "CUDA_64_BIT_DEVICE_CODE", - "CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE", - "CUDA_BUILD_CUBIN", - "CUDA_BUILD_EMULATION", - "CUDA_LINK_LIBRARIES_KEYWORD", - "CUDA_GENERATED_OUTPUT_DIR", - #"CUDA_HOST_COMPILATION_CPP", - "CUDA_HOST_COMPILER", - #"CUDA_NVCC_FLAGS", - #"CUDA_NVCC_FLAGS_", - "CUDA_PROPAGATE_HOST_FLAGS", - "CUDA_SEPARABLE_COMPILATION", - #"CUDA_SOURCE_PROPERTY_FORMAT", - "CUDA_USE_STATIC_CUDA_RUNTIME", - "CUDA_VERBOSE_BUILD", - - # others: - #"CUDA_VERSION_MAJOR", - #"CUDA_VERSION_MINOR", - #"CUDA_VERSION", - #"CUDA_VERSION_STRING", - "CUDA_HAS_FP16", - #"CUDA_TOOLKIT_ROOT_DIR", - "CUDA_SDK_ROOT_DIR", - "CUDA_INCLUDE_DIRS", - "CUDA_LIBRARIES", - "CUDA_CUFFT_LIBRARIES", - "CUDA_CUBLAS_LIBRARIES", - "CUDA_cudart_static_LIBRARY", - "CUDA_cudadevrt_LIBRARY", - "CUDA_cupti_LIBRARY", - "CUDA_curand_LIBRARY", - "CUDA_cusolver_LIBRARY", - "CUDA_cusparse_LIBRARY", - "CUDA_npp_LIBRARY", - "CUDA_nppc_LIBRARY", - "CUDA_nppi_LIBRARY", - "CUDA_npps_LIBRARY", - "CUDA_nvcuvenc_LIBRARY", - "CUDA_nvcuvid_LIBRARY" - ) - { - my $mt = m/\b($func)/g; - if ($mt) { - $m += $mt; - print STDERR " warning: $fileName:#$line_num : unsupported macro/option : $_\n"; - } - } - - return $m; -} diff --git a/projects/clr/hipamd/bin/hipify-perl b/projects/clr/hipamd/bin/hipify-perl deleted file mode 100755 index 1cb0cdb8a7..0000000000 --- a/projects/clr/hipamd/bin/hipify-perl +++ /dev/null @@ -1,2693 +0,0 @@ -#!/usr/bin/perl -w - -## -# 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. -## - -# IMPORTANT: Do not change this file manually: it is generated by hipify-clang --perl - -#usage hipify-perl [OPTIONS] INPUT_FILE - -use Getopt::Long; -my $whitelist = ""; -my $fileName = ""; -my %ft; -my %Tkernels; - -GetOptions( - "examine" => \$examine # Combines -no-output and -print-stats options. - , "inplace" => \$inplace # Modify input file inplace, replacing input with hipified output, save backup in .prehip file. - , "no-output" => \$no_output # Don't write any translated output to stdout. - , "print-stats" => \$print_stats # Print translation statistics. - , "quiet-warnings" => \$quiet_warnings # Don't print warnings on unknown CUDA functions. - , "whitelist=s" => \$whitelist # TODO: test it beforehand -); - -$print_stats = 1 if $examine; -$no_output = 1 if $examine; - -# Whitelist of cuda[A-Z] identifiers, which are commonly used in CUDA sources but don't map to any CUDA API: -@whitelist = ( - "cudaCloverField" - , "cudaColorSpinorField" - , "cudaDevice" - , "cudaDeviceId" - , "cudaDevice_t" - , "cudaDevices" - , "cudaDimBlock" - , "cudaDimGrid" - , "cudaFatLink" - , "cudaGauge" - , "cudaGaugeField" - , "cudaGradInput" - , "cudaGradOutput" - , "cudaGridDim" - , "cudaIDs" - , "cudaInGauge" - , "cudaIndices" - , "cudaInput" - , "cudaMom" - , "cudaOutput" - , "cudaParam" - , "cudaSiteLink" - , "cudaStaple" -); - -push(@whitelist, split(',', $whitelist)); - -@statNames = ("error", "init", "version", "device", "context", "module", "memory", "virtual_memory", "addressing", "stream", "event", "external_resource_interop", "stream_memory", "execution", "graph", "occupancy", "texture", "surface", "peer", "graphics", "profiler", "openGL", "D3D9", "D3D10", "D3D11", "VDPAU", "EGL", "thread", "complex", "library", "device_library", "device_function", "include", "include_cuda_main_header", "type", "literal", "numeric_literal", "define", "extern_shared", "kernel_launch"); - -sub totalStats { - my %count = %{ shift() }; - my $total = 0; - foreach $key (keys %count) { - $total += $count{$key}; - } - return $total; -}; - -sub printStats { - my $label = shift(); - my @statNames = @{ shift() }; - my %counts = %{ shift() }; - my $warnings = shift(); - my $loc = shift(); - my $total = totalStats(\%counts); - printf STDERR "%s %d CUDA->HIP refs ( ", $label, $total; - foreach $stat (@statNames) { - printf STDERR "%s:%d ", $stat, $counts{$stat}; - } - printf STDERR ")\n warn:%d LOC:%d", $warnings, $loc; -} - -sub addStats { - my $dest_ref = shift(); - my %adder = %{ shift() }; - foreach $key (keys %adder) { - $dest_ref->{$key} += $adder{$key}; - } -} - -sub clearStats { - my $dest_ref = shift(); - my @statNames = @{ shift() }; - foreach $stat(@statNames) { - $dest_ref->{$stat} = 0; - } -} - -sub simpleSubstitutions { - $ft{'error'} += s/\bcudaGetErrorName\b/hipGetErrorName/g; - $ft{'error'} += s/\bcudaGetErrorString\b/hipGetErrorString/g; - $ft{'error'} += s/\bcudaGetLastError\b/hipGetLastError/g; - $ft{'error'} += s/\bcudaPeekAtLastError\b/hipPeekAtLastError/g; - $ft{'init'} += s/\bcuInit\b/hipInit/g; - $ft{'version'} += s/\bcuDriverGetVersion\b/hipDriverGetVersion/g; - $ft{'version'} += s/\bcudaDriverGetVersion\b/hipDriverGetVersion/g; - $ft{'version'} += s/\bcudaRuntimeGetVersion\b/hipRuntimeGetVersion/g; - $ft{'device'} += s/\bcuDeviceComputeCapability\b/hipDeviceComputeCapability/g; - $ft{'device'} += s/\bcuDeviceGet\b/hipGetDevice/g; - $ft{'device'} += s/\bcuDeviceGetAttribute\b/hipDeviceGetAttribute/g; - $ft{'device'} += s/\bcuDeviceGetCount\b/hipGetDeviceCount/g; - $ft{'device'} += s/\bcuDeviceGetName\b/hipDeviceGetName/g; - $ft{'device'} += s/\bcuDeviceTotalMem\b/hipDeviceTotalMem/g; - $ft{'device'} += s/\bcuDeviceTotalMem_v2\b/hipDeviceTotalMem/g; - $ft{'device'} += s/\bcudaChooseDevice\b/hipChooseDevice/g; - $ft{'device'} += s/\bcudaDeviceGetAttribute\b/hipDeviceGetAttribute/g; - $ft{'device'} += s/\bcudaDeviceGetByPCIBusId\b/hipDeviceGetByPCIBusId/g; - $ft{'device'} += s/\bcudaDeviceGetCacheConfig\b/hipDeviceGetCacheConfig/g; - $ft{'device'} += s/\bcudaDeviceGetLimit\b/hipDeviceGetLimit/g; - $ft{'device'} += s/\bcudaDeviceGetPCIBusId\b/hipDeviceGetPCIBusId/g; - $ft{'device'} += s/\bcudaDeviceGetSharedMemConfig\b/hipDeviceGetSharedMemConfig/g; - $ft{'device'} += s/\bcudaDeviceGetStreamPriorityRange\b/hipDeviceGetStreamPriorityRange/g; - $ft{'device'} += s/\bcudaDeviceReset\b/hipDeviceReset/g; - $ft{'device'} += s/\bcudaDeviceSetCacheConfig\b/hipDeviceSetCacheConfig/g; - $ft{'device'} += s/\bcudaDeviceSetLimit\b/hipDeviceSetLimit/g; - $ft{'device'} += s/\bcudaDeviceSetSharedMemConfig\b/hipDeviceSetSharedMemConfig/g; - $ft{'device'} += s/\bcudaDeviceSynchronize\b/hipDeviceSynchronize/g; - $ft{'device'} += s/\bcudaFuncSetCacheConfig\b/hipFuncSetCacheConfig/g; - $ft{'device'} += s/\bcudaGetDevice\b/hipGetDevice/g; - $ft{'device'} += s/\bcudaGetDeviceCount\b/hipGetDeviceCount/g; - $ft{'device'} += s/\bcudaGetDeviceFlags\b/hipCtxGetFlags/g; - $ft{'device'} += s/\bcudaGetDeviceProperties\b/hipGetDeviceProperties/g; - $ft{'device'} += s/\bcudaIpcCloseMemHandle\b/hipIpcCloseMemHandle/g; - $ft{'device'} += s/\bcudaIpcGetEventHandle\b/hipIpcGetEventHandle/g; - $ft{'device'} += s/\bcudaIpcGetMemHandle\b/hipIpcGetMemHandle/g; - $ft{'device'} += s/\bcudaIpcOpenEventHandle\b/hipIpcOpenEventHandle/g; - $ft{'device'} += s/\bcudaIpcOpenMemHandle\b/hipIpcOpenMemHandle/g; - $ft{'device'} += s/\bcudaSetDevice\b/hipSetDevice/g; - $ft{'device'} += s/\bcudaSetDeviceFlags\b/hipSetDeviceFlags/g; - $ft{'context'} += s/\bcuCtxCreate\b/hipCtxCreate/g; - $ft{'context'} += s/\bcuCtxCreate_v2\b/hipCtxCreate/g; - $ft{'context'} += s/\bcuCtxDestroy\b/hipCtxDestroy/g; - $ft{'context'} += s/\bcuCtxDestroy_v2\b/hipCtxDestroy/g; - $ft{'context'} += s/\bcuCtxGetApiVersion\b/hipCtxGetApiVersion/g; - $ft{'context'} += s/\bcuCtxGetCacheConfig\b/hipCtxGetCacheConfig/g; - $ft{'context'} += s/\bcuCtxGetCurrent\b/hipCtxGetCurrent/g; - $ft{'context'} += s/\bcuCtxGetDevice\b/hipCtxGetDevice/g; - $ft{'context'} += s/\bcuCtxGetFlags\b/hipCtxGetFlags/g; - $ft{'context'} += s/\bcuCtxGetLimit\b/hipDeviceGetLimit/g; - $ft{'context'} += s/\bcuCtxGetSharedMemConfig\b/hipCtxGetSharedMemConfig/g; - $ft{'context'} += s/\bcuCtxGetStreamPriorityRange\b/hipDeviceGetStreamPriorityRange/g; - $ft{'context'} += s/\bcuCtxPopCurrent\b/hipCtxPopCurrent/g; - $ft{'context'} += s/\bcuCtxPopCurrent_v2\b/hipCtxPopCurrent/g; - $ft{'context'} += s/\bcuCtxPushCurrent\b/hipCtxPushCurrent/g; - $ft{'context'} += s/\bcuCtxPushCurrent_v2\b/hipCtxPushCurrent/g; - $ft{'context'} += s/\bcuCtxSetCacheConfig\b/hipCtxSetCacheConfig/g; - $ft{'context'} += s/\bcuCtxSetCurrent\b/hipCtxSetCurrent/g; - $ft{'context'} += s/\bcuCtxSetLimit\b/hipDeviceSetLimit/g; - $ft{'context'} += s/\bcuCtxSetSharedMemConfig\b/hipCtxSetSharedMemConfig/g; - $ft{'context'} += s/\bcuCtxSynchronize\b/hipCtxSynchronize/g; - $ft{'context'} += s/\bcuDevicePrimaryCtxGetState\b/hipDevicePrimaryCtxGetState/g; - $ft{'context'} += s/\bcuDevicePrimaryCtxRelease\b/hipDevicePrimaryCtxRelease/g; - $ft{'context'} += s/\bcuDevicePrimaryCtxReset\b/hipDevicePrimaryCtxReset/g; - $ft{'context'} += s/\bcuDevicePrimaryCtxRetain\b/hipDevicePrimaryCtxRetain/g; - $ft{'context'} += s/\bcuDevicePrimaryCtxSetFlags\b/hipDevicePrimaryCtxSetFlags/g; - $ft{'module'} += s/\bcuModuleGetFunction\b/hipModuleGetFunction/g; - $ft{'module'} += s/\bcuModuleGetGlobal\b/hipModuleGetGlobal/g; - $ft{'module'} += s/\bcuModuleGetGlobal_v2\b/hipModuleGetGlobal/g; - $ft{'module'} += s/\bcuModuleGetTexRef\b/hipModuleGetTexRef/g; - $ft{'module'} += s/\bcuModuleLoad\b/hipModuleLoad/g; - $ft{'module'} += s/\bcuModuleLoadData\b/hipModuleLoadData/g; - $ft{'module'} += s/\bcuModuleLoadDataEx\b/hipModuleLoadDataEx/g; - $ft{'module'} += s/\bcuModuleUnload\b/hipModuleUnload/g; - $ft{'memory'} += s/\bcuArray3DCreate\b/hipArray3DCreate/g; - $ft{'memory'} += s/\bcuArray3DCreate_v2\b/hipArray3DCreate/g; - $ft{'memory'} += s/\bcuArrayCreate\b/hipArrayCreate/g; - $ft{'memory'} += s/\bcuArrayCreate_v2\b/hipArrayCreate/g; - $ft{'memory'} += s/\bcuDeviceGetByPCIBusId\b/hipDeviceGetByPCIBusId/g; - $ft{'memory'} += s/\bcuDeviceGetPCIBusId\b/hipDeviceGetPCIBusId/g; - $ft{'memory'} += s/\bcuIpcCloseMemHandle\b/hipIpcCloseMemHandle/g; - $ft{'memory'} += s/\bcuIpcGetMemHandle\b/hipIpcGetMemHandle/g; - $ft{'memory'} += s/\bcuIpcOpenMemHandle\b/hipIpcOpenMemHandle/g; - $ft{'memory'} += s/\bcuMemAlloc\b/hipMalloc/g; - $ft{'memory'} += s/\bcuMemAllocHost\b/hipHostMalloc/g; - $ft{'memory'} += s/\bcuMemAllocHost_v2\b/hipHostMalloc/g; - $ft{'memory'} += s/\bcuMemAllocManaged\b/hipMallocManaged/g; - $ft{'memory'} += s/\bcuMemAllocPitch\b/hipMemAllocPitch/g; - $ft{'memory'} += s/\bcuMemAllocPitch_v2\b/hipMemAllocPitch/g; - $ft{'memory'} += s/\bcuMemAlloc_v2\b/hipMalloc/g; - $ft{'memory'} += s/\bcuMemFree\b/hipFree/g; - $ft{'memory'} += s/\bcuMemFreeHost\b/hipHostFree/g; - $ft{'memory'} += s/\bcuMemFree_v2\b/hipFree/g; - $ft{'memory'} += s/\bcuMemGetAddressRange\b/hipMemGetAddressRange/g; - $ft{'memory'} += s/\bcuMemGetAddressRange_v2\b/hipMemGetAddressRange/g; - $ft{'memory'} += s/\bcuMemGetInfo\b/hipMemGetInfo/g; - $ft{'memory'} += s/\bcuMemGetInfo_v2\b/hipMemGetInfo/g; - $ft{'memory'} += s/\bcuMemHostAlloc\b/hipHostMalloc/g; - $ft{'memory'} += s/\bcuMemHostGetDevicePointer\b/hipHostGetDevicePointer/g; - $ft{'memory'} += s/\bcuMemHostGetDevicePointer_v2\b/hipHostGetDevicePointer/g; - $ft{'memory'} += s/\bcuMemHostGetFlags\b/hipHostGetFlags/g; - $ft{'memory'} += s/\bcuMemHostRegister\b/hipHostRegister/g; - $ft{'memory'} += s/\bcuMemHostRegister_v2\b/hipHostRegister/g; - $ft{'memory'} += s/\bcuMemHostUnregister\b/hipHostUnregister/g; - $ft{'memory'} += s/\bcuMemcpy2D\b/hipMemcpyParam2D/g; - $ft{'memory'} += s/\bcuMemcpy2DAsync\b/hipMemcpyParam2DAsync/g; - $ft{'memory'} += s/\bcuMemcpy2DAsync_v2\b/hipMemcpyParam2DAsync/g; - $ft{'memory'} += s/\bcuMemcpy2D_v2\b/hipMemcpyParam2D/g; - $ft{'memory'} += s/\bcuMemcpy3D\b/hipDrvMemcpy3D/g; - $ft{'memory'} += s/\bcuMemcpy3DAsync\b/hipDrvMemcpy3DAsync/g; - $ft{'memory'} += s/\bcuMemcpy3D_v2\b/hipDrvMemcpy3D/g; - $ft{'memory'} += s/\bcuMemcpy3DAsync_v2\b/hipDrvMemcpy3DAsync/g; - $ft{'memory'} += s/\bcuMemcpyAtoH\b/hipMemcpyAtoH/g; - $ft{'memory'} += s/\bcuMemcpyAtoH_v2\b/hipMemcpyAtoH/g; - $ft{'memory'} += s/\bcuMemcpyDtoD\b/hipMemcpyDtoD/g; - $ft{'memory'} += s/\bcuMemcpyDtoDAsync\b/hipMemcpyDtoDAsync/g; - $ft{'memory'} += s/\bcuMemcpyDtoDAsync_v2\b/hipMemcpyDtoDAsync/g; - $ft{'memory'} += s/\bcuMemcpyDtoD_v2\b/hipMemcpyDtoD/g; - $ft{'memory'} += s/\bcuMemcpyDtoH\b/hipMemcpyDtoH/g; - $ft{'memory'} += s/\bcuMemcpyDtoHAsync\b/hipMemcpyDtoHAsync/g; - $ft{'memory'} += s/\bcuMemcpyDtoHAsync_v2\b/hipMemcpyDtoHAsync/g; - $ft{'memory'} += s/\bcuMemcpyDtoH_v2\b/hipMemcpyDtoH/g; - $ft{'memory'} += s/\bcuMemcpyHtoA\b/hipMemcpyHtoA/g; - $ft{'memory'} += s/\bcuMemcpyHtoA_v2\b/hipMemcpyHtoA/g; - $ft{'memory'} += s/\bcuMemcpyHtoD\b/hipMemcpyHtoD/g; - $ft{'memory'} += s/\bcuMemcpyHtoDAsync\b/hipMemcpyHtoDAsync/g; - $ft{'memory'} += s/\bcuMemcpyHtoDAsync_v2\b/hipMemcpyHtoDAsync/g; - $ft{'memory'} += s/\bcuMemcpyHtoD_v2\b/hipMemcpyHtoD/g; - $ft{'memory'} += s/\bcuMemsetD16\b/hipMemsetD16/g; - $ft{'memory'} += s/\bcuMemsetD16Async\b/hipMemsetD16Async/g; - $ft{'memory'} += s/\bcuMemsetD16_v2\b/hipMemsetD16/g; - $ft{'memory'} += s/\bcuMemsetD32\b/hipMemsetD32/g; - $ft{'memory'} += s/\bcuMemsetD32Async\b/hipMemsetD32Async/g; - $ft{'memory'} += s/\bcuMemsetD32_v2\b/hipMemsetD32/g; - $ft{'memory'} += s/\bcuMemsetD8\b/hipMemsetD8/g; - $ft{'memory'} += s/\bcuMemsetD8Async\b/hipMemsetD8Async/g; - $ft{'memory'} += s/\bcuMemsetD8_v2\b/hipMemsetD8/g; - $ft{'memory'} += s/\bcudaFree\b/hipFree/g; - $ft{'memory'} += s/\bcudaFreeArray\b/hipFreeArray/g; - $ft{'memory'} += s/\bcudaFreeHost\b/hipHostFree/g; - $ft{'memory'} += s/\bcudaGetSymbolAddress\b/hipGetSymbolAddress/g; - $ft{'memory'} += s/\bcudaGetSymbolSize\b/hipGetSymbolSize/g; - $ft{'memory'} += s/\bcudaHostAlloc\b/hipHostMalloc/g; - $ft{'memory'} += s/\bcudaHostGetDevicePointer\b/hipHostGetDevicePointer/g; - $ft{'memory'} += s/\bcudaHostGetFlags\b/hipHostGetFlags/g; - $ft{'memory'} += s/\bcudaHostRegister\b/hipHostRegister/g; - $ft{'memory'} += s/\bcudaHostUnregister\b/hipHostUnregister/g; - $ft{'memory'} += s/\bcudaMalloc\b/hipMalloc/g; - $ft{'memory'} += s/\bcudaMalloc3D\b/hipMalloc3D/g; - $ft{'memory'} += s/\bcudaMalloc3DArray\b/hipMalloc3DArray/g; - $ft{'memory'} += s/\bcudaMallocArray\b/hipMallocArray/g; - $ft{'memory'} += s/\bcudaMallocHost\b/hipHostMalloc/g; - $ft{'memory'} += s/\bcudaMallocManaged\b/hipMallocManaged/g; - $ft{'memory'} += s/\bcudaMallocPitch\b/hipMallocPitch/g; - $ft{'memory'} += s/\bcudaMemGetInfo\b/hipMemGetInfo/g; - $ft{'memory'} += s/\bcudaMemcpy\b/hipMemcpy/g; - $ft{'memory'} += s/\bcudaMemcpy2D\b/hipMemcpy2D/g; - $ft{'memory'} += s/\bcudaMemcpy2DAsync\b/hipMemcpy2DAsync/g; - $ft{'memory'} += s/\bcudaMemcpy2DFromArray\b/hipMemcpy2DFromArray/g; - $ft{'memory'} += s/\bcudaMemcpy2DFromArrayAsync\b/hipMemcpy2DFromArrayAsync/g; - $ft{'memory'} += s/\bcudaMemcpy2DToArray\b/hipMemcpy2DToArray/g; - $ft{'memory'} += s/\bcudaMemcpy3D\b/hipMemcpy3D/g; - $ft{'memory'} += s/\bcudaMemcpy3DAsync\b/hipMemcpy3DAsync/g; - $ft{'memory'} += s/\bcudaMemcpyAsync\b/hipMemcpyAsync/g; - $ft{'memory'} += s/\bcudaMemcpyFromArray\b/hipMemcpyFromArray/g; - $ft{'memory'} += s/\bcudaMemcpyFromSymbol\b/hipMemcpyFromSymbol/g; - $ft{'memory'} += s/\bcudaMemcpyFromSymbolAsync\b/hipMemcpyFromSymbolAsync/g; - $ft{'memory'} += s/\bcudaMemcpyPeer\b/hipMemcpyPeer/g; - $ft{'memory'} += s/\bcudaMemcpyPeerAsync\b/hipMemcpyPeerAsync/g; - $ft{'memory'} += s/\bcudaMemcpyToArray\b/hipMemcpyToArray/g; - $ft{'memory'} += s/\bcudaMemcpyToArrayAsync\b/hipMemcpyToArrayAsync/g; - $ft{'memory'} += s/\bcudaMemcpyToSymbol\b/hipMemcpyToSymbol/g; - $ft{'memory'} += s/\bcudaMemcpyToSymbolAsync\b/hipMemcpyToSymbolAsync/g; - $ft{'memory'} += s/\bcudaMemset\b/hipMemset/g; - $ft{'memory'} += s/\bcudaMemset2D\b/hipMemset2D/g; - $ft{'memory'} += s/\bcudaMemset2DAsync\b/hipMemset2DAsync/g; - $ft{'memory'} += s/\bcudaMemset3D\b/hipMemset3D/g; - $ft{'memory'} += s/\bcudaMemset3DAsync\b/hipMemset3DAsync/g; - $ft{'memory'} += s/\bcudaMemsetAsync\b/hipMemsetAsync/g; - $ft{'memory'} += s/\bmake_cudaExtent\b/make_hipExtent/g; - $ft{'memory'} += s/\bmake_cudaPitchedPtr\b/make_hipPitchedPtr/g; - $ft{'memory'} += s/\bmake_cudaPos\b/make_hipPos/g; - $ft{'addressing'} += s/\bcudaPointerGetAttributes\b/hipPointerGetAttributes/g; - $ft{'stream'} += s/\bcuStreamAddCallback\b/hipStreamAddCallback/g; - $ft{'stream'} += s/\bcuStreamCreate\b/hipStreamCreateWithFlags/g; - $ft{'stream'} += s/\bcuStreamCreateWithPriority\b/hipStreamCreateWithPriority/g; - $ft{'stream'} += s/\bcuStreamDestroy\b/hipStreamDestroy/g; - $ft{'stream'} += s/\bcuStreamDestroy_v2\b/hipStreamDestroy/g; - $ft{'stream'} += s/\bcuStreamGetFlags\b/hipStreamGetFlags/g; - $ft{'stream'} += s/\bcuStreamGetPriority\b/hipStreamGetPriority/g; - $ft{'stream'} += s/\bcuStreamQuery\b/hipStreamQuery/g; - $ft{'stream'} += s/\bcuStreamSynchronize\b/hipStreamSynchronize/g; - $ft{'stream'} += s/\bcuStreamWaitEvent\b/hipStreamWaitEvent/g; - $ft{'stream'} += s/\bcudaStreamAddCallback\b/hipStreamAddCallback/g; - $ft{'stream'} += s/\bcudaStreamCreate\b/hipStreamCreate/g; - $ft{'stream'} += s/\bcudaStreamCreateWithFlags\b/hipStreamCreateWithFlags/g; - $ft{'stream'} += s/\bcudaStreamCreateWithPriority\b/hipStreamCreateWithPriority/g; - $ft{'stream'} += s/\bcudaStreamDestroy\b/hipStreamDestroy/g; - $ft{'stream'} += s/\bcudaStreamGetFlags\b/hipStreamGetFlags/g; - $ft{'stream'} += s/\bcudaStreamGetPriority\b/hipStreamGetPriority/g; - $ft{'stream'} += s/\bcudaStreamQuery\b/hipStreamQuery/g; - $ft{'stream'} += s/\bcudaStreamSynchronize\b/hipStreamSynchronize/g; - $ft{'stream'} += s/\bcudaStreamWaitEvent\b/hipStreamWaitEvent/g; - $ft{'event'} += s/\bcuEventCreate\b/hipEventCreateWithFlags/g; - $ft{'event'} += s/\bcuEventDestroy\b/hipEventDestroy/g; - $ft{'event'} += s/\bcuEventDestroy_v2\b/hipEventDestroy/g; - $ft{'event'} += s/\bcuEventElapsedTime\b/hipEventElapsedTime/g; - $ft{'event'} += s/\bcuEventQuery\b/hipEventQuery/g; - $ft{'event'} += s/\bcuEventRecord\b/hipEventRecord/g; - $ft{'event'} += s/\bcuEventSynchronize\b/hipEventSynchronize/g; - $ft{'event'} += s/\bcudaEventCreate\b/hipEventCreate/g; - $ft{'event'} += s/\bcudaEventCreateWithFlags\b/hipEventCreateWithFlags/g; - $ft{'event'} += s/\bcudaEventDestroy\b/hipEventDestroy/g; - $ft{'event'} += s/\bcudaEventElapsedTime\b/hipEventElapsedTime/g; - $ft{'event'} += s/\bcudaEventQuery\b/hipEventQuery/g; - $ft{'event'} += s/\bcudaEventRecord\b/hipEventRecord/g; - $ft{'event'} += s/\bcudaEventSynchronize\b/hipEventSynchronize/g; - $ft{'execution'} += s/\bcuFuncGetAttribute\b/hipFuncGetAttribute/g; - $ft{'execution'} += s/\bcuLaunchKernel\b/hipModuleLaunchKernel/g; - $ft{'execution'} += s/\bcudaConfigureCall\b/hipConfigureCall/g; - $ft{'execution'} += s/\bcudaFuncGetAttributes\b/hipFuncGetAttributes/g; - $ft{'execution'} += s/\bcudaLaunch\b/hipLaunchByPtr/g; - $ft{'execution'} += s/\bcudaLaunchCooperativeKernel\b/hipLaunchCooperativeKernel/g; - $ft{'execution'} += s/\bcudaLaunchCooperativeKernelMultiDevice\b/hipLaunchCooperativeKernelMultiDevice/g; - $ft{'execution'} += s/\bcudaLaunchKernel\b/hipLaunchKernel/g; - $ft{'execution'} += s/\bcudaSetupArgument\b/hipSetupArgument/g; - $ft{'occupancy'} += s/\bcuOccupancyMaxActiveBlocksPerMultiprocessor\b/hipDrvOccupancyMaxActiveBlocksPerMultiprocessor/g; - $ft{'occupancy'} += s/\bcuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags\b/hipDrvOccupancyMaxActiveBlocksPerMultiprocessorWithFlags/g; - $ft{'occupancy'} += s/\bcuOccupancyMaxPotentialBlockSize\b/hipOccupancyMaxPotentialBlockSize/g; - $ft{'occupancy'} += s/\bcudaOccupancyMaxActiveBlocksPerMultiprocessor\b/hipOccupancyMaxActiveBlocksPerMultiprocessor/g; - $ft{'occupancy'} += s/\bcudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags\b/hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags/g; - $ft{'occupancy'} += s/\bcudaOccupancyMaxPotentialBlockSize\b/hipOccupancyMaxPotentialBlockSize/g; - $ft{'texture'} += s/\bcuTexRefGetAddress\b/hipTexRefGetAddress/g; - $ft{'texture'} += s/\bcuTexRefGetAddressMode\b/hipTexRefGetAddressMode/g; - $ft{'texture'} += s/\bcuTexRefGetAddress_v2\b/hipTexRefGetAddress/g; - $ft{'texture'} += s/\bcuTexRefGetArray\b/hipTexRefGetArray/g; - $ft{'texture'} += s/\bcuTexRefSetAddress\b/hipTexRefSetAddress/g; - $ft{'texture'} += s/\bcuTexRefSetAddress2D\b/hipTexRefSetAddress2D/g; - $ft{'texture'} += s/\bcuTexRefSetAddress2D_v2\b/hipTexRefSetAddress2D/g; - $ft{'texture'} += s/\bcuTexRefSetAddress2D_v3\b/hipTexRefSetAddress2D/g; - $ft{'texture'} += s/\bcuTexRefSetAddressMode\b/hipTexRefSetAddressMode/g; - $ft{'texture'} += s/\bcuTexRefSetAddress_v2\b/hipTexRefSetAddress/g; - $ft{'texture'} += s/\bcuTexRefSetArray\b/hipTexRefSetArray/g; - $ft{'texture'} += s/\bcuTexRefSetFilterMode\b/hipTexRefSetFilterMode/g; - $ft{'texture'} += s/\bcuTexRefSetFlags\b/hipTexRefSetFlags/g; - $ft{'texture'} += s/\bcuTexRefSetFormat\b/hipTexRefSetFormat/g; - $ft{'texture'} += s/\bcudaBindTexture\b/hipBindTexture/g; - $ft{'texture'} += s/\bcudaBindTexture2D\b/hipBindTexture2D/g; - $ft{'texture'} += s/\bcudaBindTextureToArray\b/hipBindTextureToArray/g; - $ft{'texture'} += s/\bcudaBindTextureToMipmappedArray\b/hipBindTextureToMipmappedArray/g; - $ft{'texture'} += s/\bcudaCreateChannelDesc\b/hipCreateChannelDesc/g; - $ft{'texture'} += s/\bcudaCreateTextureObject\b/hipCreateTextureObject/g; - $ft{'texture'} += s/\bcudaDestroyTextureObject\b/hipDestroyTextureObject/g; - $ft{'texture'} += s/\bcudaGetChannelDesc\b/hipGetChannelDesc/g; - $ft{'texture'} += s/\bcudaGetTextureAlignmentOffset\b/hipGetTextureAlignmentOffset/g; - $ft{'texture'} += s/\bcudaGetTextureObjectResourceDesc\b/hipGetTextureObjectResourceDesc/g; - $ft{'texture'} += s/\bcudaGetTextureObjectResourceViewDesc\b/hipGetTextureObjectResourceViewDesc/g; - $ft{'texture'} += s/\bcudaGetTextureReference\b/hipGetTextureReference/g; - $ft{'texture'} += s/\bcudaUnbindTexture\b/hipUnbindTexture/g; - $ft{'surface'} += s/\bcudaCreateSurfaceObject\b/hipCreateSurfaceObject/g; - $ft{'surface'} += s/\bcudaDestroySurfaceObject\b/hipDestroySurfaceObject/g; - $ft{'peer'} += s/\bcuCtxDisablePeerAccess\b/hipCtxDisablePeerAccess/g; - $ft{'peer'} += s/\bcuCtxEnablePeerAccess\b/hipCtxEnablePeerAccess/g; - $ft{'peer'} += s/\bcuDeviceCanAccessPeer\b/hipDeviceCanAccessPeer/g; - $ft{'peer'} += s/\bcudaDeviceCanAccessPeer\b/hipDeviceCanAccessPeer/g; - $ft{'peer'} += s/\bcudaDeviceDisablePeerAccess\b/hipDeviceDisablePeerAccess/g; - $ft{'peer'} += s/\bcudaDeviceEnablePeerAccess\b/hipDeviceEnablePeerAccess/g; - $ft{'profiler'} += s/\bcuProfilerStart\b/hipProfilerStart/g; - $ft{'profiler'} += s/\bcuProfilerStop\b/hipProfilerStop/g; - $ft{'profiler'} += s/\bcudaProfilerStart\b/hipProfilerStart/g; - $ft{'profiler'} += s/\bcudaProfilerStop\b/hipProfilerStop/g; - $ft{'thread'} += s/\bcudaThreadExit\b/hipDeviceReset/g; - $ft{'thread'} += s/\bcudaThreadGetCacheConfig\b/hipDeviceGetCacheConfig/g; - $ft{'thread'} += s/\bcudaThreadSetCacheConfig\b/hipDeviceSetCacheConfig/g; - $ft{'thread'} += s/\bcudaThreadSynchronize\b/hipDeviceSynchronize/g; - $ft{'complex'} += s/\bcuCabs\b/hipCabs/g; - $ft{'complex'} += s/\bcuCabsf\b/hipCabsf/g; - $ft{'complex'} += s/\bcuCadd\b/hipCadd/g; - $ft{'complex'} += s/\bcuCaddf\b/hipCaddf/g; - $ft{'complex'} += s/\bcuCdiv\b/hipCdiv/g; - $ft{'complex'} += s/\bcuCdivf\b/hipCdivf/g; - $ft{'complex'} += s/\bcuCfma\b/hipCfma/g; - $ft{'complex'} += s/\bcuCfmaf\b/hipCfmaf/g; - $ft{'complex'} += s/\bcuCimag\b/hipCimag/g; - $ft{'complex'} += s/\bcuCimagf\b/hipCimagf/g; - $ft{'complex'} += s/\bcuCmul\b/hipCmul/g; - $ft{'complex'} += s/\bcuCmulf\b/hipCmulf/g; - $ft{'complex'} += s/\bcuComplexDoubleToFloat\b/hipComplexDoubleToFloat/g; - $ft{'complex'} += s/\bcuComplexFloatToDouble\b/hipComplexFloatToDouble/g; - $ft{'complex'} += s/\bcuConj\b/hipConj/g; - $ft{'complex'} += s/\bcuConjf\b/hipConjf/g; - $ft{'complex'} += s/\bcuCreal\b/hipCreal/g; - $ft{'complex'} += s/\bcuCrealf\b/hipCrealf/g; - $ft{'complex'} += s/\bcuCsub\b/hipCsub/g; - $ft{'complex'} += s/\bcuCsubf\b/hipCsubf/g; - $ft{'complex'} += s/\bmake_cuComplex\b/make_hipComplex/g; - $ft{'complex'} += s/\bmake_cuDoubleComplex\b/make_hipDoubleComplex/g; - $ft{'complex'} += s/\bmake_cuFloatComplex\b/make_hipFloatComplex/g; - $ft{'library'} += s/\bcublasCaxpy\b/hipblasCaxpy/g; - $ft{'library'} += s/\bcublasCaxpy_v2\b/hipblasCaxpy/g; - $ft{'library'} += s/\bcublasCcopy\b/hipblasCcopy/g; - $ft{'library'} += s/\bcublasCcopy_v2\b/hipblasCcopy/g; - $ft{'library'} += s/\bcublasCdotc\b/hipblasCdotc/g; - $ft{'library'} += s/\bcublasCdotc_v2\b/hipblasCdotc/g; - $ft{'library'} += s/\bcublasCdotu\b/hipblasCdotu/g; - $ft{'library'} += s/\bcublasCdotu_v2\b/hipblasCdotu/g; - $ft{'library'} += s/\bcublasCgemm\b/hipblasCgemm/g; - $ft{'library'} += s/\bcublasCgemmBatched\b/hipblasCgemmBatched/g; - $ft{'library'} += s/\bcublasCgemmStridedBatched\b/hipblasCgemmStridedBatched/g; - $ft{'library'} += s/\bcublasCgemv\b/hipblasCgemv/g; - $ft{'library'} += s/\bcublasCgemv_v2\b/hipblasCgemv/g; - $ft{'library'} += s/\bcublasCreate\b/hipblasCreate/g; - $ft{'library'} += s/\bcublasCreate_v2\b/hipblasCreate/g; - $ft{'library'} += s/\bcublasCrot\b/hipblasCrot/g; - $ft{'library'} += s/\bcublasCrot_v2\b/hipblasCrot/g; - $ft{'library'} += s/\bcublasCrotg\b/hipblasCrotg/g; - $ft{'library'} += s/\bcublasCrotg_v2\b/hipblasCrotg/g; - $ft{'library'} += s/\bcublasCscal\b/hipblasCscal/g; - $ft{'library'} += s/\bcublasCscal_v2\b/hipblasCscal/g; - $ft{'library'} += s/\bcublasCsrot\b/hipblasCsrot/g; - $ft{'library'} += s/\bcublasCsrot_v2\b/hipblasCsrot/g; - $ft{'library'} += s/\bcublasCsscal\b/hipblasCsscal/g; - $ft{'library'} += s/\bcublasCsscal_v2\b/hipblasCsscal/g; - $ft{'library'} += s/\bcublasCswap\b/hipblasCswap/g; - $ft{'library'} += s/\bcublasCswap_v2\b/hipblasCswap/g; - $ft{'library'} += s/\bcublasDasum\b/hipblasDasum/g; - $ft{'library'} += s/\bcublasDasum_v2\b/hipblasDasum/g; - $ft{'library'} += s/\bcublasDaxpy\b/hipblasDaxpy/g; - $ft{'library'} += s/\bcublasDaxpy_v2\b/hipblasDaxpy/g; - $ft{'library'} += s/\bcublasDcopy\b/hipblasDcopy/g; - $ft{'library'} += s/\bcublasDcopy_v2\b/hipblasDcopy/g; - $ft{'library'} += s/\bcublasDdot\b/hipblasDdot/g; - $ft{'library'} += s/\bcublasDdot_v2\b/hipblasDdot/g; - $ft{'library'} += s/\bcublasDestroy\b/hipblasDestroy/g; - $ft{'library'} += s/\bcublasDestroy_v2\b/hipblasDestroy/g; - $ft{'library'} += s/\bcublasDgeam\b/hipblasDgeam/g; - $ft{'library'} += s/\bcublasDgemm\b/hipblasDgemm/g; - $ft{'library'} += s/\bcublasDgemmBatched\b/hipblasDgemmBatched/g; - $ft{'library'} += s/\bcublasDgemmStridedBatched\b/hipblasDgemmStridedBatched/g; - $ft{'library'} += s/\bcublasDgemm_v2\b/hipblasDgemm/g; - $ft{'library'} += s/\bcublasDgemv\b/hipblasDgemv/g; - $ft{'library'} += s/\bcublasDgemv_v2\b/hipblasDgemv/g; - $ft{'library'} += s/\bcublasDger\b/hipblasDger/g; - $ft{'library'} += s/\bcublasDger_v2\b/hipblasDger/g; - $ft{'library'} += s/\bcublasDnrm2\b/hipblasDnrm2/g; - $ft{'library'} += s/\bcublasDnrm2_v2\b/hipblasDnrm2/g; - $ft{'library'} += s/\bcublasDrot\b/hipblasDrot/g; - $ft{'library'} += s/\bcublasDrot_v2\b/hipblasDrot/g; - $ft{'library'} += s/\bcublasDrotg\b/hipblasDrotg/g; - $ft{'library'} += s/\bcublasDrotg_v2\b/hipblasDrotg/g; - $ft{'library'} += s/\bcublasDrotm\b/hipblasDrotm/g; - $ft{'library'} += s/\bcublasDrotm_v2\b/hipblasDrotm/g; - $ft{'library'} += s/\bcublasDrotmg\b/hipblasDrotmg/g; - $ft{'library'} += s/\bcublasDrotmg_v2\b/hipblasDrotmg/g; - $ft{'library'} += s/\bcublasDscal\b/hipblasDscal/g; - $ft{'library'} += s/\bcublasDscal_v2\b/hipblasDscal/g; - $ft{'library'} += s/\bcublasDswap\b/hipblasDswap/g; - $ft{'library'} += s/\bcublasDswap_v2\b/hipblasDswap/g; - $ft{'library'} += s/\bcublasDsyr\b/hipblasDsyr/g; - $ft{'library'} += s/\bcublasDsyr_v2\b/hipblasDsyr/g; - $ft{'library'} += s/\bcublasDtrsm\b/hipblasDtrsm/g; - $ft{'library'} += s/\bcublasDtrsm_v2\b/hipblasDtrsm/g; - $ft{'library'} += s/\bcublasDtrsv\b/hipblasDtrsv/g; - $ft{'library'} += s/\bcublasDtrsv_v2\b/hipblasDtrsv/g; - $ft{'library'} += s/\bcublasDzasum\b/hipblasDzasum/g; - $ft{'library'} += s/\bcublasDzasum_v2\b/hipblasDzasum/g; - $ft{'library'} += s/\bcublasDznrm2\b/hipblasDznrm2/g; - $ft{'library'} += s/\bcublasDznrm2_v2\b/hipblasDznrm2/g; - $ft{'library'} += s/\bcublasGemmEx\b/hipblasGemmEx/g; - $ft{'library'} += s/\bcublasGetMatrix\b/hipblasGetMatrix/g; - $ft{'library'} += s/\bcublasGetPointerMode\b/hipblasGetPointerMode/g; - $ft{'library'} += s/\bcublasGetPointerMode_v2\b/hipblasGetPointerMode/g; - $ft{'library'} += s/\bcublasGetStream\b/hipblasGetStream/g; - $ft{'library'} += s/\bcublasGetStream_v2\b/hipblasGetStream/g; - $ft{'library'} += s/\bcublasGetVector\b/hipblasGetVector/g; - $ft{'library'} += s/\bcublasHgemm\b/hipblasHgemm/g; - $ft{'library'} += s/\bcublasHgemmBatched\b/hipblasHgemmBatched/g; - $ft{'library'} += s/\bcublasHgemmStridedBatched\b/hipblasHgemmStridedBatched/g; - $ft{'library'} += s/\bcublasIcamax\b/hipblasIcamax/g; - $ft{'library'} += s/\bcublasIcamax_v2\b/hipblasIcamax/g; - $ft{'library'} += s/\bcublasIcamin\b/hipblasIcamin/g; - $ft{'library'} += s/\bcublasIcamin_v2\b/hipblasIcamin/g; - $ft{'library'} += s/\bcublasIdamax\b/hipblasIdamax/g; - $ft{'library'} += s/\bcublasIdamax_v2\b/hipblasIdamax/g; - $ft{'library'} += s/\bcublasIdamin\b/hipblasIdamin/g; - $ft{'library'} += s/\bcublasIdamin_v2\b/hipblasIdamin/g; - $ft{'library'} += s/\bcublasIsamax\b/hipblasIsamax/g; - $ft{'library'} += s/\bcublasIsamax_v2\b/hipblasIsamax/g; - $ft{'library'} += s/\bcublasIsamin\b/hipblasIsamin/g; - $ft{'library'} += s/\bcublasIsamin_v2\b/hipblasIsamin/g; - $ft{'library'} += s/\bcublasIzamax\b/hipblasIzamax/g; - $ft{'library'} += s/\bcublasIzamax_v2\b/hipblasIzamax/g; - $ft{'library'} += s/\bcublasIzamin\b/hipblasIzamin/g; - $ft{'library'} += s/\bcublasIzamin_v2\b/hipblasIzamin/g; - $ft{'library'} += s/\bcublasSasum\b/hipblasSasum/g; - $ft{'library'} += s/\bcublasSasum_v2\b/hipblasSasum/g; - $ft{'library'} += s/\bcublasSaxpy\b/hipblasSaxpy/g; - $ft{'library'} += s/\bcublasSaxpy_v2\b/hipblasSaxpy/g; - $ft{'library'} += s/\bcublasScasum\b/hipblasScasum/g; - $ft{'library'} += s/\bcublasScasum_v2\b/hipblasScasum/g; - $ft{'library'} += s/\bcublasScnrm2\b/hipblasScnrm2/g; - $ft{'library'} += s/\bcublasScnrm2_v2\b/hipblasScnrm2/g; - $ft{'library'} += s/\bcublasScopy\b/hipblasScopy/g; - $ft{'library'} += s/\bcublasScopy_v2\b/hipblasScopy/g; - $ft{'library'} += s/\bcublasSdot\b/hipblasSdot/g; - $ft{'library'} += s/\bcublasSdot_v2\b/hipblasSdot/g; - $ft{'library'} += s/\bcublasSetMatrix\b/hipblasSetMatrix/g; - $ft{'library'} += s/\bcublasSetPointerMode\b/hipblasSetPointerMode/g; - $ft{'library'} += s/\bcublasSetPointerMode_v2\b/hipblasSetPointerMode/g; - $ft{'library'} += s/\bcublasSetStream\b/hipblasSetStream/g; - $ft{'library'} += s/\bcublasSetStream_v2\b/hipblasSetStream/g; - $ft{'library'} += s/\bcublasSetVector\b/hipblasSetVector/g; - $ft{'library'} += s/\bcublasSgeam\b/hipblasSgeam/g; - $ft{'library'} += s/\bcublasSgemm\b/hipblasSgemm/g; - $ft{'library'} += s/\bcublasSgemmBatched\b/hipblasSgemmBatched/g; - $ft{'library'} += s/\bcublasSgemmStridedBatched\b/hipblasSgemmStridedBatched/g; - $ft{'library'} += s/\bcublasSgemm_v2\b/hipblasSgemm/g; - $ft{'library'} += s/\bcublasSgemv\b/hipblasSgemv/g; - $ft{'library'} += s/\bcublasSgemvBatched\b/hipblasSgemvBatched/g; - $ft{'library'} += s/\bcublasSgemv_v2\b/hipblasSgemv/g; - $ft{'library'} += s/\bcublasSger\b/hipblasSger/g; - $ft{'library'} += s/\bcublasSger_v2\b/hipblasSger/g; - $ft{'library'} += s/\bcublasSnrm2\b/hipblasSnrm2/g; - $ft{'library'} += s/\bcublasSnrm2_v2\b/hipblasSnrm2/g; - $ft{'library'} += s/\bcublasSrot\b/hipblasSrot/g; - $ft{'library'} += s/\bcublasSrot_v2\b/hipblasSrot/g; - $ft{'library'} += s/\bcublasSrotg\b/hipblasSrotg/g; - $ft{'library'} += s/\bcublasSrotg_v2\b/hipblasSrotg/g; - $ft{'library'} += s/\bcublasSrotm\b/hipblasSrotm/g; - $ft{'library'} += s/\bcublasSrotm_v2\b/hipblasSrotm/g; - $ft{'library'} += s/\bcublasSrotmg\b/hipblasSrotmg/g; - $ft{'library'} += s/\bcublasSrotmg_v2\b/hipblasSrotmg/g; - $ft{'library'} += s/\bcublasSscal\b/hipblasSscal/g; - $ft{'library'} += s/\bcublasSscal_v2\b/hipblasSscal/g; - $ft{'library'} += s/\bcublasSswap\b/hipblasSswap/g; - $ft{'library'} += s/\bcublasSswap_v2\b/hipblasSswap/g; - $ft{'library'} += s/\bcublasSsyr\b/hipblasSsyr/g; - $ft{'library'} += s/\bcublasSsyr_v2\b/hipblasSsyr/g; - $ft{'library'} += s/\bcublasStrsm\b/hipblasStrsm/g; - $ft{'library'} += s/\bcublasStrsm_v2\b/hipblasStrsm/g; - $ft{'library'} += s/\bcublasStrsv\b/hipblasStrsv/g; - $ft{'library'} += s/\bcublasStrsv_v2\b/hipblasStrsv/g; - $ft{'library'} += s/\bcublasZaxpy\b/hipblasZaxpy/g; - $ft{'library'} += s/\bcublasZaxpy_v2\b/hipblasZaxpy/g; - $ft{'library'} += s/\bcublasZcopy\b/hipblasZcopy/g; - $ft{'library'} += s/\bcublasZcopy_v2\b/hipblasZcopy/g; - $ft{'library'} += s/\bcublasZdotc\b/hipblasZdotc/g; - $ft{'library'} += s/\bcublasZdotc_v2\b/hipblasZdotc/g; - $ft{'library'} += s/\bcublasZdotu\b/hipblasZdotu/g; - $ft{'library'} += s/\bcublasZdotu_v2\b/hipblasZdotu/g; - $ft{'library'} += s/\bcublasZdrot\b/hipblasZdrot/g; - $ft{'library'} += s/\bcublasZdrot_v2\b/hipblasZdrot/g; - $ft{'library'} += s/\bcublasZdscal\b/hipblasZdscal/g; - $ft{'library'} += s/\bcublasZdscal_v2\b/hipblasZdscal/g; - $ft{'library'} += s/\bcublasZgemm\b/hipblasZgemm/g; - $ft{'library'} += s/\bcublasZgemmBatched\b/hipblasZgemmBatched/g; - $ft{'library'} += s/\bcublasZgemmStridedBatched\b/hipblasZgemmStridedBatched/g; - $ft{'library'} += s/\bcublasZgemm_v2\b/hipblasZgemm/g; - $ft{'library'} += s/\bcublasZgemv\b/hipblasZgemv/g; - $ft{'library'} += s/\bcublasZgemv_v2\b/hipblasZgemv/g; - $ft{'library'} += s/\bcublasZrot\b/hipblasZrot/g; - $ft{'library'} += s/\bcublasZrot_v2\b/hipblasZrot/g; - $ft{'library'} += s/\bcublasZrotg\b/hipblasZrotg/g; - $ft{'library'} += s/\bcublasZrotg_v2\b/hipblasZrotg/g; - $ft{'library'} += s/\bcublasZscal\b/hipblasZscal/g; - $ft{'library'} += s/\bcublasZscal_v2\b/hipblasZscal/g; - $ft{'library'} += s/\bcublasZswap\b/hipblasZswap/g; - $ft{'library'} += s/\bcublasZswap_v2\b/hipblasZswap/g; - $ft{'library'} += s/\bcuda_stream\b/hip_stream/g; - $ft{'library'} += s/\bcudnnActivationBackward\b/hipdnnActivationBackward/g; - $ft{'library'} += s/\bcudnnActivationForward\b/hipdnnActivationForward/g; - $ft{'library'} += s/\bcudnnAddTensor\b/hipdnnAddTensor/g; - $ft{'library'} += s/\bcudnnBatchNormalizationBackward\b/hipdnnBatchNormalizationBackward/g; - $ft{'library'} += s/\bcudnnBatchNormalizationForwardInference\b/hipdnnBatchNormalizationForwardInference/g; - $ft{'library'} += s/\bcudnnBatchNormalizationForwardTraining\b/hipdnnBatchNormalizationForwardTraining/g; - $ft{'library'} += s/\bcudnnConvolutionBackwardBias\b/hipdnnConvolutionBackwardBias/g; - $ft{'library'} += s/\bcudnnConvolutionBackwardData\b/hipdnnConvolutionBackwardData/g; - $ft{'library'} += s/\bcudnnConvolutionBackwardFilter\b/hipdnnConvolutionBackwardFilter/g; - $ft{'library'} += s/\bcudnnConvolutionForward\b/hipdnnConvolutionForward/g; - $ft{'library'} += s/\bcudnnCreate\b/hipdnnCreate/g; - $ft{'library'} += s/\bcudnnCreateActivationDescriptor\b/hipdnnCreateActivationDescriptor/g; - $ft{'library'} += s/\bcudnnCreateConvolutionDescriptor\b/hipdnnCreateConvolutionDescriptor/g; - $ft{'library'} += s/\bcudnnCreateDropoutDescriptor\b/hipdnnCreateDropoutDescriptor/g; - $ft{'library'} += s/\bcudnnCreateFilterDescriptor\b/hipdnnCreateFilterDescriptor/g; - $ft{'library'} += s/\bcudnnCreateLRNDescriptor\b/hipdnnCreateLRNDescriptor/g; - $ft{'library'} += s/\bcudnnCreateOpTensorDescriptor\b/hipdnnCreateOpTensorDescriptor/g; - $ft{'library'} += s/\bcudnnCreatePersistentRNNPlan\b/hipdnnCreatePersistentRNNPlan/g; - $ft{'library'} += s/\bcudnnCreatePoolingDescriptor\b/hipdnnCreatePoolingDescriptor/g; - $ft{'library'} += s/\bcudnnCreateRNNDescriptor\b/hipdnnCreateRNNDescriptor/g; - $ft{'library'} += s/\bcudnnCreateReduceTensorDescriptor\b/hipdnnCreateReduceTensorDescriptor/g; - $ft{'library'} += s/\bcudnnCreateTensorDescriptor\b/hipdnnCreateTensorDescriptor/g; - $ft{'library'} += s/\bcudnnDeriveBNTensorDescriptor\b/hipdnnDeriveBNTensorDescriptor/g; - $ft{'library'} += s/\bcudnnDestroy\b/hipdnnDestroy/g; - $ft{'library'} += s/\bcudnnDestroyActivationDescriptor\b/hipdnnDestroyActivationDescriptor/g; - $ft{'library'} += s/\bcudnnDestroyConvolutionDescriptor\b/hipdnnDestroyConvolutionDescriptor/g; - $ft{'library'} += s/\bcudnnDestroyDropoutDescriptor\b/hipdnnDestroyDropoutDescriptor/g; - $ft{'library'} += s/\bcudnnDestroyFilterDescriptor\b/hipdnnDestroyFilterDescriptor/g; - $ft{'library'} += s/\bcudnnDestroyLRNDescriptor\b/hipdnnDestroyLRNDescriptor/g; - $ft{'library'} += s/\bcudnnDestroyOpTensorDescriptor\b/hipdnnDestroyOpTensorDescriptor/g; - $ft{'library'} += s/\bcudnnDestroyPersistentRNNPlan\b/hipdnnDestroyPersistentRNNPlan/g; - $ft{'library'} += s/\bcudnnDestroyPoolingDescriptor\b/hipdnnDestroyPoolingDescriptor/g; - $ft{'library'} += s/\bcudnnDestroyRNNDescriptor\b/hipdnnDestroyRNNDescriptor/g; - $ft{'library'} += s/\bcudnnDestroyReduceTensorDescriptor\b/hipdnnDestroyReduceTensorDescriptor/g; - $ft{'library'} += s/\bcudnnDestroyTensorDescriptor\b/hipdnnDestroyTensorDescriptor/g; - $ft{'library'} += s/\bcudnnDropoutGetStatesSize\b/hipdnnDropoutGetStatesSize/g; - $ft{'library'} += s/\bcudnnFindConvolutionBackwardDataAlgorithm\b/hipdnnFindConvolutionBackwardDataAlgorithm/g; - $ft{'library'} += s/\bcudnnFindConvolutionBackwardDataAlgorithmEx\b/hipdnnFindConvolutionBackwardDataAlgorithmEx/g; - $ft{'library'} += s/\bcudnnFindConvolutionBackwardFilterAlgorithm\b/hipdnnFindConvolutionBackwardFilterAlgorithm/g; - $ft{'library'} += s/\bcudnnFindConvolutionBackwardFilterAlgorithmEx\b/hipdnnFindConvolutionBackwardFilterAlgorithmEx/g; - $ft{'library'} += s/\bcudnnFindConvolutionForwardAlgorithm\b/hipdnnFindConvolutionForwardAlgorithm/g; - $ft{'library'} += s/\bcudnnFindConvolutionForwardAlgorithmEx\b/hipdnnFindConvolutionForwardAlgorithmEx/g; - $ft{'library'} += s/\bcudnnGetActivationDescriptor\b/hipdnnGetActivationDescriptor/g; - $ft{'library'} += s/\bcudnnGetConvolution2dDescriptor\b/hipdnnGetConvolution2dDescriptor/g; - $ft{'library'} += s/\bcudnnGetConvolution2dForwardOutputDim\b/hipdnnGetConvolution2dForwardOutputDim/g; - $ft{'library'} += s/\bcudnnGetConvolutionBackwardDataAlgorithm\b/hipdnnGetConvolutionBackwardDataAlgorithm/g; - $ft{'library'} += s/\bcudnnGetConvolutionBackwardDataWorkspaceSize\b/hipdnnGetConvolutionBackwardDataWorkspaceSize/g; - $ft{'library'} += s/\bcudnnGetConvolutionBackwardFilterAlgorithm\b/hipdnnGetConvolutionBackwardFilterAlgorithm/g; - $ft{'library'} += s/\bcudnnGetConvolutionBackwardFilterWorkspaceSize\b/hipdnnGetConvolutionBackwardFilterWorkspaceSize/g; - $ft{'library'} += s/\bcudnnGetConvolutionForwardAlgorithm\b/hipdnnGetConvolutionForwardAlgorithm/g; - $ft{'library'} += s/\bcudnnGetConvolutionForwardWorkspaceSize\b/hipdnnGetConvolutionForwardWorkspaceSize/g; - $ft{'library'} += s/\bcudnnGetErrorString\b/hipdnnGetErrorString/g; - $ft{'library'} += s/\bcudnnGetFilter4dDescriptor\b/hipdnnGetFilter4dDescriptor/g; - $ft{'library'} += s/\bcudnnGetFilterNdDescriptor\b/hipdnnGetFilterNdDescriptor/g; - $ft{'library'} += s/\bcudnnGetLRNDescriptor\b/hipdnnGetLRNDescriptor/g; - $ft{'library'} += s/\bcudnnGetOpTensorDescriptor\b/hipdnnGetOpTensorDescriptor/g; - $ft{'library'} += s/\bcudnnGetPooling2dDescriptor\b/hipdnnGetPooling2dDescriptor/g; - $ft{'library'} += s/\bcudnnGetPooling2dForwardOutputDim\b/hipdnnGetPooling2dForwardOutputDim/g; - $ft{'library'} += s/\bcudnnGetRNNDescriptor\b/hipdnnGetRNNDescriptor/g; - $ft{'library'} += s/\bcudnnGetRNNLinLayerBiasParams\b/hipdnnGetRNNLinLayerBiasParams/g; - $ft{'library'} += s/\bcudnnGetRNNLinLayerMatrixParams\b/hipdnnGetRNNLinLayerMatrixParams/g; - $ft{'library'} += s/\bcudnnGetRNNParamsSize\b/hipdnnGetRNNParamsSize/g; - $ft{'library'} += s/\bcudnnGetRNNTrainingReserveSize\b/hipdnnGetRNNTrainingReserveSize/g; - $ft{'library'} += s/\bcudnnGetRNNWorkspaceSize\b/hipdnnGetRNNWorkspaceSize/g; - $ft{'library'} += s/\bcudnnGetReduceTensorDescriptor\b/hipdnnGetReduceTensorDescriptor/g; - $ft{'library'} += s/\bcudnnGetReductionWorkspaceSize\b/hipdnnGetReductionWorkspaceSize/g; - $ft{'library'} += s/\bcudnnGetStream\b/hipdnnGetStream/g; - $ft{'library'} += s/\bcudnnGetTensor4dDescriptor\b/hipdnnGetTensor4dDescriptor/g; - $ft{'library'} += s/\bcudnnGetTensorNdDescriptor\b/hipdnnGetTensorNdDescriptor/g; - $ft{'library'} += s/\bcudnnGetVersion\b/hipdnnGetVersion/g; - $ft{'library'} += s/\bcudnnLRNCrossChannelBackward\b/hipdnnLRNCrossChannelBackward/g; - $ft{'library'} += s/\bcudnnLRNCrossChannelForward\b/hipdnnLRNCrossChannelForward/g; - $ft{'library'} += s/\bcudnnOpTensor\b/hipdnnOpTensor/g; - $ft{'library'} += s/\bcudnnPoolingBackward\b/hipdnnPoolingBackward/g; - $ft{'library'} += s/\bcudnnPoolingForward\b/hipdnnPoolingForward/g; - $ft{'library'} += s/\bcudnnRNNBackwardData\b/hipdnnRNNBackwardData/g; - $ft{'library'} += s/\bcudnnRNNBackwardWeights\b/hipdnnRNNBackwardWeights/g; - $ft{'library'} += s/\bcudnnRNNForwardInference\b/hipdnnRNNForwardInference/g; - $ft{'library'} += s/\bcudnnRNNForwardTraining\b/hipdnnRNNForwardTraining/g; - $ft{'library'} += s/\bcudnnReduceTensor\b/hipdnnReduceTensor/g; - $ft{'library'} += s/\bcudnnScaleTensor\b/hipdnnScaleTensor/g; - $ft{'library'} += s/\bcudnnSetActivationDescriptor\b/hipdnnSetActivationDescriptor/g; - $ft{'library'} += s/\bcudnnSetConvolution2dDescriptor\b/hipdnnSetConvolution2dDescriptor/g; - $ft{'library'} += s/\bcudnnSetConvolutionGroupCount\b/hipdnnSetConvolutionGroupCount/g; - $ft{'library'} += s/\bcudnnSetConvolutionMathType\b/hipdnnSetConvolutionMathType/g; - $ft{'library'} += s/\bcudnnSetConvolutionNdDescriptor\b/hipdnnSetConvolutionNdDescriptor/g; - $ft{'library'} += s/\bcudnnSetDropoutDescriptor\b/hipdnnSetDropoutDescriptor/g; - $ft{'library'} += s/\bcudnnSetFilter4dDescriptor\b/hipdnnSetFilter4dDescriptor/g; - $ft{'library'} += s/\bcudnnSetFilterNdDescriptor\b/hipdnnSetFilterNdDescriptor/g; - $ft{'library'} += s/\bcudnnSetLRNDescriptor\b/hipdnnSetLRNDescriptor/g; - $ft{'library'} += s/\bcudnnSetOpTensorDescriptor\b/hipdnnSetOpTensorDescriptor/g; - $ft{'library'} += s/\bcudnnSetPersistentRNNPlan\b/hipdnnSetPersistentRNNPlan/g; - $ft{'library'} += s/\bcudnnSetPooling2dDescriptor\b/hipdnnSetPooling2dDescriptor/g; - $ft{'library'} += s/\bcudnnSetPoolingNdDescriptor\b/hipdnnSetPoolingNdDescriptor/g; - $ft{'library'} += s/\bcudnnSetRNNDescriptor\b/hipdnnSetRNNDescriptor/g; - $ft{'library'} += s/\bcudnnSetRNNDescriptor_v5\b/hipdnnSetRNNDescriptor_v5/g; - $ft{'library'} += s/\bcudnnSetRNNDescriptor_v6\b/hipdnnSetRNNDescriptor_v6/g; - $ft{'library'} += s/\bcudnnSetReduceTensorDescriptor\b/hipdnnSetReduceTensorDescriptor/g; - $ft{'library'} += s/\bcudnnSetStream\b/hipdnnSetStream/g; - $ft{'library'} += s/\bcudnnSetTensor\b/hipdnnSetTensor/g; - $ft{'library'} += s/\bcudnnSetTensor4dDescriptor\b/hipdnnSetTensor4dDescriptor/g; - $ft{'library'} += s/\bcudnnSetTensor4dDescriptorEx\b/hipdnnSetTensor4dDescriptorEx/g; - $ft{'library'} += s/\bcudnnSetTensorNdDescriptor\b/hipdnnSetTensorNdDescriptor/g; - $ft{'library'} += s/\bcudnnSoftmaxBackward\b/hipdnnSoftmaxBackward/g; - $ft{'library'} += s/\bcudnnSoftmaxForward\b/hipdnnSoftmaxForward/g; - $ft{'library'} += s/\bcufftCreate\b/hipfftCreate/g; - $ft{'library'} += s/\bcufftDestroy\b/hipfftDestroy/g; - $ft{'library'} += s/\bcufftEstimate1d\b/hipfftEstimate1d/g; - $ft{'library'} += s/\bcufftEstimate2d\b/hipfftEstimate2d/g; - $ft{'library'} += s/\bcufftEstimate3d\b/hipfftEstimate3d/g; - $ft{'library'} += s/\bcufftEstimateMany\b/hipfftEstimateMany/g; - $ft{'library'} += s/\bcufftExecC2C\b/hipfftExecC2C/g; - $ft{'library'} += s/\bcufftExecC2R\b/hipfftExecC2R/g; - $ft{'library'} += s/\bcufftExecD2Z\b/hipfftExecD2Z/g; - $ft{'library'} += s/\bcufftExecR2C\b/hipfftExecR2C/g; - $ft{'library'} += s/\bcufftExecZ2D\b/hipfftExecZ2D/g; - $ft{'library'} += s/\bcufftExecZ2Z\b/hipfftExecZ2Z/g; - $ft{'library'} += s/\bcufftGetSize\b/hipfftGetSize/g; - $ft{'library'} += s/\bcufftGetSize1d\b/hipfftGetSize1d/g; - $ft{'library'} += s/\bcufftGetSize2d\b/hipfftGetSize2d/g; - $ft{'library'} += s/\bcufftGetSize3d\b/hipfftGetSize3d/g; - $ft{'library'} += s/\bcufftGetSizeMany\b/hipfftGetSizeMany/g; - $ft{'library'} += s/\bcufftGetSizeMany64\b/hipfftGetSizeMany64/g; - $ft{'library'} += s/\bcufftGetVersion\b/hipfftGetVersion/g; - $ft{'library'} += s/\bcufftMakePlan1d\b/hipfftMakePlan1d/g; - $ft{'library'} += s/\bcufftMakePlan2d\b/hipfftMakePlan2d/g; - $ft{'library'} += s/\bcufftMakePlan3d\b/hipfftMakePlan3d/g; - $ft{'library'} += s/\bcufftMakePlanMany\b/hipfftMakePlanMany/g; - $ft{'library'} += s/\bcufftMakePlanMany64\b/hipfftMakePlanMany64/g; - $ft{'library'} += s/\bcufftPlan1d\b/hipfftPlan1d/g; - $ft{'library'} += s/\bcufftPlan2d\b/hipfftPlan2d/g; - $ft{'library'} += s/\bcufftPlan3d\b/hipfftPlan3d/g; - $ft{'library'} += s/\bcufftPlanMany\b/hipfftPlanMany/g; - $ft{'library'} += s/\bcufftSetAutoAllocation\b/hipfftSetAutoAllocation/g; - $ft{'library'} += s/\bcufftSetStream\b/hipfftSetStream/g; - $ft{'library'} += s/\bcufftSetWorkArea\b/hipfftSetWorkArea/g; - $ft{'library'} += s/\bcurandCreateGenerator\b/hiprandCreateGenerator/g; - $ft{'library'} += s/\bcurandCreateGeneratorHost\b/hiprandCreateGeneratorHost/g; - $ft{'library'} += s/\bcurandCreatePoissonDistribution\b/hiprandCreatePoissonDistribution/g; - $ft{'library'} += s/\bcurandDestroyDistribution\b/hiprandDestroyDistribution/g; - $ft{'library'} += s/\bcurandDestroyGenerator\b/hiprandDestroyGenerator/g; - $ft{'library'} += s/\bcurandGenerate\b/hiprandGenerate/g; - $ft{'library'} += s/\bcurandGenerateLogNormal\b/hiprandGenerateLogNormal/g; - $ft{'library'} += s/\bcurandGenerateLogNormalDouble\b/hiprandGenerateLogNormalDouble/g; - $ft{'library'} += s/\bcurandGenerateNormal\b/hiprandGenerateNormal/g; - $ft{'library'} += s/\bcurandGenerateNormalDouble\b/hiprandGenerateNormalDouble/g; - $ft{'library'} += s/\bcurandGeneratePoisson\b/hiprandGeneratePoisson/g; - $ft{'library'} += s/\bcurandGenerateSeeds\b/hiprandGenerateSeeds/g; - $ft{'library'} += s/\bcurandGenerateUniform\b/hiprandGenerateUniform/g; - $ft{'library'} += s/\bcurandGenerateUniformDouble\b/hiprandGenerateUniformDouble/g; - $ft{'library'} += s/\bcurandGetVersion\b/hiprandGetVersion/g; - $ft{'library'} += s/\bcurandMakeMTGP32Constants\b/hiprandMakeMTGP32Constants/g; - $ft{'library'} += s/\bcurandMakeMTGP32KernelState\b/hiprandMakeMTGP32KernelState/g; - $ft{'library'} += s/\bcurandSetGeneratorOffset\b/hiprandSetGeneratorOffset/g; - $ft{'library'} += s/\bcurandSetPseudoRandomGeneratorSeed\b/hiprandSetPseudoRandomGeneratorSeed/g; - $ft{'library'} += s/\bcurandSetQuasiRandomGeneratorDimensions\b/hiprandSetQuasiRandomGeneratorDimensions/g; - $ft{'library'} += s/\bcurandSetStream\b/hiprandSetStream/g; - $ft{'library'} += s/\bcusparseCaxpyi\b/hipsparseCaxpyi/g; - $ft{'library'} += s/\bcusparseCbsrmv\b/hipsparseCbsrmv/g; - $ft{'library'} += s/\bcusparseCcsr2csc\b/hipsparseCcsr2csc/g; - $ft{'library'} += s/\bcusparseCcsr2hyb\b/hipsparseCcsr2hyb/g; - $ft{'library'} += s/\bcusparseCcsrgeam\b/hipsparseCcsrgeam/g; - $ft{'library'} += s/\bcusparseCcsrgeam2\b/hipsparseCcsrgeam2/g; - $ft{'library'} += s/\bcusparseCcsrgeam2_bufferSizeExt\b/hipsparseCcsrgeam2_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseCcsrgemm\b/hipsparseCcsrgemm/g; - $ft{'library'} += s/\bcusparseCcsrgemm2\b/hipsparseCcsrgemm2/g; - $ft{'library'} += s/\bcusparseCcsrgemm2_bufferSizeExt\b/hipsparseCcsrgemm2_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseCcsrilu02\b/hipsparseCcsrilu02/g; - $ft{'library'} += s/\bcusparseCcsrilu02_analysis\b/hipsparseCcsrilu02_analysis/g; - $ft{'library'} += s/\bcusparseCcsrilu02_bufferSize\b/hipsparseCcsrilu02_bufferSize/g; - $ft{'library'} += s/\bcusparseCcsrilu02_bufferSizeExt\b/hipsparseCcsrilu02_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseCcsrmm\b/hipsparseCcsrmm/g; - $ft{'library'} += s/\bcusparseCcsrmm2\b/hipsparseCcsrmm2/g; - $ft{'library'} += s/\bcusparseCcsrmv\b/hipsparseCcsrmv/g; - $ft{'library'} += s/\bcusparseCcsrsm2_analysis\b/hipsparseCcsrsm2_analysis/g; - $ft{'library'} += s/\bcusparseCcsrsm2_bufferSizeExt\b/hipsparseCcsrsm2_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseCcsrsm_solve\b/hipsparseCcsrsm_solve/g; - $ft{'library'} += s/\bcusparseCcsrsv2_analysis\b/hipsparseCcsrsv2_analysis/g; - $ft{'library'} += s/\bcusparseCcsrsv2_bufferSize\b/hipsparseCcsrsv2_bufferSize/g; - $ft{'library'} += s/\bcusparseCcsrsv2_bufferSizeExt\b/hipsparseCcsrsv2_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseCcsrsv2_solve\b/hipsparseCcsrsv2_solve/g; - $ft{'library'} += s/\bcusparseCdotci\b/hipsparseCdotci/g; - $ft{'library'} += s/\bcusparseCdoti\b/hipsparseCdoti/g; - $ft{'library'} += s/\bcusparseCgthr\b/hipsparseCgthr/g; - $ft{'library'} += s/\bcusparseCgthrz\b/hipsparseCgthrz/g; - $ft{'library'} += s/\bcusparseChybmv\b/hipsparseChybmv/g; - $ft{'library'} += s/\bcusparseCnnz\b/hipsparseCnnz/g; - $ft{'library'} += s/\bcusparseCnnz_compress\b/hipsparseCnnz_compress/g; - $ft{'library'} += s/\bcusparseCreate\b/hipsparseCreate/g; - $ft{'library'} += s/\bcusparseCreateCsrgemm2Info\b/hipsparseCreateCsrgemm2Info/g; - $ft{'library'} += s/\bcusparseCreateCsrilu02Info\b/hipsparseCreateCsrilu02Info/g; - $ft{'library'} += s/\bcusparseCreateCsrsm2Info\b/hipsparseCreateCsrsm2Info/g; - $ft{'library'} += s/\bcusparseCreateCsrsv2Info\b/hipsparseCreateCsrsv2Info/g; - $ft{'library'} += s/\bcusparseCreateHybMat\b/hipsparseCreateHybMat/g; - $ft{'library'} += s/\bcusparseCreateIdentityPermutation\b/hipsparseCreateIdentityPermutation/g; - $ft{'library'} += s/\bcusparseCreateMatDescr\b/hipsparseCreateMatDescr/g; - $ft{'library'} += s/\bcusparseCsctr\b/hipsparseCsctr/g; - $ft{'library'} += s/\bcusparseDaxpyi\b/hipsparseDaxpyi/g; - $ft{'library'} += s/\bcusparseDbsrmv\b/hipsparseDbsrmv/g; - $ft{'library'} += s/\bcusparseDcsr2csc\b/hipsparseDcsr2csc/g; - $ft{'library'} += s/\bcusparseDcsr2hyb\b/hipsparseDcsr2hyb/g; - $ft{'library'} += s/\bcusparseDcsrgeam\b/hipsparseDcsrgeam/g; - $ft{'library'} += s/\bcusparseDcsrgeam2\b/hipsparseDcsrgeam2/g; - $ft{'library'} += s/\bcusparseDcsrgeam2_bufferSizeExt\b/hipsparseDcsrgeam2_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseDcsrgemm\b/hipsparseDcsrgemm/g; - $ft{'library'} += s/\bcusparseDcsrgemm2\b/hipsparseDcsrgemm2/g; - $ft{'library'} += s/\bcusparseDcsrgemm2_bufferSizeExt\b/hipsparseDcsrgemm2_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseDcsrilu02\b/hipsparseDcsrilu02/g; - $ft{'library'} += s/\bcusparseDcsrilu02_analysis\b/hipsparseDcsrilu02_analysis/g; - $ft{'library'} += s/\bcusparseDcsrilu02_bufferSize\b/hipsparseDcsrilu02_bufferSize/g; - $ft{'library'} += s/\bcusparseDcsrilu02_bufferSizeExt\b/hipsparseDcsrilu02_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseDcsrmm\b/hipsparseDcsrmm/g; - $ft{'library'} += s/\bcusparseDcsrmm2\b/hipsparseDcsrmm2/g; - $ft{'library'} += s/\bcusparseDcsrmv\b/hipsparseDcsrmv/g; - $ft{'library'} += s/\bcusparseDcsrsm2_analysis\b/hipsparseDcsrsm2_analysis/g; - $ft{'library'} += s/\bcusparseDcsrsm2_bufferSizeExt\b/hipsparseDcsrsm2_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseDcsrsm_solve\b/hipsparseDcsrsm_solve/g; - $ft{'library'} += s/\bcusparseDcsrsv2_analysis\b/hipsparseDcsrsv2_analysis/g; - $ft{'library'} += s/\bcusparseDcsrsv2_bufferSize\b/hipsparseDcsrsv2_bufferSize/g; - $ft{'library'} += s/\bcusparseDcsrsv2_bufferSizeExt\b/hipsparseDcsrsv2_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseDcsrsv2_solve\b/hipsparseDcsrsv2_solve/g; - $ft{'library'} += s/\bcusparseDdoti\b/hipsparseDdoti/g; - $ft{'library'} += s/\bcusparseDestroy\b/hipsparseDestroy/g; - $ft{'library'} += s/\bcusparseDestroyCsrgemm2Info\b/hipsparseDestroyCsrgemm2Info/g; - $ft{'library'} += s/\bcusparseDestroyCsrilu02Info\b/hipsparseDestroyCsrilu02Info/g; - $ft{'library'} += s/\bcusparseDestroyCsrsm2Info\b/hipsparseDestroyCsrsm2Info/g; - $ft{'library'} += s/\bcusparseDestroyCsrsv2Info\b/hipsparseDestroyCsrsv2Info/g; - $ft{'library'} += s/\bcusparseDestroyHybMat\b/hipsparseDestroyHybMat/g; - $ft{'library'} += s/\bcusparseDestroyMatDescr\b/hipsparseDestroyMatDescr/g; - $ft{'library'} += s/\bcusparseDgthr\b/hipsparseDgthr/g; - $ft{'library'} += s/\bcusparseDgthrz\b/hipsparseDgthrz/g; - $ft{'library'} += s/\bcusparseDhybmv\b/hipsparseDhybmv/g; - $ft{'library'} += s/\bcusparseDnnz\b/hipsparseDnnz/g; - $ft{'library'} += s/\bcusparseDnnz_compress\b/hipsparseDnnz_compress/g; - $ft{'library'} += s/\bcusparseDroti\b/hipsparseDroti/g; - $ft{'library'} += s/\bcusparseDsctr\b/hipsparseDsctr/g; - $ft{'library'} += s/\bcusparseGetMatDiagType\b/hipsparseGetMatDiagType/g; - $ft{'library'} += s/\bcusparseGetMatFillMode\b/hipsparseGetMatFillMode/g; - $ft{'library'} += s/\bcusparseGetMatIndexBase\b/hipsparseGetMatIndexBase/g; - $ft{'library'} += s/\bcusparseGetMatType\b/hipsparseGetMatType/g; - $ft{'library'} += s/\bcusparseGetPointerMode\b/hipsparseGetPointerMode/g; - $ft{'library'} += s/\bcusparseGetStream\b/hipsparseGetStream/g; - $ft{'library'} += s/\bcusparseGetVersion\b/hipsparseGetVersion/g; - $ft{'library'} += s/\bcusparseSaxpyi\b/hipsparseSaxpyi/g; - $ft{'library'} += s/\bcusparseSbsrmv\b/hipsparseSbsrmv/g; - $ft{'library'} += s/\bcusparseScsr2csc\b/hipsparseScsr2csc/g; - $ft{'library'} += s/\bcusparseScsr2hyb\b/hipsparseScsr2hyb/g; - $ft{'library'} += s/\bcusparseScsrgeam\b/hipsparseScsrgeam/g; - $ft{'library'} += s/\bcusparseScsrgeam2\b/hipsparseScsrgeam2/g; - $ft{'library'} += s/\bcusparseScsrgeam2_bufferSizeExt\b/hipsparseScsrgeam2_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseScsrgemm\b/hipsparseScsrgemm/g; - $ft{'library'} += s/\bcusparseScsrgemm2\b/hipsparseScsrgemm2/g; - $ft{'library'} += s/\bcusparseScsrgemm2_bufferSizeExt\b/hipsparseScsrgemm2_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseScsrilu02\b/hipsparseScsrilu02/g; - $ft{'library'} += s/\bcusparseScsrilu02_analysis\b/hipsparseScsrilu02_analysis/g; - $ft{'library'} += s/\bcusparseScsrilu02_bufferSize\b/hipsparseScsrilu02_bufferSize/g; - $ft{'library'} += s/\bcusparseScsrilu02_bufferSizeExt\b/hipsparseScsrilu02_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseScsrmm\b/hipsparseScsrmm/g; - $ft{'library'} += s/\bcusparseScsrmm2\b/hipsparseScsrmm2/g; - $ft{'library'} += s/\bcusparseScsrmv\b/hipsparseScsrmv/g; - $ft{'library'} += s/\bcusparseScsrsm2_analysis\b/hipsparseScsrsm2_analysis/g; - $ft{'library'} += s/\bcusparseScsrsm2_bufferSizeExt\b/hipsparseScsrsm2_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseScsrsm_solve\b/hipsparseScsrsm_solve/g; - $ft{'library'} += s/\bcusparseScsrsv2_analysis\b/hipsparseScsrsv2_analysis/g; - $ft{'library'} += s/\bcusparseScsrsv2_bufferSize\b/hipsparseScsrsv2_bufferSize/g; - $ft{'library'} += s/\bcusparseScsrsv2_bufferSizeExt\b/hipsparseScsrsv2_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseScsrsv2_solve\b/hipsparseScsrsv2_solve/g; - $ft{'library'} += s/\bcusparseSdoti\b/hipsparseSdoti/g; - $ft{'library'} += s/\bcusparseSetMatDiagType\b/hipsparseSetMatDiagType/g; - $ft{'library'} += s/\bcusparseSetMatFillMode\b/hipsparseSetMatFillMode/g; - $ft{'library'} += s/\bcusparseSetMatIndexBase\b/hipsparseSetMatIndexBase/g; - $ft{'library'} += s/\bcusparseSetMatType\b/hipsparseSetMatType/g; - $ft{'library'} += s/\bcusparseSetPointerMode\b/hipsparseSetPointerMode/g; - $ft{'library'} += s/\bcusparseSetStream\b/hipsparseSetStream/g; - $ft{'library'} += s/\bcusparseSgthr\b/hipsparseSgthr/g; - $ft{'library'} += s/\bcusparseSgthrz\b/hipsparseSgthrz/g; - $ft{'library'} += s/\bcusparseShybmv\b/hipsparseShybmv/g; - $ft{'library'} += s/\bcusparseSnnz\b/hipsparseSnnz/g; - $ft{'library'} += s/\bcusparseSnnz_compress\b/hipsparseSnnz_compress/g; - $ft{'library'} += s/\bcusparseSroti\b/hipsparseSroti/g; - $ft{'library'} += s/\bcusparseSsctr\b/hipsparseSsctr/g; - $ft{'library'} += s/\bcusparseXbsrilu02_zeroPivot\b/hipsparseXbsrilu02_zeroPivot/g; - $ft{'library'} += s/\bcusparseXcoo2csr\b/hipsparseXcoo2csr/g; - $ft{'library'} += s/\bcusparseXcoosortByColumn\b/hipsparseXcoosortByColumn/g; - $ft{'library'} += s/\bcusparseXcoosortByRow\b/hipsparseXcoosortByRow/g; - $ft{'library'} += s/\bcusparseXcoosort_bufferSizeExt\b/hipsparseXcoosort_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseXcscsort\b/hipsparseXcscsort/g; - $ft{'library'} += s/\bcusparseXcscsort_bufferSizeExt\b/hipsparseXcscsort_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseXcsr2coo\b/hipsparseXcsr2coo/g; - $ft{'library'} += s/\bcusparseXcsrgeam2Nnz\b/hipsparseXcsrgeam2Nnz/g; - $ft{'library'} += s/\bcusparseXcsrgeamNnz\b/hipsparseXcsrgeamNnz/g; - $ft{'library'} += s/\bcusparseXcsrgemm2Nnz\b/hipsparseXcsrgemm2Nnz/g; - $ft{'library'} += s/\bcusparseXcsrgemmNnz\b/hipsparseXcsrgemmNnz/g; - $ft{'library'} += s/\bcusparseXcsrilu02_zeroPivot\b/hipsparseXcsrilu02_zeroPivot/g; - $ft{'library'} += s/\bcusparseXcsrsm2_zeroPivot\b/hipsparseXcsrsm2_zeroPivot/g; - $ft{'library'} += s/\bcusparseXcsrsort\b/hipsparseXcsrsort/g; - $ft{'library'} += s/\bcusparseXcsrsort_bufferSizeExt\b/hipsparseXcsrsort_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseXcsrsv2_zeroPivot\b/hipsparseXcsrsv2_zeroPivot/g; - $ft{'library'} += s/\bcusparseZaxpyi\b/hipsparseZaxpyi/g; - $ft{'library'} += s/\bcusparseZbsrmv\b/hipsparseZbsrmv/g; - $ft{'library'} += s/\bcusparseZcsr2csc\b/hipsparseZcsr2csc/g; - $ft{'library'} += s/\bcusparseZcsr2hyb\b/hipsparseZcsr2hyb/g; - $ft{'library'} += s/\bcusparseZcsrgeam\b/hipsparseZcsrgeam/g; - $ft{'library'} += s/\bcusparseZcsrgeam2\b/hipsparseZcsrgeam2/g; - $ft{'library'} += s/\bcusparseZcsrgeam2_bufferSizeExt\b/hipsparseZcsrgeam2_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseZcsrgemm\b/hipsparseZcsrgemm/g; - $ft{'library'} += s/\bcusparseZcsrgemm2\b/hipsparseZcsrgemm2/g; - $ft{'library'} += s/\bcusparseZcsrgemm2_bufferSizeExt\b/hipsparseZcsrgemm2_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseZcsrilu02\b/hipsparseZcsrilu02/g; - $ft{'library'} += s/\bcusparseZcsrilu02_analysis\b/hipsparseZcsrilu02_analysis/g; - $ft{'library'} += s/\bcusparseZcsrilu02_bufferSize\b/hipsparseZcsrilu02_bufferSize/g; - $ft{'library'} += s/\bcusparseZcsrilu02_bufferSizeExt\b/hipsparseZcsrilu02_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseZcsrmm\b/hipsparseZcsrmm/g; - $ft{'library'} += s/\bcusparseZcsrmm2\b/hipsparseZcsrmm2/g; - $ft{'library'} += s/\bcusparseZcsrmv\b/hipsparseZcsrmv/g; - $ft{'library'} += s/\bcusparseZcsrsm2_analysis\b/hipsparseZcsrsm2_analysis/g; - $ft{'library'} += s/\bcusparseZcsrsm2_bufferSizeExt\b/hipsparseZcsrsm2_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseZcsrsm_solve\b/hipsparseZcsrsm_solve/g; - $ft{'library'} += s/\bcusparseZcsrsv2_analysis\b/hipsparseZcsrsv2_analysis/g; - $ft{'library'} += s/\bcusparseZcsrsv2_bufferSize\b/hipsparseZcsrsv2_bufferSize/g; - $ft{'library'} += s/\bcusparseZcsrsv2_bufferSizeExt\b/hipsparseZcsrsv2_bufferSizeExt/g; - $ft{'library'} += s/\bcusparseZcsrsv2_solve\b/hipsparseZcsrsv2_solve/g; - $ft{'library'} += s/\bcusparseZdotci\b/hipsparseZdotci/g; - $ft{'library'} += s/\bcusparseZdoti\b/hipsparseZdoti/g; - $ft{'library'} += s/\bcusparseZgthr\b/hipsparseZgthr/g; - $ft{'library'} += s/\bcusparseZgthrz\b/hipsparseZgthrz/g; - $ft{'library'} += s/\bcusparseZhybmv\b/hipsparseZhybmv/g; - $ft{'library'} += s/\bcusparseZnnz\b/hipsparseZnnz/g; - $ft{'library'} += s/\bcusparseZnnz_compress\b/hipsparseZnnz_compress/g; - $ft{'library'} += s/\bcusparseZsctr\b/hipsparseZsctr/g; - $ft{'device_library'} += s/\bcurand\b/hiprand/g; - $ft{'device_library'} += s/\bcurand_discrete\b/hiprand_discrete/g; - $ft{'device_library'} += s/\bcurand_discrete4\b/hiprand_discrete4/g; - $ft{'device_library'} += s/\bcurand_init\b/hiprand_init/g; - $ft{'device_library'} += s/\bcurand_log_normal\b/hiprand_log_normal/g; - $ft{'device_library'} += s/\bcurand_log_normal2\b/hiprand_log_normal2/g; - $ft{'device_library'} += s/\bcurand_log_normal2_double\b/hiprand_log_normal2_double/g; - $ft{'device_library'} += s/\bcurand_log_normal4\b/hiprand_log_normal4/g; - $ft{'device_library'} += s/\bcurand_log_normal4_double\b/hiprand_log_normal4_double/g; - $ft{'device_library'} += s/\bcurand_log_normal_double\b/hiprand_log_normal_double/g; - $ft{'device_library'} += s/\bcurand_normal\b/hiprand_normal/g; - $ft{'device_library'} += s/\bcurand_normal2\b/hiprand_normal2/g; - $ft{'device_library'} += s/\bcurand_normal2_double\b/hiprand_normal2_double/g; - $ft{'device_library'} += s/\bcurand_normal4\b/hiprand_normal4/g; - $ft{'device_library'} += s/\bcurand_normal4_double\b/hiprand_normal4_double/g; - $ft{'device_library'} += s/\bcurand_normal_double\b/hiprand_normal_double/g; - $ft{'device_library'} += s/\bcurand_poisson\b/hiprand_poisson/g; - $ft{'device_library'} += s/\bcurand_poisson4\b/hiprand_poisson4/g; - $ft{'device_library'} += s/\bcurand_uniform\b/hiprand_uniform/g; - $ft{'device_library'} += s/\bcurand_uniform2_double\b/hiprand_uniform2_double/g; - $ft{'device_library'} += s/\bcurand_uniform4\b/hiprand_uniform4/g; - $ft{'device_library'} += s/\bcurand_uniform4_double\b/hiprand_uniform4_double/g; - $ft{'device_library'} += s/\bcurand_uniform_double\b/hiprand_uniform_double/g; - $ft{'include'} += s/\bcaffe2\/core\/common_cudnn.h\b/caffe2\/core\/hip\/common_miopen.h/g; - $ft{'include'} += s/\bcaffe2\/operators\/spatial_batch_norm_op.h\b/caffe2\/operators\/hip\/spatial_batch_norm_op_miopen.hip/g; - $ft{'include'} += s/\bchannel_descriptor.h\b/hip\/channel_descriptor.h/g; - $ft{'include'} += s/\bcooperative_groups.h\b/hip\/hip_cooperative_groups.h/g; - $ft{'include'} += s/\bcuda_fp16.h\b/hip\/hip_fp16.h/g; - $ft{'include'} += s/\bcuda_profiler_api.h\b/hip\/hip_profile.h/g; - $ft{'include'} += s/\bcuda_runtime_api.h\b/hip\/hip_runtime_api.h/g; - $ft{'include'} += s/\bcuda_texture_types.h\b/hip\/hip_texture_types.h/g; - $ft{'include'} += s/\bcurand_discrete.h\b/hiprand_kernel.h/g; - $ft{'include'} += s/\bcurand_discrete2.h\b/hiprand_kernel.h/g; - $ft{'include'} += s/\bcurand_globals.h\b/hiprand_kernel.h/g; - $ft{'include'} += s/\bcurand_kernel.h\b/hiprand_kernel.h/g; - $ft{'include'} += s/\bcurand_lognormal.h\b/hiprand_kernel.h/g; - $ft{'include'} += s/\bcurand_mrg32k3a.h\b/hiprand_kernel.h/g; - $ft{'include'} += s/\bcurand_mtgp32.h\b/hiprand_kernel.h/g; - $ft{'include'} += s/\bcurand_mtgp32_host.h\b/hiprand_mtgp32_host.h/g; - $ft{'include'} += s/\bcurand_mtgp32_kernel.h\b/hiprand_kernel.h/g; - $ft{'include'} += s/\bcurand_mtgp32dc_p_11213.h\b/rocrand_mtgp32_11213.h/g; - $ft{'include'} += s/\bcurand_normal.h\b/hiprand_kernel.h/g; - $ft{'include'} += s/\bcurand_normal_static.h\b/hiprand_kernel.h/g; - $ft{'include'} += s/\bcurand_philox4x32_x.h\b/hiprand_kernel.h/g; - $ft{'include'} += s/\bcurand_poisson.h\b/hiprand_kernel.h/g; - $ft{'include'} += s/\bcurand_precalc.h\b/hiprand_kernel.h/g; - $ft{'include'} += s/\bcurand_uniform.h\b/hiprand_kernel.h/g; - $ft{'include'} += s/\bdevice_functions.h\b/hip\/device_functions.h/g; - $ft{'include'} += s/\bdriver_types.h\b/hip\/driver_types.h/g; - $ft{'include'} += s/\btexture_fetch_functions.h\b//g; - $ft{'include'} += s/\bvector_types.h\b/hip\/hip_vector_types.h/g; - $ft{'include_cuda_main_header'} += s/\bcuComplex.h\b/hip\/hip_complex.h/g; - $ft{'include_cuda_main_header'} += s/\bcub\/cub.cuh\b/hipcub\/hipcub.hpp/g; - $ft{'include_cuda_main_header'} += s/\bcublas.h\b/hipblas.h/g; - $ft{'include_cuda_main_header'} += s/\bcublas_v2.h\b/hipblas.h/g; - $ft{'include_cuda_main_header'} += s/\bcuda.h\b/hip\/hip_runtime.h/g; - $ft{'include_cuda_main_header'} += s/\bcuda_runtime.h\b/hip\/hip_runtime.h/g; - $ft{'include_cuda_main_header'} += s/\bcudnn.h\b/hipDNN.h/g; - $ft{'include_cuda_main_header'} += s/\bcufft.h\b/hipfft.h/g; - $ft{'include_cuda_main_header'} += s/\bcurand.h\b/hiprand.h/g; - $ft{'include_cuda_main_header'} += s/\bcusparse.h\b/hipsparse.h/g; - $ft{'include_cuda_main_header'} += s/\bcusparse_v2.h\b/hipsparse.h/g; - $ft{'type'} += s/\bCUDAContext\b/HIPContext/g; - $ft{'type'} += s/\bCUDA_ARRAY3D_DESCRIPTOR\b/HIP_ARRAY3D_DESCRIPTOR/g; - $ft{'type'} += s/\bCUDA_ARRAY3D_DESCRIPTOR_st\b/HIP_ARRAY3D_DESCRIPTOR/g; - $ft{'type'} += s/\bCUDA_ARRAY_DESCRIPTOR\b/HIP_ARRAY_DESCRIPTOR/g; - $ft{'type'} += s/\bCUDA_ARRAY_DESCRIPTOR_st\b/HIP_ARRAY_DESCRIPTOR/g; - $ft{'type'} += s/\bCUDA_MEMCPY2D\b/hip_Memcpy2D/g; - $ft{'type'} += s/\bCUDA_MEMCPY2D_st\b/hip_Memcpy2D/g; - $ft{'type'} += s/\bCUDA_MEMCPY3D\b/HIP_MEMCPY3D/g; - $ft{'type'} += s/\bCUDA_MEMCPY3D_st\b/HIP_MEMCPY3D/g; - $ft{'type'} += s/\bCUaddress_mode\b/hipTextureAddressMode/g; - $ft{'type'} += s/\bCUaddress_mode_enum\b/hipTextureAddressMode/g; - $ft{'type'} += s/\bCUarray\b/hipArray */g; - $ft{'type'} += s/\bCUarray_format\b/hipArray_format/g; - $ft{'type'} += s/\bCUarray_format_enum\b/hipArray_format/g; - $ft{'type'} += s/\bCUarray_st\b/hipArray/g; - $ft{'type'} += s/\bCUcomputemode\b/hipComputeMode/g; - $ft{'type'} += s/\bCUcomputemode_enum\b/hipComputeMode/g; - $ft{'type'} += s/\bCUcontext\b/hipCtx_t/g; - $ft{'type'} += s/\bCUctx_st\b/ihipCtx_t/g; - $ft{'type'} += s/\bCUdevice\b/hipDevice_t/g; - $ft{'type'} += s/\bCUdevice_attribute\b/hipDeviceAttribute_t/g; - $ft{'type'} += s/\bCUdevice_attribute_enum\b/hipDeviceAttribute_t/g; - $ft{'type'} += s/\bCUdeviceptr\b/hipDeviceptr_t/g; - $ft{'type'} += s/\bCUevent\b/hipEvent_t/g; - $ft{'type'} += s/\bCUevent_st\b/ihipEvent_t/g; - $ft{'type'} += s/\bCUfilter_mode\b/hipTextureFilterMode/g; - $ft{'type'} += s/\bCUfilter_mode_enum\b/hipTextureFilterMode/g; - $ft{'type'} += s/\bCUfunc_cache\b/hipFuncCache_t/g; - $ft{'type'} += s/\bCUfunc_cache_enum\b/hipFuncCache_t/g; - $ft{'type'} += s/\bCUfunc_st\b/ihipModuleSymbol_t/g; - $ft{'type'} += s/\bCUfunction\b/hipFunction_t/g; - $ft{'type'} += s/\bCUfunction_attribute\b/hipFunction_attribute/g; - $ft{'type'} += s/\bCUfunction_attribute_enum\b/hipFunction_attribute/g; - $ft{'type'} += s/\bCUipcEventHandle\b/ihipIpcEventHandle_t/g; - $ft{'type'} += s/\bCUipcEventHandle_st\b/ihipIpcEventHandle_t/g; - $ft{'type'} += s/\bCUipcMemHandle\b/hipIpcMemHandle_t/g; - $ft{'type'} += s/\bCUipcMemHandle_st\b/hipIpcMemHandle_st/g; - $ft{'type'} += s/\bCUjit_option\b/hipJitOption/g; - $ft{'type'} += s/\bCUjit_option_enum\b/hipJitOption/g; - $ft{'type'} += s/\bCUlimit\b/hipLimit_t/g; - $ft{'type'} += s/\bCUlimit_enum\b/hipLimit_t/g; - $ft{'type'} += s/\bCUmemorytype\b/hipMemoryType/g; - $ft{'type'} += s/\bCUmemorytype_enum\b/hipMemoryType/g; - $ft{'type'} += s/\bCUmipmappedArray\b/hipMipmappedArray_t/g; - $ft{'type'} += s/\bCUmipmappedArray_st\b/hipMipmappedArray_st/g; - $ft{'type'} += s/\bCUmod_st\b/ihipModule_t/g; - $ft{'type'} += s/\bCUmodule\b/hipModule_t/g; - $ft{'type'} += s/\bCUresourceViewFormat\b/hipResourceViewFormat/g; - $ft{'type'} += s/\bCUresourceViewFormat_enum\b/hipResourceViewFormat/g; - $ft{'type'} += s/\bCUresourcetype\b/hipResourceType/g; - $ft{'type'} += s/\bCUresourcetype_enum\b/hipResourceType/g; - $ft{'type'} += s/\bCUresult\b/hipError_t/g; - $ft{'type'} += s/\bCUsharedconfig\b/hipSharedMemConfig/g; - $ft{'type'} += s/\bCUsharedconfig_enum\b/hipSharedMemConfig/g; - $ft{'type'} += s/\bCUstream\b/hipStream_t/g; - $ft{'type'} += s/\bCUstreamCallback\b/hipStreamCallback_t/g; - $ft{'type'} += s/\bCUstream_st\b/ihipStream_t/g; - $ft{'type'} += s/\bCUtexObject\b/hipTextureObject_t/g; - $ft{'type'} += s/\bCUtexref_st\b/textureReference/g; - $ft{'type'} += s/\bcsrgemm2Info\b/csrgemm2Info/g; - $ft{'type'} += s/\bcsrgemm2Info_t\b/csrgemm2Info_t/g; - $ft{'type'} += s/\bcsrilu02Info_t\b/csrilu02Info_t/g; - $ft{'type'} += s/\bcsrsm2Info\b/csrsm2Info/g; - $ft{'type'} += s/\bcsrsm2Info_t\b/csrsm2Info_t/g; - $ft{'type'} += s/\bcsrsv2Info_t\b/csrsv2Info_t/g; - $ft{'type'} += s/\bcuComplex\b/hipComplex/g; - $ft{'type'} += s/\bcuDoubleComplex\b/hipDoubleComplex/g; - $ft{'type'} += s/\bcuFloatComplex\b/hipFloatComplex/g; - $ft{'type'} += s/\bcublasDataType_t\b/hipblasDatatype_t/g; - $ft{'type'} += s/\bcublasDiagType_t\b/hipblasDiagType_t/g; - $ft{'type'} += s/\bcublasFillMode_t\b/hipblasFillMode_t/g; - $ft{'type'} += s/\bcublasGemmAlgo_t\b/hipblasGemmAlgo_t/g; - $ft{'type'} += s/\bcublasHandle_t\b/hipblasHandle_t/g; - $ft{'type'} += s/\bcublasOperation_t\b/hipblasOperation_t/g; - $ft{'type'} += s/\bcublasPointerMode_t\b/hipblasPointerMode_t/g; - $ft{'type'} += s/\bcublasSideMode_t\b/hipblasSideMode_t/g; - $ft{'type'} += s/\bcublasStatus\b/hipblasStatus_t/g; - $ft{'type'} += s/\bcublasStatus_t\b/hipblasStatus_t/g; - $ft{'type'} += s/\bcudaArray\b/hipArray/g; - $ft{'type'} += s/\bcudaArray_const_t\b/hipArray_const_t/g; - $ft{'type'} += s/\bcudaArray_t\b/hipArray_t/g; - $ft{'type'} += s/\bcudaChannelFormatDesc\b/hipChannelFormatDesc/g; - $ft{'type'} += s/\bcudaChannelFormatKind\b/hipChannelFormatKind/g; - $ft{'type'} += s/\bcudaComputeMode\b/hipComputeMode/g; - $ft{'type'} += s/\bcudaDataType\b/hipblasDatatype_t/g; - $ft{'type'} += s/\bcudaDataType_t\b/hipblasDatatype_t/g; - $ft{'type'} += s/\bcudaDeviceAttr\b/hipDeviceAttribute_t/g; - $ft{'type'} += s/\bcudaDeviceProp\b/hipDeviceProp_t/g; - $ft{'type'} += s/\bcudaError\b/hipError_t/g; - $ft{'type'} += s/\bcudaError_enum\b/hipError_t/g; - $ft{'type'} += s/\bcudaError_t\b/hipError_t/g; - $ft{'type'} += s/\bcudaEvent_t\b/hipEvent_t/g; - $ft{'type'} += s/\bcudaExtent\b/hipExtent/g; - $ft{'type'} += s/\bcudaFuncAttributes\b/hipFuncAttributes/g; - $ft{'type'} += s/\bcudaFuncCache\b/hipFuncCache_t/g; - $ft{'type'} += s/\bcudaIpcEventHandle_st\b/ihipIpcEventHandle_t/g; - $ft{'type'} += s/\bcudaIpcEventHandle_t\b/ihipIpcEventHandle_t/g; - $ft{'type'} += s/\bcudaIpcMemHandle_st\b/hipIpcMemHandle_st/g; - $ft{'type'} += s/\bcudaIpcMemHandle_t\b/hipIpcMemHandle_t/g; - $ft{'type'} += s/\bcudaLaunchParams\b/hipLaunchParams/g; - $ft{'type'} += s/\bcudaLimit\b/hipLimit_t/g; - $ft{'type'} += s/\bcudaMemcpy3DParms\b/hipMemcpy3DParms/g; - $ft{'type'} += s/\bcudaMemcpyKind\b/hipMemcpyKind/g; - $ft{'type'} += s/\bcudaMipmappedArray\b/hipMipmappedArray/g; - $ft{'type'} += s/\bcudaMipmappedArray_const_t\b/hipMipmappedArray_const_t/g; - $ft{'type'} += s/\bcudaMipmappedArray_t\b/hipMipmappedArray_t/g; - $ft{'type'} += s/\bcudaPitchedPtr\b/hipPitchedPtr/g; - $ft{'type'} += s/\bcudaPointerAttributes\b/hipPointerAttribute_t/g; - $ft{'type'} += s/\bcudaPos\b/hipPos/g; - $ft{'type'} += s/\bcudaResourceDesc\b/hipResourceDesc/g; - $ft{'type'} += s/\bcudaResourceType\b/hipResourceType/g; - $ft{'type'} += s/\bcudaResourceViewDesc\b/hipResourceViewDesc/g; - $ft{'type'} += s/\bcudaResourceViewFormat\b/hipResourceViewFormat/g; - $ft{'type'} += s/\bcudaSharedMemConfig\b/hipSharedMemConfig/g; - $ft{'type'} += s/\bcudaStreamCallback_t\b/hipStreamCallback_t/g; - $ft{'type'} += s/\bcudaStream_t\b/hipStream_t/g; - $ft{'type'} += s/\bcudaSurfaceBoundaryMode\b/hipSurfaceBoundaryMode/g; - $ft{'type'} += s/\bcudaSurfaceObject_t\b/hipSurfaceObject_t/g; - $ft{'type'} += s/\bcudaTextureAddressMode\b/hipTextureAddressMode/g; - $ft{'type'} += s/\bcudaTextureDesc\b/hipTextureDesc/g; - $ft{'type'} += s/\bcudaTextureFilterMode\b/hipTextureFilterMode/g; - $ft{'type'} += s/\bcudaTextureObject_t\b/hipTextureObject_t/g; - $ft{'type'} += s/\bcudaTextureReadMode\b/hipTextureReadMode/g; - $ft{'type'} += s/\bcudnnActivationDescriptor_t\b/hipdnnActivationDescriptor_t/g; - $ft{'type'} += s/\bcudnnActivationMode_t\b/hipdnnActivationMode_t/g; - $ft{'type'} += s/\bcudnnBatchNormMode_t\b/hipdnnBatchNormMode_t/g; - $ft{'type'} += s/\bcudnnConvolutionBwdDataAlgoPerf_t\b/hipdnnConvolutionBwdDataAlgoPerf_t/g; - $ft{'type'} += s/\bcudnnConvolutionBwdDataAlgo_t\b/hipdnnConvolutionBwdDataAlgo_t/g; - $ft{'type'} += s/\bcudnnConvolutionBwdDataPreference_t\b/hipdnnConvolutionBwdDataPreference_t/g; - $ft{'type'} += s/\bcudnnConvolutionBwdFilterAlgoPerf_t\b/hipdnnConvolutionBwdFilterAlgoPerf_t/g; - $ft{'type'} += s/\bcudnnConvolutionBwdFilterAlgo_t\b/hipdnnConvolutionBwdFilterAlgo_t/g; - $ft{'type'} += s/\bcudnnConvolutionBwdFilterPreference_t\b/hipdnnConvolutionBwdFilterPreference_t/g; - $ft{'type'} += s/\bcudnnConvolutionDescriptor_t\b/hipdnnConvolutionDescriptor_t/g; - $ft{'type'} += s/\bcudnnConvolutionFwdAlgoPerf_t\b/hipdnnConvolutionFwdAlgoPerf_t/g; - $ft{'type'} += s/\bcudnnConvolutionFwdAlgo_t\b/hipdnnConvolutionFwdAlgo_t/g; - $ft{'type'} += s/\bcudnnConvolutionFwdPreference_t\b/hipdnnConvolutionFwdPreference_t/g; - $ft{'type'} += s/\bcudnnConvolutionMode_t\b/hipdnnConvolutionMode_t/g; - $ft{'type'} += s/\bcudnnDataType_t\b/hipdnnDataType_t/g; - $ft{'type'} += s/\bcudnnDirectionMode_t\b/hipdnnDirectionMode_t/g; - $ft{'type'} += s/\bcudnnDropoutDescriptor_t\b/hipdnnDropoutDescriptor_t/g; - $ft{'type'} += s/\bcudnnFilterDescriptor_t\b/hipdnnFilterDescriptor_t/g; - $ft{'type'} += s/\bcudnnHandle_t\b/hipdnnHandle_t/g; - $ft{'type'} += s/\bcudnnIndicesType_t\b/hipdnnIndicesType_t/g; - $ft{'type'} += s/\bcudnnLRNDescriptor_t\b/hipdnnLRNDescriptor_t/g; - $ft{'type'} += s/\bcudnnLRNMode_t\b/hipdnnLRNMode_t/g; - $ft{'type'} += s/\bcudnnMathType_t\b/hipdnnMathType_t/g; - $ft{'type'} += s/\bcudnnNanPropagation_t\b/hipdnnNanPropagation_t/g; - $ft{'type'} += s/\bcudnnOpTensorDescriptor_t\b/hipdnnOpTensorDescriptor_t/g; - $ft{'type'} += s/\bcudnnOpTensorOp_t\b/hipdnnOpTensorOp_t/g; - $ft{'type'} += s/\bcudnnPersistentRNNPlan_t\b/hipdnnPersistentRNNPlan_t/g; - $ft{'type'} += s/\bcudnnPoolingDescriptor_t\b/hipdnnPoolingDescriptor_t/g; - $ft{'type'} += s/\bcudnnPoolingMode_t\b/hipdnnPoolingMode_t/g; - $ft{'type'} += s/\bcudnnRNNAlgo_t\b/hipdnnRNNAlgo_t/g; - $ft{'type'} += s/\bcudnnRNNBiasMode_t\b/hipdnnRNNBiasMode_t/g; - $ft{'type'} += s/\bcudnnRNNDescriptor_t\b/hipdnnRNNDescriptor_t/g; - $ft{'type'} += s/\bcudnnRNNInputMode_t\b/hipdnnRNNInputMode_t/g; - $ft{'type'} += s/\bcudnnRNNMode_t\b/hipdnnRNNMode_t/g; - $ft{'type'} += s/\bcudnnReduceTensorDescriptor_t\b/hipdnnReduceTensorDescriptor_t/g; - $ft{'type'} += s/\bcudnnReduceTensorIndices_t\b/hipdnnReduceTensorIndices_t/g; - $ft{'type'} += s/\bcudnnReduceTensorOp_t\b/hipdnnReduceTensorOp_t/g; - $ft{'type'} += s/\bcudnnSoftmaxAlgorithm_t\b/hipdnnSoftmaxAlgorithm_t/g; - $ft{'type'} += s/\bcudnnSoftmaxMode_t\b/hipdnnSoftmaxMode_t/g; - $ft{'type'} += s/\bcudnnStatus_t\b/hipdnnStatus_t/g; - $ft{'type'} += s/\bcudnnTensorDescriptor_t\b/hipdnnTensorDescriptor_t/g; - $ft{'type'} += s/\bcudnnTensorFormat_t\b/hipdnnTensorFormat_t/g; - $ft{'type'} += s/\bcufftComplex\b/hipfftComplex/g; - $ft{'type'} += s/\bcufftDoubleComplex\b/hipfftDoubleComplex/g; - $ft{'type'} += s/\bcufftDoubleReal\b/hipfftDoubleReal/g; - $ft{'type'} += s/\bcufftHandle\b/hipfftHandle/g; - $ft{'type'} += s/\bcufftReal\b/hipfftReal/g; - $ft{'type'} += s/\bcufftResult\b/hipfftResult/g; - $ft{'type'} += s/\bcufftResult_t\b/hipfftResult_t/g; - $ft{'type'} += s/\bcufftType\b/hipfftType/g; - $ft{'type'} += s/\bcufftType_t\b/hipfftType_t/g; - $ft{'type'} += s/\bcurandDirectionVectors32_t\b/hiprandDirectionVectors32_t/g; - $ft{'type'} += s/\bcurandDiscreteDistribution_st\b/hiprandDiscreteDistribution_st/g; - $ft{'type'} += s/\bcurandDiscreteDistribution_t\b/hiprandDiscreteDistribution_t/g; - $ft{'type'} += s/\bcurandGenerator_st\b/hiprandGenerator_st/g; - $ft{'type'} += s/\bcurandGenerator_t\b/hiprandGenerator_t/g; - $ft{'type'} += s/\bcurandRngType\b/hiprandRngType_t/g; - $ft{'type'} += s/\bcurandRngType_t\b/hiprandRngType_t/g; - $ft{'type'} += s/\bcurandState\b/hiprandState/g; - $ft{'type'} += s/\bcurandStateMRG32k3a\b/hiprandStateMRG32k3a/g; - $ft{'type'} += s/\bcurandStateMRG32k3a_t\b/hiprandStateMRG32k3a_t/g; - $ft{'type'} += s/\bcurandStateMtgp32\b/hiprandStateMtgp32/g; - $ft{'type'} += s/\bcurandStateMtgp32_t\b/hiprandStateMtgp32_t/g; - $ft{'type'} += s/\bcurandStatePhilox4_32_10\b/hiprandStatePhilox4_32_10/g; - $ft{'type'} += s/\bcurandStatePhilox4_32_10_t\b/hiprandStatePhilox4_32_10_t/g; - $ft{'type'} += s/\bcurandStateSobol32\b/hiprandStateSobol32/g; - $ft{'type'} += s/\bcurandStateSobol32_t\b/hiprandStateSobol32_t/g; - $ft{'type'} += s/\bcurandStateXORWOW\b/hiprandStateXORWOW/g; - $ft{'type'} += s/\bcurandStateXORWOW_t\b/hiprandStateXORWOW_t/g; - $ft{'type'} += s/\bcurandState_t\b/hiprandState_t/g; - $ft{'type'} += s/\bcurandStatus\b/hiprandStatus_t/g; - $ft{'type'} += s/\bcurandStatus_t\b/hiprandStatus_t/g; - $ft{'type'} += s/\bcusparseAction_t\b/hipsparseAction_t/g; - $ft{'type'} += s/\bcusparseDiagType_t\b/hipsparseDiagType_t/g; - $ft{'type'} += s/\bcusparseDirection_t\b/hipsparseDirection_t/g; - $ft{'type'} += s/\bcusparseFillMode_t\b/hipsparseFillMode_t/g; - $ft{'type'} += s/\bcusparseHandle_t\b/hipsparseHandle_t/g; - $ft{'type'} += s/\bcusparseHybMat_t\b/hipsparseHybMat_t/g; - $ft{'type'} += s/\bcusparseHybPartition_t\b/hipsparseHybPartition_t/g; - $ft{'type'} += s/\bcusparseIndexBase_t\b/hipsparseIndexBase_t/g; - $ft{'type'} += s/\bcusparseMatDescr_t\b/hipsparseMatDescr_t/g; - $ft{'type'} += s/\bcusparseMatrixType_t\b/hipsparseMatrixType_t/g; - $ft{'type'} += s/\bcusparseOperation_t\b/hipsparseOperation_t/g; - $ft{'type'} += s/\bcusparsePointerMode_t\b/hipsparsePointerMode_t/g; - $ft{'type'} += s/\bcusparseSolvePolicy_t\b/hipsparseSolvePolicy_t/g; - $ft{'type'} += s/\bcusparseStatus_t\b/hipsparseStatus_t/g; - $ft{'numeric_literal'} += s/\bCUBLAS_DIAG_NON_UNIT\b/HIPBLAS_DIAG_NON_UNIT/g; - $ft{'numeric_literal'} += s/\bCUBLAS_DIAG_UNIT\b/HIPBLAS_DIAG_UNIT/g; - $ft{'numeric_literal'} += s/\bCUBLAS_FILL_MODE_FULL\b/HIPBLAS_FILL_MODE_FULL/g; - $ft{'numeric_literal'} += s/\bCUBLAS_FILL_MODE_LOWER\b/HIPBLAS_FILL_MODE_LOWER/g; - $ft{'numeric_literal'} += s/\bCUBLAS_FILL_MODE_UPPER\b/HIPBLAS_FILL_MODE_UPPER/g; - $ft{'numeric_literal'} += s/\bCUBLAS_GEMM_DEFAULT\b/HIPBLAS_GEMM_DEFAULT/g; - $ft{'numeric_literal'} += s/\bCUBLAS_GEMM_DFALT\b/HIPBLAS_GEMM_DEFAULT/g; - $ft{'numeric_literal'} += s/\bCUBLAS_OP_C\b/HIPBLAS_OP_C/g; - $ft{'numeric_literal'} += s/\bCUBLAS_OP_HERMITAN\b/HIPBLAS_OP_C/g; - $ft{'numeric_literal'} += s/\bCUBLAS_OP_N\b/HIPBLAS_OP_N/g; - $ft{'numeric_literal'} += s/\bCUBLAS_OP_T\b/HIPBLAS_OP_T/g; - $ft{'numeric_literal'} += s/\bCUBLAS_POINTER_MODE_DEVICE\b/HIPBLAS_POINTER_MODE_DEVICE/g; - $ft{'numeric_literal'} += s/\bCUBLAS_POINTER_MODE_HOST\b/HIPBLAS_POINTER_MODE_HOST/g; - $ft{'numeric_literal'} += s/\bCUBLAS_SIDE_LEFT\b/HIPBLAS_SIDE_LEFT/g; - $ft{'numeric_literal'} += s/\bCUBLAS_SIDE_RIGHT\b/HIPBLAS_SIDE_RIGHT/g; - $ft{'numeric_literal'} += s/\bCUBLAS_STATUS_ALLOC_FAILED\b/HIPBLAS_STATUS_ALLOC_FAILED/g; - $ft{'numeric_literal'} += s/\bCUBLAS_STATUS_ARCH_MISMATCH\b/HIPBLAS_STATUS_ARCH_MISMATCH/g; - $ft{'numeric_literal'} += s/\bCUBLAS_STATUS_EXECUTION_FAILED\b/HIPBLAS_STATUS_EXECUTION_FAILED/g; - $ft{'numeric_literal'} += s/\bCUBLAS_STATUS_INTERNAL_ERROR\b/HIPBLAS_STATUS_INTERNAL_ERROR/g; - $ft{'numeric_literal'} += s/\bCUBLAS_STATUS_INVALID_VALUE\b/HIPBLAS_STATUS_INVALID_VALUE/g; - $ft{'numeric_literal'} += s/\bCUBLAS_STATUS_MAPPING_ERROR\b/HIPBLAS_STATUS_MAPPING_ERROR/g; - $ft{'numeric_literal'} += s/\bCUBLAS_STATUS_NOT_INITIALIZED\b/HIPBLAS_STATUS_NOT_INITIALIZED/g; - $ft{'numeric_literal'} += s/\bCUBLAS_STATUS_NOT_SUPPORTED\b/HIPBLAS_STATUS_NOT_SUPPORTED/g; - $ft{'numeric_literal'} += s/\bCUBLAS_STATUS_SUCCESS\b/HIPBLAS_STATUS_SUCCESS/g; - $ft{'numeric_literal'} += s/\bCUDA_C_16F\b/HIPBLAS_C_16F/g; - $ft{'numeric_literal'} += s/\bCUDA_C_32F\b/HIPBLAS_C_32F/g; - $ft{'numeric_literal'} += s/\bCUDA_C_32I\b/HIPBLAS_C_32I/g; - $ft{'numeric_literal'} += s/\bCUDA_C_32U\b/HIPBLAS_C_32U/g; - $ft{'numeric_literal'} += s/\bCUDA_C_64F\b/HIPBLAS_C_64F/g; - $ft{'numeric_literal'} += s/\bCUDA_C_8I\b/HIPBLAS_C_8I/g; - $ft{'numeric_literal'} += s/\bCUDA_C_8U\b/HIPBLAS_C_8U/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_ALREADY_ACQUIRED\b/hipErrorAlreadyAcquired/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_ALREADY_MAPPED\b/hipErrorAlreadyMapped/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_ARRAY_IS_MAPPED\b/hipErrorArrayIsMapped/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_ASSERT\b/hipErrorAssert/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_CONTEXT_ALREADY_CURRENT\b/hipErrorContextAlreadyCurrent/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_CONTEXT_ALREADY_IN_USE\b/hipErrorContextAlreadyInUse/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE\b/hipErrorCooperativeLaunchTooLarge/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_DEINITIALIZED\b/hipErrorDeinitialized/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_ECC_UNCORRECTABLE\b/hipErrorECCNotCorrectable/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_FILE_NOT_FOUND\b/hipErrorFileNotFound/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED\b/hipErrorHostMemoryAlreadyRegistered/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_HOST_MEMORY_NOT_REGISTERED\b/hipErrorHostMemoryNotRegistered/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_ILLEGAL_ADDRESS\b/hipErrorIllegalAddress/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_INVALID_CONTEXT\b/hipErrorInvalidContext/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_INVALID_DEVICE\b/hipErrorInvalidDevice/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_INVALID_GRAPHICS_CONTEXT\b/hipErrorInvalidGraphicsContext/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_INVALID_HANDLE\b/hipErrorInvalidHandle/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_INVALID_IMAGE\b/hipErrorInvalidImage/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_INVALID_PTX\b/hipErrorInvalidKernelFile/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_INVALID_SOURCE\b/hipErrorInvalidSource/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_INVALID_VALUE\b/hipErrorInvalidValue/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_LAUNCH_FAILED\b/hipErrorLaunchFailure/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_LAUNCH_OUT_OF_RESOURCES\b/hipErrorLaunchOutOfResources/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_LAUNCH_TIMEOUT\b/hipErrorLaunchTimeOut/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_MAP_FAILED\b/hipErrorMapFailed/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_NOT_FOUND\b/hipErrorNotFound/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_NOT_INITIALIZED\b/hipErrorNotInitialized/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_NOT_MAPPED\b/hipErrorNotMapped/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_NOT_MAPPED_AS_ARRAY\b/hipErrorNotMappedAsArray/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_NOT_MAPPED_AS_POINTER\b/hipErrorNotMappedAsPointer/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_NOT_READY\b/hipErrorNotReady/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_NOT_SUPPORTED\b/hipErrorNotSupported/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_NO_BINARY_FOR_GPU\b/hipErrorNoBinaryForGpu/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_NO_DEVICE\b/hipErrorNoDevice/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_OPERATING_SYSTEM\b/hipErrorOperatingSystem/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_OUT_OF_MEMORY\b/hipErrorOutOfMemory/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED\b/hipErrorPeerAccessAlreadyEnabled/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_PEER_ACCESS_NOT_ENABLED\b/hipErrorPeerAccessNotEnabled/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_PEER_ACCESS_UNSUPPORTED\b/hipErrorPeerAccessUnsupported/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_PRIMARY_CONTEXT_ACTIVE\b/hipErrorSetOnActiveProcess/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_PROFILER_ALREADY_STARTED\b/hipErrorProfilerAlreadyStarted/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_PROFILER_ALREADY_STOPPED\b/hipErrorProfilerAlreadyStopped/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_PROFILER_DISABLED\b/hipErrorProfilerDisabled/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_PROFILER_NOT_INITIALIZED\b/hipErrorProfilerNotInitialized/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_SHARED_OBJECT_INIT_FAILED\b/hipErrorSharedObjectInitFailed/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND\b/hipErrorSharedObjectSymbolNotFound/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_UNKNOWN\b/hipErrorUnknown/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_UNMAP_FAILED\b/hipErrorUnmapFailed/g; - $ft{'numeric_literal'} += s/\bCUDA_ERROR_UNSUPPORTED_LIMIT\b/hipErrorUnsupportedLimit/g; - $ft{'numeric_literal'} += s/\bCUDA_R_16F\b/HIPBLAS_R_16F/g; - $ft{'numeric_literal'} += s/\bCUDA_R_32F\b/HIPBLAS_R_32F/g; - $ft{'numeric_literal'} += s/\bCUDA_R_32I\b/HIPBLAS_R_32I/g; - $ft{'numeric_literal'} += s/\bCUDA_R_32U\b/HIPBLAS_R_32U/g; - $ft{'numeric_literal'} += s/\bCUDA_R_64F\b/HIPBLAS_R_64F/g; - $ft{'numeric_literal'} += s/\bCUDA_R_8I\b/HIPBLAS_R_8I/g; - $ft{'numeric_literal'} += s/\bCUDA_R_8U\b/HIPBLAS_R_8U/g; - $ft{'numeric_literal'} += s/\bCUDA_SUCCESS\b/hipSuccess/g; - $ft{'numeric_literal'} += s/\bCUDNN_16BIT_INDICES\b/HIPDNN_16BIT_INDICES/g; - $ft{'numeric_literal'} += s/\bCUDNN_32BIT_INDICES\b/HIPDNN_32BIT_INDICES/g; - $ft{'numeric_literal'} += s/\bCUDNN_64BIT_INDICES\b/HIPDNN_64BIT_INDICES/g; - $ft{'numeric_literal'} += s/\bCUDNN_8BIT_INDICES\b/HIPDNN_8BIT_INDICES/g; - $ft{'numeric_literal'} += s/\bCUDNN_ACTIVATION_CLIPPED_RELU\b/HIPDNN_ACTIVATION_CLIPPED_RELU/g; - $ft{'numeric_literal'} += s/\bCUDNN_ACTIVATION_ELU\b/HIPDNN_ACTIVATION_ELU/g; - $ft{'numeric_literal'} += s/\bCUDNN_ACTIVATION_IDENTITY\b/HIPDNN_ACTIVATION_PATHTRU/g; - $ft{'numeric_literal'} += s/\bCUDNN_ACTIVATION_RELU\b/HIPDNN_ACTIVATION_RELU/g; - $ft{'numeric_literal'} += s/\bCUDNN_ACTIVATION_SIGMOID\b/HIPDNN_ACTIVATION_SIGMOID/g; - $ft{'numeric_literal'} += s/\bCUDNN_ACTIVATION_TANH\b/HIPDNN_ACTIVATION_TANH/g; - $ft{'numeric_literal'} += s/\bCUDNN_BATCHNORM_PER_ACTIVATION\b/HIPDNN_BATCHNORM_PER_ACTIVATION/g; - $ft{'numeric_literal'} += s/\bCUDNN_BATCHNORM_SPATIAL\b/HIPDNN_BATCHNORM_SPATIAL/g; - $ft{'numeric_literal'} += s/\bCUDNN_BATCHNORM_SPATIAL_PERSISTENT\b/HIPDNN_BATCHNORM_SPATIAL_PERSISTENT/g; - $ft{'numeric_literal'} += s/\bCUDNN_BIDIRECTIONAL\b/HIPDNN_BIDIRECTIONAL/g; - $ft{'numeric_literal'} += s/\bCUDNN_BN_MIN_EPSILON\b/HIPDNN_BN_MIN_EPSILON/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION\b/HIPDNN_CONVOLUTION/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_DATA_ALGO_0\b/HIPDNN_CONVOLUTION_BWD_DATA_ALGO_0/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_DATA_ALGO_1\b/HIPDNN_CONVOLUTION_BWD_DATA_ALGO_1/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_DATA_ALGO_COUNT\b/HIPDNN_CONVOLUTION_BWD_DATA_ALGO_TRANSPOSE_GEMM/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_DATA_ALGO_FFT\b/HIPDNN_CONVOLUTION_BWD_DATA_ALGO_FFT/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_DATA_ALGO_FFT_TILING\b/HIPDNN_CONVOLUTION_BWD_DATA_ALGO_FFT_TILING/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_DATA_ALGO_WINOGRAD\b/HIPDNN_CONVOLUTION_BWD_DATA_ALGO_WINOGRAD/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_DATA_ALGO_WINOGRAD_NONFUSED\b/HIPDNN_CONVOLUTION_BWD_DATA_ALGO_WINOGRAD_NONFUSED/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_DATA_NO_WORKSPACE\b/HIPDNN_CONVOLUTION_BWD_DATA_NO_WORKSPACE/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_DATA_PREFER_FASTEST\b/HIPDNN_CONVOLUTION_BWD_DATA_PREFER_FASTEST/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_DATA_SPECIFY_WORKSPACE_LIMIT\b/HIPDNN_CONVOLUTION_BWD_DATA_SPECIFY_WORKSPACE_LIMIT/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_FILTER_ALGO_0\b/HIPDNN_CONVOLUTION_BWD_FILTER_ALGO_0/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_FILTER_ALGO_1\b/HIPDNN_CONVOLUTION_BWD_FILTER_ALGO_1/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_FILTER_ALGO_3\b/HIPDNN_CONVOLUTION_BWD_FILTER_ALGO_3/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_FILTER_ALGO_COUNT\b/HIPDNN_CONVOLUTION_BWD_FILTER_ALGO_COUNT/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_FILTER_ALGO_FFT\b/HIPDNN_CONVOLUTION_BWD_FILTER_ALGO_FFT/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_FILTER_ALGO_FFT_TILING\b/HIPDNN_CONVOLUTION_BWD_FILTER_ALGO_FFT_TILING/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_FILTER_ALGO_WINOGRAD\b/HIPDNN_CONVOLUTION_BWD_FILTER_ALGO_WINOGRAD/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_FILTER_ALGO_WINOGRAD_NONFUSED\b/HIPDNN_CONVOLUTION_BWD_FILTER_ALGO_WINOGRAD_NONFUSED/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_FILTER_NO_WORKSPACE\b/HIPDNN_CONVOLUTION_BWD_FILTER_NO_WORKSPACE/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_FILTER_PREFER_FASTEST\b/HIPDNN_CONVOLUTION_BWD_FILTER_PREFER_FASTEST/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_BWD_FILTER_SPECIFY_WORKSPACE_LIMIT\b/HIPDNN_CONVOLUTION_BWD_FILTER_SPECIFY_WORKSPACE_LIMIT/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_FWD_ALGO_COUNT\b/HIPDNN_CONVOLUTION_FWD_ALGO_COUNT/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_FWD_ALGO_DIRECT\b/HIPDNN_CONVOLUTION_FWD_ALGO_DIRECT/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_FWD_ALGO_FFT\b/HIPDNN_CONVOLUTION_FWD_ALGO_FFT/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_FWD_ALGO_FFT_TILING\b/HIPDNN_CONVOLUTION_FWD_ALGO_FFT_TILING/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_FWD_ALGO_GEMM\b/HIPDNN_CONVOLUTION_FWD_ALGO_GEMM/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_GEMM\b/HIPDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_GEMM/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_PRECOMP_GEMM\b/HIPDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_PRECOMP_GEMM/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_FWD_ALGO_WINOGRAD\b/HIPDNN_CONVOLUTION_FWD_ALGO_WINOGRAD/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_FWD_ALGO_WINOGRAD_NONFUSED\b/HIPDNN_CONVOLUTION_FWD_ALGO_WINOGRAD_NONFUSED/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_FWD_NO_WORKSPACE\b/HIPDNN_CONVOLUTION_FWD_NO_WORKSPACE/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_FWD_PREFER_FASTEST\b/HIPDNN_CONVOLUTION_FWD_PREFER_FASTEST/g; - $ft{'numeric_literal'} += s/\bCUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT\b/HIPDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT/g; - $ft{'numeric_literal'} += s/\bCUDNN_CROSS_CORRELATION\b/HIPDNN_CROSS_CORRELATION/g; - $ft{'numeric_literal'} += s/\bCUDNN_DATA_DOUBLE\b/HIPDNN_DATA_DOUBLE/g; - $ft{'numeric_literal'} += s/\bCUDNN_DATA_FLOAT\b/HIPDNN_DATA_FLOAT/g; - $ft{'numeric_literal'} += s/\bCUDNN_DATA_HALF\b/HIPDNN_DATA_HALF/g; - $ft{'numeric_literal'} += s/\bCUDNN_DATA_INT32\b/HIPDNN_DATA_INT32/g; - $ft{'numeric_literal'} += s/\bCUDNN_DATA_INT8\b/HIPDNN_DATA_INT8/g; - $ft{'numeric_literal'} += s/\bCUDNN_DATA_INT8x4\b/HIPDNN_DATA_INT8x4/g; - $ft{'numeric_literal'} += s/\bCUDNN_DEFAULT_MATH\b/HIPDNN_DEFAULT_MATH/g; - $ft{'numeric_literal'} += s/\bCUDNN_GRU\b/HIPDNN_GRU/g; - $ft{'numeric_literal'} += s/\bCUDNN_LINEAR_INPUT\b/HIPDNN_LINEAR_INPUT/g; - $ft{'numeric_literal'} += s/\bCUDNN_LRN_CROSS_CHANNEL_DIM1\b/HIPDNN_LRN_CROSS_CHANNEL/g; - $ft{'numeric_literal'} += s/\bCUDNN_LSTM\b/HIPDNN_LSTM/g; - $ft{'numeric_literal'} += s/\bCUDNN_NOT_PROPAGATE_NAN\b/HIPDNN_NOT_PROPAGATE_NAN/g; - $ft{'numeric_literal'} += s/\bCUDNN_OP_TENSOR_ADD\b/HIPDNN_OP_TENSOR_ADD/g; - $ft{'numeric_literal'} += s/\bCUDNN_OP_TENSOR_MAX\b/HIPDNN_OP_TENSOR_MAX/g; - $ft{'numeric_literal'} += s/\bCUDNN_OP_TENSOR_MIN\b/HIPDNN_OP_TENSOR_MIN/g; - $ft{'numeric_literal'} += s/\bCUDNN_OP_TENSOR_MUL\b/HIPDNN_OP_TENSOR_MUL/g; - $ft{'numeric_literal'} += s/\bCUDNN_OP_TENSOR_SQRT\b/HIPDNN_OP_TENSOR_SQRT/g; - $ft{'numeric_literal'} += s/\bCUDNN_POOLING_AVERAGE_COUNT_EXCLUDE_PADDING\b/HIPDNN_POOLING_AVERAGE_COUNT_EXCLUDE_PADDING/g; - $ft{'numeric_literal'} += s/\bCUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING\b/HIPDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING/g; - $ft{'numeric_literal'} += s/\bCUDNN_POOLING_MAX\b/HIPDNN_POOLING_MAX/g; - $ft{'numeric_literal'} += s/\bCUDNN_POOLING_MAX_DETERMINISTIC\b/HIPDNN_POOLING_MAX_DETERMINISTIC/g; - $ft{'numeric_literal'} += s/\bCUDNN_PROPAGATE_NAN\b/HIPDNN_PROPAGATE_NAN/g; - $ft{'numeric_literal'} += s/\bCUDNN_REDUCE_TENSOR_ADD\b/HIPDNN_REDUCE_TENSOR_ADD/g; - $ft{'numeric_literal'} += s/\bCUDNN_REDUCE_TENSOR_AMAX\b/HIPDNN_REDUCE_TENSOR_AMAX/g; - $ft{'numeric_literal'} += s/\bCUDNN_REDUCE_TENSOR_AVG\b/HIPDNN_REDUCE_TENSOR_AVG/g; - $ft{'numeric_literal'} += s/\bCUDNN_REDUCE_TENSOR_FLATTENED_INDICES\b/HIPDNN_REDUCE_TENSOR_FLATTENED_INDICES/g; - $ft{'numeric_literal'} += s/\bCUDNN_REDUCE_TENSOR_MAX\b/HIPDNN_REDUCE_TENSOR_MAX/g; - $ft{'numeric_literal'} += s/\bCUDNN_REDUCE_TENSOR_MIN\b/HIPDNN_REDUCE_TENSOR_MIN/g; - $ft{'numeric_literal'} += s/\bCUDNN_REDUCE_TENSOR_MUL\b/HIPDNN_REDUCE_TENSOR_MUL/g; - $ft{'numeric_literal'} += s/\bCUDNN_REDUCE_TENSOR_MUL_NO_ZEROS\b/HIPDNN_REDUCE_TENSOR_MUL_NO_ZEROS/g; - $ft{'numeric_literal'} += s/\bCUDNN_REDUCE_TENSOR_NORM1\b/HIPDNN_REDUCE_TENSOR_NORM1/g; - $ft{'numeric_literal'} += s/\bCUDNN_REDUCE_TENSOR_NORM2\b/HIPDNN_REDUCE_TENSOR_NORM2/g; - $ft{'numeric_literal'} += s/\bCUDNN_REDUCE_TENSOR_NO_INDICES\b/HIPDNN_REDUCE_TENSOR_NO_INDICES/g; - $ft{'numeric_literal'} += s/\bCUDNN_RNN_ALGO_PERSIST_DYNAMIC\b/HIPDNN_RNN_ALGO_PERSIST_DYNAMIC/g; - $ft{'numeric_literal'} += s/\bCUDNN_RNN_ALGO_PERSIST_STATIC\b/HIPDNN_RNN_ALGO_PERSIST_STATIC/g; - $ft{'numeric_literal'} += s/\bCUDNN_RNN_ALGO_STANDARD\b/HIPDNN_RNN_ALGO_STANDARD/g; - $ft{'numeric_literal'} += s/\bCUDNN_RNN_DOUBLE_BIAS\b/HIPDNN_RNN_WITH_BIAS/g; - $ft{'numeric_literal'} += s/\bCUDNN_RNN_NO_BIAS\b/HIPDNN_RNN_NO_BIAS/g; - $ft{'numeric_literal'} += s/\bCUDNN_RNN_RELU\b/HIPDNN_RNN_RELU/g; - $ft{'numeric_literal'} += s/\bCUDNN_RNN_SINGLE_INP_BIAS\b/HIPDNN_RNN_WITH_BIAS/g; - $ft{'numeric_literal'} += s/\bCUDNN_RNN_SINGLE_REC_BIAS\b/HIPDNN_RNN_WITH_BIAS/g; - $ft{'numeric_literal'} += s/\bCUDNN_RNN_TANH\b/HIPDNN_RNN_TANH/g; - $ft{'numeric_literal'} += s/\bCUDNN_SKIP_INPUT\b/HIPDNN_SKIP_INPUT/g; - $ft{'numeric_literal'} += s/\bCUDNN_SOFTMAX_ACCURATE\b/HIPDNN_SOFTMAX_ACCURATE/g; - $ft{'numeric_literal'} += s/\bCUDNN_SOFTMAX_FAST\b/HIPDNN_SOFTMAX_FAST/g; - $ft{'numeric_literal'} += s/\bCUDNN_SOFTMAX_LOG\b/HIPDNN_SOFTMAX_LOG/g; - $ft{'numeric_literal'} += s/\bCUDNN_SOFTMAX_MODE_CHANNEL\b/HIPDNN_SOFTMAX_MODE_CHANNEL/g; - $ft{'numeric_literal'} += s/\bCUDNN_SOFTMAX_MODE_INSTANCE\b/HIPDNN_SOFTMAX_MODE_INSTANCE/g; - $ft{'numeric_literal'} += s/\bCUDNN_STATUS_ALLOC_FAILED\b/HIPDNN_STATUS_ALLOC_FAILED/g; - $ft{'numeric_literal'} += s/\bCUDNN_STATUS_ARCH_MISMATCH\b/HIPDNN_STATUS_ARCH_MISMATCH/g; - $ft{'numeric_literal'} += s/\bCUDNN_STATUS_BAD_PARAM\b/HIPDNN_STATUS_BAD_PARAM/g; - $ft{'numeric_literal'} += s/\bCUDNN_STATUS_EXECUTION_FAILED\b/HIPDNN_STATUS_EXECUTION_FAILED/g; - $ft{'numeric_literal'} += s/\bCUDNN_STATUS_INTERNAL_ERROR\b/HIPDNN_STATUS_INTERNAL_ERROR/g; - $ft{'numeric_literal'} += s/\bCUDNN_STATUS_INVALID_VALUE\b/HIPDNN_STATUS_INVALID_VALUE/g; - $ft{'numeric_literal'} += s/\bCUDNN_STATUS_LICENSE_ERROR\b/HIPDNN_STATUS_LICENSE_ERROR/g; - $ft{'numeric_literal'} += s/\bCUDNN_STATUS_MAPPING_ERROR\b/HIPDNN_STATUS_MAPPING_ERROR/g; - $ft{'numeric_literal'} += s/\bCUDNN_STATUS_NOT_INITIALIZED\b/HIPDNN_STATUS_NOT_INITIALIZED/g; - $ft{'numeric_literal'} += s/\bCUDNN_STATUS_NOT_SUPPORTED\b/HIPDNN_STATUS_NOT_SUPPORTED/g; - $ft{'numeric_literal'} += s/\bCUDNN_STATUS_RUNTIME_PREREQUISITE_MISSING\b/HIPDNN_STATUS_RUNTIME_PREREQUISITE_MISSING/g; - $ft{'numeric_literal'} += s/\bCUDNN_STATUS_SUCCESS\b/HIPDNN_STATUS_SUCCESS/g; - $ft{'numeric_literal'} += s/\bCUDNN_TENSOR_NCHW\b/HIPDNN_TENSOR_NCHW/g; - $ft{'numeric_literal'} += s/\bCUDNN_TENSOR_NCHW_VECT_C\b/HIPDNN_TENSOR_NCHW_VECT_C/g; - $ft{'numeric_literal'} += s/\bCUDNN_TENSOR_NHWC\b/HIPDNN_TENSOR_NHWC/g; - $ft{'numeric_literal'} += s/\bCUDNN_TENSOR_OP_MATH\b/HIPDNN_TENSOR_OP_MATH/g; - $ft{'numeric_literal'} += s/\bCUDNN_UNIDIRECTIONAL\b/HIPDNN_UNIDIRECTIONAL/g; - $ft{'numeric_literal'} += s/\bCUDNN_VERSION\b/HIPDNN_VERSION/g; - $ft{'numeric_literal'} += s/\bCUFFT_ALLOC_FAILED\b/HIPFFT_ALLOC_FAILED/g; - $ft{'numeric_literal'} += s/\bCUFFT_C2C\b/HIPFFT_C2C/g; - $ft{'numeric_literal'} += s/\bCUFFT_C2R\b/HIPFFT_C2R/g; - $ft{'numeric_literal'} += s/\bCUFFT_D2Z\b/HIPFFT_D2Z/g; - $ft{'numeric_literal'} += s/\bCUFFT_EXEC_FAILED\b/HIPFFT_EXEC_FAILED/g; - $ft{'numeric_literal'} += s/\bCUFFT_FORWARD\b/HIPFFT_FORWARD/g; - $ft{'numeric_literal'} += s/\bCUFFT_INCOMPLETE_PARAMETER_LIST\b/HIPFFT_INCOMPLETE_PARAMETER_LIST/g; - $ft{'numeric_literal'} += s/\bCUFFT_INTERNAL_ERROR\b/HIPFFT_INTERNAL_ERROR/g; - $ft{'numeric_literal'} += s/\bCUFFT_INVALID_DEVICE\b/HIPFFT_INVALID_DEVICE/g; - $ft{'numeric_literal'} += s/\bCUFFT_INVALID_PLAN\b/HIPFFT_INVALID_PLAN/g; - $ft{'numeric_literal'} += s/\bCUFFT_INVALID_SIZE\b/HIPFFT_INVALID_SIZE/g; - $ft{'numeric_literal'} += s/\bCUFFT_INVALID_TYPE\b/HIPFFT_INVALID_TYPE/g; - $ft{'numeric_literal'} += s/\bCUFFT_INVALID_VALUE\b/HIPFFT_INVALID_VALUE/g; - $ft{'numeric_literal'} += s/\bCUFFT_INVERSE\b/HIPFFT_BACKWARD/g; - $ft{'numeric_literal'} += s/\bCUFFT_NOT_IMPLEMENTED\b/HIPFFT_NOT_IMPLEMENTED/g; - $ft{'numeric_literal'} += s/\bCUFFT_NOT_SUPPORTED\b/HIPFFT_NOT_SUPPORTED/g; - $ft{'numeric_literal'} += s/\bCUFFT_NO_WORKSPACE\b/HIPFFT_NO_WORKSPACE/g; - $ft{'numeric_literal'} += s/\bCUFFT_PARSE_ERROR\b/HIPFFT_PARSE_ERROR/g; - $ft{'numeric_literal'} += s/\bCUFFT_R2C\b/HIPFFT_R2C/g; - $ft{'numeric_literal'} += s/\bCUFFT_SETUP_FAILED\b/HIPFFT_SETUP_FAILED/g; - $ft{'numeric_literal'} += s/\bCUFFT_SUCCESS\b/HIPFFT_SUCCESS/g; - $ft{'numeric_literal'} += s/\bCUFFT_UNALIGNED_DATA\b/HIPFFT_UNALIGNED_DATA/g; - $ft{'numeric_literal'} += s/\bCUFFT_Z2D\b/HIPFFT_Z2D/g; - $ft{'numeric_literal'} += s/\bCUFFT_Z2Z\b/HIPFFT_Z2Z/g; - $ft{'numeric_literal'} += s/\bCURAND_RNG_PSEUDO_DEFAULT\b/HIPRAND_RNG_PSEUDO_DEFAULT/g; - $ft{'numeric_literal'} += s/\bCURAND_RNG_PSEUDO_MRG32K3A\b/HIPRAND_RNG_PSEUDO_MRG32K3A/g; - $ft{'numeric_literal'} += s/\bCURAND_RNG_PSEUDO_MT19937\b/HIPRAND_RNG_PSEUDO_MT19937/g; - $ft{'numeric_literal'} += s/\bCURAND_RNG_PSEUDO_MTGP32\b/HIPRAND_RNG_PSEUDO_MTGP32/g; - $ft{'numeric_literal'} += s/\bCURAND_RNG_PSEUDO_PHILOX4_32_10\b/HIPRAND_RNG_PSEUDO_PHILOX4_32_10/g; - $ft{'numeric_literal'} += s/\bCURAND_RNG_PSEUDO_XORWOW\b/HIPRAND_RNG_PSEUDO_XORWOW/g; - $ft{'numeric_literal'} += s/\bCURAND_RNG_QUASI_DEFAULT\b/HIPRAND_RNG_QUASI_DEFAULT/g; - $ft{'numeric_literal'} += s/\bCURAND_RNG_QUASI_SCRAMBLED_SOBOL32\b/HIPRAND_RNG_QUASI_SCRAMBLED_SOBOL32/g; - $ft{'numeric_literal'} += s/\bCURAND_RNG_QUASI_SCRAMBLED_SOBOL64\b/HIPRAND_RNG_QUASI_SCRAMBLED_SOBOL64/g; - $ft{'numeric_literal'} += s/\bCURAND_RNG_QUASI_SOBOL32\b/HIPRAND_RNG_QUASI_SOBOL32/g; - $ft{'numeric_literal'} += s/\bCURAND_RNG_QUASI_SOBOL64\b/HIPRAND_RNG_QUASI_SOBOL64/g; - $ft{'numeric_literal'} += s/\bCURAND_RNG_TEST\b/HIPRAND_RNG_TEST/g; - $ft{'numeric_literal'} += s/\bCURAND_STATUS_ALLOCATION_FAILED\b/HIPRAND_STATUS_ALLOCATION_FAILED/g; - $ft{'numeric_literal'} += s/\bCURAND_STATUS_ARCH_MISMATCH\b/HIPRAND_STATUS_ARCH_MISMATCH/g; - $ft{'numeric_literal'} += s/\bCURAND_STATUS_DOUBLE_PRECISION_REQUIRED\b/HIPRAND_STATUS_DOUBLE_PRECISION_REQUIRED/g; - $ft{'numeric_literal'} += s/\bCURAND_STATUS_INITIALIZATION_FAILED\b/HIPRAND_STATUS_INITIALIZATION_FAILED/g; - $ft{'numeric_literal'} += s/\bCURAND_STATUS_INTERNAL_ERROR\b/HIPRAND_STATUS_INTERNAL_ERROR/g; - $ft{'numeric_literal'} += s/\bCURAND_STATUS_LAUNCH_FAILURE\b/HIPRAND_STATUS_LAUNCH_FAILURE/g; - $ft{'numeric_literal'} += s/\bCURAND_STATUS_LENGTH_NOT_MULTIPLE\b/HIPRAND_STATUS_LENGTH_NOT_MULTIPLE/g; - $ft{'numeric_literal'} += s/\bCURAND_STATUS_NOT_INITIALIZED\b/HIPRAND_STATUS_NOT_INITIALIZED/g; - $ft{'numeric_literal'} += s/\bCURAND_STATUS_OUT_OF_RANGE\b/HIPRAND_STATUS_OUT_OF_RANGE/g; - $ft{'numeric_literal'} += s/\bCURAND_STATUS_PREEXISTING_FAILURE\b/HIPRAND_STATUS_PREEXISTING_FAILURE/g; - $ft{'numeric_literal'} += s/\bCURAND_STATUS_SUCCESS\b/HIPRAND_STATUS_SUCCESS/g; - $ft{'numeric_literal'} += s/\bCURAND_STATUS_TYPE_ERROR\b/HIPRAND_STATUS_TYPE_ERROR/g; - $ft{'numeric_literal'} += s/\bCURAND_STATUS_VERSION_MISMATCH\b/HIPRAND_STATUS_VERSION_MISMATCH/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_ACTION_NUMERIC\b/HIPSPARSE_ACTION_NUMERIC/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_ACTION_SYMBOLIC\b/HIPSPARSE_ACTION_SYMBOLIC/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_DIAG_TYPE_NON_UNIT\b/HIPSPARSE_DIAG_TYPE_NON_UNIT/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_DIAG_TYPE_UNIT\b/HIPSPARSE_DIAG_TYPE_UNIT/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_DIRECTION_COLUMN\b/HIPSPARSE_DIRECTION_COLUMN/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_DIRECTION_ROW\b/HIPSPARSE_DIRECTION_ROW/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_FILL_MODE_LOWER\b/HIPSPARSE_FILL_MODE_LOWER/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_FILL_MODE_UPPER\b/HIPSPARSE_FILL_MODE_UPPER/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_HYB_PARTITION_AUTO\b/HIPSPARSE_HYB_PARTITION_AUTO/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_HYB_PARTITION_MAX\b/HIPSPARSE_HYB_PARTITION_MAX/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_HYB_PARTITION_USER\b/HIPSPARSE_HYB_PARTITION_USER/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_INDEX_BASE_ONE\b/HIPSPARSE_INDEX_BASE_ONE/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_INDEX_BASE_ZERO\b/HIPSPARSE_INDEX_BASE_ZERO/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_MATRIX_TYPE_GENERAL\b/HIPSPARSE_MATRIX_TYPE_GENERAL/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_MATRIX_TYPE_HERMITIAN\b/HIPSPARSE_MATRIX_TYPE_HERMITIAN/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_MATRIX_TYPE_SYMMETRIC\b/HIPSPARSE_MATRIX_TYPE_SYMMETRIC/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_MATRIX_TYPE_TRIANGULAR\b/HIPSPARSE_MATRIX_TYPE_TRIANGULAR/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_OPERATION_CONJUGATE_TRANSPOSE\b/HIPSPARSE_OPERATION_CONJUGATE_TRANSPOSE/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_OPERATION_NON_TRANSPOSE\b/HIPSPARSE_OPERATION_NON_TRANSPOSE/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_OPERATION_TRANSPOSE\b/HIPSPARSE_OPERATION_TRANSPOSE/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_POINTER_MODE_DEVICE\b/HIPSPARSE_POINTER_MODE_DEVICE/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_POINTER_MODE_HOST\b/HIPSPARSE_POINTER_MODE_HOST/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_SOLVE_POLICY_NO_LEVEL\b/HIPSPARSE_SOLVE_POLICY_NO_LEVEL/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_SOLVE_POLICY_USE_LEVEL\b/HIPSPARSE_SOLVE_POLICY_USE_LEVEL/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_STATUS_ALLOC_FAILED\b/HIPSPARSE_STATUS_ALLOC_FAILED/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_STATUS_ARCH_MISMATCH\b/HIPSPARSE_STATUS_ARCH_MISMATCH/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_STATUS_EXECUTION_FAILED\b/HIPSPARSE_STATUS_EXECUTION_FAILED/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_STATUS_INTERNAL_ERROR\b/HIPSPARSE_STATUS_INTERNAL_ERROR/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_STATUS_INVALID_VALUE\b/HIPSPARSE_STATUS_INVALID_VALUE/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_STATUS_MAPPING_ERROR\b/HIPSPARSE_STATUS_MAPPING_ERROR/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED\b/HIPSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_STATUS_NOT_INITIALIZED\b/HIPSPARSE_STATUS_NOT_INITIALIZED/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_STATUS_SUCCESS\b/HIPSPARSE_STATUS_SUCCESS/g; - $ft{'numeric_literal'} += s/\bCUSPARSE_STATUS_ZERO_PIVOT\b/HIPSPARSE_STATUS_ZERO_PIVOT/g; - $ft{'numeric_literal'} += s/\bCU_AD_FORMAT_FLOAT\b/HIP_AD_FORMAT_FLOAT/g; - $ft{'numeric_literal'} += s/\bCU_AD_FORMAT_HALF\b/HIP_AD_FORMAT_HALF/g; - $ft{'numeric_literal'} += s/\bCU_AD_FORMAT_SIGNED_INT16\b/HIP_AD_FORMAT_SIGNED_INT16/g; - $ft{'numeric_literal'} += s/\bCU_AD_FORMAT_SIGNED_INT32\b/HIP_AD_FORMAT_SIGNED_INT32/g; - $ft{'numeric_literal'} += s/\bCU_AD_FORMAT_SIGNED_INT8\b/HIP_AD_FORMAT_SIGNED_INT8/g; - $ft{'numeric_literal'} += s/\bCU_AD_FORMAT_UNSIGNED_INT16\b/HIP_AD_FORMAT_UNSIGNED_INT16/g; - $ft{'numeric_literal'} += s/\bCU_AD_FORMAT_UNSIGNED_INT32\b/HIP_AD_FORMAT_UNSIGNED_INT32/g; - $ft{'numeric_literal'} += s/\bCU_AD_FORMAT_UNSIGNED_INT8\b/HIP_AD_FORMAT_UNSIGNED_INT8/g; - $ft{'numeric_literal'} += s/\bCU_COMPUTEMODE_DEFAULT\b/hipComputeModeDefault/g; - $ft{'numeric_literal'} += s/\bCU_COMPUTEMODE_EXCLUSIVE\b/hipComputeModeExclusive/g; - $ft{'numeric_literal'} += s/\bCU_COMPUTEMODE_EXCLUSIVE_PROCESS\b/hipComputeModeExclusiveProcess/g; - $ft{'numeric_literal'} += s/\bCU_COMPUTEMODE_PROHIBITED\b/hipComputeModeProhibited/g; - $ft{'numeric_literal'} += s/\bCU_CTX_BLOCKING_SYNC\b/hipDeviceScheduleBlockingSync/g; - $ft{'numeric_literal'} += s/\bCU_CTX_LMEM_RESIZE_TO_MAX\b/hipDeviceLmemResizeToMax/g; - $ft{'numeric_literal'} += s/\bCU_CTX_MAP_HOST\b/hipDeviceMapHost/g; - $ft{'numeric_literal'} += s/\bCU_CTX_SCHED_AUTO\b/hipDeviceScheduleAuto/g; - $ft{'numeric_literal'} += s/\bCU_CTX_SCHED_BLOCKING_SYNC\b/hipDeviceScheduleBlockingSync/g; - $ft{'numeric_literal'} += s/\bCU_CTX_SCHED_MASK\b/hipDeviceScheduleMask/g; - $ft{'numeric_literal'} += s/\bCU_CTX_SCHED_SPIN\b/hipDeviceScheduleSpin/g; - $ft{'numeric_literal'} += s/\bCU_CTX_SCHED_YIELD\b/hipDeviceScheduleYield/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY\b/hipDeviceAttributeCanMapHostMemory/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_CLOCK_RATE\b/hipDeviceAttributeClockRate/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR\b/hipDeviceAttributeComputeCapabilityMajor/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR\b/hipDeviceAttributeComputeCapabilityMinor/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_COMPUTE_MODE\b/hipDeviceAttributeComputeMode/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS\b/hipDeviceAttributeConcurrentKernels/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH\b/hipDeviceAttributeCooperativeLaunch/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH\b/hipDeviceAttributeCooperativeMultiDeviceLaunch/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_ECC_ENABLED\b/hipDeviceAttributeEccEnabled/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH\b/hipDeviceAttributeMemoryBusWidth/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_INTEGRATED\b/hipDeviceAttributeIntegrated/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT\b/hipDeviceAttributeKernelExecTimeout/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE\b/hipDeviceAttributeL2CacheSize/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH\b/hipDeviceAttributeMaxTexture1DWidth/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT\b/hipDeviceAttributeMaxTexture2DHeight/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH\b/hipDeviceAttributeMaxTexture2DWidth/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH\b/hipDeviceAttributeMaxTexture3DDepth/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT\b/hipDeviceAttributeMaxTexture3DHeight/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH\b/hipDeviceAttributeMaxTexture3DWidth/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X\b/hipDeviceAttributeMaxBlockDimX/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y\b/hipDeviceAttributeMaxBlockDimY/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z\b/hipDeviceAttributeMaxBlockDimZ/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X\b/hipDeviceAttributeMaxGridDimX/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y\b/hipDeviceAttributeMaxGridDimY/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z\b/hipDeviceAttributeMaxGridDimZ/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MAX_PITCH\b/hipDeviceAttributeMaxPitch/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK\b/hipDeviceAttributeMaxRegistersPerBlock/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK\b/hipDeviceAttributeMaxSharedMemoryPerBlock/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR\b/hipDeviceAttributeMaxSharedMemoryPerMultiprocessor/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK\b/hipDeviceAttributeMaxThreadsPerBlock/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR\b/hipDeviceAttributeMaxThreadsPerMultiProcessor/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE\b/hipDeviceAttributeMemoryClockRate/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT\b/hipDeviceAttributeMultiprocessorCount/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD\b/hipDeviceAttributeIsMultiGpuBoard/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_PCI_BUS_ID\b/hipDeviceAttributePciBusId/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID\b/hipDeviceAttributePciDeviceId/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK\b/hipDeviceAttributeMaxRegistersPerBlock/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK\b/hipDeviceAttributeMaxSharedMemoryPerBlock/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT\b/hipDeviceAttributeTextureAlignment/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY\b/hipDeviceAttributeTotalConstantMemory/g; - $ft{'numeric_literal'} += s/\bCU_DEVICE_ATTRIBUTE_WARP_SIZE\b/hipDeviceAttributeWarpSize/g; - $ft{'numeric_literal'} += s/\bCU_EVENT_BLOCKING_SYNC\b/hipEventBlockingSync/g; - $ft{'numeric_literal'} += s/\bCU_EVENT_DEFAULT\b/hipEventDefault/g; - $ft{'numeric_literal'} += s/\bCU_EVENT_DISABLE_TIMING\b/hipEventDisableTiming/g; - $ft{'numeric_literal'} += s/\bCU_EVENT_INTERPROCESS\b/hipEventInterprocess/g; - $ft{'numeric_literal'} += s/\bCU_FUNC_ATTRIBUTE_BINARY_VERSION\b/HIP_FUNC_ATTRIBUTE_BINARY_VERSION/g; - $ft{'numeric_literal'} += s/\bCU_FUNC_ATTRIBUTE_CACHE_MODE_CA\b/HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA/g; - $ft{'numeric_literal'} += s/\bCU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES\b/HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES/g; - $ft{'numeric_literal'} += s/\bCU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES\b/HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES/g; - $ft{'numeric_literal'} += s/\bCU_FUNC_ATTRIBUTE_MAX\b/HIP_FUNC_ATTRIBUTE_MAX/g; - $ft{'numeric_literal'} += s/\bCU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES\b/HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES/g; - $ft{'numeric_literal'} += s/\bCU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK\b/HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK/g; - $ft{'numeric_literal'} += s/\bCU_FUNC_ATTRIBUTE_NUM_REGS\b/HIP_FUNC_ATTRIBUTE_NUM_REGS/g; - $ft{'numeric_literal'} += s/\bCU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT\b/HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT/g; - $ft{'numeric_literal'} += s/\bCU_FUNC_ATTRIBUTE_PTX_VERSION\b/HIP_FUNC_ATTRIBUTE_PTX_VERSION/g; - $ft{'numeric_literal'} += s/\bCU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES\b/HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES/g; - $ft{'numeric_literal'} += s/\bCU_FUNC_CACHE_PREFER_EQUAL\b/hipFuncCachePreferEqual/g; - $ft{'numeric_literal'} += s/\bCU_FUNC_CACHE_PREFER_L1\b/hipFuncCachePreferL1/g; - $ft{'numeric_literal'} += s/\bCU_FUNC_CACHE_PREFER_NONE\b/hipFuncCachePreferNone/g; - $ft{'numeric_literal'} += s/\bCU_FUNC_CACHE_PREFER_SHARED\b/hipFuncCachePreferShared/g; - $ft{'numeric_literal'} += s/\bCU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS\b/hipIpcMemLazyEnablePeerAccess/g; - $ft{'numeric_literal'} += s/\bCU_JIT_CACHE_MODE\b/hipJitOptionCacheMode/g; - $ft{'numeric_literal'} += s/\bCU_JIT_ERROR_LOG_BUFFER\b/hipJitOptionErrorLogBuffer/g; - $ft{'numeric_literal'} += s/\bCU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES\b/hipJitOptionErrorLogBufferSizeBytes/g; - $ft{'numeric_literal'} += s/\bCU_JIT_FALLBACK_STRATEGY\b/hipJitOptionFallbackStrategy/g; - $ft{'numeric_literal'} += s/\bCU_JIT_FAST_COMPILE\b/hipJitOptionFastCompile/g; - $ft{'numeric_literal'} += s/\bCU_JIT_GENERATE_DEBUG_INFO\b/hipJitOptionGenerateDebugInfo/g; - $ft{'numeric_literal'} += s/\bCU_JIT_GENERATE_LINE_INFO\b/hipJitOptionGenerateLineInfo/g; - $ft{'numeric_literal'} += s/\bCU_JIT_GLOBAL_SYMBOL_ADDRESSES\b/hipJitGlobalSymbolAddresses/g; - $ft{'numeric_literal'} += s/\bCU_JIT_GLOBAL_SYMBOL_COUNT\b/hipJitGlobalSymbolCount/g; - $ft{'numeric_literal'} += s/\bCU_JIT_GLOBAL_SYMBOL_NAMES\b/hipJitGlobalSymbolNames/g; - $ft{'numeric_literal'} += s/\bCU_JIT_INFO_LOG_BUFFER\b/hipJitOptionInfoLogBuffer/g; - $ft{'numeric_literal'} += s/\bCU_JIT_INFO_LOG_BUFFER_SIZE_BYTES\b/hipJitOptionInfoLogBufferSizeBytes/g; - $ft{'numeric_literal'} += s/\bCU_JIT_LOG_VERBOSE\b/hipJitOptionLogVerbose/g; - $ft{'numeric_literal'} += s/\bCU_JIT_MAX_REGISTERS\b/hipJitOptionMaxRegisters/g; - $ft{'numeric_literal'} += s/\bCU_JIT_NEW_SM3X_OPT\b/hipJitOptionSm3xOpt/g; - $ft{'numeric_literal'} += s/\bCU_JIT_NUM_OPTIONS\b/hipJitOptionNumOptions/g; - $ft{'numeric_literal'} += s/\bCU_JIT_OPTIMIZATION_LEVEL\b/hipJitOptionOptimizationLevel/g; - $ft{'numeric_literal'} += s/\bCU_JIT_TARGET\b/hipJitOptionTarget/g; - $ft{'numeric_literal'} += s/\bCU_JIT_TARGET_FROM_CUCONTEXT\b/hipJitOptionTargetFromContext/g; - $ft{'numeric_literal'} += s/\bCU_JIT_THREADS_PER_BLOCK\b/hipJitOptionThreadsPerBlock/g; - $ft{'numeric_literal'} += s/\bCU_JIT_WALL_TIME\b/hipJitOptionWallTime/g; - $ft{'numeric_literal'} += s/\bCU_LIMIT_MALLOC_HEAP_SIZE\b/hipLimitMallocHeapSize/g; - $ft{'numeric_literal'} += s/\bCU_MEMORYTYPE_ARRAY\b/hipMemoryTypeArray/g; - $ft{'numeric_literal'} += s/\bCU_MEMORYTYPE_DEVICE\b/hipMemoryTypeDevice/g; - $ft{'numeric_literal'} += s/\bCU_MEMORYTYPE_HOST\b/hipMemoryTypeHost/g; - $ft{'numeric_literal'} += s/\bCU_MEMORYTYPE_UNIFIED\b/hipMemoryTypeUnified/g; - $ft{'numeric_literal'} += s/\bCU_MEM_ATTACH_GLOBAL\b/hipMemAttachGlobal/g; - $ft{'numeric_literal'} += s/\bCU_MEM_ATTACH_HOST\b/hipMemAttachHost/g; - $ft{'numeric_literal'} += s/\bCU_OCCUPANCY_DEFAULT\b/hipOccupancyDefault/g; - $ft{'numeric_literal'} += s/\bCU_RESOURCE_TYPE_ARRAY\b/hipResourceTypeArray/g; - $ft{'numeric_literal'} += s/\bCU_RESOURCE_TYPE_LINEAR\b/hipResourceTypeLinear/g; - $ft{'numeric_literal'} += s/\bCU_RESOURCE_TYPE_MIPMAPPED_ARRAY\b/hipResourceTypeMipmappedArray/g; - $ft{'numeric_literal'} += s/\bCU_RESOURCE_TYPE_PITCH2D\b/hipResourceTypePitch2D/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_FLOAT_1X16\b/hipResViewFormatHalf1/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_FLOAT_1X32\b/hipResViewFormatFloat1/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_FLOAT_2X16\b/hipResViewFormatHalf2/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_FLOAT_2X32\b/hipResViewFormatFloat2/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_FLOAT_4X16\b/hipResViewFormatHalf4/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_FLOAT_4X32\b/hipResViewFormatFloat4/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_NONE\b/hipResViewFormatNone/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_SIGNED_BC4\b/hipResViewFormatSignedBlockCompressed4/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_SIGNED_BC5\b/hipResViewFormatSignedBlockCompressed5/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_SIGNED_BC6H\b/hipResViewFormatSignedBlockCompressed6H/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_SINT_1X16\b/hipResViewFormatSignedShort1/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_SINT_1X32\b/hipResViewFormatSignedInt1/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_SINT_1X8\b/hipResViewFormatSignedChar1/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_SINT_2X16\b/hipResViewFormatSignedShort2/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_SINT_2X32\b/hipResViewFormatSignedInt2/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_SINT_2X8\b/hipResViewFormatSignedChar2/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_SINT_4X16\b/hipResViewFormatSignedShort4/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_SINT_4X32\b/hipResViewFormatSignedInt4/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_SINT_4X8\b/hipResViewFormatSignedChar4/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_UINT_1X16\b/hipResViewFormatUnsignedShort1/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_UINT_1X32\b/hipResViewFormatUnsignedInt1/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_UINT_1X8\b/hipResViewFormatUnsignedChar1/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_UINT_2X16\b/hipResViewFormatUnsignedShort2/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_UINT_2X32\b/hipResViewFormatUnsignedInt2/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_UINT_2X8\b/hipResViewFormatUnsignedChar2/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_UINT_4X16\b/hipResViewFormatUnsignedShort4/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_UINT_4X32\b/hipResViewFormatUnsignedInt4/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_UINT_4X8\b/hipResViewFormatUnsignedChar4/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_UNSIGNED_BC1\b/hipResViewFormatUnsignedBlockCompressed1/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_UNSIGNED_BC2\b/hipResViewFormatUnsignedBlockCompressed2/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_UNSIGNED_BC3\b/hipResViewFormatUnsignedBlockCompressed3/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_UNSIGNED_BC4\b/hipResViewFormatUnsignedBlockCompressed4/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_UNSIGNED_BC5\b/hipResViewFormatUnsignedBlockCompressed5/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_UNSIGNED_BC6H\b/hipResViewFormatUnsignedBlockCompressed6H/g; - $ft{'numeric_literal'} += s/\bCU_RES_VIEW_FORMAT_UNSIGNED_BC7\b/hipResViewFormatUnsignedBlockCompressed7/g; - $ft{'numeric_literal'} += s/\bCU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE\b/hipSharedMemBankSizeDefault/g; - $ft{'numeric_literal'} += s/\bCU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE\b/hipSharedMemBankSizeEightByte/g; - $ft{'numeric_literal'} += s/\bCU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE\b/hipSharedMemBankSizeFourByte/g; - $ft{'numeric_literal'} += s/\bCU_STREAM_DEFAULT\b/hipStreamDefault/g; - $ft{'numeric_literal'} += s/\bCU_STREAM_NON_BLOCKING\b/hipStreamNonBlocking/g; - $ft{'numeric_literal'} += s/\bCU_TR_ADDRESS_MODE_BORDER\b/hipAddressModeBorder/g; - $ft{'numeric_literal'} += s/\bCU_TR_ADDRESS_MODE_CLAMP\b/hipAddressModeClamp/g; - $ft{'numeric_literal'} += s/\bCU_TR_ADDRESS_MODE_MIRROR\b/hipAddressModeMirror/g; - $ft{'numeric_literal'} += s/\bCU_TR_ADDRESS_MODE_WRAP\b/hipAddressModeWrap/g; - $ft{'numeric_literal'} += s/\bCU_TR_FILTER_MODE_LINEAR\b/hipFilterModeLinear/g; - $ft{'numeric_literal'} += s/\bCU_TR_FILTER_MODE_POINT\b/hipFilterModePoint/g; - $ft{'numeric_literal'} += s/\bcudaAddressModeBorder\b/hipAddressModeBorder/g; - $ft{'numeric_literal'} += s/\bcudaAddressModeClamp\b/hipAddressModeClamp/g; - $ft{'numeric_literal'} += s/\bcudaAddressModeMirror\b/hipAddressModeMirror/g; - $ft{'numeric_literal'} += s/\bcudaAddressModeWrap\b/hipAddressModeWrap/g; - $ft{'numeric_literal'} += s/\bcudaBoundaryModeClamp\b/hipBoundaryModeClamp/g; - $ft{'numeric_literal'} += s/\bcudaBoundaryModeTrap\b/hipBoundaryModeTrap/g; - $ft{'numeric_literal'} += s/\bcudaBoundaryModeZero\b/hipBoundaryModeZero/g; - $ft{'numeric_literal'} += s/\bcudaChannelFormatKindFloat\b/hipChannelFormatKindFloat/g; - $ft{'numeric_literal'} += s/\bcudaChannelFormatKindNone\b/hipChannelFormatKindNone/g; - $ft{'numeric_literal'} += s/\bcudaChannelFormatKindSigned\b/hipChannelFormatKindSigned/g; - $ft{'numeric_literal'} += s/\bcudaChannelFormatKindUnsigned\b/hipChannelFormatKindUnsigned/g; - $ft{'numeric_literal'} += s/\bcudaComputeModeDefault\b/hipComputeModeDefault/g; - $ft{'numeric_literal'} += s/\bcudaComputeModeExclusive\b/hipComputeModeExclusive/g; - $ft{'numeric_literal'} += s/\bcudaComputeModeExclusiveProcess\b/hipComputeModeExclusiveProcess/g; - $ft{'numeric_literal'} += s/\bcudaComputeModeProhibited\b/hipComputeModeProhibited/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrCanMapHostMemory\b/hipDeviceAttributeCanMapHostMemory/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrClockRate\b/hipDeviceAttributeClockRate/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrComputeCapabilityMajor\b/hipDeviceAttributeComputeCapabilityMajor/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrComputeCapabilityMinor\b/hipDeviceAttributeComputeCapabilityMinor/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrComputeMode\b/hipDeviceAttributeComputeMode/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrConcurrentKernels\b/hipDeviceAttributeConcurrentKernels/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrCooperativeLaunch\b/hipDeviceAttributeCooperativeLaunch/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrCooperativeMultiDeviceLaunch\b/hipDeviceAttributeCooperativeMultiDeviceLaunch/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrEccEnabled\b/hipDeviceAttributeEccEnabled/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrGlobalMemoryBusWidth\b/hipDeviceAttributeMemoryBusWidth/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrIntegrated\b/hipDeviceAttributeIntegrated/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrIsMultiGpuBoard\b/hipDeviceAttributeIsMultiGpuBoard/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrKernelExecTimeout\b/hipDeviceAttributeKernelExecTimeout/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrL2CacheSize\b/hipDeviceAttributeL2CacheSize/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMaxBlockDimX\b/hipDeviceAttributeMaxBlockDimX/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMaxBlockDimY\b/hipDeviceAttributeMaxBlockDimY/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMaxBlockDimZ\b/hipDeviceAttributeMaxBlockDimZ/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMaxGridDimX\b/hipDeviceAttributeMaxGridDimX/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMaxGridDimY\b/hipDeviceAttributeMaxGridDimY/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMaxGridDimZ\b/hipDeviceAttributeMaxGridDimZ/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMaxPitch\b/hipDeviceAttributeMaxPitch/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMaxRegistersPerBlock\b/hipDeviceAttributeMaxRegistersPerBlock/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMaxSharedMemoryPerBlock\b/hipDeviceAttributeMaxSharedMemoryPerBlock/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMaxSharedMemoryPerMultiprocessor\b/hipDeviceAttributeMaxSharedMemoryPerMultiprocessor/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMaxTexture1DWidth\b/hipDeviceAttributeMaxTexture1DWidth/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMaxTexture2DHeight\b/hipDeviceAttributeMaxTexture2DHeight/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMaxTexture2DWidth\b/hipDeviceAttributeMaxTexture2DWidth/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMaxTexture3DDepth\b/hipDeviceAttributeMaxTexture3DDepth/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMaxTexture3DHeight\b/hipDeviceAttributeMaxTexture3DHeight/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMaxTexture3DWidth\b/hipDeviceAttributeMaxTexture3DWidth/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMaxThreadsPerBlock\b/hipDeviceAttributeMaxThreadsPerBlock/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMaxThreadsPerMultiProcessor\b/hipDeviceAttributeMaxThreadsPerMultiProcessor/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMemoryClockRate\b/hipDeviceAttributeMemoryClockRate/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrMultiProcessorCount\b/hipDeviceAttributeMultiprocessorCount/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrPciBusId\b/hipDeviceAttributePciBusId/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrPciDeviceId\b/hipDeviceAttributePciDeviceId/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrTextureAlignment\b/hipDeviceAttributeTextureAlignment/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrTotalConstantMemory\b/hipDeviceAttributeTotalConstantMemory/g; - $ft{'numeric_literal'} += s/\bcudaDevAttrWarpSize\b/hipDeviceAttributeWarpSize/g; - $ft{'numeric_literal'} += s/\bcudaErrorAlreadyAcquired\b/hipErrorAlreadyAcquired/g; - $ft{'numeric_literal'} += s/\bcudaErrorAlreadyMapped\b/hipErrorAlreadyMapped/g; - $ft{'numeric_literal'} += s/\bcudaErrorArrayIsMapped\b/hipErrorArrayIsMapped/g; - $ft{'numeric_literal'} += s/\bcudaErrorAssert\b/hipErrorAssert/g; - $ft{'numeric_literal'} += s/\bcudaErrorCooperativeLaunchTooLarge\b/hipErrorCooperativeLaunchTooLarge/g; - $ft{'numeric_literal'} += s/\bcudaErrorCudartUnloading\b/hipErrorDeinitialized/g; - $ft{'numeric_literal'} += s/\bcudaErrorDeviceAlreadyInUse\b/hipErrorContextAlreadyInUse/g; - $ft{'numeric_literal'} += s/\bcudaErrorDeviceUninitialized\b/hipErrorInvalidContext/g; - $ft{'numeric_literal'} += s/\bcudaErrorDeviceUninitilialized\b/hipErrorInvalidContext/g; - $ft{'numeric_literal'} += s/\bcudaErrorECCUncorrectable\b/hipErrorECCNotCorrectable/g; - $ft{'numeric_literal'} += s/\bcudaErrorFileNotFound\b/hipErrorFileNotFound/g; - $ft{'numeric_literal'} += s/\bcudaErrorHostMemoryAlreadyRegistered\b/hipErrorHostMemoryAlreadyRegistered/g; - $ft{'numeric_literal'} += s/\bcudaErrorHostMemoryNotRegistered\b/hipErrorHostMemoryNotRegistered/g; - $ft{'numeric_literal'} += s/\bcudaErrorIllegalAddress\b/hipErrorIllegalAddress/g; - $ft{'numeric_literal'} += s/\bcudaErrorInitializationError\b/hipErrorNotInitialized/g; - $ft{'numeric_literal'} += s/\bcudaErrorInsufficientDriver\b/hipErrorInsufficientDriver/g; - $ft{'numeric_literal'} += s/\bcudaErrorInvalidConfiguration\b/hipErrorInvalidConfiguration/g; - $ft{'numeric_literal'} += s/\bcudaErrorInvalidDevice\b/hipErrorInvalidDevice/g; - $ft{'numeric_literal'} += s/\bcudaErrorInvalidDeviceFunction\b/hipErrorInvalidDeviceFunction/g; - $ft{'numeric_literal'} += s/\bcudaErrorInvalidDevicePointer\b/hipErrorInvalidDevicePointer/g; - $ft{'numeric_literal'} += s/\bcudaErrorInvalidGraphicsContext\b/hipErrorInvalidGraphicsContext/g; - $ft{'numeric_literal'} += s/\bcudaErrorInvalidKernelImage\b/hipErrorInvalidImage/g; - $ft{'numeric_literal'} += s/\bcudaErrorInvalidMemcpyDirection\b/hipErrorInvalidMemcpyDirection/g; - $ft{'numeric_literal'} += s/\bcudaErrorInvalidPtx\b/hipErrorInvalidKernelFile/g; - $ft{'numeric_literal'} += s/\bcudaErrorInvalidResourceHandle\b/hipErrorInvalidHandle/g; - $ft{'numeric_literal'} += s/\bcudaErrorInvalidSource\b/hipErrorInvalidSource/g; - $ft{'numeric_literal'} += s/\bcudaErrorInvalidSymbol\b/hipErrorInvalidSymbol/g; - $ft{'numeric_literal'} += s/\bcudaErrorInvalidValue\b/hipErrorInvalidValue/g; - $ft{'numeric_literal'} += s/\bcudaErrorLaunchFailure\b/hipErrorLaunchFailure/g; - $ft{'numeric_literal'} += s/\bcudaErrorLaunchOutOfResources\b/hipErrorLaunchOutOfResources/g; - $ft{'numeric_literal'} += s/\bcudaErrorLaunchTimeout\b/hipErrorLaunchTimeOut/g; - $ft{'numeric_literal'} += s/\bcudaErrorMapBufferObjectFailed\b/hipErrorMapFailed/g; - $ft{'numeric_literal'} += s/\bcudaErrorMemoryAllocation\b/hipErrorOutOfMemory/g; - $ft{'numeric_literal'} += s/\bcudaErrorMissingConfiguration\b/hipErrorMissingConfiguration/g; - $ft{'numeric_literal'} += s/\bcudaErrorNoDevice\b/hipErrorNoDevice/g; - $ft{'numeric_literal'} += s/\bcudaErrorNoKernelImageForDevice\b/hipErrorNoBinaryForGpu/g; - $ft{'numeric_literal'} += s/\bcudaErrorNotMapped\b/hipErrorNotMapped/g; - $ft{'numeric_literal'} += s/\bcudaErrorNotMappedAsArray\b/hipErrorNotMappedAsArray/g; - $ft{'numeric_literal'} += s/\bcudaErrorNotMappedAsPointer\b/hipErrorNotMappedAsPointer/g; - $ft{'numeric_literal'} += s/\bcudaErrorNotReady\b/hipErrorNotReady/g; - $ft{'numeric_literal'} += s/\bcudaErrorNotSupported\b/hipErrorNotSupported/g; - $ft{'numeric_literal'} += s/\bcudaErrorOperatingSystem\b/hipErrorOperatingSystem/g; - $ft{'numeric_literal'} += s/\bcudaErrorPeerAccessAlreadyEnabled\b/hipErrorPeerAccessAlreadyEnabled/g; - $ft{'numeric_literal'} += s/\bcudaErrorPeerAccessNotEnabled\b/hipErrorPeerAccessNotEnabled/g; - $ft{'numeric_literal'} += s/\bcudaErrorPeerAccessUnsupported\b/hipErrorPeerAccessUnsupported/g; - $ft{'numeric_literal'} += s/\bcudaErrorPriorLaunchFailure\b/hipErrorPriorLaunchFailure/g; - $ft{'numeric_literal'} += s/\bcudaErrorProfilerAlreadyStarted\b/hipErrorProfilerAlreadyStarted/g; - $ft{'numeric_literal'} += s/\bcudaErrorProfilerAlreadyStopped\b/hipErrorProfilerAlreadyStopped/g; - $ft{'numeric_literal'} += s/\bcudaErrorProfilerDisabled\b/hipErrorProfilerDisabled/g; - $ft{'numeric_literal'} += s/\bcudaErrorProfilerNotInitialized\b/hipErrorProfilerNotInitialized/g; - $ft{'numeric_literal'} += s/\bcudaErrorSetOnActiveProcess\b/hipErrorSetOnActiveProcess/g; - $ft{'numeric_literal'} += s/\bcudaErrorSharedObjectInitFailed\b/hipErrorSharedObjectInitFailed/g; - $ft{'numeric_literal'} += s/\bcudaErrorSharedObjectSymbolNotFound\b/hipErrorSharedObjectSymbolNotFound/g; - $ft{'numeric_literal'} += s/\bcudaErrorSymbolNotFound\b/hipErrorNotFound/g; - $ft{'numeric_literal'} += s/\bcudaErrorUnknown\b/hipErrorUnknown/g; - $ft{'numeric_literal'} += s/\bcudaErrorUnmapBufferObjectFailed\b/hipErrorUnmapFailed/g; - $ft{'numeric_literal'} += s/\bcudaErrorUnsupportedLimit\b/hipErrorUnsupportedLimit/g; - $ft{'numeric_literal'} += s/\bcudaFilterModeLinear\b/hipFilterModeLinear/g; - $ft{'numeric_literal'} += s/\bcudaFilterModePoint\b/hipFilterModePoint/g; - $ft{'numeric_literal'} += s/\bcudaFuncCachePreferEqual\b/hipFuncCachePreferEqual/g; - $ft{'numeric_literal'} += s/\bcudaFuncCachePreferL1\b/hipFuncCachePreferL1/g; - $ft{'numeric_literal'} += s/\bcudaFuncCachePreferNone\b/hipFuncCachePreferNone/g; - $ft{'numeric_literal'} += s/\bcudaFuncCachePreferShared\b/hipFuncCachePreferShared/g; - $ft{'numeric_literal'} += s/\bcudaLimitMallocHeapSize\b/hipLimitMallocHeapSize/g; - $ft{'numeric_literal'} += s/\bcudaMemcpyDefault\b/hipMemcpyDefault/g; - $ft{'numeric_literal'} += s/\bcudaMemcpyDeviceToDevice\b/hipMemcpyDeviceToDevice/g; - $ft{'numeric_literal'} += s/\bcudaMemcpyDeviceToHost\b/hipMemcpyDeviceToHost/g; - $ft{'numeric_literal'} += s/\bcudaMemcpyHostToDevice\b/hipMemcpyHostToDevice/g; - $ft{'numeric_literal'} += s/\bcudaMemcpyHostToHost\b/hipMemcpyHostToHost/g; - $ft{'numeric_literal'} += s/\bcudaReadModeElementType\b/hipReadModeElementType/g; - $ft{'numeric_literal'} += s/\bcudaReadModeNormalizedFloat\b/hipReadModeNormalizedFloat/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatFloat1\b/hipResViewFormatFloat1/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatFloat2\b/hipResViewFormatFloat2/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatFloat4\b/hipResViewFormatFloat4/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatHalf1\b/hipResViewFormatHalf1/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatHalf2\b/hipResViewFormatHalf2/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatHalf4\b/hipResViewFormatHalf4/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatNone\b/hipResViewFormatNone/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatSignedBlockCompressed4\b/hipResViewFormatSignedBlockCompressed4/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatSignedBlockCompressed5\b/hipResViewFormatSignedBlockCompressed5/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatSignedBlockCompressed6H\b/hipResViewFormatSignedBlockCompressed6H/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatSignedChar1\b/hipResViewFormatSignedChar1/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatSignedChar2\b/hipResViewFormatSignedChar2/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatSignedChar4\b/hipResViewFormatSignedChar4/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatSignedInt1\b/hipResViewFormatSignedInt1/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatSignedInt2\b/hipResViewFormatSignedInt2/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatSignedInt4\b/hipResViewFormatSignedInt4/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatSignedShort1\b/hipResViewFormatSignedShort1/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatSignedShort2\b/hipResViewFormatSignedShort2/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatSignedShort4\b/hipResViewFormatSignedShort4/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatUnsignedBlockCompressed1\b/hipResViewFormatUnsignedBlockCompressed1/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatUnsignedBlockCompressed2\b/hipResViewFormatUnsignedBlockCompressed2/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatUnsignedBlockCompressed3\b/hipResViewFormatUnsignedBlockCompressed3/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatUnsignedBlockCompressed4\b/hipResViewFormatUnsignedBlockCompressed4/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatUnsignedBlockCompressed5\b/hipResViewFormatUnsignedBlockCompressed5/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatUnsignedBlockCompressed6H\b/hipResViewFormatUnsignedBlockCompressed6H/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatUnsignedBlockCompressed7\b/hipResViewFormatUnsignedBlockCompressed7/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatUnsignedChar1\b/hipResViewFormatUnsignedChar1/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatUnsignedChar2\b/hipResViewFormatUnsignedChar2/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatUnsignedChar4\b/hipResViewFormatUnsignedChar4/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatUnsignedInt1\b/hipResViewFormatUnsignedInt1/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatUnsignedInt2\b/hipResViewFormatUnsignedInt2/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatUnsignedInt4\b/hipResViewFormatUnsignedInt4/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatUnsignedShort1\b/hipResViewFormatUnsignedShort1/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatUnsignedShort2\b/hipResViewFormatUnsignedShort2/g; - $ft{'numeric_literal'} += s/\bcudaResViewFormatUnsignedShort4\b/hipResViewFormatUnsignedShort4/g; - $ft{'numeric_literal'} += s/\bcudaResourceTypeArray\b/hipResourceTypeArray/g; - $ft{'numeric_literal'} += s/\bcudaResourceTypeLinear\b/hipResourceTypeLinear/g; - $ft{'numeric_literal'} += s/\bcudaResourceTypeMipmappedArray\b/hipResourceTypeMipmappedArray/g; - $ft{'numeric_literal'} += s/\bcudaResourceTypePitch2D\b/hipResourceTypePitch2D/g; - $ft{'numeric_literal'} += s/\bcudaSharedMemBankSizeDefault\b/hipSharedMemBankSizeDefault/g; - $ft{'numeric_literal'} += s/\bcudaSharedMemBankSizeEightByte\b/hipSharedMemBankSizeEightByte/g; - $ft{'numeric_literal'} += s/\bcudaSharedMemBankSizeFourByte\b/hipSharedMemBankSizeFourByte/g; - $ft{'numeric_literal'} += s/\bcudaSuccess\b/hipSuccess/g; - $ft{'define'} += s/\bCUDA_ARRAY3D_CUBEMAP\b/hipArrayCubemap/g; - $ft{'define'} += s/\bCUDA_ARRAY3D_LAYERED\b/hipArrayLayered/g; - $ft{'define'} += s/\bCUDA_ARRAY3D_SURFACE_LDST\b/hipArraySurfaceLoadStore/g; - $ft{'define'} += s/\bCUDA_ARRAY3D_TEXTURE_GATHER\b/hipArrayTextureGather/g; - $ft{'define'} += s/\bCUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC\b/hipCooperativeLaunchMultiDeviceNoPostSync/g; - $ft{'define'} += s/\bCUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC\b/hipCooperativeLaunchMultiDeviceNoPreSync/g; - $ft{'define'} += s/\bCU_LAUNCH_PARAM_BUFFER_POINTER\b/HIP_LAUNCH_PARAM_BUFFER_POINTER/g; - $ft{'define'} += s/\bCU_LAUNCH_PARAM_BUFFER_SIZE\b/HIP_LAUNCH_PARAM_BUFFER_SIZE/g; - $ft{'define'} += s/\bCU_LAUNCH_PARAM_END\b/HIP_LAUNCH_PARAM_END/g; - $ft{'define'} += s/\bCU_MEMHOSTALLOC_DEVICEMAP\b/hipHostMallocMapped/g; - $ft{'define'} += s/\bCU_MEMHOSTALLOC_PORTABLE\b/hipHostMallocPortable/g; - $ft{'define'} += s/\bCU_MEMHOSTALLOC_WRITECOMBINED\b/hipHostMallocWriteCombined/g; - $ft{'define'} += s/\bCU_MEMHOSTREGISTER_DEVICEMAP\b/hipHostRegisterMapped/g; - $ft{'define'} += s/\bCU_MEMHOSTREGISTER_IOMEMORY\b/hipHostRegisterIoMemory/g; - $ft{'define'} += s/\bCU_MEMHOSTREGISTER_PORTABLE\b/hipHostRegisterPortable/g; - $ft{'define'} += s/\bCU_TRSA_OVERRIDE_FORMAT\b/HIP_TRSA_OVERRIDE_FORMAT/g; - $ft{'define'} += s/\bCU_TRSF_NORMALIZED_COORDINATES\b/HIP_TRSF_NORMALIZED_COORDINATES/g; - $ft{'define'} += s/\bCU_TRSF_READ_AS_INTEGER\b/HIP_TRSF_READ_AS_INTEGER/g; - $ft{'define'} += s/\bREGISTER_CUDA_OPERATOR\b/REGISTER_HIP_OPERATOR/g; - $ft{'define'} += s/\bREGISTER_CUDA_OPERATOR_CREATOR\b/REGISTER_HIP_OPERATOR_CREATOR/g; - $ft{'define'} += s/\b__CUDACC__\b/__HIPCC__/g; - $ft{'define'} += s/\bcudaArrayCubemap\b/hipArrayCubemap/g; - $ft{'define'} += s/\bcudaArrayDefault\b/hipArrayDefault/g; - $ft{'define'} += s/\bcudaArrayLayered\b/hipArrayLayered/g; - $ft{'define'} += s/\bcudaArraySurfaceLoadStore\b/hipArraySurfaceLoadStore/g; - $ft{'define'} += s/\bcudaArrayTextureGather\b/hipArrayTextureGather/g; - $ft{'define'} += s/\bcudaCooperativeLaunchMultiDeviceNoPostSync\b/hipCooperativeLaunchMultiDeviceNoPostSync/g; - $ft{'define'} += s/\bcudaCooperativeLaunchMultiDeviceNoPreSync\b/hipCooperativeLaunchMultiDeviceNoPreSync/g; - $ft{'define'} += s/\bcudaDeviceBlockingSync\b/hipDeviceScheduleBlockingSync/g; - $ft{'define'} += s/\bcudaDeviceLmemResizeToMax\b/hipDeviceLmemResizeToMax/g; - $ft{'define'} += s/\bcudaDeviceMapHost\b/hipDeviceMapHost/g; - $ft{'define'} += s/\bcudaDeviceScheduleAuto\b/hipDeviceScheduleAuto/g; - $ft{'define'} += s/\bcudaDeviceScheduleBlockingSync\b/hipDeviceScheduleBlockingSync/g; - $ft{'define'} += s/\bcudaDeviceScheduleMask\b/hipDeviceScheduleMask/g; - $ft{'define'} += s/\bcudaDeviceScheduleSpin\b/hipDeviceScheduleSpin/g; - $ft{'define'} += s/\bcudaDeviceScheduleYield\b/hipDeviceScheduleYield/g; - $ft{'define'} += s/\bcudaEventBlockingSync\b/hipEventBlockingSync/g; - $ft{'define'} += s/\bcudaEventDefault\b/hipEventDefault/g; - $ft{'define'} += s/\bcudaEventDisableTiming\b/hipEventDisableTiming/g; - $ft{'define'} += s/\bcudaEventInterprocess\b/hipEventInterprocess/g; - $ft{'define'} += s/\bcudaHostAllocDefault\b/hipHostMallocDefault/g; - $ft{'define'} += s/\bcudaHostAllocMapped\b/hipHostMallocMapped/g; - $ft{'define'} += s/\bcudaHostAllocPortable\b/hipHostMallocPortable/g; - $ft{'define'} += s/\bcudaHostAllocWriteCombined\b/hipHostMallocWriteCombined/g; - $ft{'define'} += s/\bcudaHostRegisterDefault\b/hipHostRegisterDefault/g; - $ft{'define'} += s/\bcudaHostRegisterIoMemory\b/hipHostRegisterIoMemory/g; - $ft{'define'} += s/\bcudaHostRegisterMapped\b/hipHostRegisterMapped/g; - $ft{'define'} += s/\bcudaHostRegisterPortable\b/hipHostRegisterPortable/g; - $ft{'define'} += s/\bcudaIpcMemLazyEnablePeerAccess\b/hipIpcMemLazyEnablePeerAccess/g; - $ft{'define'} += s/\bcudaMemAttachGlobal\b/hipMemAttachGlobal/g; - $ft{'define'} += s/\bcudaMemAttachHost\b/hipMemAttachHost/g; - $ft{'define'} += s/\bcudaOccupancyDefault\b/hipOccupancyDefault/g; - $ft{'define'} += s/\bcudaStreamDefault\b/hipStreamDefault/g; - $ft{'define'} += s/\bcudaStreamNonBlocking\b/hipStreamNonBlocking/g; - $ft{'define'} += s/\bcudaTextureType1D\b/hipTextureType1D/g; - $ft{'define'} += s/\bcudaTextureType1DLayered\b/hipTextureType1DLayered/g; - $ft{'define'} += s/\bcudaTextureType2D\b/hipTextureType2D/g; - $ft{'define'} += s/\bcudaTextureType2DLayered\b/hipTextureType2DLayered/g; - $ft{'define'} += s/\bcudaTextureType3D\b/hipTextureType3D/g; - $ft{'define'} += s/\bcudaTextureTypeCubemap\b/hipTextureTypeCubemap/g; - $ft{'define'} += s/\bcudaTextureTypeCubemapLayered\b/hipTextureTypeCubemapLayered/g; -} - -# CUDA Kernel Launch Syntax -sub transformKernelLaunch { - no warnings qw/uninitialized/; - my $k = 0; - - # Handle the kern<...><<>>() syntax with empty args: - $k += s/([:|\w]+)\s*<(.+)>\s*<<<\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*>>>(\s*)\((\s*)\)/hipLaunchKernelGGL(HIP_KERNEL_NAME($1<$2>), dim3($3), dim3($4), $5, $6)/g; - # Handle the kern<<>>() syntax with empty args: - $k += s/([:|\w]+)\s*<<<\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*>>>(\s*)\((\s*)\)/hipLaunchKernelGGL($1, dim3($2), dim3($3), $4, $5)/g; - - # Handle the kern<...><<>>(...) syntax with non-empty args: - $k += s/([:|\w]+)\s*<(.+)>\s*<<<\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*>>>(\s*)\(/hipLaunchKernelGGL(HIP_KERNEL_NAME($1<$2>), dim3($3), dim3($4), $5, $6, /g; - # Handle the kern<<>>(...) syntax with non-empty args: - $k += s/([:|\w]+)\s*<<<\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*>>>(\s*)\(/hipLaunchKernelGGL($1, dim3($2), dim3($3), $4, $5, /g; - - # Handle the kern<...><<>>() syntax with empty args: - $k += s/([:|\w]+)\s*<(.+)>\s*<<<\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*>>>(\s*)\((\s*)\)/hipLaunchKernelGGL(HIP_KERNEL_NAME($1<$2>), dim3($3), dim3($4), $5, 0)/g; - # Handle the kern<<>>() syntax with empty args: - $k += s/([:|\w]+)\s*<<<\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*>>>(\s*)\((\s*)\)/hipLaunchKernelGGL($1, dim3($2), dim3($3), $4, 0)/g; - - # Handle the kern<...><>>(...) syntax with non-empty args: - $k += s/([:|\w]+)\s*<(.+)>\s*<<<\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*>>>(\s*)\(/hipLaunchKernelGGL(HIP_KERNEL_NAME($1<$2>), dim3($3), dim3($4), $5, 0, /g; - # Handle the kern<<>>(...) syntax with non-empty args: - $k += s/([:|\w]+)\s*<<<\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*>>>(\s*)\(/hipLaunchKernelGGL($1, dim3($2), dim3($3), $4, 0, /g; - - # Handle the kern<...><<>>() syntax with empty args: - $k += s/([:|\w]+)\s*<(.+)>\s*<<<\s*(.+)\s*,\s*(.+)\s*>>>(\s*)\((\s*)\)/hipLaunchKernelGGL(HIP_KERNEL_NAME($1<$2>), dim3($3), dim3($4), 0, 0)/g; - # Handle the kern<<>>() syntax with empty args: - $k += s/([:|\w]+)\s*<<<\s*(.+)\s*,\s*(.+)\s*>>>(\s*)\((\s*)\)/hipLaunchKernelGGL($1, dim3($2), dim3($3), 0, 0)/g; - - # Handle the kern<...><<>>(...) syntax with non-empty args: - $k += s/([:|\w]+)\s*<(.+)>\s*<<<\s*(.+)\s*,\s*(.+)\s*>>>(\s*)\(/hipLaunchKernelGGL(HIP_KERNEL_NAME($1<$2>), dim3($3), dim3($4), 0, 0, /g; - # Handle the kern<<>>(...) syntax with non-empty args: - $k += s/([:|\w]+)\s*<<<\s*(.+)\s*,\s*(.+)\s*>>>(\s*)\(/hipLaunchKernelGGL($1, dim3($2), dim3($3), 0, 0, /g; - - if ($k) { - $ft{'kernel_launch'} += $k; - $Tkernels{$1}++; - } -} - -sub transformCubNamespace { - my $k = 0; - $k += s/using\s*namespace\s*cub/using namespace hipcub/g; - $k += s/\bcub::\b/hipcub::/g; - return $k; -} - -sub transformHostFunctions { - my $k = 0; - foreach $func ( - "hipMemcpyToSymbol", - "hipMemcpyToSymbolAsync" - ) - { - $k += s/(?\($2\),/g - } - foreach $func ( - "hipFuncGetAttributes" - ) - { - $k += s/(?\($3\)$4/g; - } - return $k; -} - -sub countSupportedDeviceFunctions { - my $k = 0; - foreach $func ( - "__brev", - "__brevll", - "__byte_perm", - "__clz", - "__clzll", - "__cosf", - "__double2int_rz", - "__double2ll_rz", - "__double2uint_rz", - "__double2ull_rz", - "__exp10f", - "__expf", - "__fadd_rd", - "__fadd_rn", - "__fadd_ru", - "__fadd_rz", - "__fdiv_rd", - "__fdiv_rn", - "__fdiv_ru", - "__fdiv_rz", - "__fdividef", - "__ffs", - "__ffsll", - "__float22half2_rn", - "__float2half", - "__float2half2_rn", - "__float2half_rd", - "__float2half_rn", - "__float2half_ru", - "__float2half_rz", - "__float2int_rd", - "__float2int_rn", - "__float2int_ru", - "__float2int_rz", - "__float2ll_rd", - "__float2ll_rn", - "__float2ll_ru", - "__float2ll_rz", - "__float2uint_rd", - "__float2uint_rn", - "__float2uint_ru", - "__float2uint_rz", - "__float2ull_rd", - "__float2ull_rn", - "__float2ull_ru", - "__float2ull_rz", - "__float_as_int", - "__float_as_uint", - "__floats2half2_rn", - "__fmaf_rd", - "__fmaf_rn", - "__fmaf_ru", - "__fmaf_rz", - "__fmul_rd", - "__fmul_rn", - "__fmul_ru", - "__fmul_rz", - "__frcp_rd", - "__frcp_rn", - "__frcp_ru", - "__frcp_rz", - "__frsqrt_rn", - "__fsqrt_rd", - "__fsqrt_rn", - "__fsqrt_ru", - "__fsqrt_rz", - "__fsub_rd", - "__fsub_rn", - "__fsub_ru", - "__fsub_rz", - "__h2div", - "__hadd", - "__hadd2", - "__hadd2_sat", - "__hadd_sat", - "__half22float2", - "__half2float", - "__half2half2", - "__half2int_rd", - "__half2int_rn", - "__half2int_ru", - "__half2int_rz", - "__half2ll_rd", - "__half2ll_rn", - "__half2ll_ru", - "__half2ll_rz", - "__half2short_rd", - "__half2short_rn", - "__half2short_ru", - "__half2short_rz", - "__half2uint_rd", - "__half2uint_rn", - "__half2uint_ru", - "__half2uint_rz", - "__half2ull_rd", - "__half2ull_rn", - "__half2ull_ru", - "__half2ull_rz", - "__half2ushort_rd", - "__half2ushort_rn", - "__half2ushort_ru", - "__half2ushort_rz", - "__half_as_short", - "__half_as_ushort", - "__halves2half2", - "__hbeq2", - "__hbequ2", - "__hbge2", - "__hbgeu2", - "__hbgt2", - "__hbgtu2", - "__hble2", - "__hbleu2", - "__hblt2", - "__hbltu2", - "__hbne2", - "__hbneu2", - "__hdiv", - "__heq", - "__heq2", - "__hequ", - "__hequ2", - "__hfma", - "__hfma2", - "__hfma2_sat", - "__hfma_sat", - "__hge", - "__hge2", - "__hgeu", - "__hgeu2", - "__hgt", - "__hgt2", - "__hgtu", - "__hgtu2", - "__high2float", - "__high2half", - "__high2half2", - "__highs2half2", - "__hisinf", - "__hisnan", - "__hisnan2", - "__hle", - "__hle2", - "__hleu", - "__hleu2", - "__hlt", - "__hlt2", - "__hltu", - "__hltu2", - "__hmul", - "__hmul2", - "__hmul2_sat", - "__hmul_sat", - "__hne", - "__hne2", - "__hneg", - "__hneg2", - "__hneu", - "__hneu2", - "__hsub", - "__hsub2", - "__hsub2_sat", - "__hsub_sat", - "__int2float_rd", - "__int2float_rn", - "__int2float_ru", - "__int2float_rz", - "__int2half_rn", - "__int2half_ru", - "__int2half_rz", - "__int_as_float", - "__ldca", - "__ldcg", - "__ldcs", - "__ldg", - "__ll2float_rd", - "__ll2float_rn", - "__ll2float_ru", - "__ll2float_rz", - "__ll2half_rd", - "__ll2half_rn", - "__ll2half_ru", - "__ll2half_rz", - "__log10f", - "__log2f", - "__logf", - "__low2float", - "__low2half", - "__low2half2", - "__lowhigh2highlow", - "__lows2half2", - "__mul24", - "__mul64hi", - "__mulhi", - "__popc", - "__popcll", - "__powf", - "__rhadd", - "__sad", - "__saturatef", - "__short2half_rd", - "__short2half_rn", - "__short2half_ru", - "__short2half_rz", - "__short_as_half", - "__sincosf", - "__sinf", - "__syncthreads", - "__tanf", - "__threadfence", - "__threadfence_block", - "__uhadd", - "__uint2float_rd", - "__uint2float_rn", - "__uint2float_ru", - "__uint2float_rz", - "__uint2half_rd", - "__uint2half_rn", - "__uint2half_ru", - "__uint2half_rz", - "__uint_as_float", - "__ull2float_rd", - "__ull2float_rn", - "__ull2float_ru", - "__ull2float_rz", - "__ull2half_rd", - "__ull2half_rn", - "__ull2half_ru", - "__ull2half_rz", - "__umul24", - "__umul64hi", - "__umulhi", - "__urhadd", - "__usad", - "__ushort2half_rd", - "__ushort2half_rn", - "__ushort2half_ru", - "__ushort2half_rz", - "__ushort_as_half", - "abs", - "acos", - "acosf", - "acosh", - "acoshf", - "asin", - "asinf", - "asinh", - "asinhf", - "atan", - "atan2", - "atan2f", - "atanf", - "atanh", - "atanhf", - "atomicAdd", - "atomicAnd", - "atomicCAS", - "atomicDec", - "atomicExch", - "atomicInc", - "atomicMax", - "atomicMin", - "atomicOr", - "atomicSub", - "atomicXor", - "cbrt", - "cbrtf", - "ceil", - "ceilf", - "copysign", - "copysignf", - "cos", - "cosf", - "cosh", - "coshf", - "cospi", - "cospif", - "cyl_bessel_i0", - "cyl_bessel_i0f", - "cyl_bessel_i1", - "cyl_bessel_i1f", - "erf", - "erfc", - "erfcf", - "erfcinv", - "erfcinvf", - "erfcx", - "erfcxf", - "erff", - "erfinv", - "erfinvf", - "exp", - "exp10", - "exp10f", - "exp2", - "exp2f", - "expf", - "expm1", - "expm1f", - "fabs", - "fabsf", - "fdim", - "fdimf", - "fdivide", - "fdividef", - "floor", - "floorf", - "fma", - "fmaf", - "fmax", - "fmaxf", - "fmin", - "fminf", - "fmod", - "fmodf", - "frexp", - "frexpf", - "h2ceil", - "h2cos", - "h2exp", - "h2exp10", - "h2exp2", - "h2floor", - "h2log", - "h2log10", - "h2log2", - "h2rcp", - "h2rint", - "h2rsqrt", - "h2sin", - "h2sqrt", - "h2trunc", - "hceil", - "hcos", - "hexp", - "hexp10", - "hexp2", - "hfloor", - "hlog", - "hlog10", - "hlog2", - "hrcp", - "hrint", - "hrsqrt", - "hsin", - "hsqrt", - "htrunc", - "hypot", - "hypotf", - "ilogb", - "ilogbf", - "isfinite", - "isinf", - "isnan", - "j0", - "j0f", - "j1", - "j1f", - "jn", - "jnf", - "labs", - "ldexp", - "ldexpf", - "lgamma", - "lgammaf", - "llabs", - "llrint", - "llrintf", - "llround", - "llroundf", - "log", - "log10", - "log10f", - "log1p", - "log1pf", - "log2", - "log2f", - "logb", - "logbf", - "logf", - "lrint", - "lrintf", - "lround", - "lroundf", - "max", - "min", - "modf", - "modff", - "nan", - "nanf", - "nearbyint", - "nearbyintf", - "nextafter", - "nextafterf", - "norm", - "norm3d", - "norm3df", - "norm4d", - "norm4df", - "normcdf", - "normcdff", - "normcdfinv", - "normcdfinvf", - "normf", - "pow", - "powf", - "rcbrt", - "rcbrtf", - "remainder", - "remainderf", - "remquo", - "remquof", - "rhypot", - "rhypotf", - "rint", - "rintf", - "rnorm", - "rnorm3d", - "rnorm3df", - "rnorm4d", - "rnorm4df", - "rnormf", - "round", - "roundf", - "rsqrt", - "rsqrtf", - "scalbln", - "scalblnf", - "scalbn", - "scalbnf", - "signbit", - "sin", - "sincos", - "sincosf", - "sincospi", - "sincospif", - "sinf", - "sinh", - "sinhf", - "sinpi", - "sinpif", - "sqrt", - "sqrtf", - "tan", - "tanf", - "tanh", - "tanhf", - "tgamma", - "tgammaf", - "trunc", - "truncf", - "y0", - "y0f", - "y1", - "y1f", - "yn", - "ynf" - ) - { - # match device function from the list, except those, which have a namespace prefix (aka somenamespace::umin(...)); - # function with only global namespace qualifier '::' (aka ::umin(...)) should be treated as a device function (and warned as well as without such qualifier); - my $mt_namespace = m/(\w+)::($func)\s*\(\s*.*\s*\)/g; - my $mt = m/($func)\s*\(\s*.*\s*\)/g; - if ($mt && !$mt_namespace) { - $k += $mt; - } - } - return $k; -} - -sub warnUnsupportedDeviceFunctions { - my $line_num = shift; - my $k = 0; - foreach $func ( - "_Pow_int", - "__brkpt", - "__finite", - "__finitef", - "__finitel", - "__habs", - "__habs2", - "__isinf", - "__isinff", - "__isinfl", - "__isnan", - "__isnanf", - "__isnanl", - "__pm0", - "__pm1", - "__pm2", - "__pm3", - "__prof_trigger", - "__shfl_down_sync", - "__shfl_sync", - "__shfl_up_sync", - "__shfl_xor_sync", - "__signbit", - "__signbitf", - "__signbitl", - "__trap", - "__vabs2", - "__vabs4", - "__vabsdiffs2", - "__vabsdiffs4", - "__vabsdiffu2", - "__vabsdiffu4", - "__vabsss2", - "__vabsss4", - "__vadd2", - "__vadd4", - "__vaddss2", - "__vaddss4", - "__vaddus2", - "__vaddus4", - "__vavgs2", - "__vavgs4", - "__vavgu2", - "__vavgu4", - "__vcmpeq2", - "__vcmpeq4", - "__vcmpges2", - "__vcmpges4", - "__vcmpgeu2", - "__vcmpgeu4", - "__vcmpgts2", - "__vcmpgts4", - "__vcmpgtu2", - "__vcmpgtu4", - "__vcmples2", - "__vcmples4", - "__vcmpleu4", - "__vcmplts2", - "__vcmplts4", - "__vcmpltu2", - "__vcmpltu4", - "__vcmpne2", - "__vcmpne4", - "__vhaddu2", - "__vhaddu4", - "__vmaxs2", - "__vmaxs4", - "__vmaxu2", - "__vmaxu4", - "__vmins2", - "__vmins4", - "__vminu2", - "__vminu4", - "__vneg2", - "__vneg4", - "__vnegss2", - "__vnegss4", - "__vsads2", - "__vsads4", - "__vsadu2", - "__vsadu4", - "__vseteq2", - "__vseteq4", - "__vsetges2", - "__vsetges4", - "__vsetgeu2", - "__vsetgeu4", - "__vsetgts2", - "__vsetgts4", - "__vsetgtu4", - "__vsetles2", - "__vsetles4", - "__vsetleu2", - "__vsetleu4", - "__vsetlts2", - "__vsetlts4", - "__vsetltu2", - "__vsetltu4", - "__vsetne2", - "__vsetne4", - "__vsub2", - "__vsub4", - "__vsubss2", - "__vsubss4", - "__vsubus2", - "__vsubus4", - "_fdsign", - "_ldsign", - "float2int", - "float_as_int", - "float_as_uint", - "int2float", - "int_as_float", - "llmax", - "llmin", - "mul24", - "mul64hi", - "mulhi", - "saturate", - "uint2float", - "uint_as_float", - "ullmax", - "ullmin", - "umax", - "umin", - "umul24" - ) - { - # match device function from the list, except those, which have a namespace prefix (aka somenamespace::umin(...)); - # function with only global namespace qualifier '::' (aka ::umin(...)) should be treated as a device function (and warned as well as without such qualifier); - my $mt_namespace = m/(\w+)::($func)\s*\(\s*.*\s*\)/g; - my $mt = m/($func)\s*\(\s*.*\s*\)/g; - if ($mt && !$mt_namespace) { - $k += $mt; - print STDERR " warning: $fileName:$line_num: unsupported device function \"$func\": $_\n"; - } - } - return $k; -} - -# Count of transforms in all files -my %tt; -clearStats(\%tt, \@statNames); -$Twarnings = 0; -$TlineCount = 0; -my %TwarningTags; -my $fileCount = @ARGV; - -while (@ARGV) { - $fileName=shift (@ARGV); - if ($inplace) { - my $file_prehip = "$fileName" . ".prehip"; - my $infile; - my $outfile; - if (-e $file_prehip) { - $infile = $file_prehip; - $outfile = $fileName; - } else { - system ("cp $fileName $file_prehip"); - $infile = $file_prehip; - $outfile = $fileName; - } - open(INFILE,"<", $infile) or die "error: could not open $infile"; - open(OUTFILE,">", $outfile) or die "error: could not open $outfile"; - $OUTFILE = OUTFILE; - } else { - open(INFILE,"<", $fileName) or die "error: could not open $fileName"; - $OUTFILE = STDOUT; - } - # Count of transforms in this file - clearStats(\%ft, \@statNames); - my $countIncludes = 0; - my $countKeywords = 0; - my $warnings = 0; - my %warningTags; - my $lineCount = 0; - undef $/; - # Read whole file at once, so we can match newlines - while () { - $countKeywords += m/__global__/; - $countKeywords += m/__shared__/; - simpleSubstitutions(); - transformKernelLaunch(); - transformCubNamespace(); - if ($print_stats) { - while (/(\b(hip|HIP)([A-Z]|_)\w+\b)/g) { - $convertedTags{$1}++; - } - } - my $hasDeviceCode = $countKeywords + $ft{'device_function'}; - unless ($quiet_warnings) { - # Copy into array of lines, process line-by-line to show warnings - if ($hasDeviceCode or (/\bcu|CU/) or (/<<<.*>>>/)) { - my @lines = split /\n/, $_; - # Copy the whole file - my $tmp = $_; - my $line_num = 0; - foreach (@lines) { - $line_num++; - # Remove any whitelisted words - foreach $w (@whitelist) { - s/\b$w\b/ZAP/ - } - my $tag; - if ((/(\bcuda[A-Z]\w+)/) or (/<<<.*>>>/)) { - # Flag any remaining code that look like cuda API calls: may want to add these to hipify - $tag = (defined $1) ? $1 : "Launch"; - } - if (defined $tag) { - $warnings++; - $warningTags{$tag}++; - print STDERR " warning: $fileName:#$line_num : $_\n"; - } - $s = warnUnsupportedDeviceFunctions($line_num); - $warnings += $s; - } - $_ = $tmp; - } - } - if ($hasDeviceCode > 0) { - $ft{'device_function'} += countSupportedDeviceFunctions(); - } - transformHostFunctions(); - # TODO: would like to move this code outside loop but it uses $_ which contains the whole file - unless ($no_output) { - my $apiCalls = $ft{'error'} + $ft{'init'} + $ft{'version'} + $ft{'device'} + $ft{'context'} + $ft{'module'} + $ft{'memory'} + $ft{'virtual_memory'} + $ft{'addressing'} + $ft{'stream'} + $ft{'event'} + $ft{'external_resource_interop'} + $ft{'stream_memory'} + $ft{'execution'} + $ft{'graph'} + $ft{'occupancy'} + $ft{'texture'} + $ft{'surface'} + $ft{'peer'} + $ft{'graphics'} + $ft{'profiler'} + $ft{'openGL'} + $ft{'D3D9'} + $ft{'D3D10'} + $ft{'D3D11'} + $ft{'VDPAU'} + $ft{'EGL'} + $ft{'thread'} + $ft{'complex'} + $ft{'library'} + $ft{'device_library'} + $ft{'include'} + $ft{'include_cuda_main_header'} + $ft{'type'} + $ft{'literal'} + $ft{'numeric_literal'} + $ft{'define'}; - my $kernStuff = $hasDeviceCode + $ft{'kernel_launch'} + $ft{'device_function'}; - my $totalCalls = $apiCalls + $kernStuff; - $is_dos = m/\r\n$/; - if ($totalCalls and ($countIncludes == 0) and ($kernStuff != 0)) { - # TODO: implement hipify-clang's logic with header files AMAP - print $OUTFILE '#include "hip/hip_runtime.h"' . ($is_dos ? "\r\n" : "\n"); - } - print $OUTFILE "$_"; - } - $lineCount = $_ =~ tr/\n//; - } - my $totalConverted = totalStats(\%ft); - if (($totalConverted+$warnings) and $print_stats) { - printStats(" info: converted", \@statNames, \%ft, $warnings, $lineCount); - print STDERR " in '$fileName'\n"; - } - # Update totals for all files - addStats(\%tt, \%ft); - $Twarnings += $warnings; - $TlineCount += $lineCount; - foreach $key (keys %warningTags) { - $TwarningTags{$key} += $warningTags{$key}; - } -} -# Print total stats for all files processed: -if ($print_stats and ($fileCount > 1)) { - print STDERR "\n"; - printStats(" info: TOTAL-converted", \@statNames, \%tt, $Twarnings, $TlineCount); - print STDERR "\n"; - foreach my $key (sort { $TwarningTags{$b} <=> $TwarningTags{$a} } keys %TwarningTags) { - printf STDERR " warning: unconverted %s : %d\n", $key, $TwarningTags{$key}; - } - my $kernelCnt = keys %Tkernels; - printf STDERR " kernels (%d total) : ", $kernelCnt; - foreach my $key (sort { $Tkernels{$b} <=> $Tkernels{$a} } keys %Tkernels) { - printf STDERR " %s(%d)", $key, $Tkernels{$key}; - } - print STDERR "\n\n"; -} -if ($print_stats) { - foreach my $key (sort { $convertedTags{$b} <=> $convertedTags{$a} } keys %convertedTags) { - printf STDERR " %s %d\n", $key, $convertedTags{$key}; - } -} diff --git a/projects/clr/hipamd/bin/hipvars.pm b/projects/clr/hipamd/bin/hipvars.pm deleted file mode 100644 index ad51505fe3..0000000000 --- a/projects/clr/hipamd/bin/hipvars.pm +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/bin/perl -w -# Copyright (c) 2020-2021 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. - -package hipvars; -use Getopt::Long; -use Cwd; -use File::Basename; - -$HIP_BASE_VERSION_MAJOR = "4"; -$HIP_BASE_VERSION_MINOR = "2"; - -#--- -# Function to parse config file -sub parse_config_file { - my ($file, $config) = @_; - if (open (CONFIG, "$file")) { - while () { - my $config_line=$_; - chop ($config_line); - $config_line =~ s/^\s*//; - $config_line =~ s/\s*$//; - if (($config_line !~ /^#/) && ($config_line ne "")) { - my ($name, $value) = split (/=/, $config_line); - $$config{$name} = $value; - } - } - close(CONFIG); - } -} - -#--- -# Function to check if executable can be run -sub can_run { - my ($exe) = @_; - `$exe --version 2>&1`; - if ($? == 0) { - return 1; - } else { - return 0; - } -} - -$isWindows = $^O eq 'MSWin32'; - -# -# TODO: Fix rpath LDFLAGS settings -# -# Since this hipcc script gets installed at two uneven hierarchical levels, -# linked by symlink, the absolute path of this script should be used to -# derive HIP_PATH, as dirname $0 could be /opt/rocm/bin or /opt/rocm/hip/bin -# depending on how it gets invoked. -# ROCM_PATH which points to is determined based on whether -# we find bin/rocm_agent_enumerator in the parent of HIP_PATH or not. If it is found, -# ROCM_PATH is defined relative to HIP_PATH else it is hardcoded to /opt/rocm. -# -$HIP_PATH=$ENV{'HIP_PATH'} // dirname(Cwd::abs_path("$0/../")); # use parent directory of hipcc -if (-e "$HIP_PATH/../bin/rocm_agent_enumerator") { - $ROCM_PATH=$ENV{'ROCM_PATH'} // dirname("$HIP_PATH"); # use parent directory of HIP_PATH -} else { - $ROCM_PATH=$ENV{'ROCM_PATH'} // "/opt/rocm"; -} -$CUDA_PATH=$ENV{'CUDA_PATH'} // '/usr/local/cuda'; -$HSA_PATH=$ENV{'HSA_PATH'} // "$ROCM_PATH/hsa"; - -# Windows has a different structure, all binaries are inside hip/bin -if ($isWindows) { - $HIP_CLANG_PATH=$ENV{'HIP_CLANG_PATH'} // "$HIP_PATH/bin"; -} else { - $HIP_CLANG_PATH=$ENV{'HIP_CLANG_PATH'} // "$ROCM_PATH/llvm/bin"; -} -# HIP_ROCCLR_HOME is used by Windows builds -$HIP_ROCCLR_HOME=$ENV{'HIP_ROCCLR_HOME'}; - -if (defined $HIP_ROCCLR_HOME) { - $HIP_INFO_PATH= "$HIP_ROCCLR_HOME/lib/.hipInfo"; -} else { - $HIP_INFO_PATH= "$HIP_PATH/lib/.hipInfo"; # use actual file -} -#--- -#HIP_PLATFORM controls whether to use nvidia or amd platform: -$HIP_PLATFORM=$ENV{'HIP_PLATFORM'}; -# Read .hipInfo -my %hipInfo = (); -parse_config_file("$HIP_INFO_PATH", \%hipInfo); -# Prioritize Env first, otherwise use the hipInfo config file -$HIP_COMPILER = $ENV{'HIP_COMPILER'} // $hipInfo{'HIP_COMPILER'} // "clang"; -$HIP_RUNTIME = $ENV{'HIP_RUNTIME'} // $hipInfo{'HIP_RUNTIME'} // "rocclr"; - -# If using ROCclr runtime, need to find HIP_ROCCLR_HOME -if (defined $HIP_RUNTIME and $HIP_RUNTIME eq "rocclr" and !defined $HIP_ROCCLR_HOME) { - my $hipvars_dir = dirname($0); - if (-e "$hipvars_dir/../lib/bitcode") { - $HIP_ROCCLR_HOME = Cwd::abs_path($hipvars_dir . "/.."); - } else { - $HIP_ROCCLR_HOME = $HIP_PATH; # use HIP_PATH - } -} - -if (not defined $HIP_PLATFORM) { - if (can_run("$HIP_CLANG_PATH/clang++") or can_run("clang++")) { - $HIP_PLATFORM = "amd"; - } elsif (can_run("$CUDA_PATH/bin/nvcc") or can_run("nvcc")) { - $HIP_PLATFORM = "nvidia"; - $HIP_COMPILER = "nvcc"; - $HIP_RUNTIME = "cuda"; - } else { - # Default to amd for now - $HIP_PLATFORM = "amd"; - } -} elsif ($HIP_PLATFORM eq "hcc") { - $HIP_PLATFORM = "amd"; - warn("Warning: HIP_PLATFORM=hcc is deprecated. Please use HIP_PLATFORM=amd. \n") -} elsif ($HIP_PLATFORM eq "nvcc") { - $HIP_PLATFORM = "nvidia"; - $HIP_COMPILER = "nvcc"; - $HIP_RUNTIME = "cuda"; - warn("Warning: HIP_PLATFORM=nvcc is deprecated. Please use HIP_PLATFORM=nvidia. \n") -} - -if ($HIP_COMPILER eq "clang") { - # Windows does not have clang at linux default path - if (defined $HIP_ROCCLR_HOME and (-e "$HIP_ROCCLR_HOME/bin/clang" or -e "$HIP_ROCCLR_HOME/bin/clang.exe")) { - $HIP_CLANG_PATH = "$HIP_ROCCLR_HOME/bin"; - } -} - -#--- -# Read .hipVersion -my %hipVersion = (); -parse_config_file("$hipvars::HIP_PATH/bin/.hipVersion", \%hipVersion); -$HIP_VERSION_MAJOR = $hipVersion{'HIP_VERSION_MAJOR'} // $HIP_BASE_VERSION_MAJOR; -$HIP_VERSION_MINOR = $hipVersion{'HIP_VERSION_MINOR'} // $HIP_BASE_VERSION_MINOR; -$HIP_VERSION_PATCH = $hipVersion{'HIP_VERSION_PATCH'} // "0"; -$HIP_VERSION="$HIP_VERSION_MAJOR.$HIP_VERSION_MINOR.$HIP_VERSION_PATCH"; diff --git a/projects/clr/hipamd/bin/roc-obj-extract b/projects/clr/hipamd/bin/roc-obj-extract deleted file mode 100755 index d43e356d7d..0000000000 --- a/projects/clr/hipamd/bin/roc-obj-extract +++ /dev/null @@ -1,229 +0,0 @@ -#!/usr/bin/perl -# Copyright (c) 2020-2021 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. - -use strict; -use File::Copy; -use File::Spec; -use File::Basename; -use File::Which; -use Cwd 'realpath'; -use Getopt::Std; -use List::Util qw(max); -use URI::Encode; - -my $extract_range_specifier; -my $extract_pid; -my $extract_file; -my $output_file; -my $output_path; -my $extract_offset; -my $extract_size; -my $pid_running; -my $verbose=0; -my $error=0; -my $output_to_stdout=0; - -sub usage { - print("Usage: $0 [-o|v|h] URI... \n"); - print(" URIs can be read from STDIN, one per line.\n"); - print(" From the URIs specified, extracts code objects into files named: "); - print("-[pid]-offset-size.co\n\n"); - print("Options:\n"); - print(" -o \tPath for output. If \"-\" specified, code object is printed to STDOUT.\n"); - print(" -v \tVerbose output to STDOUT (includes Entry ID).\n"); - print(" -h \tShow this help message.\n"); - print("\nURI syntax:\n"); - print("\tcode_object_uri ::== file_uri | memory_uri\n"); - print("\tfile_uri ::== \"file://\" extract_file [ range_specifier ]\n"); - print("\tmemory_uri ::== \"memory://\" process_id range_specifier\n"); - print("\trange_specifier ::== [ \"#\" | \"?\" ] \"offset=\" number \"&\" \"size=\" number\n"); - print("\textract_file ::== URI_ENCODED_OS_FILE_PATH\n"); - print("\tprocess_id ::== DECIMAL_NUMBER\n"); - print("\tnumber ::== HEX_NUMBER \| DECIMAL_NUMBER \| OCTAL_NUMBER\n\n"); - print("\tExample: file://dir1/dir2/hello_world#offset=133&size=14472 \n"); - print("\t memory://1234#offset=0x20000&size=3000\n\n"); - - exit($error); -} - -# Process options -my %options=(); -getopts('vho:', \%options); - -if (defined $options{h}) { - usage(); -} - -if (defined $options{v}) { - $verbose = 1; -} - -if (defined $options{o}) { - $output_path = $options{o}; - if ($output_path eq "-") { - $output_to_stdout=1; - } else { - (-d $output_path) || die("Error: Path \'$output_path\' cannot be found.\n"); - } -} - -# push STDIN to ARGV array. -push @ARGV, unless -t STDIN; - -# error check: enough arguments presented. -if ($#ARGV < 0) { - print(STDERR "Error: No arguments.\n"); $error++; - usage(); -} - -# error check: command dd is available. -my $dd_cmd = which("dd"); -(-f $dd_cmd) || die("Error: Can't find dd command\n"); - -foreach my $uri_str(@ARGV) { - chomp $uri_str; - - # we expect the URI to follow this BNF syntax: - # - # code_object_uri ::== file_uri | memory_uri - # file_uri ::== "file://" extract_file [ range_specifier ] - # memory_uri ::== "memory://" process_id range_specifier - # range_specifier ::== [ "#" | "?" ] "offset=" number "&" "size=" number - # extract_file ::== URI_ENCODED_OS_FILE_PATH - # process_id ::== DECIMAL_NUMBER - # number ::== HEX_NUMBER | DECIMAL_NUMBER | OCTAL_NUMBER - - # Example: file://dir1/dir2/hello_world#offset=133&size=14472 - # memory://1234#offset=0x20000&size=3000 - - my ($uri_protocol, $specs) = split(/:\/\//,$uri_str); - my $obj_uri_encode = URI::Encode->new(); - my $decoded_extract_file; - - if (lc($uri_protocol) eq "file") { - # expect file path - ($extract_file, $extract_range_specifier) = split(/[#,?]/,$specs); - - # decode the file name. URIs may have file/path names with non-alphanumeric characters, which will be encoded with %. We need to decode these. - $decoded_extract_file = $obj_uri_encode->decode($extract_file); - - # verify file exists: - if (! -e $decoded_extract_file) { - print(STDERR "Error: can't find file: $decoded_extract_file\n"); $error++; - next; - } - - # use the output_path is specified, otherwise use current working dir. - if ($output_path ne "") { - $output_file = File::Spec->catfile($output_path, basename($decoded_extract_file)); - } else { - $output_file = basename($decoded_extract_file); - } - - } elsif ( lc($uri_protocol) eq "memory") { - # expect memory specifier - ($extract_pid, $extract_range_specifier) = split(/[#,?]/,$specs); - - # verify pid is currently running - $pid_running = kill 0, $extract_pid; - if (! $pid_running) { - print(STDERR "Error: PID: $extract_pid is NOT running\n"); $error++; - next; - } - - # get pid filename: - $extract_file = "/proc/$extract_pid/mem"; - - # verify file exists: - if (! -e $extract_file) { - print(STDERR "Error: can't find file: $extract_file\n"); $error++; - next; - } - - # for extracting from a pid, make the output file in the current dir/path with the pid value as a name. - $output_file = "pid${extract_pid}"; - - # need to set $decoded_extract_file, because later we use this for other checks. - $decoded_extract_file = $extract_file; - - } else { - # error, unrecognized Code Object URI - print(STDERR "Error: \'$uri_protocol\' is not recognized as a supported code object URI.\n"); $error++; - next; - } - - # it is valid to not give a range specifier in a URI, in which case the entire code object will be extracted. - if ($extract_range_specifier ne "") { - ($extract_offset, $extract_size) = split(/[&]/,$extract_range_specifier); - (undef, $extract_offset) = split(/=/,$extract_offset); - (undef, $extract_size) = split(/=/,$extract_size); - } else { - # Error if URI is a memory request, and we have no range_specifier. - if ($pid_running) { - print(STDERR "Error: must specify a Range Specifier (offset and size) for a memory URI: $uri_str\n"); $error++; - next; - } - - $extract_offset = 0; - $extract_size = -s $decoded_extract_file; - } - - # We should have at least a valid size to extract; ignore cases with size=0. - if ($extract_size != 0) { - print("Reading input file \"$extract_file\" ...\n") if ($verbose); - - # only if this is a File URI. - if (lc($uri_protocol) eq "file") { - # verify that offset+size does not exceed file size: - my $file_size = -s $decoded_extract_file; - my $size = int($extract_offset) + int($extract_size); - if ( $size > $file_size ) { - print(STDERR "Error: requested offset($extract_offset) + size($extract_size) exceeds file size($file_size) for file \"$decoded_extract_file\".\n"); $error++; - next; - } - } - - open(INPUT_FP, "<", $decoded_extract_file) || die $!; - binmode INPUT_FP; - - # extract the code object - my $co_filename; - if (!$output_to_stdout) { - $co_filename = "of=\'${output_file}-offset${extract_offset}-size${extract_size}.co\'"; - } - - my $dd_cmd_str = "$dd_cmd if=\'$decoded_extract_file\' $co_filename skip=$extract_offset count=$extract_size bs=1 status=none"; - - print("DD Command: $dd_cmd_str\n") if ($verbose); - - my $dd_ret = system($dd_cmd_str); - if ($dd_ret != 0) { - print(STDERR "Error: DD command ($dd_cmd_str) failed with RC: $dd_ret\n"); $error++; - } - - print("Extract request: file: $extract_file offset: $extract_offset size: $extract_size\n") if ($verbose); - } else { - print("Warning: trying to extract from $extract_file at offset=$extract_offset with size=0. Nothing to extract.\n") if ($verbose); - } - -} # end of for each (URI) argument - -exit($error); diff --git a/projects/clr/hipamd/bin/roc-obj-ls b/projects/clr/hipamd/bin/roc-obj-ls deleted file mode 100755 index cfc34c7a4b..0000000000 --- a/projects/clr/hipamd/bin/roc-obj-ls +++ /dev/null @@ -1,156 +0,0 @@ -#!/usr/bin/perl -# Copyright (c) 2020-2021 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. - -use strict; -use File::Copy; -use File::Spec; -use File::Basename; -use File::Which; -use Cwd 'realpath'; -use Getopt::Std; -use List::Util qw(max); -use URI::Encode; - -sub usage { - print("Usage: $0 [-v|h] executable...\n"); - print("List the URIs of the code objects embedded in the specfied host executables.\n"); - print("-v \tVerbose output (includes Entry ID)\n"); - print("-h \tShow this help message\n"); - exit; -} - -# sub to read a qword. 1st arg is a FP, 2nd arg is ref to destination var. -sub readq { - my ($input_fp, $qword) = @_; - read($input_fp, my $bytes, 8) == 8 or die("Error: Failed to read 8 bytes\n"); - ${$qword} = unpack("Q<", $bytes); -} - -# Process options -my %options=(); -getopts('vhd', \%options); - -if (defined $options{h}) { - usage(); -} - -my $verbose = $options{v}; -my $debug = $options{d}; - -# look for objdump -my $objdump = which("objdump"); -(-f $objdump) || die("Error: Can't find objdump command\n"); - -# for each argument (which should be an executable): -foreach my $executable_file(@ARGV) { - - # debug message - print("Reading input file \"$executable_file\" ...\n") if ($debug); - - # verify/open file specified. - open (INPUT_FP, "<", $executable_file) || die("Error: failed to open file: $executable_file\n"); - binmode INPUT_FP; - - # kernel section information - my $escaped_name=quotemeta($executable_file); - my $bundle_section_name = ".hip_fatbin"; - my $bundle_section_size = hex(`$objdump -h $escaped_name | grep $bundle_section_name | awk '{print \$3}'`); - my $bundle_section_offset = hex(`$objdump -h $escaped_name | grep $bundle_section_name | awk '{print \$6}'`); - - $bundle_section_size or die("Error: No kernel section found\n"); - - my $bundle_section_end = $bundle_section_offset + $bundle_section_size; - - if ($debug) { - print "Code Objects Bundle section size: $bundle_section_size\n"; - print "Code Objects Bundle section offset: $bundle_section_offset\n"; - print "Code Objects Bundle section end: $bundle_section_end\n"; - } - - my $current_bundle_offset = $bundle_section_offset; - print "Current Bundle offset: $current_bundle_offset\n" if ($debug); - - # move fp to current_bundle_offset. - seek(INPUT_FP, $current_bundle_offset, 0); - - # skip OFFLOAD_BUNDLER_MAGIC_STR - my $magic_str; - my $read_bytes = read(INPUT_FP, $magic_str, 24); - if (($read_bytes != 24) || ($magic_str ne "__CLANG_OFFLOAD_BUNDLE__")) { - print(STDERR "Error: Offload bundle magic string not detected\n") if ($debug); - last; - } - - # read number of bundle entries, which are code objects. - my $num_codeobjects; - readq(\*INPUT_FP,\$num_codeobjects); - # $num_codeobjects = unpack("Q<", $num_codeobjects); - - # Listing - print "Bundle of $num_codeobjects HIP Code Objects:\n" if ($verbose); - - # strings for creating new files - my $file_co_number = sprintf("%03d", $num_codeobjects); - my $filename_prefix = "${executable_file}-${file_co_number}"; - - print("Entry ID:\t\t\tURI:\n") if ($verbose); - - # for each Bundle entry (code object) .... - for (my $iter = 0; $iter < $num_codeobjects; $iter++) { - - # read bundle entry (code object) offset - my $entry_offset; - my $abs_offset; - readq(*INPUT_FP,\$entry_offset); - print("entry_offset: $entry_offset\n") if $debug; - - # read bundle entry (code object) size - my $entry_size; - readq(*INPUT_FP,\$entry_size); - print("entry_size: $entry_size\n") if $debug; - - # read triple size - my $triple_size; - readq(*INPUT_FP,\$triple_size); - print("triple_size: $triple_size\n") if $debug; - - # read triple string - my $triple; - my $read_bytes = read(INPUT_FP, $triple, $triple_size); - $read_bytes == $triple_size or die("Error: Fail to parse triple\n"); - print("triple: $triple\n") if $debug; - - # because the bundle entry's offset is relative to the beginning of the bundled code object section. - $abs_offset = int($entry_offset) + $bundle_section_offset; - - my $obj_uri_encode = URI::Encode->new(); - my $encoded_executable_file = $obj_uri_encode->encode($executable_file); - - if ($verbose) { - print(STDOUT "$triple\tfile:\/\/$encoded_executable_file#offset=$abs_offset\&size=$entry_size\n"); - } else { - print(STDOUT "file:\/\/$encoded_executable_file#offset=$abs_offset\&size=$entry_size\n"); - } - - } # End of for each Bundle entry (code object) ... -} # End of for each command line argument - -exit(0); diff --git a/projects/clr/hipamd/cmake/FindHIP.cmake b/projects/clr/hipamd/cmake/FindHIP.cmake deleted file mode 100644 index 7e391bf240..0000000000 --- a/projects/clr/hipamd/cmake/FindHIP.cmake +++ /dev/null @@ -1,714 +0,0 @@ -# Copyright (C) 2016-2021 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. - -############################################################################### -# FindHIP.cmake -############################################################################### -include(CheckCXXCompilerFlag) -############################################################################### -# SET: Variable defaults -############################################################################### -# User defined flags -set(HIP_HIPCC_FLAGS "" CACHE STRING "Semicolon delimited flags for HIPCC") -set(HIP_CLANG_FLAGS "" CACHE STRING "Semicolon delimited flags for CLANG") -set(HIP_NVCC_FLAGS "" CACHE STRING "Semicolon delimted flags for NVCC") -mark_as_advanced(HIP_HIPCC_FLAGS HIP_CLANG_FLAGS HIP_NVCC_FLAGS) - -set(_hip_configuration_types ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE} Debug MinSizeRel Release RelWithDebInfo) -list(REMOVE_DUPLICATES _hip_configuration_types) -foreach(config ${_hip_configuration_types}) - string(TOUPPER ${config} config_upper) - set(HIP_HIPCC_FLAGS_${config_upper} "" CACHE STRING "Semicolon delimited flags for HIPCC") - set(HIP_CLANG_FLAGS_${config_upper} "" CACHE STRING "Semicolon delimited flags for CLANG") - set(HIP_NVCC_FLAGS_${config_upper} "" CACHE STRING "Semicolon delimited flags for NVCC") - mark_as_advanced(HIP_HIPCC_FLAGS_${config_upper} HIP_CLANG_FLAGS_${config_upper} HIP_NVCC_FLAGS_${config_upper}) -endforeach() -option(HIP_HOST_COMPILATION_CPP "Host code compilation mode" ON) -option(HIP_VERBOSE_BUILD "Print out the commands run while compiling the HIP source file. With the Makefile generator this defaults to VERBOSE variable specified on the command line, but can be forced on with this option." OFF) -mark_as_advanced(HIP_HOST_COMPILATION_CPP) - -############################################################################### -# FIND: HIP and associated helper binaries -############################################################################### - -get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../" REALPATH) - -# HIP is supported on Linux only -if(UNIX AND NOT APPLE AND NOT CYGWIN) - # Search for HIP installation - if(NOT HIP_ROOT_DIR) - # Search in user specified path first - find_path( - HIP_ROOT_DIR - NAMES bin/hipconfig - PATHS - "$ENV{ROCM_PATH}/hip" - ENV HIP_PATH - ${_IMPORT_PREFIX} - /opt/rocm/hip - DOC "HIP installed location" - NO_DEFAULT_PATH - ) - if(NOT EXISTS ${HIP_ROOT_DIR}) - if(HIP_FIND_REQUIRED) - message(FATAL_ERROR "Specify HIP_ROOT_DIR") - elseif(NOT HIP_FIND_QUIETLY) - message("HIP_ROOT_DIR not found or specified") - endif() - endif() - # And push it back to the cache - set(HIP_ROOT_DIR ${HIP_ROOT_DIR} CACHE PATH "HIP installed location" FORCE) - endif() - - # Find HIPCC executable - find_program( - HIP_HIPCC_EXECUTABLE - NAMES hipcc - PATHS - "${HIP_ROOT_DIR}" - ENV ROCM_PATH - ENV HIP_PATH - /opt/rocm - /opt/rocm/hip - PATH_SUFFIXES bin - NO_DEFAULT_PATH - ) - if(NOT HIP_HIPCC_EXECUTABLE) - # Now search in default paths - find_program(HIP_HIPCC_EXECUTABLE hipcc) - endif() - mark_as_advanced(HIP_HIPCC_EXECUTABLE) - - # Find HIPCONFIG executable - find_program( - HIP_HIPCONFIG_EXECUTABLE - NAMES hipconfig - PATHS - "${HIP_ROOT_DIR}" - ENV ROCM_PATH - ENV HIP_PATH - /opt/rocm - /opt/rocm/hip - PATH_SUFFIXES bin - NO_DEFAULT_PATH - ) - if(NOT HIP_HIPCONFIG_EXECUTABLE) - # Now search in default paths - find_program(HIP_HIPCONFIG_EXECUTABLE hipconfig) - endif() - mark_as_advanced(HIP_HIPCONFIG_EXECUTABLE) - - # Find HIPCC_CMAKE_LINKER_HELPER executable - find_program( - HIP_HIPCC_CMAKE_LINKER_HELPER - NAMES hipcc_cmake_linker_helper - PATHS - "${HIP_ROOT_DIR}" - ENV ROCM_PATH - ENV HIP_PATH - /opt/rocm - /opt/rocm/hip - PATH_SUFFIXES bin - NO_DEFAULT_PATH - ) - if(NOT HIP_HIPCC_CMAKE_LINKER_HELPER) - # Now search in default paths - find_program(HIP_HIPCC_CMAKE_LINKER_HELPER hipcc_cmake_linker_helper) - endif() - mark_as_advanced(HIP_HIPCC_CMAKE_LINKER_HELPER) - - if(HIP_HIPCONFIG_EXECUTABLE AND NOT HIP_VERSION) - # Compute the version - execute_process( - COMMAND ${HIP_HIPCONFIG_EXECUTABLE} --version - OUTPUT_VARIABLE _hip_version - ERROR_VARIABLE _hip_error - OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_STRIP_TRAILING_WHITESPACE - ) - if(NOT _hip_error) - set(HIP_VERSION ${_hip_version} CACHE STRING "Version of HIP as computed from hipcc") - else() - set(HIP_VERSION "0.0.0" CACHE STRING "Version of HIP as computed by FindHIP()") - endif() - mark_as_advanced(HIP_VERSION) - endif() - if(HIP_VERSION) - string(REPLACE "." ";" _hip_version_list "${HIP_VERSION}") - list(GET _hip_version_list 0 HIP_VERSION_MAJOR) - list(GET _hip_version_list 1 HIP_VERSION_MINOR) - list(GET _hip_version_list 2 HIP_VERSION_PATCH) - set(HIP_VERSION_STRING "${HIP_VERSION}") - endif() - - if(HIP_HIPCONFIG_EXECUTABLE AND NOT HIP_PLATFORM) - # Compute the platform - execute_process( - COMMAND ${HIP_HIPCONFIG_EXECUTABLE} --platform - OUTPUT_VARIABLE _hip_platform - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - set(HIP_PLATFORM ${_hip_platform} CACHE STRING "HIP platform as computed by hipconfig") - mark_as_advanced(HIP_PLATFORM) - endif() - - if(HIP_HIPCONFIG_EXECUTABLE AND NOT HIP_COMPILER) - # Compute the compiler - execute_process( - COMMAND ${HIP_HIPCONFIG_EXECUTABLE} --compiler - OUTPUT_VARIABLE _hip_compiler - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - set(HIP_COMPILER ${_hip_compiler} CACHE STRING "HIP compiler as computed by hipconfig") - mark_as_advanced(HIP_COMPILER) - endif() - - if(HIP_HIPCONFIG_EXECUTABLE AND NOT HIP_RUNTIME) - # Compute the runtime - execute_process( - COMMAND ${HIP_HIPCONFIG_EXECUTABLE} --runtime - OUTPUT_VARIABLE _hip_runtime - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - set(HIP_RUNTIME ${_hip_runtime} CACHE STRING "HIP runtime as computed by hipconfig") - mark_as_advanced(HIP_RUNTIME) - endif() -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - HIP - REQUIRED_VARS - HIP_ROOT_DIR - HIP_HIPCC_EXECUTABLE - HIP_HIPCONFIG_EXECUTABLE - HIP_PLATFORM - HIP_COMPILER - HIP_RUNTIME - VERSION_VAR HIP_VERSION - ) - -############################################################################### -# Set HIP CMAKE Flags -############################################################################### -# Copy the invocation styles from CXX to HIP -set(CMAKE_HIP_ARCHIVE_CREATE ${CMAKE_CXX_ARCHIVE_CREATE}) -set(CMAKE_HIP_ARCHIVE_APPEND ${CMAKE_CXX_ARCHIVE_APPEND}) -set(CMAKE_HIP_ARCHIVE_FINISH ${CMAKE_CXX_ARCHIVE_FINISH}) -set(CMAKE_SHARED_LIBRARY_SONAME_HIP_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG}) -set(CMAKE_SHARED_LIBRARY_CREATE_HIP_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}) -set(CMAKE_SHARED_LIBRARY_HIP_FLAGS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}) -#set(CMAKE_SHARED_LIBRARY_LINK_HIP_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS}) -set(CMAKE_SHARED_LIBRARY_RUNTIME_HIP_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG}) -set(CMAKE_SHARED_LIBRARY_RUNTIME_HIP_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP}) -set(CMAKE_SHARED_LIBRARY_LINK_STATIC_HIP_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_STATIC_CXX_FLAGS}) -set(CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_HIP_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_CXX_FLAGS}) - -set(HIP_CLANG_PARALLEL_BUILD_COMPILE_OPTIONS "") -set(HIP_CLANG_PARALLEL_BUILD_LINK_OPTIONS "") - -if("${HIP_COMPILER}" STREQUAL "nvcc") - # Set the CMake Flags to use the nvcc Compiler. - set(CMAKE_HIP_CREATE_SHARED_LIBRARY "${HIP_HIPCC_CMAKE_LINKER_HELPER} -o ") - set(CMAKE_HIP_CREATE_SHARED_MODULE "${HIP_HIPCC_CMAKE_LINKER_HELPER} -o -shared" ) - set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} -o ") -elseif("${HIP_COMPILER}" STREQUAL "clang") - #Set HIP_CLANG_PATH - if("x${HIP_CLANG_PATH}" STREQUAL "x") - if(DEFINED ENV{HIP_CLANG_PATH}) - set(HIP_CLANG_PATH $ENV{HIP_CLANG_PATH}) - elseif(DEFINED ENV{ROCM_PATH}) - set(HIP_CLANG_PATH "$ENV{ROCM_PATH}/llvm/bin") - elseif(DEFINED ENV{HIP_PATH}) - set(HIP_CLANG_PATH "$ENV{HIP_PATH}/../llvm/bin") - elseif(DEFINED HIP_PATH) - set(HIP_CLANG_PATH "${HIP_PATH}/../llvm/bin") - else() - set(HIP_CLANG_PATH "/opt/rocm/llvm/bin") - endif() - endif() - #Number of parallel jobs by default is 1 - if(NOT DEFINED HIP_CLANG_NUM_PARALLEL_JOBS) - set(HIP_CLANG_NUM_PARALLEL_JOBS 1) - endif() - #Add support for parallel build and link - if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") - check_cxx_compiler_flag("-parallel-jobs=1" HIP_CLANG_SUPPORTS_PARALLEL_JOBS) - endif() - if(HIP_CLANG_NUM_PARALLEL_JOBS GREATER 1) - if(${HIP_CLANG_SUPPORTS_PARALLEL_JOBS}) - set(HIP_CLANG_PARALLEL_BUILD_COMPILE_OPTIONS "-Wno-format-nonliteral -parallel-jobs=${HIP_CLANG_NUM_PARALLEL_JOBS}") - set(HIP_CLANG_PARALLEL_BUILD_LINK_OPTIONS "-parallel-jobs=${HIP_CLANG_NUM_PARALLEL_JOBS}") - else() - message("clang compiler doesn't support parallel jobs") - endif() - endif() - - # Set the CMake Flags to use the HIP-Clang Compiler. - set(CMAKE_HIP_CREATE_SHARED_LIBRARY "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HIP_CLANG_PATH} ${HIP_CLANG_PARALLEL_BUILD_LINK_OPTIONS} -o ") - set(CMAKE_HIP_CREATE_SHARED_MODULE "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HIP_CLANG_PATH} ${HIP_CLANG_PARALLEL_BUILD_LINK_OPTIONS} -o -shared" ) - set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HIP_CLANG_PATH} ${HIP_CLANG_PARALLEL_BUILD_LINK_OPTIONS} -o ") - - if("${HIP_RUNTIME}" STREQUAL "rocclr") - if(TARGET host) - message(STATUS "host interface - found") - set(HIP_HOST_INTERFACE host) - endif() - endif() -endif() - -############################################################################### -# MACRO: Locate helper files -############################################################################### -macro(HIP_FIND_HELPER_FILE _name _extension) - set(_hip_full_name "${_name}.${_extension}") - get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) - set(HIP_${_name} "${CMAKE_CURRENT_LIST_DIR}/FindHIP/${_hip_full_name}") - if(NOT EXISTS "${HIP_${_name}}") - set(error_message "${_hip_full_name} not found in ${CMAKE_CURRENT_LIST_DIR}/FindHIP") - if(HIP_FIND_REQUIRED) - message(FATAL_ERROR "${error_message}") - else() - if(NOT HIP_FIND_QUIETLY) - message(STATUS "${error_message}") - endif() - endif() - endif() - # Set this variable as internal, so the user isn't bugged with it. - set(HIP_${_name} ${HIP_${_name}} CACHE INTERNAL "Location of ${_full_name}" FORCE) -endmacro() - -############################################################################### -hip_find_helper_file(run_make2cmake cmake) -hip_find_helper_file(run_hipcc cmake) -############################################################################### - -############################################################################### -# MACRO: Reset compiler flags -############################################################################### -macro(HIP_RESET_FLAGS) - unset(HIP_HIPCC_FLAGS) - unset(HIP_CLANG_FLAGS) - unset(HIP_NVCC_FLAGS) - foreach(config ${_hip_configuration_types}) - string(TOUPPER ${config} config_upper) - unset(HIP_HIPCC_FLAGS_${config_upper}) - unset(HIP_CLANG_FLAGS_${config_upper}) - unset(HIP_NVCC_FLAGS_${config_upper}) - endforeach() -endmacro() - -############################################################################### -# MACRO: Separate the options from the sources -############################################################################### -macro(HIP_GET_SOURCES_AND_OPTIONS _sources _cmake_options _hipcc_options _clang_options _nvcc_options) - set(${_sources}) - set(${_cmake_options}) - set(${_hipcc_options}) - set(${_clang_options}) - set(${_nvcc_options}) - set(_hipcc_found_options FALSE) - set(_hcc_found_options FALSE) - set(_clang_found_options FALSE) - set(_nvcc_found_options FALSE) - foreach(arg ${ARGN}) - if("x${arg}" STREQUAL "xHIPCC_OPTIONS") - set(_hipcc_found_options TRUE) - set(_hcc_found_options FALSE) - set(_clang_found_options FALSE) - set(_nvcc_found_options FALSE) - elseif("x${arg}" STREQUAL "xHCC_OPTIONS") - # To be removed after HCC_OPTIONS is removed from hip_add_executable() - # via upstream updation - message(WARNING, "Please remove obsolete HCC_OPTIONS from hip_add_executable()") - set(_hipcc_found_options FALSE) - set(_hcc_found_options TRUE) - set(_clang_found_options FALSE) - set(_nvcc_found_options FALSE) - elseif("x${arg}" STREQUAL "xCLANG_OPTIONS") - set(_hipcc_found_options FALSE) - set(_hcc_found_options FALSE) - set(_clang_found_options TRUE) - set(_nvcc_found_options FALSE) - elseif("x${arg}" STREQUAL "xNVCC_OPTIONS") - set(_hipcc_found_options FALSE) - set(_hcc_found_options FALSE) - set(_clang_found_options FALSE) - set(_nvcc_found_options TRUE) - elseif( - "x${arg}" STREQUAL "xEXCLUDE_FROM_ALL" OR - "x${arg}" STREQUAL "xSTATIC" OR - "x${arg}" STREQUAL "xSHARED" OR - "x${arg}" STREQUAL "xMODULE" - ) - list(APPEND ${_cmake_options} ${arg}) - else() - if(_hipcc_found_options) - list(APPEND ${_hipcc_options} ${arg}) - elseif(_hcc_found_options) - message(WARNING, "Please remove obsolete HCC_OPTIONS ${arg} from hip_add_executable()") - elseif(_clang_found_options) - list(APPEND ${_clang_options} ${arg}) - elseif(_nvcc_found_options) - list(APPEND ${_nvcc_options} ${arg}) - else() - # Assume this is a file - list(APPEND ${_sources} ${arg}) - endif() - endif() - endforeach() -endmacro() - -############################################################################### -# MACRO: Add include directories to pass to the hipcc command -############################################################################### -set(HIP_HIPCC_INCLUDE_ARGS_USER "") -macro(HIP_INCLUDE_DIRECTORIES) - foreach(dir ${ARGN}) - list(APPEND HIP_HIPCC_INCLUDE_ARGS_USER $<$:-I${dir}>) - endforeach() -endmacro() - -############################################################################### -# FUNCTION: Helper to avoid clashes of files with the same basename but different paths -############################################################################### -function(HIP_COMPUTE_BUILD_PATH path build_path) - # Convert to cmake style paths - file(TO_CMAKE_PATH "${path}" bpath) - if(IS_ABSOLUTE "${bpath}") - string(FIND "${bpath}" "${CMAKE_CURRENT_BINARY_DIR}" _binary_dir_pos) - if(_binary_dir_pos EQUAL 0) - file(RELATIVE_PATH bpath "${CMAKE_CURRENT_BINARY_DIR}" "${bpath}") - else() - file(RELATIVE_PATH bpath "${CMAKE_CURRENT_SOURCE_DIR}" "${bpath}") - endif() - endif() - - # Remove leading / - string(REGEX REPLACE "^[/]+" "" bpath "${bpath}") - # Avoid absolute paths by removing ':' - string(REPLACE ":" "_" bpath "${bpath}") - # Avoid relative paths that go up the tree - string(REPLACE "../" "__/" bpath "${bpath}") - # Avoid spaces - string(REPLACE " " "_" bpath "${bpath}") - # Strip off the filename - get_filename_component(bpath "${bpath}" PATH) - - set(${build_path} "${bpath}" PARENT_SCOPE) -endfunction() - -############################################################################### -# MACRO: Parse OPTIONS from ARGN & set variables prefixed by _option_prefix -############################################################################### -macro(HIP_PARSE_HIPCC_OPTIONS _option_prefix) - set(_hip_found_config) - foreach(arg ${ARGN}) - # Determine if we are dealing with a per-configuration flag - foreach(config ${_hip_configuration_types}) - string(TOUPPER ${config} config_upper) - if(arg STREQUAL "${config_upper}") - set(_hip_found_config _${arg}) - # Clear arg to prevent it from being processed anymore - set(arg) - endif() - endforeach() - if(arg) - list(APPEND ${_option_prefix}${_hip_found_config} "${arg}") - endif() - endforeach() -endmacro() - -############################################################################### -# MACRO: Try and include dependency file if it exists -############################################################################### -macro(HIP_INCLUDE_HIPCC_DEPENDENCIES dependency_file) - set(HIP_HIPCC_DEPEND) - set(HIP_HIPCC_DEPEND_REGENERATE FALSE) - - # Create the dependency file if it doesn't exist - if(NOT EXISTS ${dependency_file}) - file(WRITE ${dependency_file} "# Generated by: FindHIP.cmake. Do not edit.\n") - endif() - # Include the dependency file - include(${dependency_file}) - - # Verify the existence of all the included files - if(HIP_HIPCC_DEPEND) - foreach(f ${HIP_HIPCC_DEPEND}) - if(NOT EXISTS ${f}) - # If they aren't there, regenerate the file again - set(HIP_HIPCC_DEPEND_REGENERATE TRUE) - endif() - endforeach() - else() - # No dependencies, so regenerate the file - set(HIP_HIPCC_DEPEND_REGENERATE TRUE) - endif() - - # Regenerate the dependency file if needed - if(HIP_HIPCC_DEPEND_REGENERATE) - set(HIP_HIPCC_DEPEND ${dependency_file}) - file(WRITE ${dependency_file} "# Generated by: FindHIP.cmake. Do not edit.\n") - endif() -endmacro() - -############################################################################### -# MACRO: Prepare cmake commands for the target -############################################################################### -macro(HIP_PREPARE_TARGET_COMMANDS _target _format _generated_files _source_files) - set(_hip_flags "") - string(TOUPPER "${CMAKE_BUILD_TYPE}" _hip_build_configuration) - if(HIP_HOST_COMPILATION_CPP) - set(HIP_C_OR_CXX CXX) - else() - set(HIP_C_OR_CXX C) - endif() - set(generated_extension ${CMAKE_${HIP_C_OR_CXX}_OUTPUT_EXTENSION}) - - # Initialize list of includes with those specified by the user. Append with - # ones specified to cmake directly. - set(HIP_HIPCC_INCLUDE_ARGS ${HIP_HIPCC_INCLUDE_ARGS_USER}) - - # Add the include directories - set(include_directories_generator "$") - list(APPEND HIP_HIPCC_INCLUDE_ARGS "$<$:-I$>") - - get_directory_property(_hip_include_directories INCLUDE_DIRECTORIES) - list(REMOVE_DUPLICATES _hip_include_directories) - if(_hip_include_directories) - foreach(dir ${_hip_include_directories}) - list(APPEND HIP_HIPCC_INCLUDE_ARGS $<$:-I${dir}>) - endforeach() - endif() - - HIP_GET_SOURCES_AND_OPTIONS(_hip_sources _hip_cmake_options _hipcc_options _clang_options _nvcc_options ${ARGN}) - HIP_PARSE_HIPCC_OPTIONS(HIP_HIPCC_FLAGS ${_hipcc_options}) - HIP_PARSE_HIPCC_OPTIONS(HIP_CLANG_FLAGS ${_clang_options}) - HIP_PARSE_HIPCC_OPTIONS(HIP_NVCC_FLAGS ${_nvcc_options}) - - # Add the compile definitions - set(compile_definition_generator "$") - list(APPEND HIP_HIPCC_FLAGS "$<$:-D$>") - - # Check if we are building shared library. - set(_hip_build_shared_libs FALSE) - list(FIND _hip_cmake_options SHARED _hip_found_SHARED) - list(FIND _hip_cmake_options MODULE _hip_found_MODULE) - if(_hip_found_SHARED GREATER -1 OR _hip_found_MODULE GREATER -1) - set(_hip_build_shared_libs TRUE) - endif() - list(FIND _hip_cmake_options STATIC _hip_found_STATIC) - if(_hip_found_STATIC GREATER -1) - set(_hip_build_shared_libs FALSE) - endif() - - # If we are building a shared library, add extra flags to HIP_HIPCC_FLAGS - if(_hip_build_shared_libs) - list(APPEND HIP_CLANG_FLAGS "-fPIC") - list(APPEND HIP_NVCC_FLAGS "--shared -Xcompiler '-fPIC'") - endif() - - # Set host compiler - set(HIP_HOST_COMPILER "${CMAKE_${HIP_C_OR_CXX}_COMPILER}") - - # Set compiler flags - set(_HIP_HOST_FLAGS "set(CMAKE_HOST_FLAGS ${CMAKE_${HIP_C_OR_CXX}_FLAGS})") - set(_HIP_HIPCC_FLAGS "set(HIP_HIPCC_FLAGS ${HIP_HIPCC_FLAGS})") - set(_HIP_CLANG_FLAGS "set(HIP_CLANG_FLAGS ${HIP_CLANG_FLAGS})") - set(_HIP_NVCC_FLAGS "set(HIP_NVCC_FLAGS ${HIP_NVCC_FLAGS})") - foreach(config ${_hip_configuration_types}) - string(TOUPPER ${config} config_upper) - set(_HIP_HOST_FLAGS "${_HIP_HOST_FLAGS}\nset(CMAKE_HOST_FLAGS_${config_upper} ${CMAKE_${HIP_C_OR_CXX}_FLAGS_${config_upper}})") - set(_HIP_HIPCC_FLAGS "${_HIP_HIPCC_FLAGS}\nset(HIP_HIPCC_FLAGS_${config_upper} ${HIP_HIPCC_FLAGS_${config_upper}})") - set(_HIP_CLANG_FLAGS "${_HIP_CLANG_FLAGS}\nset(HIP_CLANG_FLAGS_${config_upper} ${HIP_CLANG_FLAGS_${config_upper}})") - set(_HIP_NVCC_FLAGS "${_HIP_NVCC_FLAGS}\nset(HIP_NVCC_FLAGS_${config_upper} ${HIP_NVCC_FLAGS_${config_upper}})") - endforeach() - - # Reset the output variable - set(_hip_generated_files "") - set(_hip_source_files "") - - # Iterate over all arguments and create custom commands for all source files - foreach(file ${ARGN}) - # Ignore any file marked as a HEADER_FILE_ONLY - get_source_file_property(_is_header ${file} HEADER_FILE_ONLY) - # Allow per source file overrides of the format. Also allows compiling non .cu files. - get_source_file_property(_hip_source_format ${file} HIP_SOURCE_PROPERTY_FORMAT) - if((${file} MATCHES "\\.cu$" OR _hip_source_format) AND NOT _is_header) - set(host_flag FALSE) - else() - set(host_flag TRUE) - endif() - - if(NOT host_flag) - # Determine output directory - HIP_COMPUTE_BUILD_PATH("${file}" hip_build_path) - set(hip_compile_output_dir "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${_target}.dir/${hip_build_path}") - - get_filename_component(basename ${file} NAME) - set(generated_file_path "${hip_compile_output_dir}/${CMAKE_CFG_INTDIR}") - set(generated_file_basename "${_target}_generated_${basename}${generated_extension}") - - # Set file names - set(generated_file "${generated_file_path}/${generated_file_basename}") - set(cmake_dependency_file "${hip_compile_output_dir}/${generated_file_basename}.depend") - set(custom_target_script_pregen "${hip_compile_output_dir}/${generated_file_basename}.cmake.pre-gen") - set(custom_target_script "${hip_compile_output_dir}/${generated_file_basename}.cmake") - - # Set properties for object files - set_source_files_properties("${generated_file}" - PROPERTIES - EXTERNAL_OBJECT true # This is an object file not to be compiled, but only be linked - ) - - # Don't add CMAKE_CURRENT_SOURCE_DIR if the path is already an absolute path - get_filename_component(file_path "${file}" PATH) - if(IS_ABSOLUTE "${file_path}") - set(source_file "${file}") - else() - set(source_file "${CMAKE_CURRENT_SOURCE_DIR}/${file}") - endif() - - # Bring in the dependencies - HIP_INCLUDE_HIPCC_DEPENDENCIES(${cmake_dependency_file}) - - # Configure the build script - configure_file("${HIP_run_hipcc}" "${custom_target_script_pregen}" @ONLY) - file(GENERATE - OUTPUT "${custom_target_script}" - INPUT "${custom_target_script_pregen}" - ) - set(main_dep DEPENDS ${source_file}) - if(CMAKE_GENERATOR MATCHES "Makefiles") - set(verbose_output "$(VERBOSE)") - elseif(HIP_VERBOSE_BUILD) - set(verbose_output ON) - else() - set(verbose_output OFF) - endif() - - # Create up the comment string - file(RELATIVE_PATH generated_file_relative_path "${CMAKE_BINARY_DIR}" "${generated_file}") - set(hip_build_comment_string "Building HIPCC object ${generated_file_relative_path}") - - # Build the generated file and dependency file - add_custom_command( - OUTPUT ${generated_file} - # These output files depend on the source_file and the contents of cmake_dependency_file - ${main_dep} - DEPENDS ${HIP_HIPCC_DEPEND} - DEPENDS ${custom_target_script} - # Make sure the output directory exists before trying to write to it. - COMMAND ${CMAKE_COMMAND} -E make_directory "${generated_file_path}" - COMMAND ${CMAKE_COMMAND} ARGS - -D verbose:BOOL=${verbose_output} - -D build_configuration:STRING=${_hip_build_configuration} - -D "generated_file:STRING=${generated_file}" - -P "${custom_target_script}" - WORKING_DIRECTORY "${hip_compile_output_dir}" - COMMENT "${hip_build_comment_string}" - ) - - # Make sure the build system knows the file is generated - set_source_files_properties(${generated_file} PROPERTIES GENERATED TRUE) - list(APPEND _hip_generated_files ${generated_file}) - list(APPEND _hip_source_files ${file}) - endif() - endforeach() - - # Set the return parameter - set(${_generated_files} ${_hip_generated_files}) - set(${_source_files} ${_hip_source_files}) -endmacro() - -############################################################################### -# HIP_ADD_EXECUTABLE -############################################################################### -macro(HIP_ADD_EXECUTABLE hip_target) - # Separate the sources from the options - HIP_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _hipcc_options _clang_options _nvcc_options ${ARGN}) - HIP_PREPARE_TARGET_COMMANDS(${hip_target} OBJ _generated_files _source_files ${_sources} HIPCC_OPTIONS ${_hipcc_options} CLANG_OPTIONS ${_clang_options} NVCC_OPTIONS ${_nvcc_options}) - if(_source_files) - list(REMOVE_ITEM _sources ${_source_files}) - endif() - if("${HIP_COMPILER}" STREQUAL "clang") - if("x${HIP_CLANG_PATH}" STREQUAL "x") - if(DEFINED ENV{HIP_CLANG_PATH}) - set(HIP_CLANG_PATH $ENV{HIP_CLANG_PATH}) - elseif(DEFINED ENV{ROCM_PATH}) - set(HIP_CLANG_PATH "$ENV{ROCM_PATH}/llvm/bin") - elseif(DEFINED ENV{HIP_PATH}) - set(HIP_CLANG_PATH "$ENV{HIP_PATH}/../llvm/bin") - elseif(DEFINED HIP_PATH) - set(HIP_CLANG_PATH "${HIP_PATH}/../llvm/bin") - else() - set(HIP_CLANG_PATH "/opt/rocm/llvm/bin") - endif() - endif() - set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HIP_CLANG_PATH} ${HIP_CLANG_PARALLEL_BUILD_LINK_OPTIONS} -o ") - else() - set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} -o ") - endif() - if ("${_sources}" STREQUAL "") - add_executable(${hip_target} ${_cmake_options} ${_generated_files} "") - else() - add_executable(${hip_target} ${_cmake_options} ${_generated_files} ${_sources}) - endif() - #LINK_OPTIONS - if("${HIP_COMPILER}" STREQUAL "nvcc") - # Some arch flags need be sent to linker. _nvcc_options mixes compiling and linker flags. - string(REPLACE ";" " " _nvcc_flags "${_nvcc_options}") # Replace ',' with space - if(NOT "x${_nvcc_flags}" STREQUAL "x") - set_target_properties(${hip_target} PROPERTIES LINK_FLAGS "${_nvcc_flags}") - endif() - endif() - set_target_properties(${hip_target} PROPERTIES LINKER_LANGUAGE HIP) - # Link with host - if (HIP_HOST_INTERFACE) - # hip rt should be rocclr, compiler should be clang - target_link_libraries(${hip_target} ${HIP_HOST_INTERFACE}) - endif() -endmacro() - -############################################################################### -# HIP_ADD_LIBRARY -############################################################################### -macro(HIP_ADD_LIBRARY hip_target) - # Separate the sources from the options - HIP_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _hipcc_options _clang_options _nvcc_options ${ARGN}) - HIP_PREPARE_TARGET_COMMANDS(${hip_target} OBJ _generated_files _source_files ${_sources} ${_cmake_options} HIPCC_OPTIONS ${_hipcc_options} CLANG_OPTIONS ${_clang_options} NVCC_OPTIONS ${_nvcc_options}) - if(_source_files) - list(REMOVE_ITEM _sources ${_source_files}) - endif() - if ("${_sources}" STREQUAL "") - add_library(${hip_target} ${_cmake_options} ${_generated_files} "") - else() - add_library(${hip_target} ${_cmake_options} ${_generated_files} ${_sources}) - endif() - set_target_properties(${hip_target} PROPERTIES LINKER_LANGUAGE ${HIP_C_OR_CXX}) - # Link with host - if (HIP_HOST_INTERFACE) - # hip rt should be rocclr, compiler should be clang - target_link_libraries(${hip_target} ${HIP_HOST_INTERFACE}) - endif() -endmacro() - -# vim: ts=4:sw=4:expandtab:smartindent diff --git a/projects/clr/hipamd/cmake/FindHIP/run_hipcc.cmake b/projects/clr/hipamd/cmake/FindHIP/run_hipcc.cmake deleted file mode 100644 index 15fe6a6390..0000000000 --- a/projects/clr/hipamd/cmake/FindHIP/run_hipcc.cmake +++ /dev/null @@ -1,194 +0,0 @@ -# Copyright (C) 2016-2021 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. - -############################################################################### -# Runs commands using HIPCC -############################################################################### - -############################################################################### -# This file runs the hipcc commands to produce the desired output file -# along with the dependency file needed by CMake to compute dependencies. -# -# Input variables: -# -# verbose:BOOL=<> OFF: Be as quiet as possible (default) -# ON : Describe each step -# build_configuration:STRING=<> Build configuration. Defaults to Debug. -# generated_file:STRING=<> File to generate. Mandatory argument. - -if(NOT build_configuration) - set(build_configuration Debug) -endif() -if(NOT generated_file) - message(FATAL_ERROR "You must specify generated_file on the command line") -endif() - -# Set these up as variables to make reading the generated file easier -set(HIP_HIPCC_EXECUTABLE "@HIP_HIPCC_EXECUTABLE@") # path -set(HIP_HIPCONFIG_EXECUTABLE "@HIP_HIPCONFIG_EXECUTABLE@") #path -set(HIP_HOST_COMPILER "@HIP_HOST_COMPILER@") # path -set(CMAKE_COMMAND "@CMAKE_COMMAND@") # path -set(HIP_run_make2cmake "@HIP_run_make2cmake@") # path -set(HIP_CLANG_PATH "@HIP_CLANG_PATH@") #path -set(HIP_CLANG_PARALLEL_BUILD_COMPILE_OPTIONS "@HIP_CLANG_PARALLEL_BUILD_COMPILE_OPTIONS@") - -@HIP_HOST_FLAGS@ -@_HIP_HIPCC_FLAGS@ -@_HIP_CLANG_FLAGS@ -@_HIP_NVCC_FLAGS@ -#Needed to bring the HIP_HIPCC_INCLUDE_ARGS variable in scope -set(HIP_HIPCC_INCLUDE_ARGS @HIP_HIPCC_INCLUDE_ARGS@) # list - -set(cmake_dependency_file "@cmake_dependency_file@") # path -set(source_file "@source_file@") # path -set(host_flag "@host_flag@") # bool - -# Determine compiler and compiler flags -execute_process(COMMAND ${HIP_HIPCONFIG_EXECUTABLE} --platform OUTPUT_VARIABLE HIP_PLATFORM OUTPUT_STRIP_TRAILING_WHITESPACE) -execute_process(COMMAND ${HIP_HIPCONFIG_EXECUTABLE} --compiler OUTPUT_VARIABLE HIP_COMPILER OUTPUT_STRIP_TRAILING_WHITESPACE) -execute_process(COMMAND ${HIP_HIPCONFIG_EXECUTABLE} --runtime OUTPUT_VARIABLE HIP_RUNTIME OUTPUT_STRIP_TRAILING_WHITESPACE) -if(NOT host_flag) - set(__CC ${HIP_HIPCC_EXECUTABLE}) - if("${HIP_PLATFORM}" STREQUAL "amd") - if("${HIP_COMPILER}" STREQUAL "clang") - if(NOT "x${HIP_CLANG_PATH}" STREQUAL "x") - set(ENV{HIP_CLANG_PATH} ${HIP_CLANG_PATH}) - endif() - set(__CC_FLAGS ${HIP_CLANG_PARALLEL_BUILD_COMPILE_OPTIONS} ${HIP_HIPCC_FLAGS} ${HIP_CLANG_FLAGS} ${HIP_HIPCC_FLAGS_${build_configuration}} ${HIP_CLANG_FLAGS_${build_configuration}}) - endif() - else() - set(__CC_FLAGS ${HIP_HIPCC_FLAGS} ${HIP_NVCC_FLAGS} ${HIP_HIPCC_FLAGS_${build_configuration}} ${HIP_NVCC_FLAGS_${build_configuration}}) - endif() -else() - set(__CC ${HIP_HOST_COMPILER}) - set(__CC_FLAGS ${CMAKE_HOST_FLAGS} ${CMAKE_HOST_FLAGS_${build_configuration}}) -endif() -set(__CC_INCLUDES ${HIP_HIPCC_INCLUDE_ARGS}) - -# hip_execute_process - Executes a command with optional command echo and status message. -# status - Status message to print if verbose is true -# command - COMMAND argument from the usual execute_process argument structure -# ARGN - Remaining arguments are the command with arguments -# HIP_result - Return value from running the command -macro(hip_execute_process status command) - set(_command ${command}) - if(NOT "x${_command}" STREQUAL "xCOMMAND") - message(FATAL_ERROR "Malformed call to hip_execute_process. Missing COMMAND as second argument. (command = ${command})") - endif() - if(verbose) - execute_process(COMMAND "${CMAKE_COMMAND}" -E echo -- ${status}) - # Build command string to print - set(hip_execute_process_string) - foreach(arg ${ARGN}) - # Escape quotes if any - string(REPLACE "\"" "\\\"" arg ${arg}) - # Surround args with spaces with quotes - if(arg MATCHES " ") - list(APPEND hip_execute_process_string "\"${arg}\"") - else() - list(APPEND hip_execute_process_string ${arg}) - endif() - endforeach() - # Echo the command - execute_process(COMMAND ${CMAKE_COMMAND} -E echo ${hip_execute_process_string}) - endif() - # Run the command - execute_process(COMMAND ${ARGN} RESULT_VARIABLE HIP_result) -endmacro() - -# Delete the target file -hip_execute_process( - "Removing ${generated_file}" - COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}" - ) - -# Generate the dependency file -hip_execute_process( - "Generating dependency file: ${cmake_dependency_file}.pre" - COMMAND "${__CC}" - -M - "${source_file}" - -o "${cmake_dependency_file}.pre" - ${__CC_FLAGS} - ${__CC_INCLUDES} - ) - -if(HIP_result) - message(FATAL_ERROR "Error generating ${generated_file}") -endif() - -# Generate the cmake readable dependency file to a temp file -hip_execute_process( - "Generating temporary cmake readable file: ${cmake_dependency_file}.tmp" - COMMAND "${CMAKE_COMMAND}" - -D "input_file:FILEPATH=${cmake_dependency_file}.pre" - -D "output_file:FILEPATH=${cmake_dependency_file}.tmp" - -D "verbose=${verbose}" - -P "${HIP_run_make2cmake}" - ) - -if(HIP_result) - message(FATAL_ERROR "Error generating ${generated_file}") -endif() - -# Copy the file if it is different -hip_execute_process( - "Copy if different ${cmake_dependency_file}.tmp to ${cmake_dependency_file}" - COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${cmake_dependency_file}.tmp" "${cmake_dependency_file}" - ) - -if(HIP_result) - message(FATAL_ERROR "Error generating ${generated_file}") -endif() - -# Delete the temporary file -hip_execute_process( - "Removing ${cmake_dependency_file}.tmp and ${cmake_dependency_file}.pre" - COMMAND "${CMAKE_COMMAND}" -E remove "${cmake_dependency_file}.tmp" "${cmake_dependency_file}.pre" - ) - -if(HIP_result) - message(FATAL_ERROR "Error generating ${generated_file}") -endif() - -# Generate the output file -hip_execute_process( - "Generating ${generated_file}" - COMMAND "${__CC}" - -c - "${source_file}" - -o "${generated_file}" - ${__CC_FLAGS} - ${__CC_INCLUDES} - ) - -if(HIP_result) - # Make sure that we delete the output file - hip_execute_process( - "Removing ${generated_file}" - COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}" - ) - message(FATAL_ERROR "Error generating file ${generated_file}") -else() - if(verbose) - message("Generated ${generated_file} successfully.") - endif() -endif() -# vim: ts=4:sw=4:expandtab:smartindent diff --git a/projects/clr/hipamd/cmake/FindHIP/run_make2cmake.cmake b/projects/clr/hipamd/cmake/FindHIP/run_make2cmake.cmake deleted file mode 100644 index 29b1014acd..0000000000 --- a/projects/clr/hipamd/cmake/FindHIP/run_make2cmake.cmake +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright (C) 2016-2021 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. - -############################################################################### -# Computes dependencies using HIPCC -############################################################################### - -############################################################################### -# This file converts dependency files generated using hipcc to a format that -# cmake can understand. - -# Input variables: -# -# input_file:STRING=<> Dependency file to parse. Required argument -# output_file:STRING=<> Output file to generate. Required argument - -if(NOT input_file OR NOT output_file) - message(FATAL_ERROR "You must specify input_file and output_file on the command line") -endif() - -file(READ ${input_file} depend_text) - -if (NOT "${depend_text}" STREQUAL "") - string(REPLACE " /" "\n/" depend_text ${depend_text}) - string(REGEX REPLACE "^.*:" "" depend_text ${depend_text}) - string(REGEX REPLACE "[ \\\\]*\n" ";" depend_text ${depend_text}) - - set(dependency_list "") - - foreach(file ${depend_text}) - string(REGEX REPLACE "^ +" "" file ${file}) - if(NOT EXISTS "${file}") - message(WARNING " Removing non-existent dependency file: ${file}") - set(file "") - endif() - - if(NOT IS_DIRECTORY "${file}") - get_filename_component(file_absolute "${file}" ABSOLUTE) - list(APPEND dependency_list "${file_absolute}") - endif() - endforeach() -endif() - -# Remove the duplicate entries and sort them. -list(REMOVE_DUPLICATES dependency_list) -list(SORT dependency_list) - -foreach(file ${dependency_list}) - set(hip_hipcc_depend "${hip_hipcc_depend} \"${file}\"\n") -endforeach() - -file(WRITE ${output_file} "# Generated by: FindHIP.cmake. Do not edit.\nSET(HIP_HIPCC_DEPEND\n ${hip_hipcc_depend})\n\n") -# vim: ts=4:sw=4:expandtab:smartindent diff --git a/projects/clr/hipamd/src/hipamd/cmake/FindROCclr.cmake b/projects/clr/hipamd/cmake/FindROCclr.cmake similarity index 100% rename from projects/clr/hipamd/src/hipamd/cmake/FindROCclr.cmake rename to projects/clr/hipamd/cmake/FindROCclr.cmake diff --git a/projects/clr/hipamd/configure b/projects/clr/hipamd/configure deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/projects/clr/hipamd/docker/dockerfile-build-ubuntu-16.04 b/projects/clr/hipamd/docker/dockerfile-build-ubuntu-16.04 deleted file mode 100644 index 4f093eb9d0..0000000000 --- a/projects/clr/hipamd/docker/dockerfile-build-ubuntu-16.04 +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (C) 2017-2021 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. - -# Parameters related to building hip -ARG base_image - -FROM ${base_image} -MAINTAINER Maneesh Gupta - -ARG user_uid - -# docker pipeline runs containers with particular uid -# create a jenkins user with this specific uid so it can use sudo priviledges -# Grant any member of sudo group password-less sudo privileges -RUN useradd --create-home -u ${user_uid} -G sudo,video --shell /bin/bash jenkins && \ - mkdir -p /etc/sudoers.d/ && \ - echo '%sudo ALL=(ALL) NOPASSWD:ALL' | tee /etc/sudoers.d/sudo-nopasswd diff --git a/projects/clr/hipamd/docker/dockerfile-hip-ubuntu-16.04 b/projects/clr/hipamd/docker/dockerfile-hip-ubuntu-16.04 deleted file mode 100644 index 0af0ee0e9b..0000000000 --- a/projects/clr/hipamd/docker/dockerfile-hip-ubuntu-16.04 +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) 2017-2021 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. - -# Parameters related to building hip -ARG base_image - -FROM ${base_image} -MAINTAINER Kent Knox - -# Copy the debian package of hip into the container from host -COPY *.deb /tmp/ - -# Install the debian package -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y curl \ - && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --allow-unauthenticated -y \ - /tmp/hip-base-*.deb \ - /tmp/hip-hcc-*.deb \ - /tmp/hip-doc-*.deb \ - /tmp/hip-samples-* \ - && rm -f /tmp/*.deb \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* diff --git a/projects/clr/hipamd/docs/doxygen-input/doxy.cfg b/projects/clr/hipamd/docs/doxygen-input/doxy.cfg deleted file mode 100644 index 16c2c900b6..0000000000 --- a/projects/clr/hipamd/docs/doxygen-input/doxy.cfg +++ /dev/null @@ -1,2550 +0,0 @@ -# Doxyfile 1.8.17 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the configuration -# file that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# https://www.gnu.org/software/libiconv/ for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = "HIP: Heterogenous-computing Interface for Portability" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = RuntimeAPI - -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all generated output in the proper direction. -# Possible values are: None, LTR, RTL and Context. -# The default value is: None. - -OUTPUT_TEXT_DIRECTION = None - -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line -# such as -# /*************** -# as being the beginning of a Javadoc-style comment "banner". If set to NO, the -# Javadoc-style will behave just like regular comments and it will not be -# interpreted by doxygen. -# The default value is: NO. - -JAVADOC_BANNER = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines (in the resulting output). You can put ^^ in the value part of an -# alias to insert a newline as if a physical newline was in the original file. -# When you need a literal { or } or , in the value part of an alias you have to -# escape them by means of a backslash (\), this can lead to conflicts with the -# commands \{ and \} for these it is advised to use the version @{ and @} or use -# a double escape (\\{ and \\}) - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice -# sources only. Doxygen will then generate output that is more tailored for that -# language. For instance, namespaces will be presented as modules, types will be -# separated into more groups, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_SLICE = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, -# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, -# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: -# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser -# tries to guess whether the code is fixed or free formatted code, this is the -# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat -# .inc files as Fortran files (default is PHP), and .f files as C (default is -# Fortran), use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See https://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up -# to that level are automatically included in the table of contents, even if -# they do not have an id attribute. -# Note: This feature currently applies only to Markdown headings. -# Minimum value: 0, maximum value: 99, default value: 5. -# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. - -TOC_INCLUDE_HEADINGS = 5 - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# If one adds a struct or class to a group and this option is enabled, then also -# any nested class or struct is added to the same group. By default this option -# is disabled and one has to add nested compounds explicitly via \ingroup. -# The default value is: NO. - -GROUP_NESTED_COMPOUNDS = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual -# methods of a class will be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIV_VIRTUAL = NO - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# declarations. If set to NO, these declarations will be included in the -# documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = YES - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES, upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# (including Cygwin) ands Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = NO - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= NO - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the -# list will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. If -# EXTRACT_ALL is set to YES then this flag will automatically be disabled. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when -# a warning is encountered. -# The default value is: NO. - -WARN_AS_ERROR = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING -# Note: If this tag is empty the current directory is searched. - -INPUT = $(HIP_PATH)/docs/doxygen-input/mainpage.txt \ - $(HIP_PATH)/README.md \ - $(HIP_PATH)/CONTRIBUTING.md \ - $(HIP_PATH)/docs/doxygen-input/sync.txt \ - $(HIP_PATH)/INSTALL.md \ - $(HIP_PATH)/docs/markdown \ - $(HIP_PATH)/include/hip \ - $(HIP_PATH)/include/hip/amd_detail/ \ - $(HIP_PATH)/src/ - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: https://www.gnu.org/software/libiconv/) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# read by doxygen. -# -# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, -# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), -# *.doc (to be provided as doxygen C comment), *.txt (to be provided as doxygen -# C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f, *.for, *.tcl, *.vhd, -# *.vhdl, *.ucf, *.qsf and *.ice. - -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.h \ - *.hpp \ - *.md \ - *.dox \ - *.doc \ - *.txt \ - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = ./examples - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = $(HIP_PATH)/docs/doxygen-input/images - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# entity all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see https://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse_libclang=ON option for CMake. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -# If clang assisted parsing is enabled you can provide the clang parser with the -# path to the compilation database (see: -# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files -# were built. This is equivalent to specifying the "-p" option to a clang tool, -# such as clang-check. These options will then be passed to the parser. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse_libclang=ON option for CMake. - -CLANG_DATABASE_PATH = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# https://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML -# documentation will contain a main index with vertical navigation menus that -# are dynamically created via JavaScript. If disabled, the navigation index will -# consists of multiple levels of tabs that are statically embedded in every HTML -# page. Disable this option to support browsers that do not have JavaScript, -# like the Qt help browser. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_MENUS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: https://developer.apple.com/xcode/), introduced with OSX -# 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy -# genXcode/_index.html for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the master .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANSPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands -# to create new LaTeX commands to be used in formulas as building blocks. See -# the section "Including formulas" for details. - -FORMULA_MACROFILE = - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# https://www.mathjax.org) which uses client side JavaScript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from https://www.mathjax.org before deployment. -# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/ - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /