Fully initialize GPU agents before loading tools.

Required for debug agent requires copy API and trap handler to be initalized
prior to loading.  Existing tools do not make use of internal queue or scratch
memory intercept which is what PostToolsInit allows.

PostToolsInit() will be removed in a following cleanup change.

Change-Id: If43377843808e3eff0defd9204910a67a852902f
This commit is contained in:
Sean Keely
2018-10-19 17:07:24 -05:00
parent 6852282a07
commit 5975c465ad
+4 -3
View File
@@ -1218,9 +1218,7 @@ hsa_status_t Runtime::Load() {
// Load extensions
LoadExtensions();
// Load tools libraries
LoadTools();
// Initialize per GPU scratch, blits, and trap handler
for (core::Agent* agent : gpu_agents_) {
hsa_status_t status =
reinterpret_cast<amd::GpuAgentInt*>(agent)->PostToolsInit();
@@ -1230,6 +1228,9 @@ hsa_status_t Runtime::Load() {
}
}
// Load tools libraries
LoadTools();
return HSA_STATUS_SUCCESS;
}