Make explicit reference between init modules.
Make explicit reference to hsa_api_trace.cpp from initialization of hsa_table_interface.cpp. Breaks the ability to use hsa_table_interface.cpp in plugins. Change-Id: I22a42d3a132512b0d9ec7a1ca629b169e7f8eba7
This commit is contained in:
committed by
Ramesh Errabolu
parent
d23b26f760
commit
f4fe7ddf47
@@ -57,6 +57,12 @@ const HsaApiTable* hsa_table_interface_get_table() {
|
|||||||
return hsaApiTable;
|
return hsaApiTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Init {
|
||||||
|
public:
|
||||||
|
Init() { rocr::core::LoadInitialHsaApiTable(); }
|
||||||
|
};
|
||||||
|
static Init LinkAtLoadOrFirstTranslationUnitAccess;
|
||||||
|
|
||||||
// Pass through stub functions
|
// Pass through stub functions
|
||||||
hsa_status_t HSA_API hsa_init() { return coreApiTable->hsa_init_fn(); }
|
hsa_status_t HSA_API hsa_init() { return coreApiTable->hsa_init_fn(); }
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,8 @@ namespace core {
|
|||||||
|
|
||||||
extern HsaApiTable hsa_api_table_;
|
extern HsaApiTable hsa_api_table_;
|
||||||
extern HsaApiTable hsa_internal_api_table_;
|
extern HsaApiTable hsa_internal_api_table_;
|
||||||
|
|
||||||
|
void LoadInitialHsaApiTable();
|
||||||
} // namespace core
|
} // namespace core
|
||||||
} // namespace rocr
|
} // namespace rocr
|
||||||
|
|
||||||
|
|||||||
@@ -392,10 +392,9 @@ void HsaApiTable::UpdateAmdExts() {
|
|||||||
amd_ext_api.hsa_amd_deregister_deallocation_callback_fn = AMD::hsa_amd_deregister_deallocation_callback;
|
amd_ext_api.hsa_amd_deregister_deallocation_callback_fn = AMD::hsa_amd_deregister_deallocation_callback;
|
||||||
}
|
}
|
||||||
|
|
||||||
class Init {
|
void LoadInitialHsaApiTable() {
|
||||||
public:
|
hsa_table_interface_init(&hsa_api_table_.hsa_api);
|
||||||
Init() { hsa_table_interface_init(&hsa_api_table_.hsa_api); }
|
}
|
||||||
};
|
|
||||||
static Init LinkAtLoad;
|
|
||||||
} // namespace core
|
} // namespace core
|
||||||
} // namespace rocr
|
} // namespace rocr
|
||||||
|
|||||||
Reference in New Issue
Block a user