mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 23:33:20 +08:00
fix: disable staging when shares system usm is enabled
Related-To: NEO-14026 Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
25fd35d9df
commit
e8b14dee12
@@ -1921,6 +1921,9 @@ bool CommandListCoreFamilyImmediate<gfxCoreFamily>::isValidForStagingTransfer(co
|
||||
if (this->useAdditionalBlitProperties) {
|
||||
return false;
|
||||
}
|
||||
if (this->isSharedSystemEnabled()) {
|
||||
return false;
|
||||
}
|
||||
auto driver = this->getDevice()->getDriverHandle();
|
||||
auto importedAlloc = driver->findHostPointerAllocation(const_cast<void *>(srcptr), size, this->getDevice()->getRootDeviceIndex());
|
||||
if (importedAlloc != nullptr) {
|
||||
|
||||
@@ -1474,6 +1474,25 @@ HWTEST_F(StagingBuffersFixture, givenAppendMemoryCopyWithStagingThenDontImportAl
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST_F(StagingBuffersFixture, givenSharedSystemUsmThenDontUseStagingBuffers) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.EnableSharedSystemUsmSupport.set(1);
|
||||
debugManager.flags.TreatNonUsmForTransfersAsSharedSystem.set(1);
|
||||
debugManager.flags.EmitMemAdvisePriorToCopyForNonUsm.set(1);
|
||||
MockCommandListImmediateHw<FamilyType::gfxCoreFamily> cmdList;
|
||||
cmdList.cmdQImmediate = queue.get();
|
||||
cmdList.initialize(device, NEO::EngineGroupType::compute, 0u);
|
||||
|
||||
auto &hwInfo = *device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||
VariableBackup<uint64_t> sharedSystemMemCapabilities{&hwInfo.capabilityTable.sharedSystemMemCapabilities};
|
||||
sharedSystemMemCapabilities = 0xf;
|
||||
|
||||
size_t src[size] = {};
|
||||
auto res = cmdList.appendMemoryCopy(usmDevice, &src, size, nullptr, 0, nullptr, copyParams);
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, res);
|
||||
EXPECT_EQ(1u, cmdList.getMemAdviseOperations().size());
|
||||
}
|
||||
|
||||
HWTEST_F(StagingBuffersFixture, givenStagingBufferManagerDestroyedAndHostSynchronizeCalledThenSuccessReturned) {
|
||||
driverHandle->stagingBufferManager.reset();
|
||||
MockCommandListImmediateHw<FamilyType::gfxCoreFamily> cmdList;
|
||||
|
||||
Reference in New Issue
Block a user