From 3fd8af5974eef3e8a290ed7b58b25178e46e7493 Mon Sep 17 00:00:00 2001 From: "systems-assistant[bot]" <221163467+systems-assistant[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 09:52:45 -0400 Subject: [PATCH] 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 Co-authored-by: Sunday Clement Co-authored-by: systems-assistant[bot] --- .../runtime/hsa-runtime/core/runtime/runtime.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp index 4ab5a877cd..8b8fc83b9f 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp @@ -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(base); op->size = len;