Re-enabled metadata parsing in HIP

Change-Id: If8caa844571cb8581450df9ffdb76e2445c75f13


[ROCm/hip commit: 7d49dcc030]
Esse commit está contido em:
Aditya Atluri
2017-03-27 11:00:39 -05:00
commit 3623535fdf
3 arquivos alterados com 6 adições e 5 exclusões
+2 -2
Ver Arquivo
@@ -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 ${HCC_HOME}/compiler/lib/cmake)
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)
+2 -1
Ver Arquivo
@@ -129,7 +129,8 @@ 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 ";
$HIPLDFLAGS .= " -L$HCC_HOME/compiler/lib -lLLVMAMDGPUDesc -lLLVMAMDGPUUtils -lLLVMMC -lLLVMCore -lLLVMSupport ";
# 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.
+2 -2
Ver Arquivo
@@ -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){