Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite recursion fix #70

Open
wants to merge 2 commits into
base: rocm-4.5.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/rocprofiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ decltype(hsa_executable_destroy)* hsa_executable_destroy_fn;
::HsaApiTable* kHsaApiTable;

void SaveHsaApi(::HsaApiTable* table) {
util::HsaRsrcFactory::InitHsaApiTable(table);
util::HsaRsrcFactory::Instance().InitHsaApiTable(table);

kHsaApiTable = table;
hsa_queue_create_fn = table->core_->hsa_queue_create_fn;
Expand Down
2 changes: 0 additions & 2 deletions src/util/hsa_rsrc_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ HsaRsrcFactory::~HsaRsrcFactory() {
void HsaRsrcFactory::InitHsaApiTable(HsaApiTable* table) {
std::lock_guard<mutex_t> lck(mutex_);

if (hsa_api_.hsa_init == NULL) {
if (table != NULL) {
hsa_api_.hsa_init = table->core_->hsa_init_fn;
hsa_api_.hsa_shut_down = table->core_->hsa_shut_down_fn;
Expand Down Expand Up @@ -268,7 +267,6 @@ void HsaRsrcFactory::InitHsaApiTable(HsaApiTable* table) {
hsa_api_.hsa_amd_profiling_get_async_copy_time = hsa_amd_profiling_get_async_copy_time;
hsa_api_.hsa_amd_profiling_get_dispatch_time = hsa_amd_profiling_get_dispatch_time;
}
}
}

hsa_status_t HsaRsrcFactory::LoadAqlProfileLib(aqlprofile_pfn_t* api) {
Expand Down
2 changes: 1 addition & 1 deletion src/util/hsa_rsrc_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ class HsaRsrcFactory {
static const char* GetKernelNameRef(uint64_t addr);

// Initialize HSA API table
void static InitHsaApiTable(HsaApiTable* table);
void InitHsaApiTable(HsaApiTable* table);
static const hsa_pfn_t* HsaApi() { return &hsa_api_; }

// Return AqlProfile API table
Expand Down