Add support for implicit args in L0

Related-To: NEO-5081
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2021-09-13 16:49:13 +00:00
committed by Compute-Runtime-Automation
parent 03e29c34c4
commit 5a59a6ad2e
13 changed files with 352 additions and 33 deletions

View File

@@ -118,8 +118,7 @@ class MockDevice : public RootDevice {
return createDeviceInternals(device);
}
template <typename T>
static T *createWithNewExecutionEnvironment(const HardwareInfo *pHwInfo, uint32_t rootDeviceIndex = 0) {
static ExecutionEnvironment *prepareExecutionEnvironment(const HardwareInfo *pHwInfo, uint32_t rootDeviceIndex) {
ExecutionEnvironment *executionEnvironment = new ExecutionEnvironment();
auto numRootDevices = DebugManager.flags.CreateMultipleRootDevices.get() ? DebugManager.flags.CreateMultipleRootDevices.get() : rootDeviceIndex + 1;
executionEnvironment->prepareRootDeviceEnvironments(numRootDevices);
@@ -127,6 +126,12 @@ class MockDevice : public RootDevice {
for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) {
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(pHwInfo);
}
return executionEnvironment;
}
template <typename T>
static T *createWithNewExecutionEnvironment(const HardwareInfo *pHwInfo, uint32_t rootDeviceIndex = 0) {
auto executionEnvironment = prepareExecutionEnvironment(pHwInfo, rootDeviceIndex);
return createWithExecutionEnvironment<T>(pHwInfo, executionEnvironment, rootDeviceIndex);
}

View File

@@ -54,6 +54,10 @@ struct MockDispatchKernelEncoder : public DispatchKernelEncoderI {
}
void expectAnyMockFunctionCall();
NEO::ImplicitArgs *getImplicitArgs() const override { return nullptr; }
uint32_t getSizeForImplicitArgsPatching() const override { return 0; }
void patchImplicitArgs(void *&pOut) const override {}
::testing::NiceMock<MockGraphicsAllocation> mockAllocation;
static constexpr uint32_t crossThreadSize = 0x40;
static constexpr uint32_t perThreadSize = 0x20;