mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +08:00
feature: stateless appendPageFaultCopy
Related-to: NEO-11859 Signed-off-by: Damian Tomczak <damian.tomczak@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
4a226bbfc1
commit
98b1f8b1fa
@@ -1392,7 +1392,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendPageFaultCopy(NEO::Graph
|
||||
|
||||
size_t middleElSize = sizeof(uint32_t) * 4;
|
||||
uintptr_t rightSize = size % middleElSize;
|
||||
bool isStateless = this->cmdListHeapAddressModel == NEO::HeapAddressModel::globalStateless;
|
||||
bool isStateless = (this->cmdListHeapAddressModel == NEO::HeapAddressModel::globalStateless) || this->isStatelessBuiltinsEnabled();
|
||||
if (size >= 4ull * MemoryConstants::gigaByte) {
|
||||
isStateless = true;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/helpers/blit_commands_helper.h"
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/libult/ult_command_stream_receiver.h"
|
||||
@@ -363,8 +364,9 @@ HWTEST2_F(CommandListCreate, givenCommandListWhenPageFaultCopyCalledThenappendPa
|
||||
MemoryManager::maxOsContextCount,
|
||||
canonizedGpuAddress);
|
||||
cmdList.appendPageFaultCopy(&mockAllocationDst, &mockAllocationSrc, size, false);
|
||||
|
||||
EXPECT_EQ(cmdList.appendMemoryCopyKernelWithGACalledTimes, 1u);
|
||||
EXPECT_EQ(cmdList.appendMemoryCopyKernelWithGAStatelessCalledTimes, 0u);
|
||||
EXPECT_EQ(cmdList.appendMemoryCopyKernelWithGAStatelessCalledTimes, device->getNEODevice()->getCompilerProductHelper().isForceToStatelessRequired() ? 1u : 0u);
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListAppend, givenCommandListWhenPageFaultCopyCalledWithCopyEngineThenappendPageFaultCopyWithappendMemoryCopyKernelWithGACalled, MatchAny) {
|
||||
@@ -429,7 +431,7 @@ HWTEST2_F(CommandListAppend, givenCommandListWhenPageFaultCopyCalledThenappendPa
|
||||
canonizedGpuAddress);
|
||||
cmdList.appendPageFaultCopy(&mockAllocationDst, &mockAllocationSrc, size, false);
|
||||
EXPECT_EQ(cmdList.appendMemoryCopyKernelWithGACalledTimes, 2u);
|
||||
EXPECT_EQ(cmdList.appendMemoryCopyKernelWithGAStatelessCalledTimes, 0u);
|
||||
EXPECT_EQ(cmdList.appendMemoryCopyKernelWithGAStatelessCalledTimes, device->getNEODevice()->getCompilerProductHelper().isForceToStatelessRequired() ? 2u : 0u);
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListAppend, givenCommandListWhenPageFaultCopyCalledAndErrorOnMidCopyThenappendPageFaultCopyWithappendMemoryCopyKernelWithGACalledForMiddleIsCalled, MatchAny) {
|
||||
@@ -462,7 +464,7 @@ HWTEST2_F(CommandListAppend, givenCommandListWhenPageFaultCopyCalledAndErrorOnMi
|
||||
canonizedGpuAddress);
|
||||
cmdList.appendPageFaultCopy(&mockAllocationDst, &mockAllocationSrc, size, false);
|
||||
EXPECT_EQ(cmdList.appendMemoryCopyKernelWithGACalledTimes, 1u);
|
||||
EXPECT_EQ(cmdList.appendMemoryCopyKernelWithGAStatelessCalledTimes, 0u);
|
||||
EXPECT_EQ(cmdList.appendMemoryCopyKernelWithGAStatelessCalledTimes, device->getNEODevice()->getCompilerProductHelper().isForceToStatelessRequired() ? 1u : 0u);
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListAppend, givenCommandListWhenPageFaultCopyCalledWithCopyEngineThenappendPageFaultCopyWithappendMemoryCopyCalledOnlyOnce, MatchAny) {
|
||||
|
||||
Reference in New Issue
Block a user