Make hsa_agent_t handles use pointer to device::Device

For roc devices create hsa_agent_t handles using a pointer to the
device::Device. This ensures each device has a different hsa_agent_t
handle. This may be necessary to ensure the loader symbol lookup will
search only symbols for the correct device.

Change-Id: Iee6dd40d68bf22a02ce8c75cbe5ac8f5a0d9e418


[ROCm/clr commit: 76c371d78a]
Šī revīzija ir iekļauta:
Tony Tye committed 2021-01-13 08:24:28 +00:00
1 vecāks 4bfc88db5f
revīzija 2476472bcb
4 files changed
+34 -18

No files matched your search

@@ -1619,8 +1619,7 @@ bool HSAILProgram::linkImpl(amd::option::Options* options) {
}
}
// ACL_TYPE_CG stage is not performed for offline compilation
hsa_agent_t agent;
agent.handle = 1;
hsa_agent_t agent = {amd::Device::toHandle(&(device()))};
if (hsaLoad) {
executable_ = loader_->CreateExecutable(HSA_PROFILE_FULL, NULL);
if (executable_ == NULL) {