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
Этот коммит содержится в:
коммит произвёл
Ramesh Errabolu
родитель
d23b26f760
Коммит
f4fe7ddf47
@@ -57,6 +57,12 @@ const HsaApiTable* hsa_table_interface_get_table() {
|
||||
return hsaApiTable;
|
||||
}
|
||||
|
||||
class Init {
|
||||
public:
|
||||
Init() { rocr::core::LoadInitialHsaApiTable(); }
|
||||
};
|
||||
static Init LinkAtLoadOrFirstTranslationUnitAccess;
|
||||
|
||||
// Pass through stub functions
|
||||
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_internal_api_table_;
|
||||
|
||||
void LoadInitialHsaApiTable();
|
||||
} // namespace core
|
||||
} // namespace rocr
|
||||
|
||||
|
||||
@@ -392,10 +392,9 @@ void HsaApiTable::UpdateAmdExts() {
|
||||
amd_ext_api.hsa_amd_deregister_deallocation_callback_fn = AMD::hsa_amd_deregister_deallocation_callback;
|
||||
}
|
||||
|
||||
class Init {
|
||||
public:
|
||||
Init() { hsa_table_interface_init(&hsa_api_table_.hsa_api); }
|
||||
};
|
||||
static Init LinkAtLoad;
|
||||
void LoadInitialHsaApiTable() {
|
||||
hsa_table_interface_init(&hsa_api_table_.hsa_api);
|
||||
}
|
||||
|
||||
} // namespace core
|
||||
} // namespace rocr
|
||||
|
||||
Ссылка в новой задаче
Block a user