hsa-runtime integration

Change-Id: I48968966ffe164218ebff88d0e3a1268e96bf1dd
This commit is contained in:
Evgeny
2017-06-23 17:54:27 -05:00
committed by Evgeny Shcherbakov
parent c533229bc1
commit 4174f07fd1
120 changed files with 1300 additions and 918 deletions
@@ -1038,11 +1038,15 @@ void Runtime::LoadExtensions() {
"libhsa-ext-finalize64.so.1"};
static const std::string kImageLib[] = {"hsa-ext-image64.dll",
"libhsa-ext-image64.so.1"};
static const std::string kAqlProfileLib[] = {"hsa-amd-aqlprofile64.dll",
"libhsa-amd-aqlprofile64.so.1"};
#else
static const std::string kFinalizerLib[] = {"hsa-ext-finalize.dll",
"libhsa-ext-finalize.so.1"};
static const std::string kImageLib[] = {"hsa-ext-image.dll",
"libhsa-ext-image.so.1"};
static const std::string kAqlProfileLib[] = {"hsa-amd-aqlprofile.dll",
"libhsa-amd-aqlprofile.so.1"};
#endif
// Update Hsa Api Table with handle of Image extension Apis
@@ -1054,6 +1058,9 @@ void Runtime::LoadExtensions() {
extensions_.LoadImage(kImageLib[os_index(os::current_os)]);
hsa_api_table_.LinkExts(&extensions_.image_api,
core::HsaApiTable::HSA_EXT_IMAGE_API_TABLE_ID);
// Update Hsa Api Table with handle of AqlProfile extension Apis
extensions_.LoadAqlProfileApi(kAqlProfileLib[os_index(os::current_os)]);
}
void Runtime::UnloadExtensions() { extensions_.Unload(); }