removed llvm dependency and metadata functionality
Change-Id: Ib9783b75d326559ed29c5aa2218aed40d20ad0fb
[ROCm/hip commit: 4f4a44c736]
This commit is contained in:
@@ -190,11 +190,11 @@ if(HIP_PLATFORM STREQUAL "hcc")
|
||||
|
||||
execute_process(COMMAND ${HCC_HOME}/bin/hcc-config --ldflags OUTPUT_VARIABLE HCC_LD_FLAGS)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${HCC_LD_FLAGS} -Wl,-Bsymbolic")
|
||||
find_package(LLVM HINTS "/opt/rocm/llvm")
|
||||
# find_package(LLVM HINTS "/opt/rocm/llvm")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --amdgpu-target=gfx701 --amdgpu-target=gfx801 --amdgpu-target=gfx802 --amdgpu-target=gfx803 --amdgpu-target=gfx900")
|
||||
add_library(hip_hcc SHARED ${SOURCE_FILES_RUNTIME})
|
||||
target_link_libraries(hip_hcc PRIVATE hc_am)
|
||||
target_link_libraries(hip_hcc PUBLIC LLVMAMDGPUUtils)
|
||||
# target_link_libraries(hip_hcc PUBLIC LLVMAMDGPUUtils)
|
||||
add_library(hip_hcc_static STATIC ${SOURCE_FILES_RUNTIME})
|
||||
target_link_libraries(hip_hcc_static PRIVATE hc_am)
|
||||
add_dependencies(hip_hcc_static hip_hcc)
|
||||
|
||||
@@ -129,7 +129,7 @@ if ($HIP_PLATFORM eq "hcc") {
|
||||
$HIPCXXFLAGS .= " -Wno-deprecated-register";
|
||||
|
||||
$HIPLDFLAGS .= " -lsupc++";
|
||||
$HIPLDFLAGS .= " -L$HSA_PATH/lib -L$ROCM_PATH/lib -lhsa-runtime64 -lhc_am -lhsakmt `${LLVM_HOME}/bin/llvm-config --ldflags --libs`";
|
||||
$HIPLDFLAGS .= " -L$HSA_PATH/lib -L$ROCM_PATH/lib -lhsa-runtime64 -lhc_am -lhsakmt";# `${LLVM_HOME}/bin/llvm-config --ldflags --libs`";
|
||||
|
||||
# Add trace marker library:
|
||||
# TODO - once we cleanly separate the HIP API headers from HIP library headers this logic should move to CMakebuild option - apps do not need to see the marker library.
|
||||
|
||||
@@ -202,7 +202,7 @@ hipError_t hipModuleLoad(hipModule_t *module, const char *fname){
|
||||
(*module)->size = size;
|
||||
in.seekg(0, std::ios::beg);
|
||||
std::copy(std::istreambuf_iterator<char>(in), std::istreambuf_iterator<char>(), ptr);
|
||||
|
||||
/* Enable for metadata implementation
|
||||
Elf *e = elf_memory((char*)p, size);
|
||||
if(elf_kind(e) != ELF_K_ELF){
|
||||
return ihipLogStatus(hipErrorInvalidValue);
|
||||
@@ -251,7 +251,7 @@ hipError_t hipModuleLoad(hipModule_t *module, const char *fname){
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
status = hsa_code_object_deserialize(ptr, size, NULL, &(*module)->object);
|
||||
|
||||
if(status != HSA_STATUS_SUCCESS){
|
||||
|
||||
Reference in New Issue
Block a user