Make ROCM_DIR default ROCm path for rocprof

Signed-off-by: zichguan-amd <zichuan.guan@amd.com>
Cette révision appartient à :
zichguan-amd a créé et Guan, Zichuan a révisé 2024-12-02 11:19:56 -05:00
1 Parent b5272fb99c
révision c042b4f582
2 fichiers modifiés
+4 -1

Aucun fichier ne correspond à votre recherche

+3
Voir le fichier
@@ -83,3 +83,6 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL Release)
TARGET ${RDC_LIB}
POST_BUILD COMMAND ${CMAKE_STRIP} ${RDC_LIB_COMPONENT}.so)
endif()
# pass ROCM_DIR to compiler
target_compile_definitions(${RDC_LIB} PRIVATE ROCM_DIR="${ROCM_DIR}")
+1 -1
Voir le fichier
@@ -154,7 +154,7 @@ rdc_status_t RdcRocpLib::rdc_telemetry_fields_unwatch(rdc_gpu_field_t* fields,
std::string RdcRocpLib::get_rocm_path() {
// set default rocm path in case lookup fails
std::string rocm_path("/opt/rocm");
std::string rocm_path(ROCM_DIR);
const char* rocm_path_env = getenv("ROCM_PATH");
if (rocm_path_env != nullptr) {
rocm_path = rocm_path_env;