Add experimental option to force discovery of all copy agents.
Discards all user provided async copy agent info and relies on pointer info discovery. Change-Id: Ife3e708a49ffccbede4983ab47d5ed0032970857
This commit is contained in:
@@ -469,8 +469,9 @@ hsa_status_t Runtime::CopyMemory(void* dst, core::Agent* dst_agent, const void*
|
||||
core::Agent* src_agent, size_t size,
|
||||
std::vector<core::Signal*>& dep_signals,
|
||||
core::Signal& completion_signal) {
|
||||
|
||||
auto lookupAgent = [this](core::Agent* agent, const void* ptr) {
|
||||
if (agent == nullptr) {
|
||||
if (agent == nullptr || flag().discover_copy_agents()) {
|
||||
hsa_amd_pointer_info_t info;
|
||||
PtrInfoBlockData block;
|
||||
info.size = sizeof(info);
|
||||
@@ -628,11 +629,11 @@ hsa_status_t Runtime::GetSystemInfo(hsa_system_info_t attribute, void* value) {
|
||||
break;
|
||||
}
|
||||
case HSA_AMD_SYSTEM_INFO_SVM_SUPPORTED: {
|
||||
bool ret = true;
|
||||
for (auto agent : gpu_agents_) {
|
||||
AMD::GpuAgent* gpu = (AMD::GpuAgent*)agent;
|
||||
ret &= (gpu->properties().Capability.ui32.SVMAPISupported == 1);
|
||||
}
|
||||
bool ret = true;
|
||||
for (auto agent : gpu_agents_) {
|
||||
AMD::GpuAgent* gpu = (AMD::GpuAgent*)agent;
|
||||
ret &= (gpu->properties().Capability.ui32.SVMAPISupported == 1);
|
||||
}
|
||||
*(bool*)value = ret;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user