clr: Use current device copy engine for inter-dev copy (#945)

* For inter-device copies always use the SDMA engine of current device
* ROCr uses srcAgent SDMA engine, and it could be a remote device
이 커밋은 다음에 포함됨:
SaleelK
2025-09-16 12:56:07 -07:00
커밋한 사람 GitHub
부모 ce9fe34c92
커밋 ec5e9673ad
+7
파일 보기
@@ -539,6 +539,13 @@ inline bool DmaBlitManager::rocrCopyBuffer(address dst, hsa_agent_t& dstAgent, c
// Copy on the first available free engine if ROCr returns a valid mask
hsa_amd_sdma_engine_id_t copyEngine = static_cast<hsa_amd_sdma_engine_id_t>(copyMask);
// Check if engine type is SdmaInter and adjust agents accordingly
// ROCr copy api would always choose SDMA engine of the srcAgent if its a GPU
if (engine == HwQueueEngine::SdmaInter) {
srcAgent = dev().getBackendDevice();
forceSDMA = true;
}
ClPrint(amd::LOG_DEBUG, amd::LOG_COPY2,
"HSA Copy copy_engine=0x%x, dst=0x%zx, src=0x%zx, "
"size=%ld, forceSDMA=%d, engineType=%d, wait_event=0x%zx, completion_signal=0x%zx",