[Openmp-commits] [openmp] 3930a0b - [OpenMP][libomptarget] Use two SDMA engines (#73633)
via Openmp-commits
openmp-commits at lists.llvm.org
Wed Nov 29 05:21:49 PST 2023
Author: Jan Patrick Lehr
Date: 2023-11-29T14:21:44+01:00
New Revision: 3930a0b57a9a558409a7368f52f905029112e3c2
URL: https://github.com/llvm/llvm-project/commit/3930a0b57a9a558409a7368f52f905029112e3c2
DIFF: https://github.com/llvm/llvm-project/commit/3930a0b57a9a558409a7368f52f905029112e3c2.diff
LOG: [OpenMP][libomptarget] Use two SDMA engines (#73633)
Limit the use to two SDMA engines which are optimized for such transfers.
Added:
Modified:
openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
index 8b2294177016cda..4b8ac2f5f9ff517 100644
--- a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
+++ b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
@@ -162,8 +162,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