From 1d6ff456739e33483152e5669fbe790e01ed86d4 Mon Sep 17 00:00:00 2001 From: jokim Date: Thu, 10 Oct 2024 14:38:23 -0400 Subject: [PATCH] rocr: Workaround segfault on GFX9 devices older than GFX90a Devices older than GFX90a hit a segfault on queue unmap when an SDMA queue has been assigned a fixed engine. Bypass fixing the engine for these devices for now. Change-Id: I7d2f882d2377f004a7bb65f3b397396db07ce6d3 --- runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp index 5fb4f642e6..843c29ffef 100644 --- a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp +++ b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp @@ -839,6 +839,12 @@ void GpuAgent::InitDma() { kfd_version.KernelInterfaceMinorVersion >= 17))) rec_eng = -1; + // Observing strange behavior when fixing host<->device engines + // on GFX9 devices older than GFX90a, so bypass engine fix. + if (!use_xgmi && isa_->GetMajorVersion() == 9 && isa_->GetMinorVersion() == 0 + && isa_->GetStepping() < 10) + rec_eng = -1; + auto ret = CreateBlitSdma(use_xgmi, rec_eng); if (ret != nullptr) return ret; }