Change interface to method programing additional fields of command

Related-To: NEO-6959

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2022-05-26 13:20:02 +00:00
committed by Compute-Runtime-Automation
parent 6fd7ae7142
commit 8431234845
10 changed files with 66 additions and 38 deletions

View File

@@ -20,14 +20,15 @@ XE_HPC_CORETEST_F(WalkerDispatchTestsXeHpcCore, givenXeHpcWhenEncodeAdditionalWa
auto walkerCmd = FamilyType::cmdInitGpgpuWalker;
auto hwInfo = *defaultHwInfo;
EncodeWalkerArgs walkerArgs{KernelExecutionType::Default, true};
{
EncodeDispatchKernel<FamilyType>::encodeAdditionalWalkerFields(hwInfo, walkerCmd, KernelExecutionType::Default);
EncodeDispatchKernel<FamilyType>::encodeAdditionalWalkerFields(hwInfo, walkerCmd, walkerArgs);
EXPECT_FALSE(walkerCmd.getComputeDispatchAllWalkerEnable());
}
{
DebugManager.flags.ComputeDispatchAllWalkerEnableInComputeWalker.set(1);
EncodeDispatchKernel<FamilyType>::encodeAdditionalWalkerFields(hwInfo, walkerCmd, KernelExecutionType::Default);
EncodeDispatchKernel<FamilyType>::encodeAdditionalWalkerFields(hwInfo, walkerCmd, walkerArgs);
EXPECT_TRUE(walkerCmd.getComputeDispatchAllWalkerEnable());
}
}

View File

@@ -35,6 +35,7 @@ PVCTEST_F(WalkerDispatchTestsPvc, givenPvcWhenEncodeAdditionalWalkerFieldsThenPo
auto &postSyncData = walkerCmd.getPostSync();
auto hwInfo = *defaultHwInfo;
EncodeWalkerArgs walkerArgs{KernelExecutionType::Default, true};
for (auto &testInput : testInputs) {
for (auto &deviceId : PVC_XL_IDS) {
hwInfo.platform.usDeviceID = deviceId;
@@ -43,8 +44,24 @@ PVCTEST_F(WalkerDispatchTestsPvc, givenPvcWhenEncodeAdditionalWalkerFieldsThenPo
testInput.programGlobalFenceAsPostSyncOperationInComputeWalker);
postSyncData.setSystemMemoryFenceRequest(false);
EncodeDispatchKernel<FamilyType>::encodeAdditionalWalkerFields(hwInfo, walkerCmd, KernelExecutionType::Default);
EncodeDispatchKernel<FamilyType>::encodeAdditionalWalkerFields(hwInfo, walkerCmd, walkerArgs);
EXPECT_EQ(testInput.expectSystemMemoryFenceRequest, postSyncData.getSystemMemoryFenceRequest());
}
}
}
}
PVCTEST_F(WalkerDispatchTestsPvc, givenPvcSupportsSystemMemoryFenceWhenNoSystemFenceRequiredThenEncodedWalkerFenceFieldSetToFalse) {
auto walkerCmd = FamilyType::cmdInitGpgpuWalker;
auto &postSyncData = walkerCmd.getPostSync();
auto hwInfo = *defaultHwInfo;
hwInfo.platform.usRevId = 0x3;
EncodeWalkerArgs walkerArgs{KernelExecutionType::Default, false};
for (auto &deviceId : PVC_XL_IDS) {
hwInfo.platform.usDeviceID = deviceId;
postSyncData.setSystemMemoryFenceRequest(true);
EncodeDispatchKernel<FamilyType>::encodeAdditionalWalkerFields(hwInfo, walkerCmd, walkerArgs);
EXPECT_FALSE(postSyncData.getSystemMemoryFenceRequest());
}
}