Improve AdditionalKernelExecInfo implementation

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2021-01-05 17:00:12 +00:00
committed by Compute-Runtime-Automation
parent 4591101541
commit 14438484d2
6 changed files with 22 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2020 Intel Corporation
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -1175,3 +1175,9 @@ HWTEST2_F(HwHelperTest, givenHwHelperWhenCheckingSipWaThenFalseIsReturned, isTgl
EXPECT_FALSE(helper.isSipWANeeded(*defaultHwInfo));
}
HWCMDTEST_F(IGFX_GEN8_CORE, HwHelperTest, givenHwHelperWhenAdditionalKernelExecInfoSupportCheckedThenReturnFalse) {
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_FALSE(helper.additionalKernelExecInfoSupported(*defaultHwInfo));
}

View File

@@ -126,6 +126,7 @@ class HwHelper {
virtual bool isCopyOnlyEngineType(EngineGroupType type) const = 0;
virtual void adjustAddressWidthForCanonize(uint32_t &addressWidth) const = 0;
virtual bool isSipWANeeded(const HardwareInfo &hwInfo) const = 0;
virtual bool additionalKernelExecInfoSupported(const HardwareInfo &hwInfo) const = 0;
static uint32_t getSubDevicesCount(const HardwareInfo *pHwInfo);
static uint32_t getEnginesCount(const HardwareInfo &hwInfo);
@@ -319,6 +320,8 @@ class HwHelperHw : public HwHelper {
bool isSipWANeeded(const HardwareInfo &hwInfo) const override;
bool additionalKernelExecInfoSupported(const HardwareInfo &hwInfo) const override;
protected:
LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const override;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2020 Intel Corporation
* Copyright (C) 2019-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -417,6 +417,11 @@ inline bool HwHelperHw<GfxFamily>::forceBlitterUseForGlobalBuffers(const Hardwar
return false;
}
template <typename GfxFamily>
bool HwHelperHw<GfxFamily>::additionalKernelExecInfoSupported(const HardwareInfo &hwInfo) const {
return false;
}
template <typename GfxFamily>
LocalMemoryAccessMode HwHelperHw<GfxFamily>::getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const {
switch (static_cast<LocalMemoryAccessMode>(DebugManager.flags.ForceLocalMemoryAccessMode.get())) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -38,7 +38,7 @@ struct PreambleHelper {
static void programThreadArbitration(LinearStream *pCommandStream, uint32_t requiredThreadArbitrationPolicy);
static void programPreemption(LinearStream *pCommandStream, Device &device, GraphicsAllocation *preemptionCsr);
static void addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo, aub_stream::EngineType engineType);
static void appendProgramVFEState(const HardwareInfo &hwInfo, KernelExecutionType kernelExecutionType, void *cmd);
static void appendProgramVFEState(const HardwareInfo &hwInfo, KernelExecutionType kernelExecutionType, uint32_t additionalKernelExecInfo, void *cmd);
static uint64_t programVFEState(LinearStream *pCommandStream,
const HardwareInfo &hwInfo,
uint32_t scratchSize,

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -117,7 +117,7 @@ void PreambleHelper<GfxFamily>::programAdditionalFieldsInVfeState(VFE_STATE_TYPE
}
template <typename GfxFamily>
void PreambleHelper<GfxFamily>::appendProgramVFEState(const HardwareInfo &hwInfo, KernelExecutionType kernelExecutionType, void *cmd) {}
void PreambleHelper<GfxFamily>::appendProgramVFEState(const HardwareInfo &hwInfo, KernelExecutionType kernelExecutionType, uint32_t additionalKernelExecInfo, void *cmd) {}
template <typename GfxFamily>
uint32_t PreambleHelper<GfxFamily>::getScratchSizeValueToProgramMediaVfeState(uint32_t scratchSize) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -53,7 +53,7 @@ uint64_t PreambleHelper<GfxFamily>::programVFEState(LinearStream *pCommandStream
cmd.setScratchSpaceBasePointerHigh(highAddress);
programAdditionalFieldsInVfeState(&cmd, hwInfo);
appendProgramVFEState(hwInfo, kernelExecutionType, &cmd);
appendProgramVFEState(hwInfo, kernelExecutionType, additionalExecInfo, &cmd);
*pMediaVfeState = cmd;
return scratchSpaceAddressOffset;