diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_aie_agent.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_aie_agent.cpp index d655d0fa2f..1e3547f003 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_aie_agent.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_aie_agent.cpp @@ -76,7 +76,10 @@ hsa_status_t AieAgent::VisitRegion(bool include_peer, AMD::callback_t call(callback); for (const auto r : regions_) { hsa_region_t region_handle(core::MemoryRegion::Convert(r)); - call(region_handle, data); + hsa_status_t status = call(region_handle, data); + if (status != HSA_STATUS_SUCCESS) { + return status; + } } return HSA_STATUS_SUCCESS; }