Remove ROCclr search hacks
find_package should now be the only way to import ROCclr. Also update
the build example comment.
The build scripts used 2 custom variables to manually specify the
build and source directories for where to find VDI. Once renamed to
ROCclr, these conflicted with the variables automatically set by
find_package(ROCclr). These hacks tried to satisfy this intermediate
step to try satisfying commit ordering problems to get through PSDB.
The INSTALL.md documentation should also be updated, but it's
completely missing any mention of ROCclr now, and still gives
directions for hcc.
Change-Id: I6fc94b6cb36241a9d4f22d24e49523367f803461
[ROCm/hip commit: a2d2709ec1]
This commit is contained in:
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.4.3)
|
||||
project(hip)
|
||||
# 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 -DROCclr_DIR=/extra/lmoriche/hip-rocclr/rocclr -DOPENCL_DIR=/extra/lmoriche/clients/lmoriche_opencl_dev2/drivers/opencl/api/opencl -DLIBROCclr_STATIC_DIR=/extra/lmoriche/hip-rocclr/build/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 ..
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
|
||||
@@ -27,37 +27,11 @@ endif()
|
||||
|
||||
set(USE_PROF_API "1")
|
||||
|
||||
# FIXME: Make this required and remove the legacy handling below
|
||||
set(save_rocclr_dir ${ROCclr_DIR})
|
||||
set(save_rocclr_static_dir ${LIBROCclr_STATIC_DIR})
|
||||
|
||||
find_package(ROCclr CONFIG
|
||||
find_package(ROCclr REQUIRED CONFIG
|
||||
PATHS
|
||||
/opt/rocm
|
||||
/opt/rocm/rocclr)
|
||||
|
||||
if (NOT ROCclr_FOUND)
|
||||
if(NOT DEFINED LIBROCclr_STATIC_DIR)
|
||||
find_path(LIBROCclr_STATIC_DIR
|
||||
NAMES libamdrocclr_static.a
|
||||
PATHS /opt/rocm/rocclr
|
||||
PATH_SUFFIXES lib)
|
||||
else()
|
||||
set(LIBROCclr_STATIC_DIR ${save_rocclr_static_dir})
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED ROCclr_DIR)
|
||||
find_path(ROCclr_DIR
|
||||
NAMES top.hpp
|
||||
PATH_SUFFIXES include
|
||||
PATHS /opt/rocm/rocclr)
|
||||
else()
|
||||
set(ROCclr_DIR ${save_rocclr_dir})
|
||||
endif()
|
||||
message("Found Static rocclr lib:${LIBROCclr_STATIC_DIR} and rocclr includes: ${ROCclr_DIR}")
|
||||
include(${LIBROCclr_STATIC_DIR}/amdrocclr_staticTargets.cmake)
|
||||
endif()
|
||||
|
||||
#############################
|
||||
# Profiling API support
|
||||
#############################
|
||||
@@ -131,14 +105,6 @@ target_include_directories(hip64
|
||||
${PROJECT_SOURCE_DIR}
|
||||
${PROJECT_SOURCE_DIR}/amdocl
|
||||
${PROJECT_SOURCE_DIR}/include/hip/hcc_detail/elfio
|
||||
|
||||
# FIXME: Remove ROCclr_DIr explicit references
|
||||
${ROCclr_DIR}
|
||||
${ROCclr_DIR}/include
|
||||
${ROCclr_DIR}/compiler/lib
|
||||
${ROCclr_DIR}/compiler/lib/include
|
||||
${ROCclr_DIR}/elf/utils/common
|
||||
${ROCclr_DIR}/elf/utils/libelf
|
||||
${ROCR_INCLUDES}
|
||||
$<TARGET_PROPERTY:amdrocclr_static,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
$<TARGET_PROPERTY:amd_comgr,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
|
||||
مرجع در شماره جدید
Block a user