From 658b05394304fa2e2f24afb797f9dcaf329eef6b Mon Sep 17 00:00:00 2001 From: Jonathan Kim Date: Mon, 25 Apr 2022 15:11:21 -0400 Subject: [PATCH] Bypass HDP flush during SDMA copies on A+A GPU-CPU xGMI connections Host to device SDMA copies do not require an HDP cache flush when connected by xGMI since data copies over the data fabric and not HDP. Signed-off-by: Jonathan Kim Reviewed-by: Sean Keely Change-Id: I78d73a47edcc1a9c0ba59f33cf91485f13f1c45b --- runtime/hsa-runtime/core/runtime/amd_blit_sdma.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/runtime/hsa-runtime/core/runtime/amd_blit_sdma.cpp b/runtime/hsa-runtime/core/runtime/amd_blit_sdma.cpp index 8af1d76834..29131aa1c0 100644 --- a/runtime/hsa-runtime/core/runtime/amd_blit_sdma.cpp +++ b/runtime/hsa-runtime/core/runtime/amd_blit_sdma.cpp @@ -146,18 +146,20 @@ hsa_status_t BlitSdma: return HSA_STATUS_ERROR; } + const core::Runtime::LinkInfo& link = core::Runtime::runtime_singleton_->GetLinkInfo( + agent_->node_id(), core::Runtime::runtime_singleton_->cpu_agents()[0]->node_id()); if (agent_->isa()->GetVersion() == core::Isa::Version(7, 0, 1)) { platform_atomic_support_ = false; } else { - const core::Runtime::LinkInfo& link = core::Runtime::runtime_singleton_->GetLinkInfo( - agent_->node_id(), core::Runtime::runtime_singleton_->cpu_agents()[0]->node_id()); platform_atomic_support_ = link.info.atomic_support_64bit; } // HDP flush supported on gfx900 and forward. // FIXME: Not working on gfx10, raises SRBM write protection interrupt. + // gfx90a can support xGMI host to device connections so bypass HDP flush + // in this case. if (agent_->isa()->GetMajorVersion() == 9) { - hdp_flush_support_ = true; + hdp_flush_support_ = link.info.link_type != HSA_AMD_LINK_INFO_TYPE_XGMI; } // Allocate queue buffer.