SWDEV-326397 - P2P copies to take SDMA path if there is no pending dispatch

Change-Id: I50cfb8d77f7882151a20a1de7aaf5219b1695b7d
This commit is contained in:
Satyanvesh Dittakavi
2022-02-15 12:55:04 +00:00
bovenliggende 37e6cbd983
commit c1b95b09bf
3 gewijzigde bestanden met toevoegingen van 3 en 2 verwijderingen
+1 -1
Bestand weergeven
@@ -2051,7 +2051,7 @@ bool KernelBlitManager::copyBuffer(device::Memory& srcMemory, device::Memory& ds
amd::ScopedLock k(lockXferOps_);
bool result = false;
bool p2p = (&gpuMem(srcMemory).dev() != &gpuMem(dstMemory).dev()) &&
(sizeIn[0] > ROC_P2P_SDMA_SIZE * Ki);
((sizeIn[0] > ROC_P2P_SDMA_SIZE * Ki) || !gpu().IsPendingDispatch());
bool asan = false;
#if defined(__clang__)
#if __has_feature(address_sanitizer)
@@ -382,6 +382,7 @@ class VirtualGPU : public device::VirtualDevice {
void enableSyncBlit() const;
void hasPendingDispatch() { hasPendingDispatch_ = true; }
bool IsPendingDispatch() const { return (hasPendingDispatch_) ? true : false; }
void addSystemScope() { addSystemScope_ = true; }
void SetCopyCommandType(cl_command_type type) { copy_command_type_ = type; }
+1 -1
Bestand weergeven
@@ -267,7 +267,7 @@ release(bool, AMD_CPU_AFFINITY, false, \
release(bool, ROC_USE_FGS_KERNARG, true, \
"Use fine grain kernel args segment for supported asics") \
release(uint, ROC_P2P_SDMA_SIZE, 1024, \
"The minimum size in MB for P2P transfer with SDMA") \
"The minimum size in KB for P2P transfer with SDMA") \
release(uint, ROC_AQL_QUEUE_SIZE, 4096, \
"AQL queue size in AQL packets") \
release(bool, ROC_SKIP_KERNEL_ARG_COPY, false, \