[Openmp-commits] [openmp] [OpenMP][libomptarget] Use two SDMA engines (PR #73633)
Jan Patrick Lehr via Openmp-commits
openmp-commits at lists.llvm.org
Tue Nov 28 02:35:52 PST 2023
https://github.com/jplehr created https://github.com/llvm/llvm-project/pull/73633
Limit the use to two SDMA engines to resolve issues with certain cards.
>From 78e5e0c81e5d7a1390829e0d90d0ec23b0c99b1e Mon Sep 17 00:00:00 2001
From: JP Lehr <JanPatrick.Lehr at amd.com>
Date: Tue, 28 Nov 2023 05:32:42 -0500
Subject: [PATCH] [OpenMP][libomptarget] Use two SDMA engines
Limit the use to two SDMA engines to resolve issues with certain cards.
---
openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
index 208cce90d8e9277..b3eed60d2879d48 100644
--- a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
+++ b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
@@ -161,8 +161,8 @@ Error asyncMemCopy(bool UseMultipleSdmaEngines, void *Dst, hsa_agent_t DstAgent,
Dst, DstAgent, Src, SrcAgent, Size, NumDepSignals, DepSignals,
CompletionSignal, (hsa_amd_sdma_engine_id_t)LocalSdmaEngine,
/*force_copy_on_sdma=*/true);
- // Increment to use one of three SDMA engines: 0x1, 0x2, 0x4
- LocalSdmaEngine = (LocalSdmaEngine << 1) % 7;
+ // Increment to use one of two SDMA engines: 0x1, 0x2
+ LocalSdmaEngine = (LocalSdmaEngine << 1) % 3;
SdmaEngine.store(LocalSdmaEngine, std::memory_order_relaxed);
return Plugin::check(S, "Error in hsa_amd_memory_async_copy_on_engine: %s");
More information about the Openmp-commits
mailing list