mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
fix: use stateless copy kernel when append memory copy on PVC and Xe2 platforms
Related-To: NEO-6075 Resolves: NEO-12027 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f61ab615e7
commit
899bda3263
@@ -1473,6 +1473,9 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopy(void *dstptr,
|
||||
uintptr_t rightSize = 0;
|
||||
uintptr_t middleSizeBytes = 0;
|
||||
bool isStateless = this->cmdListHeapAddressModel == NEO::HeapAddressModel::globalStateless;
|
||||
if (neoDevice->getCompilerProductHelper().isForceToStatelessRequired()) {
|
||||
isStateless = true;
|
||||
}
|
||||
const bool isHeapless = this->isHeaplessModeEnabled();
|
||||
|
||||
if (!isCopyOnlyEnabled) {
|
||||
|
||||
@@ -279,13 +279,27 @@ HWTEST2_F(CommandListAppend, givenCommandListWhenQueryKernelTimestampsCalledWith
|
||||
EXPECT_EQ(ret, ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY);
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListAppend, givenCommandListWhenMemoryCopyCalledThenAppendMemoryCopyWithappendMemoryCopyKernelWithGACalled, IsAtLeastSkl) {
|
||||
HWTEST2_F(CommandListAppend, givenCommandListWhenMemoryCopyCalledThenAppendMemoryCopyWithStatelessKernelIsCalled, IsAtLeastXeHpcCore) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, NEO::EngineGroupType::renderCompute, 0u);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
cmdList.appendMemoryCopy(dstPtr, srcPtr, 0x1001, nullptr, 0, nullptr, false, false);
|
||||
EXPECT_GT(cmdList.appendMemoryCopyKernelWithGACalledTimes, 0u);
|
||||
EXPECT_GT(cmdList.appendMemoryCopyKernelWithGAStatelessCalledTimes, 0u);
|
||||
EXPECT_EQ(cmdList.appendMemoryCopyKernelWithGAStatelessCalledTimes, cmdList.appendMemoryCopyKernelWithGACalledTimes);
|
||||
EXPECT_EQ(cmdList.appendMemoryCopyBlitCalledTimes, 0u);
|
||||
}
|
||||
|
||||
using PrePvcCore = IsWithinGfxCore<IGFX_GEN9_CORE, IGFX_XE_HPG_CORE>;
|
||||
HWTEST2_F(CommandListAppend, givenCommandListWhenMemoryCopyCalledThenAppendMemoryCopyWithoutStatelessKernelIsCalled, PrePvcCore) {
|
||||
MockCommandListHw<gfxCoreFamily> cmdList;
|
||||
cmdList.initialize(device, NEO::EngineGroupType::renderCompute, 0u);
|
||||
void *srcPtr = reinterpret_cast<void *>(0x1234);
|
||||
void *dstPtr = reinterpret_cast<void *>(0x2345);
|
||||
cmdList.appendMemoryCopy(dstPtr, srcPtr, 0x1001, nullptr, 0, nullptr, false, false);
|
||||
EXPECT_GT(cmdList.appendMemoryCopyKernelWithGACalledTimes, 0u);
|
||||
EXPECT_EQ(cmdList.appendMemoryCopyKernelWithGAStatelessCalledTimes, 0u);
|
||||
EXPECT_EQ(cmdList.appendMemoryCopyBlitCalledTimes, 0u);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user