[Openmp-commits] [openmp] [OpenMP][libomptarget] Use two SDMA engines (PR #73633)
via Openmp-commits
openmp-commits at lists.llvm.org
Tue Nov 28 02:36:21 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-amdgpu
Author: Jan Patrick Lehr (jplehr)
<details>
<summary>Changes</summary>
Limit the use to two SDMA engines to resolve issues with certain cards.
---
Full diff: https://github.com/llvm/llvm-project/pull/73633.diff
1 Files Affected:
- (modified) openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp (+2-2)
``````````diff
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");
``````````
</details>
https://github.com/llvm/llvm-project/pull/73633
More information about the Openmp-commits
mailing list