rocr: SvmPrefetch to a particular node (#294)
Previously regardless of hsa_agent passed the prefetch is always driven to node 0, now the agent of interest may be properly prefetched. Signed-off-by: Sunday Clement <Sunday.Clement@amd.com> Co-authored-by: Sunday Clement <Sunday.Clement@amd.com> Co-authored-by: systems-assistant[bot] <systems-assistant[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
vanhempi
75eb06dc18
commit
3fd8af5974
@@ -2977,10 +2977,7 @@ hsa_status_t Runtime::SvmPrefetch(void* ptr, size_t size, hsa_agent_t agent,
|
||||
MAKE_NAMED_SCOPE_GUARD(OpGuard, [&]() { delete op; });
|
||||
|
||||
Agent* dest = Agent::Convert(agent);
|
||||
if (dest->device_type() == Agent::kAmdCpuDevice)
|
||||
op->node_id = 0;
|
||||
else
|
||||
op->node_id = dest->node_id();
|
||||
op->node_id = dest->node_id();
|
||||
|
||||
op->base = reinterpret_cast<void*>(base);
|
||||
op->size = len;
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user