Ensure HSA_ENABLE_SDMA=0 persists on new copy on engine API

Copy on engine API still needs to respect HSA_ENABLE_SDMA settings.

Change-Id: I26038b1e3082d62687c2e279615557583d20f229


[ROCm/ROCR-Runtime commit: 3e3e11bc5a]
이 커밋은 다음에 포함됨:
Jonathan Kim 작성하고 Jonathan Kim가 2023-06-19 13:48:59 -04:00를 커밋함
1 부모 2758da98cd
커밋 63463b14c3
1 파일이 변경됨
+3 -3
+3 -3
파일 보기
@@ -856,8 +856,9 @@ hsa_status_t GpuAgent::DmaCopyOnEngine(void* dst, core::Agent& dst_agent,
bool is_p2p = !is_same_gpu && src_agent.device_type() == core::Agent::kAmdGpuDevice &&
dst_agent.device_type() == core::Agent::kAmdGpuDevice;
if (is_p2p &&
core::Runtime::runtime_singleton_->flag().enable_peer_sdma() == Flag::SDMA_DISABLE) {
if ((is_p2p &&
core::Runtime::runtime_singleton_->flag().enable_peer_sdma() == Flag::SDMA_DISABLE) ||
core::Runtime::runtime_singleton_->flag().enable_sdma() == Flag::SDMA_DISABLE) {
// Note that VDI/HIP will call DmaCopy instead of DmaCopyOnEngine for P2P copies, but
// we still want to handle force Blit Kernels in this function in case other libraries
// decide to use DmaCopyOnEngine for P2P copies
@@ -867,7 +868,6 @@ hsa_status_t GpuAgent::DmaCopyOnEngine(void* dst, core::Agent& dst_agent,
bool is_xgmi = is_p2p && dst_agent.HiveId() && src_agent.HiveId() == dst_agent.HiveId() &&
properties_.NumSdmaXgmiEngines;
// Due to a RAS issue, GFX90a can only support H2D copies on SDMA0
bool is_h2d_blit = (src_agent.device_type() == core::Agent::kAmdCpuDevice &&
dst_agent.device_type() == core::Agent::kAmdGpuDevice);