Skip to content

Commit a297925

Browse files
Merge commit 'c25c3286dc858ec1314360658dea954b5628bca8' into import/develop/ROCm_rocprofiler/prliang_amd-staging
2 parents aad122c + c25c328 commit a297925

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

projects/rocprofiler/test/ctrl/test_hsa.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,17 @@ bool TestHsa::Initialize(int /*arg_cnt*/, char** /*arg_list*/) {
9292
const char* hsaco_obj_files_path_str = getenv("HSACO_OBJ_FILES_PATH");
9393
fs::path hsaco_obj_files_path;
9494
Dl_info dl_info;
95+
9596
if(hsaco_obj_files_path_str) {
9697
hsaco_obj_files_path = fs::path(hsaco_obj_files_path_str);
97-
} else {
98-
hsaco_obj_files_path = fs::path(dl_info.dli_fname);
98+
brig_path_obj_.append(hsaco_obj_files_path.remove_filename());
99+
100+
} else if (dladdr(reinterpret_cast<const void*>(TestHsa::HsaShutdown), &dl_info) != 0) {
101+
102+
hsaco_obj_files_path = fs::canonical(fs::path(dl_info.dli_fname));
103+
brig_path_obj_.append(hsaco_obj_files_path.remove_filename().parent_path().parent_path().parent_path());
104+
brig_path_obj_ += "/share/rocprofiler/tests-v1/";
99105
}
100-
if (dladdr(reinterpret_cast<const void*>(TestHsa::HsaShutdown), &dl_info) != 0)
101-
brig_path_obj_.append(hsaco_obj_files_path.remove_filename().remove_filename());
102106
brig_path_obj_.append(agentName);
103107
brig_path_obj_.append("_" + name_ + ".hsaco");
104108

0 commit comments

Comments
 (0)