From 4ecd0382b73f6750283d2793f468ffffbef97487 Mon Sep 17 00:00:00 2001 From: David Yat Sin Date: Tue, 27 May 2025 15:35:24 +0000 Subject: [PATCH] rocr: update required CP FW version Update required CP FW version required for async-scratch memory support on gfx950. [ROCm/ROCR-Runtime commit: 04dbf769f6bdfab5b26a48616d1e54d3c196818b] --- .../runtime/hsa-runtime/core/inc/amd_gpu_agent.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/inc/amd_gpu_agent.h b/projects/rocr-runtime/runtime/hsa-runtime/core/inc/amd_gpu_agent.h index e1bbef7f4b..69ce38dbdd 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/inc/amd_gpu_agent.h +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/inc/amd_gpu_agent.h @@ -461,11 +461,14 @@ class GpuAgent : public GpuAgentInt { // @brief Returns true if scratch reclaim is enabled __forceinline bool AsyncScratchReclaimEnabled() const override { const uint32_t GFX94X_MIN_CP_FW_VERSION_REQUIRED = 177; - // TODO: Need to update min CP FW ucode version once it is released + const uint32_t GFX95X_MIN_CP_FW_VERSION_REQUIRED = 24; + return (core::Runtime::runtime_singleton_->flag().enable_scratch_async_reclaim() && - supported_isas()[0]->GetMajorVersion() == 9 && - supported_isas()[0]->GetMinorVersion() >= 4 && - properties_.EngineId.ui32.uCode >= GFX94X_MIN_CP_FW_VERSION_REQUIRED); + supported_isas()[0]->GetMajorVersion() == 9 && + ((supported_isas()[0]->GetMinorVersion() == 4 && + properties_.EngineId.ui32.uCode >= GFX94X_MIN_CP_FW_VERSION_REQUIRED) || + (supported_isas()[0]->GetMinorVersion() == 5 && + properties_.EngineId.ui32.uCode >= GFX95X_MIN_CP_FW_VERSION_REQUIRED))); }; hsa_status_t SetAsyncScratchThresholds(size_t use_once_limit) override;