adding kernel name to the dispatch callback data

This commit is contained in:
Evgeny
2017-11-29 15:01:27 -06:00
parent cb3a591826
commit a41e91a13c
5 changed files with 38 additions and 4 deletions
+6
View File
@@ -83,8 +83,14 @@ HsaRsrcFactory::HsaRsrcFactory() {
CHECK_STATUS("Error Calling hsa_iterate_agents", status);
// Get AqlProfile API table
aqlprofile_api_ = {0};
status = hsa_system_get_extension_table(HSA_EXTENSION_AMD_AQLPROFILE, 1, 0, &aqlprofile_api_);
CHECK_STATUS("aqlprofile API table query failed", status);
// Get Loader API table
loader_api_ = {0};
status = hsa_system_get_extension_table(HSA_EXTENSION_AMD_LOADER, 1, 0, &loader_api_);
CHECK_STATUS("loader API table query failed", status);
}
// Destructor of the class
+7
View File
@@ -28,6 +28,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include <hsa.h>
#include <hsa_ext_finalize.h>
#include <hsa_ven_amd_aqlprofile.h>
#include <hsa_ven_amd_loader.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@@ -223,6 +224,9 @@ class HsaRsrcFactory {
// Return AqlProfile API table
const hsa_ven_amd_aqlprofile_1_00_pfn_t* AqlProfileApi() const { return &aqlprofile_api_; }
// Return Loader API table
const hsa_ven_amd_loader_1_00_pfn_t* LoaderApi() const { return &loader_api_; }
private:
// System agents iterating callback
static hsa_status_t GetHsaAgentsCallback(hsa_agent_t agent, void* data);
@@ -254,6 +258,9 @@ class HsaRsrcFactory {
// AqlProfile API table
hsa_ven_amd_aqlprofile_1_00_pfn_t aqlprofile_api_;
// Loader API table
hsa_ven_amd_loader_1_00_pfn_t loader_api_;
};
} // namespace util