Skip to content

Commit

Permalink
[OpenMP][libomptarget] Use two SDMA engines (#73633)
Browse files Browse the repository at this point in the history
Limit the use to two SDMA engines which are optimized for such transfers.
  • Loading branch information
jplehr committed Nov 29, 2023
1 parent d2d9dc8 commit 3930a0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 3930a0b

Please sign in to comment.