cmake hip-rocclr as default build,change HIP_PLATFORM to amd|nvidia
Change-Id: I59d2e15b297b6ca2d5eee1a6dee642bdb01a3839
Этот коммит содержится в:
+154
-172
@@ -1,8 +1,12 @@
|
||||
cmake_minimum_required(VERSION 3.4.3)
|
||||
project(hip)
|
||||
# sample command for hip-hcc
|
||||
# cmake -DHIP_RUNTIME=hcc ..
|
||||
# sample command for hip-rocclr, you'll need to have rocclr installed
|
||||
# cmake -DHIP_COMPILER=clang -DHIP_PLATFORM=rocclr ..
|
||||
# cmake -DHIP_COMPILER=clang -DHIP_PLATFORM=rocclr -DOPENCL_DIR=/path/to/opencl/api/opencl -DCMAKE_PREFIX_PATH=/path/to/rocclr/build/or/install/directory ..
|
||||
# cmake ..
|
||||
# cmake -DHIP_COMPILER=clang ..
|
||||
# cmake -DHIP_COMPILER=clang -DHIP_RUNTIME=rocclr ..
|
||||
# cmake -DHIP_COMPILER=clang -DHIP_RUNTIME=rocclr -DOPENCL_DIR=/path/to/opencl/api/opencl -DCMAKE_PREFIX_PATH=/path/to/rocclr/build/or/install/directory ..
|
||||
|
||||
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared library (.so) or static lib (.a) ")
|
||||
|
||||
@@ -143,15 +147,20 @@ endif ()
|
||||
|
||||
if(CMAKE_CXX_COMPILER MATCHES ".*hcc")
|
||||
set(HIP_COMPILER "hcc" CACHE STRING "HIP Compiler")
|
||||
set(HIP_PLATFORM "hcc" CACHE STRING "HIP Platform")
|
||||
set(HIP_PLATFORM "amd" CACHE STRING "HIP Platform")
|
||||
set(HIP_RUNTIME "hcc" CACHE STRING "HIP Runtime")
|
||||
get_filename_component(CXX_PATH ${CMAKE_CXX_COMPILER} DIRECTORY)
|
||||
get_filename_component(CXX_PATH ${CXX_PATH} DIRECTORY)
|
||||
set(HCC_HOME "${CXX_PATH}" CACHE PATH "Path to which HCC has been installed")
|
||||
set(HCC_HOME "${CXX_PATH}" CACHE PATH "Path to which hcc has been installed")
|
||||
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
|
||||
#############################
|
||||
@@ -167,40 +176,43 @@ if(NOT DEFINED HIP_PLATFORM)
|
||||
endif()
|
||||
message(STATUS "HIP Platform: " ${HIP_PLATFORM})
|
||||
|
||||
if(HIP_PLATFORM STREQUAL "nvidia")
|
||||
set(HIP_COMPILER "nvcc" CACHE STRING "HIP Compiler")
|
||||
set(HIP_RUNTIME "cuda" CACHE STRING "HIP Runtime")
|
||||
endif()
|
||||
|
||||
# default runtime is rocclr
|
||||
if(NOT DEFINED HIP_RUNTIME)
|
||||
if(NOT DEFINED ENV{HIP_RUNTIME})
|
||||
set(HIP_RUNTIME "rocclr" CACHE STRING "HIP Runtime")
|
||||
else()
|
||||
set(HIP_RUNTIME $ENV{HIP_RUNTIME} CACHE STRING "HIP Compiler")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "HIP Runtime: " ${HIP_RUNTIME})
|
||||
add_to_config(_buildInfo HIP_RUNTIME)
|
||||
|
||||
# Determine HIP_COMPILER
|
||||
# Either hcc or clang; default is hcc
|
||||
# Either hcc or clang; default is clang
|
||||
if(NOT DEFINED HIP_COMPILER)
|
||||
if(NOT DEFINED ENV{HIP_COMPILER})
|
||||
set(HIP_COMPILER "hcc" CACHE STRING "HIP Compiler")
|
||||
if(HIP_RUNTIME STREQUAL "hcc")
|
||||
set(HIP_COMPILER "hcc" CACHE STRING "HIP Compiler")
|
||||
else()
|
||||
set(HIP_COMPILER "clang" CACHE STRING "HIP Compiler")
|
||||
endif()
|
||||
else()
|
||||
set(HIP_COMPILER $ENV{HIP_COMPILER} CACHE STRING "HIP Compiler")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT (HIP_COMPILER STREQUAL "hcc" OR HIP_COMPILER STREQUAL "clang"))
|
||||
message(FATAL_ERROR "Must use HIP_COMPILER as hcc or clang")
|
||||
endif()
|
||||
|
||||
message(STATUS "HIP Compiler: " ${HIP_COMPILER})
|
||||
add_to_config(_buildInfo HIP_COMPILER)
|
||||
|
||||
# Determine HIP_RUNTIME
|
||||
# Either HCC or ROCclr; default is HCC
|
||||
if(NOT DEFINED ENV{HIP_RUNTIME})
|
||||
if(HIP_PLATFORM STREQUAL "hcc")
|
||||
set(HIP_RUNTIME "HCC" CACHE STRING "HIP Runtime")
|
||||
elseif (HIP_PLATFORM STREQUAL "rocclr")
|
||||
set(HIP_RUNTIME "ROCclr" CACHE STRING "HIP Runtime")
|
||||
elseif (HIP_PLATFORM STREQUAL "nvcc")
|
||||
set(HIP_RUNTIME "CUDA" CACHE STRING "HIP Runtime")
|
||||
endif()
|
||||
endif()
|
||||
add_to_config(_buildInfo HIP_RUNTIME)
|
||||
########### Determine HCC_HOME If compiler is hcc ##################
|
||||
|
||||
if(HIP_PLATFORM STREQUAL "rocclr")
|
||||
set(USE_PROF_API "1")
|
||||
endif()
|
||||
|
||||
# If HIP_PLATFORM is hcc, we need HCC_HOME and HSA_PATH to be defined
|
||||
if(HIP_PLATFORM STREQUAL "hcc")
|
||||
if(HIP_COMPILER STREQUAL "hcc")
|
||||
# Determine HCC_HOME
|
||||
if(NOT DEFINED HCC_HOME)
|
||||
if(NOT DEFINED ENV{HCC_HOME})
|
||||
@@ -209,10 +221,6 @@ if(HIP_PLATFORM STREQUAL "hcc")
|
||||
set(HCC_HOME $ENV{HCC_HOME} CACHE PATH "Path to which HCC has been installed")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(DEFINED ENV{HIP_DEVELOPER})
|
||||
add_to_config(_buildInfo HCC_HOME)
|
||||
endif()
|
||||
if(IS_ABSOLUTE ${HCC_HOME} AND EXISTS ${HCC_HOME} AND IS_DIRECTORY ${HCC_HOME})
|
||||
execute_process(COMMAND ${HCC_HOME}/bin/hcc --version
|
||||
OUTPUT_VARIABLE HCC_VERSION
|
||||
@@ -229,7 +237,11 @@ if(HIP_PLATFORM STREQUAL "hcc")
|
||||
string(REPLACE "." ";" HCC_VERSION_LIST ${HCC_PACKAGE_VERSION})
|
||||
list(GET HCC_VERSION_LIST 0 HCC_VERSION_MAJOR)
|
||||
list(GET HCC_VERSION_LIST 1 HCC_VERSION_MINOR)
|
||||
endif()
|
||||
|
||||
############ If HIP_PLATFORM is amd, HSA_PATH has to be defined ##################
|
||||
|
||||
if(HIP_PLATFORM STREQUAL "amd")
|
||||
# Determine HSA_PATH
|
||||
if(NOT DEFINED HSA_PATH)
|
||||
if(NOT DEFINED ENV{HSA_PATH})
|
||||
@@ -244,6 +256,7 @@ if(HIP_PLATFORM STREQUAL "hcc")
|
||||
message(FATAL_ERROR "Don't know where to find HSA runtime. Please specify absolute path using -DHSA_PATH")
|
||||
endif()
|
||||
endif()
|
||||
message(STATUS "\nHSA runtime in: " ${HSA_PATH})
|
||||
|
||||
# Set default build type
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
@@ -288,41 +301,6 @@ 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)
|
||||
|
||||
#############################
|
||||
# Profiling API support
|
||||
#############################
|
||||
# Generate profiling API macros/structures header
|
||||
if(HIP_PLATFORM STREQUAL "hcc")
|
||||
if(USE_PROF_API EQUAL 1)
|
||||
set(PROF_API_STR "${PROJECT_BINARY_DIR}/include/hip/hcc_detail/hip_prof_str.h")
|
||||
set(PROF_API_HDR "${CMAKE_CURRENT_SOURCE_DIR}/include/hip/hcc_detail/hip_runtime_api.h")
|
||||
set(PROF_API_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||
set(PROF_API_GEN "${CMAKE_CURRENT_SOURCE_DIR}/hip_prof_gen.py")
|
||||
set(PROF_API_LOG "${PROJECT_BINARY_DIR}/hip_prof_gen.log.txt")
|
||||
set(PROF_API_CMD "${PROF_API_GEN} -v ${OPT_PROF_API} ${PROF_API_HDR} ${PROF_API_SRC} ${PROF_API_STR} >${PROF_API_LOG}")
|
||||
MESSAGE(STATUS "Generating profiling promitives: ${PROF_API_STR}")
|
||||
execute_process(COMMAND sh -c "rm -f ${PROF_API_STR}; ${PROF_API_CMD}")
|
||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${PROF_API_GEN} ${PROF_API_HDR} ${PROF_API_STR})
|
||||
|
||||
# Enable profiling API
|
||||
find_path(PROF_API_HEADER_DIR prof_protocol.h
|
||||
HINTS
|
||||
${PROF_API_HEADER_PATH}
|
||||
PATHS
|
||||
/opt/rocm/roctracer
|
||||
PATH_SUFFIXES
|
||||
include/ext
|
||||
)
|
||||
if(NOT PROF_API_HEADER_DIR)
|
||||
MESSAGE(WARNING "Profiling API header not found. Disabling roctracer integration. Use -DPROF_API_HEADER_PATH=<path to prof_protocol.h header>")
|
||||
else()
|
||||
add_definitions(-DUSE_PROF_API=1)
|
||||
include_directories(${PROF_API_HEADER_DIR})
|
||||
MESSAGE(STATUS "Profiling API: ${PROF_API_HEADER_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#############################
|
||||
# Build steps
|
||||
#############################
|
||||
@@ -336,45 +314,53 @@ if (BUILD_HIPIFY_CLANG)
|
||||
add_subdirectory(hipify-clang)
|
||||
endif()
|
||||
|
||||
# Build LPL an CA (fat binary generation / fat binary decomposition tools) if
|
||||
# platform is hcc; do this before the ugly hijacking of the compiler, since no
|
||||
# HC code is involved.
|
||||
#if (HIP_PLATFORM STREQUAL "hcc")
|
||||
# add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lpl_ca)
|
||||
#endif ()
|
||||
|
||||
if(HIP_PLATFORM STREQUAL "rocclr")
|
||||
# Determine HSA_PATH
|
||||
if(NOT DEFINED HSA_PATH)
|
||||
if(NOT DEFINED ENV{HSA_PATH})
|
||||
set(HSA_PATH "/opt/rocm/hsa" CACHE PATH "Path to which HSA runtime has been installed")
|
||||
else()
|
||||
set(HSA_PATH $ENV{HSA_PATH} CACHE PATH "Path to which HSA runtime has been installed")
|
||||
endif()
|
||||
endif()
|
||||
if(IS_ABSOLUTE ${HSA_PATH} AND EXISTS ${HSA_PATH} AND IS_DIRECTORY ${HSA_PATH})
|
||||
message(STATUS "Looking for HSA runtime in: " ${HSA_PATH})
|
||||
else()
|
||||
message(FATAL_ERROR "Don't know where to find HSA runtime. Please specify absolute path using -DHSA_PATH")
|
||||
endif()
|
||||
|
||||
if(HIP_RUNTIME STREQUAL "rocclr")
|
||||
include_directories(${PROJECT_SOURCE_DIR}/include)
|
||||
add_subdirectory(rocclr)
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/.hipInfo" ${_buildInfo})
|
||||
|
||||
|
||||
# set(ROCclr_CXX_FLAGS "-hc -fno-gpu-rdc --amdgpu-target=gfx803 --amdgpu-target=gfx900 --amdgpu-target=gfx906 --amdgpu-target=gfx908 ")
|
||||
# set(ROCclr_CXX_FLAGS "-hc -fno-gpu-rdc --amdgpu-target=gfx803 --amdgpu-target=gfx900 --amdgpu-target=gfx906 --amdgpu-target=gfx908 ")
|
||||
set(HIP_ROCclr_BUILD_FLAGS "${HIP_ROCclr_BUILD_FLAGS} -fPIC ${ROCclr_CXX_FLAGS} -I${HSA_PATH}/include")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HIP_ROCclr_BUILD_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${HIP_ROCclr_BUILD_FLAGS}")
|
||||
set(HCC_CXX_FLAGS "-hc -fno-gpu-rdc --amdgpu-target=gfx803 --amdgpu-target=gfx900 --amdgpu-target=gfx906 --amdgpu-target=gfx908 ")
|
||||
set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include")
|
||||
|
||||
endif()
|
||||
|
||||
message(STATUS "\nHSA runtime in: " ${HSA_PATH})
|
||||
# Build hip_hcc if platform is hcc
|
||||
if(HIP_PLATFORM STREQUAL "hcc")
|
||||
# Build hip_hcc if runtime is hcc
|
||||
if(HIP_RUNTIME STREQUAL "hcc")
|
||||
#############################
|
||||
# Profiling API support
|
||||
#############################
|
||||
# Generate profiling API macros/structures header
|
||||
if(USE_PROF_API EQUAL 1)
|
||||
set(PROF_API_STR "${PROJECT_BINARY_DIR}/include/hip/hcc_detail/hip_prof_str.h")
|
||||
set(PROF_API_HDR "${CMAKE_CURRENT_SOURCE_DIR}/include/hip/hcc_detail/hip_runtime_api.h")
|
||||
set(PROF_API_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||
set(PROF_API_GEN "${CMAKE_CURRENT_SOURCE_DIR}/hip_prof_gen.py")
|
||||
set(PROF_API_LOG "${PROJECT_BINARY_DIR}/hip_prof_gen.log.txt")
|
||||
set(PROF_API_CMD "${PROF_API_GEN} -v ${OPT_PROF_API} ${PROF_API_HDR} ${PROF_API_SRC} ${PROF_API_STR} >${PROF_API_LOG}")
|
||||
MESSAGE(STATUS "Generating profiling promitives: ${PROF_API_STR}")
|
||||
execute_process(COMMAND sh -c "rm -f ${PROF_API_STR}; ${PROF_API_CMD}")
|
||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${PROF_API_GEN} ${PROF_API_HDR} ${PROF_API_STR})
|
||||
|
||||
# Enable profiling API
|
||||
find_path(PROF_API_HEADER_DIR prof_protocol.h
|
||||
HINTS
|
||||
${PROF_API_HEADER_PATH}
|
||||
PATHS
|
||||
/opt/rocm/roctracer
|
||||
PATH_SUFFIXES
|
||||
include/ext
|
||||
)
|
||||
if(NOT PROF_API_HEADER_DIR)
|
||||
MESSAGE(WARNING "Profiling API header not found. Disabling roctracer integration. Use -DPROF_API_HEADER_PATH=<path to prof_protocol.h header>")
|
||||
else()
|
||||
add_definitions(-DUSE_PROF_API=1)
|
||||
include_directories(${PROF_API_HEADER_DIR})
|
||||
MESSAGE(STATUS "Profiling API: ${PROF_API_HEADER_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include_directories(${PROJECT_BINARY_DIR}/include)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/include)
|
||||
set(HIP_HCC_BUILD_FLAGS)
|
||||
@@ -430,24 +416,21 @@ if(HIP_PLATFORM STREQUAL "hcc")
|
||||
|
||||
target_include_directories(
|
||||
hiprtc SYSTEM
|
||||
PRIVATE ${PROJECT_SOURCE_DIR}/include ${HSA_PATH}/include)
|
||||
PRIVATE ${PROJECT_SOURCE_DIR}/include ${HSA_PATH}/include)
|
||||
|
||||
set_target_properties(hip_hcc PROPERTIES CXX_VISIBILITY_PRESET hidden)
|
||||
set_target_properties(hip_hcc PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
|
||||
set_target_properties(hiprtc PROPERTIES CXX_VISIBILITY_PRESET hidden)
|
||||
set_target_properties(hiprtc PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
|
||||
|
||||
|
||||
if(HIP_PLATFORM STREQUAL "hcc")
|
||||
find_package(amd_comgr REQUIRED CONFIG
|
||||
PATHS
|
||||
/opt/rocm/
|
||||
PATH_SUFFIXES
|
||||
cmake/amd_comgr
|
||||
lib/cmake/amd_comgr
|
||||
)
|
||||
MESSAGE(STATUS "Code Object Manager found at ${amd_comgr_DIR}.")
|
||||
endif()
|
||||
find_package(amd_comgr REQUIRED CONFIG
|
||||
PATHS
|
||||
/opt/rocm/
|
||||
PATH_SUFFIXES
|
||||
cmake/amd_comgr
|
||||
lib/cmake/amd_comgr
|
||||
)
|
||||
MESSAGE(STATUS "Code Object Manager found at ${amd_comgr_DIR}.")
|
||||
|
||||
target_link_libraries(hip_hcc PRIVATE amd_comgr)
|
||||
target_link_libraries(hip_hcc_static PRIVATE amd_comgr)
|
||||
@@ -464,19 +447,20 @@ if(HIP_PLATFORM STREQUAL "hcc")
|
||||
else()
|
||||
target_link_libraries(device INTERFACE host)
|
||||
endif()
|
||||
|
||||
# Generate .hipInfo
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/.hipInfo" ${_buildInfo})
|
||||
endif()
|
||||
|
||||
if(HIP_PLATFORM STREQUAL "hcc" OR HIP_PLATFORM STREQUAL "rocclr")
|
||||
if(HIP_PLATFORM STREQUAL "amd")
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lpl_ca)
|
||||
endif()
|
||||
|
||||
# Generate .hipInfo
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/.hipInfo" ${_buildInfo})
|
||||
|
||||
# Generate .hipVersion
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/.hipVersion" ${_versionInfo})
|
||||
|
||||
if(NOT DEFINED HIP_VERSION_GITDATE)
|
||||
set(HIP_VERSION_GITDATE 0)
|
||||
set(HIP_VERSION_GITDATE 0)
|
||||
endif()
|
||||
|
||||
# Generate hip_version.h
|
||||
@@ -504,15 +488,13 @@ endif()
|
||||
#############################
|
||||
# Install steps
|
||||
#############################
|
||||
# Install hip_hcc if platform is hcc
|
||||
if(HIP_PLATFORM STREQUAL "hcc")
|
||||
# Install hip_hcc if runtime is hcc
|
||||
if(HIP_RUNTIME STREQUAL "hcc")
|
||||
install(TARGETS hip_hcc_static hip_hcc hiprtc DESTINATION lib)
|
||||
endif()
|
||||
|
||||
# Install .hipInfo
|
||||
if(HIP_PLATFORM STREQUAL "hcc" OR HIP_PLATFORM STREQUAL "rocclr")
|
||||
install(FILES ${PROJECT_BINARY_DIR}/.hipInfo DESTINATION lib)
|
||||
endif()
|
||||
install(FILES ${PROJECT_BINARY_DIR}/.hipInfo DESTINATION lib)
|
||||
|
||||
# Install .hipVersion
|
||||
install(FILES ${PROJECT_BINARY_DIR}/.hipVersion DESTINATION bin)
|
||||
@@ -521,9 +503,9 @@ install(FILES ${PROJECT_BINARY_DIR}/.hipVersion DESTINATION bin)
|
||||
execute_process(COMMAND test ${CMAKE_INSTALL_PREFIX} -ef ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
RESULT_VARIABLE INSTALL_SOURCE)
|
||||
if(NOT ${INSTALL_SOURCE} EQUAL 0)
|
||||
if(HIP_RUNTIME STREQUAL "HCC")
|
||||
if(HIP_RUNTIME STREQUAL "hcc")
|
||||
install(DIRECTORY src DESTINATION .)
|
||||
elseif(HIP_RUNTIME STREQUAL "ROCclr")
|
||||
elseif(HIP_RUNTIME STREQUAL "rocclr")
|
||||
install(DIRECTORY rocclr DESTINATION .)
|
||||
endif()
|
||||
install(DIRECTORY bin DESTINATION . USE_SOURCE_PERMISSIONS)
|
||||
@@ -540,36 +522,37 @@ install(DIRECTORY ${PROJECT_BINARY_DIR}/include/hip
|
||||
DESTINATION include
|
||||
FILES_MATCHING PATTERN "*.h*")
|
||||
|
||||
if(HIP_RUNTIME STREQUAL "hcc")
|
||||
install(TARGETS hip_hcc_static hip_hcc host device EXPORT hip-targets DESTINATION ${LIB_INSTALL_DIR})
|
||||
install(EXPORT hip-targets DESTINATION ${CONFIG_PACKAGE_INSTALL_DIR} NAMESPACE hip::)
|
||||
elseif(HIP_RUNTIME STREQUAL "rocclr")
|
||||
# install(TARGETS hip_on_rocclr host device EXPORT hip-targets DESTINATION ${LIB_INSTALL_DIR})
|
||||
endif()
|
||||
|
||||
#############################
|
||||
# hip-config
|
||||
#############################
|
||||
if(HIP_PLATFORM STREQUAL "hcc")
|
||||
install(TARGETS hip_hcc_static hip_hcc host device EXPORT hip-targets DESTINATION ${LIB_INSTALL_DIR})
|
||||
install(EXPORT hip-targets DESTINATION ${CONFIG_PACKAGE_INSTALL_DIR} NAMESPACE hip::)
|
||||
elseif( HIP_PLATFORM STREQUAL "rocclr")
|
||||
# install(TARGETS hip_on_rocclr host device EXPORT hip-targets DESTINATION ${LIB_INSTALL_DIR})
|
||||
endif()
|
||||
include(CMakePackageConfigHelpers)
|
||||
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
|
||||
)
|
||||
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
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
install(
|
||||
FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hip-config.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hip-config-version.cmake
|
||||
DESTINATION
|
||||
${CONFIG_PACKAGE_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
|
||||
)
|
||||
install(
|
||||
FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hip-config.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hip-config-version.cmake
|
||||
DESTINATION
|
||||
${CONFIG_PACKAGE_INSTALL_DIR}
|
||||
)
|
||||
|
||||
#############################
|
||||
# Packaging steps
|
||||
@@ -594,33 +577,33 @@ if (BUILD_HIPIFY_CLANG)
|
||||
add_dependencies(pkg_hip_base hipify-clang)
|
||||
endif()
|
||||
|
||||
if(HIP_PLATFORM STREQUAL "hcc")
|
||||
if(HIP_RUNTIME STREQUAL "hcc")
|
||||
message("HCC Package\n")
|
||||
# Package: hip_hcc
|
||||
set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hip_hcc)
|
||||
configure_file(packaging/hip-hcc.txt ${BUILD_DIR}/CMakeLists.txt @ONLY)
|
||||
configure_file(packaging/hip-hcc.postinst ${BUILD_DIR}/postinst @ONLY)
|
||||
configure_file(packaging/hip-hcc.prerm ${BUILD_DIR}/prerm @ONLY)
|
||||
add_custom_target(pkg_hip_hcc 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}
|
||||
DEPENDS hip_hcc hip_hcc_static hiprtc)
|
||||
else()
|
||||
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} )
|
||||
set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hip_hcc)
|
||||
configure_file(packaging/hip-hcc.txt ${BUILD_DIR}/CMakeLists.txt @ONLY)
|
||||
configure_file(packaging/hip-hcc.postinst ${BUILD_DIR}/postinst @ONLY)
|
||||
configure_file(packaging/hip-hcc.prerm ${BUILD_DIR}/prerm @ONLY)
|
||||
add_custom_target(pkg_hip_hcc 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}
|
||||
DEPENDS hip_hcc hip_hcc_static hiprtc)
|
||||
elseif(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
|
||||
@@ -656,18 +639,17 @@ add_custom_target(pkg_hip_samples COMMAND ${CMAKE_COMMAND} .
|
||||
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_PLATFORM STREQUAL "hcc")
|
||||
if(HIP_RUNTIME STREQUAL "hcc")
|
||||
add_custom_target(package
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
DEPENDS pkg_hip_base pkg_hip_hcc pkg_hip_nvcc pkg_hip_doc pkg_hip_samples)
|
||||
elseif(HIP_PLATFORM STREQUAL "rocclr")
|
||||
elseif(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)
|
||||
|
||||
+31
-31
@@ -15,8 +15,8 @@ use Cwd 'abs_path';
|
||||
# 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 control compilation path:
|
||||
# HIP_PLATFORM='nvcc' or HIP_PLATFORM='hcc'.
|
||||
# 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:
|
||||
@@ -122,9 +122,9 @@ sub delete_temp_dirs {
|
||||
}
|
||||
|
||||
#---
|
||||
#HIP_PLATFORM controls whether to use hcc (AMD) or nvcc as the platform:
|
||||
#HIP_PLATFORM controls whether to use amd or nvidia as the platform:
|
||||
#HIP_COMPILER controls whether to use hcc, clang or nvcc for compilation:
|
||||
#HIP_RUNTIME controls whether to use HCC, ROCclr, or NVCC as the runtime:
|
||||
#HIP_RUNTIME controls whether to use hcc, rocclr, or nvcc as the runtime:
|
||||
if ($isWindows) {
|
||||
# Windows cannot run perl natively, so hipcc will explicitly call perl
|
||||
$HIP_PLATFORM= `perl $HIP_PATH/bin/hipconfig --platform`;
|
||||
@@ -139,7 +139,7 @@ if ($isWindows) {
|
||||
}
|
||||
|
||||
# If using ROCclr runtime, need to find HIP_ROCCLR_HOME
|
||||
if (defined $HIP_RUNTIME and $HIP_RUNTIME eq "ROCclr" and !defined $HIP_ROCCLR_HOME) {
|
||||
if (defined $HIP_RUNTIME and $HIP_RUNTIME eq "rocclr" and !defined $HIP_ROCCLR_HOME) {
|
||||
my $hipcc_dir = dirname($0);
|
||||
if (-e "$hipcc_dir/../lib/bitcode") {
|
||||
$HIP_ROCCLR_HOME = abs_path($hipcc_dir . "/..");
|
||||
@@ -163,7 +163,7 @@ if (defined $HIP_ROCCLR_HOME) {
|
||||
}
|
||||
}
|
||||
|
||||
if (defined $HIP_COMPILER and $HIP_PLATFORM eq "hcc" and $HIP_COMPILER eq "clang") {
|
||||
if (defined $HIP_COMPILER and $HIP_PLATFORM eq "amd" and $HIP_COMPILER eq "clang") {
|
||||
if (!defined $HIP_CLANG_PATH) {
|
||||
$HIP_CLANG_PATH = "$ROCM_PATH/llvm/bin";
|
||||
}
|
||||
@@ -191,7 +191,7 @@ $setStdLib = 0; # TODO - set to 0
|
||||
|
||||
$default_amdgpu_target = 1;
|
||||
|
||||
if ($HIP_PLATFORM eq "hcc" and $HIP_COMPILER eq "clang") {
|
||||
if ($HIP_PLATFORM eq "amd" and $HIP_COMPILER eq "clang") {
|
||||
$HIPCC="$HIP_CLANG_PATH/clang++";
|
||||
|
||||
# If $HIPCC clang++ is not compiled, use clang instead
|
||||
@@ -249,7 +249,7 @@ if ($HIP_PLATFORM eq "hcc" and $HIP_COMPILER eq "clang") {
|
||||
$HIPCFLAGS .= " -D__HIP_ROCclr__";
|
||||
}
|
||||
|
||||
} elsif ($HIP_PLATFORM eq "hcc" and $HIP_COMPILER eq "hcc") {
|
||||
} elsif ($HIP_PLATFORM eq "amd" and $HIP_COMPILER eq "hcc") {
|
||||
$HIP_INCLUDE_PATH = "$HIP_PATH/include";
|
||||
if (! defined $HIP_LIB_PATH) {
|
||||
$HIP_LIB_PATH = "$HIP_PATH/lib";
|
||||
@@ -320,7 +320,7 @@ if ($HIP_PLATFORM eq "hcc" and $HIP_COMPILER eq "clang") {
|
||||
print ("HCC_HOME=$HCC_HOME\n");
|
||||
}
|
||||
|
||||
} elsif ($HIP_PLATFORM eq "nvcc") {
|
||||
} elsif ($HIP_PLATFORM eq "nvidia") {
|
||||
$CUDA_PATH=$ENV{'CUDA_PATH'} // '/usr/local/cuda';
|
||||
$HIP_INCLUDE_PATH = "$HIP_PATH/include";
|
||||
if ($verbose & 0x2) {
|
||||
@@ -351,7 +351,7 @@ 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 $needHipHcc = ($HIP_PLATFORM eq 'hcc' and $HIP_COMPILER eq 'hcc'); # set if we need to link hip_hcc.o from src tree. (some builds, ie cmake, provide their own)
|
||||
my $needHipHcc = ($HIP_PLATFORM eq 'amd' and $HIP_COMPILER eq 'hcc'); # set if we need to link hip_hcc.o from src tree. (some builds, ie cmake, provide their own)
|
||||
my $printHipVersion = 0; # print HIP version
|
||||
my $printCXXFlags = 0; # print HIPCXXFLAGS
|
||||
my $printLDFlags = 0; # print HIPLDFLAGS
|
||||
@@ -375,7 +375,7 @@ if ($verbose & 0x4) {
|
||||
|
||||
# Handle code object generation
|
||||
my $ISACMD="";
|
||||
if($HIP_PLATFORM eq "hcc" and $HIP_COMPILER eq "hcc"){
|
||||
if($HIP_PLATFORM eq "amd" and $HIP_COMPILER eq "hcc"){
|
||||
$ISACMD .= "$HIP_PATH/bin/lpl ";
|
||||
if($ARGV[0] eq "--genco"){
|
||||
foreach $isaarg (@ARGV[1..$#ARGV]){
|
||||
@@ -390,11 +390,11 @@ if($HIP_PLATFORM eq "hcc" and $HIP_COMPILER eq "hcc"){
|
||||
}
|
||||
}
|
||||
|
||||
if(($HIP_PLATFORM eq "hcc" and $HIP_COMPILER eq "hcc")){
|
||||
if(($HIP_PLATFORM eq "amd" and $HIP_COMPILER eq "hcc")){
|
||||
$ENV{HCC_EXTRA_LIBRARIES}="\n";
|
||||
}
|
||||
|
||||
if($HIP_PLATFORM eq "nvcc"){
|
||||
if($HIP_PLATFORM eq "nvidia"){
|
||||
$ISACMD .= "$HIP_PATH/bin/hipcc -ptx ";
|
||||
if($ARGV[0] eq "--genco"){
|
||||
foreach $isaarg (@ARGV[1..$#ARGV]){
|
||||
@@ -458,7 +458,7 @@ foreach $arg (@ARGV)
|
||||
$targetsStr .= substr($arg, length($targetOpt));
|
||||
$default_amdgpu_target = 0;
|
||||
# hip-clang does not accept --amdgpu-target= options.
|
||||
if ($HIP_PLATFORM eq "hcc" and $HIP_COMPILER eq "clang") {
|
||||
if ($HIP_PLATFORM eq "amd" and $HIP_COMPILER eq "clang") {
|
||||
$swallowArg = 1;
|
||||
}
|
||||
}
|
||||
@@ -471,11 +471,11 @@ foreach $arg (@ARGV)
|
||||
$coFormatv3 = 0;
|
||||
}
|
||||
|
||||
if (($arg =~ /--genco/) and $HIP_PLATFORM eq 'hcc' and $HIP_COMPILER eq 'clang' ) {
|
||||
if (($arg =~ /--genco/) and $HIP_PLATFORM eq 'amd' and $HIP_COMPILER eq 'clang' ) {
|
||||
$arg = "--cuda-device-only";
|
||||
}
|
||||
|
||||
if(($trimarg eq '-stdlib=libstdc++') and ($setStdLib eq 0) and $HIP_PLATFORM eq 'hcc' and $HIP_COMPILER eq 'hcc')
|
||||
if(($trimarg eq '-stdlib=libstdc++') and ($setStdLib eq 0) and $HIP_PLATFORM eq 'amd' and $HIP_COMPILER eq 'hcc')
|
||||
{
|
||||
$HIPCXXFLAGS .= $HCC_WA_FLAGS;
|
||||
$setStdLib = 1;
|
||||
@@ -524,7 +524,7 @@ foreach $arg (@ARGV)
|
||||
## 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,@/ and $HIP_PLATFORM eq 'hcc' and $HIP_COMPILER eq 'clang') {
|
||||
if ($arg =~ m/^-Wl,@/ and $HIP_PLATFORM eq 'amd' and $HIP_COMPILER eq 'clang') {
|
||||
my $file = substr $arg, 5;
|
||||
open my $in, "<:encoding(utf8)", $file or die "$file: $!";
|
||||
my $new_arg = "";
|
||||
@@ -581,7 +581,7 @@ foreach $arg (@ARGV)
|
||||
$arg = "$new_arg -Wl,\@$new_file";
|
||||
$escapeArg = 0;
|
||||
} elsif (($arg =~ m/\.a$/ || $arg =~ m/\.lo$/) &&
|
||||
$HIP_PLATFORM eq 'hcc' and $HIP_COMPILER eq 'clang') {
|
||||
$HIP_PLATFORM eq 'amd' and $HIP_COMPILER eq 'clang') {
|
||||
## process static library for hip-clang
|
||||
## extract object files from static library and pass them directly to
|
||||
## hip-clang.
|
||||
@@ -678,13 +678,13 @@ foreach $arg (@ARGV)
|
||||
$needCXXFLAGS = 1;
|
||||
if ($HIP_COMPILE_CXX_AS_HIP eq '0' or $HIP_COMPILER ne "clang") {
|
||||
$hasCXX = 1;
|
||||
} elsif ($HIP_PLATFORM eq "hcc" and $HIP_COMPILER eq "clang") {
|
||||
} elsif ($HIP_PLATFORM eq "amd" and $HIP_COMPILER eq "clang") {
|
||||
$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 "hcc" and $HIP_COMPILER eq "clang") {
|
||||
if ($HIP_PLATFORM eq "amd" and $HIP_COMPILER eq "clang") {
|
||||
$hasHIP = 1;
|
||||
$toolArgs .= " -x hip";
|
||||
} else {
|
||||
@@ -713,7 +713,7 @@ foreach $arg (@ARGV)
|
||||
$prevArg = $arg;
|
||||
}
|
||||
|
||||
if($HIP_PLATFORM eq "hcc"){
|
||||
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}) {
|
||||
@@ -764,34 +764,34 @@ if($HIP_PLATFORM eq "hcc"){
|
||||
|
||||
# hcc defaults to v2, so we need to convert to the appropriate flag
|
||||
# hip-clang defaults to v3, so we don't need to do anything
|
||||
if ($coFormatv3 and $HIP_PLATFORM eq 'hcc' and $HIP_COMPILER eq 'hcc') {
|
||||
if ($coFormatv3 and $HIP_PLATFORM eq 'amd' and $HIP_COMPILER eq 'hcc') {
|
||||
$HIPLDFLAGS .= " -mcode-object-v3";
|
||||
$HIPCXXFLAGS .= " -mcode-object-v3";
|
||||
}
|
||||
|
||||
if ($hasCXX and $HIP_PLATFORM eq 'nvcc') {
|
||||
if ($hasCXX and $HIP_PLATFORM eq 'nvidia') {
|
||||
$HIPCXXFLAGS .= " -x cu";
|
||||
}
|
||||
if ($hasCU and $HIP_PLATFORM eq 'hcc' and $HIP_COMPILER eq 'hcc') {
|
||||
if ($hasCU and $HIP_PLATFORM eq 'amd' and $HIP_COMPILER eq 'hcc') {
|
||||
$HIPCXXFLAGS .= " -x c++";
|
||||
}
|
||||
|
||||
if ($buildDeps and $HIP_PLATFORM eq 'nvcc') {
|
||||
if ($buildDeps and $HIP_PLATFORM eq 'nvidia') {
|
||||
$HIPCXXFLAGS .= " -M -D__CUDACC__";
|
||||
$HIPCFLAGS .= " -M -D__CUDACC__";
|
||||
}
|
||||
|
||||
if ($buildDeps and $HIP_PLATFORM eq 'hcc' and $HIP_COMPILER eq 'clang') {
|
||||
if ($buildDeps and $HIP_PLATFORM eq 'amd' and $HIP_COMPILER eq 'clang') {
|
||||
$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 'hcc' and $HIP_COMPILER eq 'clang') {
|
||||
if ($rdc and !$compileOnly and $HIP_PLATFORM eq 'amd' and $HIP_COMPILER eq 'clang') {
|
||||
$HIPLDFLAGS .= " --hip-link";
|
||||
$HIPLDFLAGS .= $HIPLDARCHFLAGS;
|
||||
}
|
||||
|
||||
if ($setStdLib eq 0 and $HIP_PLATFORM eq 'hcc' and $HIP_COMPILER eq 'hcc')
|
||||
if ($setStdLib eq 0 and $HIP_PLATFORM eq 'amd' and $HIP_COMPILER eq 'hcc')
|
||||
{
|
||||
$HIPCXXFLAGS .= $HCC_WA_FLAGS;
|
||||
}
|
||||
@@ -810,7 +810,7 @@ if ($needHipHcc) {
|
||||
# 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 "hcc" and $HIP_COMPILER eq "clang") {
|
||||
if ($HIP_PLATFORM eq "amd" and $HIP_COMPILER eq "clang") {
|
||||
# Set default optimization level to -O3 for hip-clang.
|
||||
if ($optArg eq "") {
|
||||
$HIPCXXFLAGS .= " -O3";
|
||||
@@ -828,7 +828,7 @@ if ($HIP_PLATFORM eq "hcc" and $HIP_COMPILER eq "clang") {
|
||||
if ($DEVICE_LIB_PATH ne "$ROCM_PATH/amdgcn/bitcode") {
|
||||
$HIPCXXFLAGS .= " --hip-device-lib-path=$DEVICE_LIB_PATH";
|
||||
}
|
||||
if ($HIP_RUNTIME ne "HCC") {
|
||||
if ($HIP_RUNTIME ne "hcc") {
|
||||
$HIPCXXFLAGS .= " -fhip-new-launch-api";
|
||||
}
|
||||
}
|
||||
@@ -888,7 +888,7 @@ if ($printLDFlags) {
|
||||
print $HIPLDFLAGS;
|
||||
}
|
||||
if ($runCmd) {
|
||||
if ($HIP_PLATFORM eq "hcc" and $HIP_COMPILER eq "hcc" and exists($hipConfig{'HCC_VERSION'}) and $HCC_VERSION ne $hipConfig{'HCC_VERSION'}) {
|
||||
if ($HIP_PLATFORM eq "amd" and $HIP_COMPILER eq "hcc" and exists($hipConfig{'HCC_VERSION'}) and $HCC_VERSION ne $hipConfig{'HCC_VERSION'}) {
|
||||
print ("HIP ($HIP_PATH) was built using hcc $hipConfig{'HCC_VERSION'}, but you are using $HCC_HOME/hcc with version $HCC_VERSION from hipcc. Please rebuild HIP including cmake or update HCC_HOME variable.\n") ;
|
||||
die unless $ENV{'HIP_IGNORE_HCC_VERSION'};
|
||||
}
|
||||
|
||||
@@ -7,4 +7,6 @@ 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
|
||||
+20
-19
@@ -35,8 +35,8 @@ if ($p_help) {
|
||||
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 (hcc or clang or nvcc)\n";
|
||||
print " --platform, -P : print platform (hcc or nvcc)\n";
|
||||
print " --runtime, -r : print runtime (HCC or ROCclr)\n";
|
||||
print " --platform, -P : print platform (amd or nvidia)\n";
|
||||
print " --runtime, -r : print runtime (hcc or rocclr)\n";
|
||||
print " --hipclangpath, -l : print HIP_CLANG_PATH\n";
|
||||
print " --full, -f : print full config\n";
|
||||
print " --version, -v : print hip version\n";
|
||||
@@ -98,17 +98,17 @@ if (defined $HIP_ROCCLR_HOME) {
|
||||
$HIP_INFO_PATH= "$HIP_PATH/lib/.hipInfo"; # use actual file
|
||||
}
|
||||
#---
|
||||
#HIP_PLATFORM controls whether to use NVCC or HCC for compilation:
|
||||
#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'} // "hcc";
|
||||
$HIP_RUNTIME = $ENV{'HIP_RUNTIME'} // $hipInfo{'HIP_RUNTIME'} // "HCC";
|
||||
$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) {
|
||||
if (defined $HIP_RUNTIME and $HIP_RUNTIME eq "rocclr" and !defined $HIP_ROCCLR_HOME) {
|
||||
my $hipconfig_dir = dirname($0);
|
||||
if (-e "$hipconfig_dir/../lib/bitcode") {
|
||||
$HIP_ROCCLR_HOME = abs_path($hipconfig_dir . "/..");
|
||||
@@ -118,15 +118,17 @@ if (defined $HIP_RUNTIME and $HIP_RUNTIME eq "ROCclr" and !defined $HIP_ROCCLR_H
|
||||
}
|
||||
|
||||
if (not defined $HIP_PLATFORM) {
|
||||
if (can_run("$HCC_HOME/bin/hcc") or can_run("hcc")) {
|
||||
$HIP_PLATFORM = "hcc";
|
||||
} elsif (can_run("$HIP_CLANG_PATH/clang++") or can_run("clang++")) {
|
||||
$HIP_PLATFORM = "hcc";
|
||||
if (can_run("$HIP_CLANG_PATH/clang++") or can_run("clang++")) {
|
||||
$HIP_PLATFORM = "amd";
|
||||
} elsif (can_run("$HCC_HOME/bin/hcc") or can_run("hcc")) {
|
||||
$HIP_PLATFORM = "amd";
|
||||
} elsif (can_run("$CUDA_PATH/bin/nvcc") or can_run("nvcc")) {
|
||||
$HIP_PLATFORM = "nvcc";
|
||||
$HIP_PLATFORM = "nvidia";
|
||||
$HIP_COMPILER = "nvcc";
|
||||
$HIP_RUNTIME = "cuda";
|
||||
} else {
|
||||
# Default to hcc for now
|
||||
$HIP_PLATFORM = "hcc";
|
||||
# Default to amd for now
|
||||
$HIP_PLATFORM = "amd";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,10 +146,10 @@ if ($HIP_COMPILER eq "clang") {
|
||||
|
||||
$CPP_CONFIG = " -D__HIP_PLATFORM_HCC__= -I$HIP_PATH/include -I$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION -I$HSA_PATH/include";
|
||||
}
|
||||
if ($HIP_RUNTIME eq "ROCclr") {
|
||||
if ($HIP_RUNTIME eq "rocclr") {
|
||||
$CPP_CONFIG .= " -D__HIP_ROCclr__";
|
||||
}
|
||||
if ($HIP_PLATFORM eq "nvcc") {
|
||||
if ($HIP_PLATFORM eq "nvidia") {
|
||||
$CPP_CONFIG = " -D__HIP_PLATFORM_NVCC__= -I$HIP_PATH/include -I$CUDA_PATH/include";
|
||||
};
|
||||
|
||||
@@ -211,7 +213,7 @@ if (!$printed or $p_full) {
|
||||
print "HIP_PLATFORM : ", $HIP_PLATFORM, "\n";
|
||||
print "HIP_RUNTIME : ", $HIP_RUNTIME, "\n";
|
||||
print "CPP_CONFIG : ", $CPP_CONFIG, "\n";
|
||||
if ($HIP_PLATFORM eq "hcc")
|
||||
if ($HIP_PLATFORM eq "amd")
|
||||
{
|
||||
print "\n" ;
|
||||
if ($HIP_COMPILER eq "hcc")
|
||||
@@ -243,7 +245,7 @@ if (!$printed or $p_full) {
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
if ($HIP_PLATFORM eq "nvcc") {
|
||||
if ($HIP_PLATFORM eq "nvidia") {
|
||||
print "\n" ;
|
||||
print "== nvcc\n";
|
||||
#print "CUDA_PATH :", $CUDA_PATH";
|
||||
@@ -282,7 +284,7 @@ if ($p_check) {
|
||||
printf "good\n";
|
||||
}
|
||||
|
||||
if ($HIP_PLATFORM eq "hcc") {
|
||||
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) {
|
||||
@@ -295,7 +297,6 @@ if ($p_check) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($p_newline) {
|
||||
print "\n";
|
||||
}
|
||||
|
||||
@@ -205,8 +205,13 @@ set(CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_HIP_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_DYNA
|
||||
set(HIP_CLANG_PARALLEL_BUILD_COMPILE_OPTIONS "")
|
||||
set(HIP_CLANG_PARALLEL_BUILD_LINK_OPTIONS "")
|
||||
|
||||
if("${HIP_COMPILER}" STREQUAL "hcc")
|
||||
# Set the CMake Flags to use the HCC Compiler.
|
||||
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} <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
|
||||
set(CMAKE_HIP_CREATE_SHARED_MODULE "${HIP_HIPCC_CMAKE_LINKER_HELPER} <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <LINK_LIBRARIES> -shared" )
|
||||
set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
|
||||
elseif("${HIP_COMPILER}" STREQUAL "hcc")
|
||||
# Set the CMake Flags to use the hcc Compiler.
|
||||
set(CMAKE_HIP_CREATE_SHARED_LIBRARY "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HCC_HOME} <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
|
||||
set(CMAKE_HIP_CREATE_SHARED_MODULE "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HCC_HOME} <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <LINK_LIBRARIES> -shared" )
|
||||
set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HCC_HOME} <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
|
||||
@@ -637,6 +642,8 @@ macro(HIP_ADD_EXECUTABLE hip_target)
|
||||
endif()
|
||||
endif()
|
||||
set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HIP_CLANG_PATH} ${HIP_CLANG_PARALLEL_BUILD_LINK_OPTIONS} <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
|
||||
else()
|
||||
set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
|
||||
endif()
|
||||
if ("${_sources}" STREQUAL "")
|
||||
add_executable(${hip_target} ${_cmake_options} ${_generated_files} "")
|
||||
|
||||
@@ -48,7 +48,7 @@ execute_process(COMMAND ${HIP_HIPCONFIG_EXECUTABLE} --compiler OUTPUT_VARIABLE H
|
||||
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 "hcc")
|
||||
if("${HIP_PLATFORM}" STREQUAL "amd")
|
||||
if("${HIP_COMPILER}" STREQUAL "hcc")
|
||||
if(NOT "x${HCC_HOME}" STREQUAL "x")
|
||||
set(ENV{HCC_HOME} ${HCC_HOME})
|
||||
|
||||
@@ -123,7 +123,7 @@ set_target_properties(hip::host PROPERTIES
|
||||
INTERFACE_COMPILE_DEFINITIONS "__HIP_PLATFORM_HCC__=1"
|
||||
)
|
||||
|
||||
if(HIP_RUNTIME MATCHES "ROCclr")
|
||||
if(HIP_RUNTIME MATCHES "rocclr")
|
||||
set_target_properties(hip::amdhip64 PROPERTIES
|
||||
INTERFACE_COMPILE_DEFINITIONS "__HIP_ROCclr__=1"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${HSA_HEADER}"
|
||||
|
||||
@@ -47,16 +47,16 @@ In the above, BUILD commands provide instructions on how to build the test case
|
||||
|
||||
The supported syntax for the BUILD command is:
|
||||
<<<<<<< HEAD
|
||||
BUILD: %t %s HIPCC_OPTIONS <hipcc_specific_options> HCC_OPTIONS <hcc_specific_options> CLANG_OPTIONS <clang_specific_options> NVCC_OPTIONS <nvcc_specific_options> EXCLUDE_HIP_PLATFORM <hcc|nvcc|all> EXCLUDE_HIP_RUNTIME <HCC|ROCclr> EXCLUDE_HIP_COMPILER <hcc|clang> DEPENDS <dependencies>
|
||||
BUILD: %t %s HIPCC_OPTIONS <hipcc_specific_options> HCC_OPTIONS <hcc_specific_options> CLANG_OPTIONS <clang_specific_options> NVCC_OPTIONS <nvcc_specific_options> EXCLUDE_HIP_PLATFORM <amd|nvidia|all> EXCLUDE_HIP_RUNTIME <hcc|rocclr> EXCLUDE_HIP_COMPILER <hcc|clang> DEPENDS <dependencies>
|
||||
```
|
||||
%s: refers to current source file name. Additional source files needed for the test can be specified by name (including relative path).
|
||||
%t: refers to target executable named derived by removing the extension from the current source file. Alternatively a target executable name can be specified.
|
||||
HIPCC_OPTIONS: All options specified after this delimiter are passed to hipcc on both HCC and NVCC platforms.
|
||||
HCC_OPTIONS: All options specified after this delimiter are passed to hipcc on HCC compiler only.
|
||||
HIPCC_OPTIONS: All options specified after this delimiter are passed to hipcc on both amd and nvidia platforms.
|
||||
HCC_OPTIONS: All options specified after this delimiter are passed to hipcc on hcc compiler only.
|
||||
CLANG_OPTIONS: All options specified after this delimiter are passed to hipcc on HIP-Clang compiler only.
|
||||
NVCC_OPTIONS: All options specified after this delimiter are passed to hipcc on NVCC platform only.
|
||||
EXCLUDE_HIP_PLATFORM: This can be used to exclude a test case from HCC, NVCC or both platforms.
|
||||
EXCLUDE_HIP_RUNTIME: This can be used to exclude a test case from HCC or ROCclr runtime.
|
||||
NVCC_OPTIONS: All options specified after this delimiter are passed to hipcc on nvidia platform only.
|
||||
EXCLUDE_HIP_PLATFORM: This can be used to exclude a test case from amd, nvidia or both platforms.
|
||||
EXCLUDE_HIP_RUNTIME: This can be used to exclude a test case from hcc or rocclr runtime.
|
||||
EXCLUDE_HIP_COMPILER: This can be used to exclude a test case from hcc or clang compiler.
|
||||
EXCLUDE_HIP_RUNTIME AND EXCLUDE_HIP_COMPILER: when both options are specified it excludes test case from particular runtime and compiler.
|
||||
DEPENDS: This can be used to specify dependencies that need to be built before building the current target.
|
||||
@@ -66,7 +66,7 @@ DEPENDS: This can be used to specify dependencies that need to be built before b
|
||||
|
||||
The supported syntax for the BUILD_CMD command is:
|
||||
```
|
||||
BUILD_CMD: <targetname> <build_command> EXCLUDE_HIP_PLATFORM <hcc|nvcc|all> EXCLUDE_HIP_RUNTIME <HCC|ROCclr> EXCLUDE_HIP_COMPILER <hcc|clang> DEPENDS <dependencies>
|
||||
BUILD_CMD: <targetname> <build_command> EXCLUDE_HIP_PLATFORM <amd|nvidia|all> EXCLUDE_HIP_RUNTIME <hcc|rocclr> EXCLUDE_HIP_COMPILER <hcc|clang> DEPENDS <dependencies>
|
||||
```
|
||||
%s: refers to current source file name. Additional source files needed for the test can be specified by name (including relative path).
|
||||
%t: refers to target executable named derived by removing the extension from the current source file. Alternatively a target executable name can be specified.
|
||||
@@ -76,8 +76,8 @@ BUILD_CMD: <targetname> <build_command> EXCLUDE_HIP_PLATFORM <hcc|nvcc|all> EXCL
|
||||
%cxx: refers to system c compiler pointed to by /usr/bin/c++.
|
||||
%S: refers to path to current source file.
|
||||
%T: refers to path to current build target.
|
||||
EXCLUDE_HIP_PLATFORM: This can be used to exclude a test case from HCC, NVCC or both platforms.
|
||||
EXCLUDE_HIP_RUNTIME: This can be used to exclude a test case from HCC or ROCclr runtime.
|
||||
EXCLUDE_HIP_PLATFORM: This can be used to exclude a test case from amd, nvidia or both platforms.
|
||||
EXCLUDE_HIP_RUNTIME: This can be used to exclude a test case from hcc or rocclr runtime.
|
||||
EXCLUDE_HIP_COMPILER: This can be used to exclude a test case from hcc or clang compiler.
|
||||
EXCLUDE_HIP_RUNTIME AND EXCLUDE_HIP_COMPILER: when both options are specified it excludes test from particular runtime and compiler.
|
||||
DEPENDS: This can be used to specify dependencies that need to be built before building the current target.
|
||||
@@ -87,11 +87,11 @@ DEPENDS: This can be used to specify dependencies that need to be built before b
|
||||
|
||||
The supported syntax for the TEST command is:
|
||||
```
|
||||
TEST: %t <arguments_to_test_executable> EXCLUDE_HIP_PLATFORM <hcc|nvcc|all> EXCLUDE_HIP_RUNTIME <HCC|ROCclr> EXCLUDE_HIP_COMPILER <hcc|clang>
|
||||
TEST: %t <arguments_to_test_executable> EXCLUDE_HIP_PLATFORM <amd|nvidia|all> EXCLUDE_HIP_RUNTIME <hcc|rocclr> EXCLUDE_HIP_COMPILER <hcc|clang>
|
||||
```
|
||||
%t: refers to target executable named derived by removing the extension from the current source file. Alternatively a target executable name can be specified.
|
||||
EXCLUDE_HIP_PLATFORM: This can be used to exclude a test case from HCC, NVCC or both platforms.
|
||||
EXCLUDE_HIP_RUNTIME: This can be used to exclude a test case from HCC or ROCclr runtime.
|
||||
EXCLUDE_HIP_PLATFORM: This can be used to exclude a test case from amd, nvidia or both platforms.
|
||||
EXCLUDE_HIP_RUNTIME: This can be used to exclude a test case from hcc or rocclr runtime.
|
||||
EXCLUDE_HIP_COMPILER: This can be used to exclude a test case from hcc or clang compiler.
|
||||
EXCLUDE_HIP_RUNTIME AND EXCLUDE_HIP_COMPILER: when both options are specified it excludes test from particular runtime and compiler.
|
||||
Note that if the test has been excluded for a specific platform/runtime/compiler in the BUILD command, it is automatically excluded from the TEST command as well for the sameplatform.
|
||||
@@ -100,7 +100,7 @@ Note that if the test has been excluded for a specific platform/runtime/compiler
|
||||
|
||||
When using the TEST command, HIT will squash and append the arguments specified to the test executable name to generate the CMAKE test name. Sometimes we might want to specify a more descriptive name. The TEST_NAMED command is used for that. The supported syntax for the TEST_NAMED command is:
|
||||
```
|
||||
TEST: %t CMAKE_TEST_NAME <arguments_to_test_executable> EXCLUDE_HIP_PLATFORM <hcc|nvcc|all> EXCLUDE_HIP_RUNTIME <HCC|ROCclr> EXCLUDE_HIP_COMPILER <hcc|clang>
|
||||
TEST: %t CMAKE_TEST_NAME <arguments_to_test_executable> EXCLUDE_HIP_PLATFORM <amd|nvidia|all> EXCLUDE_HIP_RUNTIME <hcc|rocclr> EXCLUDE_HIP_COMPILER <hcc|clang>
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "test_common.h"
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../src/test_common.cpp ../../src/timer.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../src/test_common.cpp timer.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "test_common.h"
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../src/test_common.cpp ../../src/timer.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../src/test_common.cpp timer.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "test_common.h"
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../src/test_common.cpp ../../src/timer.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../src/test_common.cpp timer.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -22,7 +22,7 @@ THE SOFTWARE.
|
||||
#include <time.h>
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../src/test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../src/test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t 1.2 2.3
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM rocclr
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_RUNTIME rocclr
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM rocclr
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_RUNTIME rocclr
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp HIPCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp HIPCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp HIPCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp HIPCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp HIPCC_OPTIONS -std=c++14 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp HIPCC_OPTIONS -std=c++14 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp HIPCC_OPTIONS -std=c++17 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp HIPCC_OPTIONS -std=c++17 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -19,7 +19,7 @@ THE SOFTWARE.
|
||||
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp HCC_OPTIONS -Xclang -fallow-half-arguments-and-returns CLANG_OPTIONS -Xclang -fallow-half-arguments-and-returns EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp HCC_OPTIONS -Xclang -fallow-half-arguments-and-returns CLANG_OPTIONS -Xclang -fallow-half-arguments-and-returns EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp HCC_OPTIONS -Xclang -fallow-half-arguments-and-returns CLANG_OPTIONS -Xclang -fallow-half-arguments-and-returns EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp HCC_OPTIONS -Xclang -fallow-half-arguments-and-returns CLANG_OPTIONS -Xclang -fallow-half-arguments-and-returns EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
/* HIT_START
|
||||
* BUILD: %t %s NVCC_OPTIONS -std=c++11
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvidia
|
||||
* HIT_END
|
||||
*/
|
||||
#include "test_common.h"
|
||||
|
||||
@@ -37,7 +37,7 @@ Testcase Scenarios :
|
||||
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST_NAMED: %t hipTestAtomicnoret-manywaves --atomicnoret --tests 1
|
||||
* TEST_NAMED: %t hipTestAtomicnoret-simple --atomicnoret --tests 2
|
||||
* TEST_NAMED: %t hipTestAtomic-manywaves --tests 1
|
||||
|
||||
@@ -22,7 +22,7 @@ THE SOFTWARE.
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp NVCC_OPTIONS -std=c++11
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvidia
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc HIPCC_OPTIONS -std=c++14
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia HIPCC_OPTIONS -std=c++14
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -23,8 +23,8 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD_CMD: libLazyLoad_amd %hc %S/%s -o liblazyLoad.so -I%S/.. -fPIC -lpthread -shared -DTEST_SHARED_LIBRARY EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD_CMD: libLazyLoad_nvidia %hc %S/%s --std=c++11 -o liblazyLoad.so -I%S/.. -Xcompiler -fPIC -lpthread -shared -DTEST_SHARED_LIBRARY EXCLUDE_HIP_PLATFORM hcc rocclr
|
||||
* BUILD_CMD: libLazyLoad_amd %hc %S/%s -o liblazyLoad.so -I%S/.. -fPIC -lpthread -shared -DTEST_SHARED_LIBRARY EXCLUDE_HIP_PLATFORM nvidia
|
||||
* BUILD_CMD: libLazyLoad_nvidia %hc %S/%s --std=c++11 -o liblazyLoad.so -I%S/.. -Xcompiler -fPIC -lpthread -shared -DTEST_SHARED_LIBRARY EXCLUDE_HIP_PLATFORM amd
|
||||
* BUILD_CMD: %t %hc %S/%s --std=c++11 -o %T/%t -I%S/.. -ldl
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
|
||||
@@ -25,8 +25,8 @@ THE SOFTWARE.
|
||||
* */
|
||||
|
||||
/* HIT_START
|
||||
* BUILD_CMD: bit_extract_kernel.code %hc --genco %S/bit_extract_kernel.cpp -o bit_extract_kernel.code EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD_CMD: %t %hc %S/%s -I%S/.. -o %T/%t -ldl EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD_CMD: bit_extract_kernel.code %hc --genco %S/bit_extract_kernel.cpp -o bit_extract_kernel.code EXCLUDE_HIP_PLATFORM nvidia
|
||||
* BUILD_CMD: %t %hc %S/%s -I%S/.. -o %T/%t -ldl EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
* */
|
||||
|
||||
/* HIT_START
|
||||
* BUILD_CMD: hipMalloc %cxx -D__HIP_PLATFORM_HCC__ -I%hip-path/include -I/opt/rocm/include %S/%s -Wl,--rpath=%hip-path/lib %hip-path/lib/libamdhip64.so -o %T/%t -std=c++11 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD_CMD: hipMalloc %cxx -D__HIP_PLATFORM_HCC__ -I%hip-path/include -I/opt/rocm/include %S/%s -Wl,--rpath=%hip-path/lib %hip-path/lib/libamdhip64.so -o %T/%t -std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvidia
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
|
||||
|
||||
/* HIT_START
|
||||
* BUILD_CMD: gpu.o %hc -I%hip-path/include -g -c %S/gpu.cpp -o %T/gpu.o EXCLUDE_HIP_PLATFORM nvcc rocclr
|
||||
* BUILD_CMD: launchkernel.o %hc -D__HIP_PLATFORM_HCC__ -g -I%hip-path/include -c %S/LaunchKernel.c -o %T/launchkernel.o EXCLUDE_HIP_PLATFORM nvcc rocclr
|
||||
* BUILD_CMD: LaunchKernel %hc %T/launchkernel.o %T/gpu.o -g -Wl,--rpath=%hip-path/lib %hip-path/lib/libamdhip64.so -o %T/%t DEPENDS gpu.o launchkernel.o EXCLUDE_HIP_PLATFORM nvcc rocclr
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvcc rocclr
|
||||
* BUILD_CMD: gpu.o %hc -I%hip-path/include -g -c %S/gpu.cpp -o %T/gpu.o EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME rocclr
|
||||
* BUILD_CMD: launchkernel.o %hc -D__HIP_PLATFORM_HCC__ -g -I%hip-path/include -c %S/LaunchKernel.c -o %T/launchkernel.o EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME rocclr
|
||||
* BUILD_CMD: LaunchKernel %hc %T/launchkernel.o %T/gpu.o -g -Wl,--rpath=%hip-path/lib %hip-path/lib/libamdhip64.so -o %T/%t DEPENDS gpu.o launchkernel.o EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME rocclr
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME rocclr
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
* */
|
||||
|
||||
/* HIT_START
|
||||
* BUILD_CMD: hipMalloc %cc -D__HIP_PLATFORM_NVCC__ -I%hip-path/include -I/usr/local/cuda/include %S/%s -o %T/hipMalloc_nv -L/usr/local/cuda/lib64 -lcudart EXCLUDE_HIP_PLATFORM hcc rocclr
|
||||
* BUILD_CMD: hipMalloc %cc -D__HIP_PLATFORM_HCC__ -I%hip-path/include %S/%s -Wl,--rpath=%hip-path/lib %hip-path/lib/libamdhip64.so -o %T/hipMalloc_hcc EXCLUDE_HIP_PLATFORM nvcc rocclr
|
||||
* TEST: hipMalloc_nv EXCLUDE_HIP_PLATFORM hcc rocclr
|
||||
* TEST: hipMalloc_hcc EXCLUDE_HIP_PLATFORM nvcc rocclr
|
||||
* BUILD_CMD: hipMalloc %cc -D__HIP_PLATFORM_NVCC__ -I%hip-path/include -I/usr/local/cuda/include %S/%s -o %T/hipMalloc_nv -L/usr/local/cuda/lib64 -lcudart EXCLUDE_HIP_PLATFORM amd
|
||||
* BUILD_CMD: hipMalloc %cc -D__HIP_PLATFORM_HCC__ -I%hip-path/include %S/%s -Wl,--rpath=%hip-path/lib %hip-path/lib/libamdhip64.so -o %T/hipMalloc_hcc EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME rocclr
|
||||
* TEST: hipMalloc_nv EXCLUDE_HIP_PLATFORM amd
|
||||
* TEST: hipMalloc_hcc EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME rocclr
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright (c) 2015-2016 Advanced Micro Devices, Inc. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
// Test the HCC-specific API extensions for HIP:
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM all
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include "hip/hip_runtime.h"
|
||||
#include "hip/hip_ext.h"
|
||||
#include "test_common.h"
|
||||
|
||||
#define CHECK(error) \
|
||||
if (error != hipSuccess) { \
|
||||
fprintf(stderr, "error: '%s'(%d) at %s:%d\n", hipGetErrorString(error), error, __FILE__, \
|
||||
__LINE__); \
|
||||
exit(EXIT_FAILURE); \
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
int deviceId;
|
||||
CHECK(hipGetDevice(&deviceId));
|
||||
hipDeviceProp_t props;
|
||||
CHECK(hipGetDeviceProperties(&props, deviceId));
|
||||
printf("info: running on device #%d %s\n", deviceId, props.name);
|
||||
|
||||
#ifdef __HCC__
|
||||
hc::accelerator acc;
|
||||
CHECK(hipHccGetAccelerator(deviceId, &acc));
|
||||
std::wcout << "device_path=" << acc.get_device_path() << "\n";
|
||||
|
||||
hc::accelerator_view* av;
|
||||
CHECK(hipHccGetAcceleratorView(0 /*nullStream*/, &av));
|
||||
#endif
|
||||
|
||||
|
||||
passed();
|
||||
};
|
||||
@@ -20,7 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp LINK_OPTIONS hiprtc EXCLUDE_HIP_PLATFORM nvcc rocclr
|
||||
* BUILD: %t %s ../test_common.cpp LINK_OPTIONS hiprtc EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME rocclr
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp LINK_OPTIONS hiprtc EXCLUDE_HIP_PLATFORM nvcc rocclr
|
||||
* BUILD: %t %s ../test_common.cpp LINK_OPTIONS hiprtc EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME rocclr
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvcc EXCLUDE_HIP_RUNTIME HCC EXCLUDE_HIP_COMPILER hcc
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME hcc EXCLUDE_HIP_COMPILER hcc
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvcc EXCLUDE_HIP_RUNTIME HCC EXCLUDE_HIP_COMPILER hcc
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME hcc EXCLUDE_HIP_COMPILER hcc
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -21,8 +21,8 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_RUNTIME hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvidia
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_RUNTIME hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvidia
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ THE SOFTWARE.
|
||||
// Test the Grid_Launch syntax.
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -24,9 +24,9 @@ THE SOFTWARE.
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM hcc rocclr
|
||||
* TEST: %t --memcpyWithPeer EXCLUDE_HIP_PLATFORM hcc rocclr
|
||||
* TEST: %t --mirrorPeers EXCLUDE_HIP_PLATFORM hcc rocclr
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM amd
|
||||
* TEST: %t --memcpyWithPeer EXCLUDE_HIP_PLATFORM amd
|
||||
* TEST: %t --mirrorPeers EXCLUDE_HIP_PLATFORM amd
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvcc EXCLUDE_HIP_RUNTIME HCC EXCLUDE_HIP_COMPILER hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvcc EXCLUDE_HIP_RUNTIME HCC EXCLUDE_HIP_COMPILER hcc
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME hcc EXCLUDE_HIP_COMPILER hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME hcc EXCLUDE_HIP_COMPILER hcc
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvcc EXCLUDE_HIP_RUNTIME HCC EXCLUDE_HIP_COMPILER hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvcc EXCLUDE_HIP_RUNTIME HCC EXCLUDE_HIP_COMPILER hcc
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME hcc EXCLUDE_HIP_COMPILER hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME hcc EXCLUDE_HIP_COMPILER hcc
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvcc EXCLUDE_HIP_RUNTIME HCC EXCLUDE_HIP_COMPILER hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvcc EXCLUDE_HIP_RUNTIME HCC EXCLUDE_HIP_COMPILER hcc
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME hcc EXCLUDE_HIP_COMPILER hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME hcc EXCLUDE_HIP_COMPILER hcc
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvcc EXCLUDE_HIP_RUNTIME HCC EXCLUDE_HIP_COMPILER hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvcc EXCLUDE_HIP_RUNTIME HCC EXCLUDE_HIP_COMPILER hcc
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME hcc EXCLUDE_HIP_COMPILER hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME hcc EXCLUDE_HIP_COMPILER hcc
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvcc EXCLUDE_HIP_RUNTIME HCC EXCLUDE_HIP_COMPILER hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvcc EXCLUDE_HIP_RUNTIME HCC EXCLUDE_HIP_COMPILER hcc
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME hcc EXCLUDE_HIP_COMPILER hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME hcc EXCLUDE_HIP_COMPILER hcc
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvcc EXCLUDE_HIP_RUNTIME HCC EXCLUDE_HIP_COMPILER hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvcc EXCLUDE_HIP_RUNTIME HCC EXCLUDE_HIP_COMPILER hcc
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME hcc EXCLUDE_HIP_COMPILER hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME hcc EXCLUDE_HIP_COMPILER hcc
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvcc EXCLUDE_HIP_RUNTIME HCC EXCLUDE_HIP_COMPILER hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvcc EXCLUDE_HIP_RUNTIME HCC EXCLUDE_HIP_COMPILER hcc
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME hcc EXCLUDE_HIP_COMPILER hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME hcc EXCLUDE_HIP_COMPILER hcc
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvcc EXCLUDE_HIP_RUNTIME HCC EXCLUDE_HIP_COMPILER hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvcc EXCLUDE_HIP_RUNTIME HCC EXCLUDE_HIP_COMPILER hcc
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME hcc EXCLUDE_HIP_COMPILER hcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME hcc EXCLUDE_HIP_COMPILER hcc
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST_NAMED: %t hipDeviceGetPCIBusId-vs-hipDeviceGetAttribute --tests 0x1
|
||||
* TEST_NAMED: %t hipDeviceGetPCIBusId-vs-lspci --tests 0x2 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* TEST_NAMED: %t hipDeviceGetPCIBusId-vs-lspci --tests 0x2 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST_NAMED: %t hipSetGetDevice-invalidDevice
|
||||
* TEST_NAMED: %t hipSetGetDevice-allValidDevice
|
||||
* TEST_NAMED: %t hipSetGetDevice-validDev1 --computeDevCnt 1
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM rocclr
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_RUNTIME rocclr
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@ THE SOFTWARE.
|
||||
// forces synchronization : set
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc rocclr
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME rocclr
|
||||
* TEST: %t --iterations 10
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -24,8 +24,8 @@ THE SOFTWARE.
|
||||
* TEST_NAMED: %t hipMallocManaged2 --tests 2
|
||||
* TEST_NAMED: %t hipMallocManagedNegativeTests --tests 3
|
||||
* TEST_NAMED: %t hipMallocManagedMultiChunkSingleDevice --tests 4
|
||||
* TEST_NAMED: %t hipMallocManagedMultiChunkMultiDevice --tests 5 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* TEST_NAMED: %t hipMallocManagedOversubscription --tests 6 EXCLUDE_HIP_PLATFORM rocclr nvcc
|
||||
* TEST_NAMED: %t hipMallocManagedMultiChunkMultiDevice --tests 5 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST_NAMED: %t hipMallocManagedOversubscription --tests 6 EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME rocclr
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* */
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc rocclr
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME rocclr
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -186,12 +186,12 @@ bool testhipMemset2AsyncOps() {
|
||||
int main(int argc, char *argv[]) {
|
||||
HipTest::parseStandardArguments(argc, argv, true);
|
||||
bool testResult = true;
|
||||
char * cA_d;
|
||||
char * cA_h;
|
||||
int16_t * siA_d;
|
||||
int16_t * siA_h;
|
||||
int32_t * iA_d;
|
||||
int32_t * iA_h;
|
||||
char * cA_d = NULL;
|
||||
char * cA_h = NULL;
|
||||
int16_t * siA_d = NULL;
|
||||
int16_t * siA_h = NULL;
|
||||
int32_t * iA_d = NULL;
|
||||
int32_t * iA_h = NULL;
|
||||
HIPCHECK(hipSetDevice(p_gpuDevice));
|
||||
testResult &= testhipMemsetSmallSize(memsetval, p_gpuDevice);
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
// Test for hipMemset2D functionality for different width and height values
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST_NAMED: %t hipMemset2D-basic
|
||||
* TEST_NAMED: %t hipMemset2D-dim1 --width2D 10 --height2D 10 --memsetWidth 4 --memsetHeight 4
|
||||
* TEST_NAMED: %t hipMemset2D-dim2 --width2D 100 --height2D 100 --memsetWidth 20 --memsetHeight 40
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
//
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
// * To test invalid pointer to hipMemset* apis
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// and also launch hipMemcpyAsync() api on the same stream. This test case is simulate the scenario
|
||||
// reported in SWDEV-181598.
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// and also launch hipMemcpyAsync() api. This test case is simulate the scenario
|
||||
// reported in SWDEV-181598.
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -23,7 +23,7 @@ THE SOFTWARE.
|
||||
// single GPU or multi GPUs.
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -18,8 +18,8 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD_CMD: matmul.code %hc --genco %S/matmul.cpp -o matmul.code EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc rocclr
|
||||
* BUILD_CMD: matmul.code %hc --genco %S/matmul.cpp -o matmul.code EXCLUDE_HIP_PLATFORM nvidia
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME rocclr
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM rocclr nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_RUNTIME rocclr EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -22,32 +22,32 @@ THE SOFTWARE.
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11
|
||||
* TEST: %t --tests 0x10 EXCLUDE_HIP_PLATFORM hcc rocclr
|
||||
* TEST: %t --tests 0x11 EXCLUDE_HIP_PLATFORM hcc rocclr
|
||||
* TEST: %t --tests 0x12 EXCLUDE_HIP_PLATFORM hcc rocclr
|
||||
* TEST: %t --tests 0x10 EXCLUDE_HIP_PLATFORM amd
|
||||
* TEST: %t --tests 0x11 EXCLUDE_HIP_PLATFORM amd
|
||||
* TEST: %t --tests 0x12 EXCLUDE_HIP_PLATFORM amd
|
||||
* TEST: %t --tests 0x13
|
||||
* TEST: %t --tests 0x14
|
||||
* TEST: %t --tests 0x15
|
||||
* TEST: %t --tests 0x20 EXCLUDE_HIP_PLATFORM hcc rocclr
|
||||
* TEST: %t --tests 0x21 EXCLUDE_HIP_PLATFORM hcc rocclr
|
||||
* TEST: %t --tests 0x20 EXCLUDE_HIP_PLATFORM amd
|
||||
* TEST: %t --tests 0x21 EXCLUDE_HIP_PLATFORM amd
|
||||
* TEST: %t --tests 0x22
|
||||
* TEST: %t --tests 0x30 EXCLUDE_HIP_PLATFORM hcc rocclr
|
||||
* TEST: %t --tests 0x31 EXCLUDE_HIP_PLATFORM hcc rocclr
|
||||
* TEST: %t --tests 0x30 EXCLUDE_HIP_PLATFORM amd
|
||||
* TEST: %t --tests 0x31 EXCLUDE_HIP_PLATFORM amd
|
||||
* TEST: %t --tests 0x32
|
||||
* TEST: %t --tests 0x40 EXCLUDE_HIP_PLATFORM hcc rocclr
|
||||
* TEST: %t --tests 0x40 EXCLUDE_HIP_PLATFORM amd
|
||||
* TEST: %t --tests 0x41
|
||||
* TEST: %t --tests 0x42
|
||||
* TEST: %t --tests 0x43 EXCLUDE_HIP_PLATFORM hcc rocclr
|
||||
* TEST: %t --tests 0x44 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* TEST: %t --tests 0x43 EXCLUDE_HIP_PLATFORM amd
|
||||
* TEST: %t --tests 0x44 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t --tests 0x45
|
||||
* TEST: %t --tests 0x50 EXCLUDE_HIP_PLATFORM hcc rocclr nvcc
|
||||
* TEST: %t --tests 0x51 EXCLUDE_HIP_PLATFORM hcc rocclr nvcc
|
||||
* TEST: %t --tests 0x52 EXCLUDE_HIP_PLATFORM hcc rocclr
|
||||
* TEST: %t --tests 0x50 EXCLUDE_HIP_PLATFORM amd nvidia
|
||||
* TEST: %t --tests 0x51 EXCLUDE_HIP_PLATFORM amd nvidia
|
||||
* TEST: %t --tests 0x52 EXCLUDE_HIP_PLATFORM amd
|
||||
* TEST: %t --tests 0x53
|
||||
* TEST: %t --tests 0x54
|
||||
* TEST: %t --tests 0x55 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* TEST: %t --tests 0x55 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t --tests 0x56
|
||||
* TEST: %t --tests 0x60 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* TEST: %t --tests 0x60 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* HIT_END
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -22,7 +22,7 @@ THE SOFTWARE.
|
||||
|
||||
/* HIT_START
|
||||
* BUILD_CMD: tex2d_kernel.code %hc --genco %S/tex2d_kernel.cpp -o tex2d_kernel.code
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc rocclr
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME rocclr
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD_CMD: tex2d_kernel.code %hc --genco %S/tex2d_kernel.cpp -o tex2d_kernel.code EXCLUDE_HIP_PLATFORM rocclr nvcc
|
||||
* BUILD_CMD: tex2d_kernel.code %hc --genco %S/tex2d_kernel.cpp -o tex2d_kernel.code EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_RUNTIME rocclr
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// kernel. Verify that all the kernels queued are executed before the callback.
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// when hipStreamAddCallback() is called back to back multiple calls
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
// by hipStreamAddCallback() api.
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
// finish. Ideally Host thread should not wait for callback to finish.
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* */
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -19,7 +19,7 @@ THE SOFTWARE.
|
||||
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM rocclr
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_RUNTIME rocclr
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/*HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM rocclr
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_RUNTIME rocclr
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -22,7 +22,7 @@ THE SOFTWARE.
|
||||
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM rocclr
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_RUNTIME rocclr
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc hcc rocclr
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_PLATFORM amd
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM rocclr
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_RUNTIME rocclr
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/*HIT_START
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_PLATFORM rocclr
|
||||
* BUILD: %t %s ../test_common.cpp EXCLUDE_HIP_RUNTIME rocclr
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Ссылка в новой задаче
Block a user