Skip to content

Commit

Permalink
MIvisionX HIP GPU backend - use __HIP_PLATFORM_AMD__ instead of __HIP…
Browse files Browse the repository at this point in the history
…_PLATFORM_HCC__ which is deprecated (#703)
  • Loading branch information
AryanSalmanpour authored Dec 9, 2021
1 parent f323a72 commit 8d16b43
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions amd_openvx/openvx/ago/ago_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ using namespace std;
#endif

#if ENABLE_HIP
#ifndef __HIP_PLATFORM_HCC__
#define __HIP_PLATFORM_HCC__
#ifndef __HIP_PLATFORM_AMD__
#define __HIP_PLATFORM_AMD__
#endif
#define HIPRTC_GET_TYPE_NAME
#include "hip/hip_runtime_api.h"
Expand Down
2 changes: 1 addition & 1 deletion amd_openvx/openvx/hipvx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ set(HIPVX_SOURCES
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${HIP_CXX_FLAGS}")
add_library(openvx_hip OBJECT ${HIPVX_SOURCES})
set_target_properties(openvx_hip PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_compile_definitions(openvx_hip PRIVATE __HIP_PLATFORM_HCC__)
target_compile_definitions(openvx_hip PRIVATE __HIP_PLATFORM_AMD__)


2 changes: 1 addition & 1 deletion amd_openvx_extensions/amd_nn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ elseif (GPU_SUPPORT AND "${BACKEND}" STREQUAL "HIP" AND HIP_FOUND)
message("-- ${Green}amd_nn -- Building with HIP${ColourReset}")
set(ENABLE_OPENCL 0)
set(ENABLE_HIP 1)
add_definitions(-DENABLE_OPENCL=${ENABLE_OPENCL} -DENABLE_HIP=${ENABLE_HIP} -D__HIP_PLATFORM_HCC__)
add_definitions(-DENABLE_OPENCL=${ENABLE_OPENCL} -DENABLE_HIP=${ENABLE_HIP} -D__HIP_PLATFORM_AMD__)
include_directories(${HIP_PATH}/include ${HSA_PATH}/include)
link_directories(${HIP_PATH}/lib)
add_subdirectory(nn_hip)
Expand Down
2 changes: 1 addition & 1 deletion amd_openvx_extensions/amd_nn/nn_hip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ set(NN_HIP_SOURCES
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${HIP_CXX_FLAGS}")
add_library(nn_hip OBJECT ${NN_HIP_SOURCES})
set_target_properties(nn_hip PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_compile_definitions(nn_hip PRIVATE __HIP_PLATFORM_HCC__)
target_compile_definitions(nn_hip PRIVATE __HIP_PLATFORM_AMD__)
2 changes: 1 addition & 1 deletion amd_openvx_extensions/amd_rpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ elseif (GPU_SUPPORT AND "${BACKEND}" STREQUAL "HIP" AND HIP_FOUND)
message("-- ${Green}amd_rpp -- Building with HIP${ColourReset}")
set(ENABLE_OPENCL 0)
set(ENABLE_HIP 1)
add_definitions(-DENABLE_OPENCL=${ENABLE_OPENCL} -DENABLE_HIP=${ENABLE_HIP} -DRPP_BACKEND_HIP=1 -D__HIP_PLATFORM_HCC__)
add_definitions(-DENABLE_OPENCL=${ENABLE_OPENCL} -DENABLE_HIP=${ENABLE_HIP} -DRPP_BACKEND_HIP=1 -D__HIP_PLATFORM_AMD__)
include_directories(${HIP_PATH}/include ${HSA_PATH}/include)
link_directories(${HIP_PATH}/lib)
add_library(vx_rpp SHARED ${SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion rocAL/rocAL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ if(${BUILD_RALI})

if("${BACKEND}" STREQUAL "HIP" AND HIP_FOUND)
include_directories(${HIP_PATH}/include ${HSA_PATH}/include rocAL_hip)
target_compile_definitions(${PROJECT_NAME} PRIVATE __HIP_PLATFORM_HCC__)
target_compile_definitions(${PROJECT_NAME} PRIVATE __HIP_PLATFORM_AMD__)
target_compile_definitions(${PROJECT_NAME} PUBLIC ENABLE_HIP=1)
else()
include_directories(${OpenCL_INCLUDE_DIRS} ${OpenCL_INCLUDE_DIRS}/Headers)
Expand Down
2 changes: 1 addition & 1 deletion rocAL/rocAL/rocAL_hip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ set(CMAKE_CXX_COMPILER ${COMPILER_FOR_HIP})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${HIP_CXX_FLAGS}")
add_library(${PROJECT_NAME} OBJECT ${rocAL_HIP_SOURCES})
set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_compile_definitions(${PROJECT_NAME} PRIVATE __HIP_PLATFORM_HCC__)
target_compile_definitions(${PROJECT_NAME} PRIVATE __HIP_PLATFORM_AMD__)
2 changes: 1 addition & 1 deletion utilities/runvx/vxUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ THE SOFTWARE.
#endif

#if ENABLE_HIP
#define __HIP_PLATFORM_HCC__
#define __HIP_PLATFORM_AMD__
#include "hip/hip_runtime.h"
#include "hip/hip_runtime_api.h"
#endif
Expand Down

0 comments on commit 8d16b43

Please sign in to comment.