build compatibility

Change-Id: Ifde4b2e4e7cb48d5c06ccce5eb76b7b943c4114a
This commit is contained in:
Evgeny
2018-06-26 16:05:39 -05:00
parent add56e26ae
commit a8db3d930c
5 changed files with 15 additions and 0 deletions
+4
View File
@@ -142,10 +142,14 @@ class Profile {
if (status != HSA_STATUS_SUCCESS) AQL_EXC_RAISING(status, "aqlprofile_start");
status = api->hsa_ven_amd_aqlprofile_stop(&profile_, &stop);
if (status != HSA_STATUS_SUCCESS) AQL_EXC_RAISING(status, "aqlprofile_stop");
#ifdef AQLPROF_NEW_API
hsa_status_t rd_status = api->hsa_ven_amd_aqlprofile_read(&profile_, &read);
#if 0 // Read API returns error if disabled
if (rd_status != HSA_STATUS_SUCCESS) AQL_EXC_RAISING(status, "aqlprofile_read");
#endif
#else
hsa_status_t rd_status = HSA_STATUS_ERROR;
#endif
// Set completion signal
hsa_signal_t dummy_signal{};
+2
View File
@@ -162,8 +162,10 @@ hsa_status_t HsaRsrcFactory::LoadAqlProfileLib(aqlprofile_pfn_t* api) {
(decltype(::hsa_ven_amd_aqlprofile_start)*)dlsym(handle, "hsa_ven_amd_aqlprofile_start");
api->hsa_ven_amd_aqlprofile_stop =
(decltype(::hsa_ven_amd_aqlprofile_stop)*)dlsym(handle, "hsa_ven_amd_aqlprofile_stop");
#ifdef AQLPROF_NEW_API
api->hsa_ven_amd_aqlprofile_read =
(decltype(::hsa_ven_amd_aqlprofile_read)*)dlsym(handle, "hsa_ven_amd_aqlprofile_read");
#endif
api->hsa_ven_amd_aqlprofile_legacy_get_pm4 =
(decltype(::hsa_ven_amd_aqlprofile_legacy_get_pm4)*)dlsym(
handle, "hsa_ven_amd_aqlprofile_legacy_get_pm4");