mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
Improve AdditionalKernelExecInfo implementation
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
4591101541
commit
14438484d2
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2017-2020 Intel Corporation
|
* Copyright (C) 2017-2021 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -1175,3 +1175,9 @@ HWTEST2_F(HwHelperTest, givenHwHelperWhenCheckingSipWaThenFalseIsReturned, isTgl
|
|||||||
|
|
||||||
EXPECT_FALSE(helper.isSipWANeeded(*defaultHwInfo));
|
EXPECT_FALSE(helper.isSipWANeeded(*defaultHwInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HWCMDTEST_F(IGFX_GEN8_CORE, HwHelperTest, givenHwHelperWhenAdditionalKernelExecInfoSupportCheckedThenReturnFalse) {
|
||||||
|
auto &helper = HwHelper::get(renderCoreFamily);
|
||||||
|
|
||||||
|
EXPECT_FALSE(helper.additionalKernelExecInfoSupported(*defaultHwInfo));
|
||||||
|
}
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ class HwHelper {
|
|||||||
virtual bool isCopyOnlyEngineType(EngineGroupType type) const = 0;
|
virtual bool isCopyOnlyEngineType(EngineGroupType type) const = 0;
|
||||||
virtual void adjustAddressWidthForCanonize(uint32_t &addressWidth) const = 0;
|
virtual void adjustAddressWidthForCanonize(uint32_t &addressWidth) const = 0;
|
||||||
virtual bool isSipWANeeded(const HardwareInfo &hwInfo) 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 getSubDevicesCount(const HardwareInfo *pHwInfo);
|
||||||
static uint32_t getEnginesCount(const HardwareInfo &hwInfo);
|
static uint32_t getEnginesCount(const HardwareInfo &hwInfo);
|
||||||
@@ -319,6 +320,8 @@ class HwHelperHw : public HwHelper {
|
|||||||
|
|
||||||
bool isSipWANeeded(const HardwareInfo &hwInfo) const override;
|
bool isSipWANeeded(const HardwareInfo &hwInfo) const override;
|
||||||
|
|
||||||
|
bool additionalKernelExecInfoSupported(const HardwareInfo &hwInfo) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const override;
|
LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const override;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2019-2020 Intel Corporation
|
* Copyright (C) 2019-2021 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -417,6 +417,11 @@ inline bool HwHelperHw<GfxFamily>::forceBlitterUseForGlobalBuffers(const Hardwar
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename GfxFamily>
|
||||||
|
bool HwHelperHw<GfxFamily>::additionalKernelExecInfoSupported(const HardwareInfo &hwInfo) const {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
LocalMemoryAccessMode HwHelperHw<GfxFamily>::getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const {
|
LocalMemoryAccessMode HwHelperHw<GfxFamily>::getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const {
|
||||||
switch (static_cast<LocalMemoryAccessMode>(DebugManager.flags.ForceLocalMemoryAccessMode.get())) {
|
switch (static_cast<LocalMemoryAccessMode>(DebugManager.flags.ForceLocalMemoryAccessMode.get())) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2020 Intel Corporation
|
* Copyright (C) 2018-2021 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -38,7 +38,7 @@ struct PreambleHelper {
|
|||||||
static void programThreadArbitration(LinearStream *pCommandStream, uint32_t requiredThreadArbitrationPolicy);
|
static void programThreadArbitration(LinearStream *pCommandStream, uint32_t requiredThreadArbitrationPolicy);
|
||||||
static void programPreemption(LinearStream *pCommandStream, Device &device, GraphicsAllocation *preemptionCsr);
|
static void programPreemption(LinearStream *pCommandStream, Device &device, GraphicsAllocation *preemptionCsr);
|
||||||
static void addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo, aub_stream::EngineType engineType);
|
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,
|
static uint64_t programVFEState(LinearStream *pCommandStream,
|
||||||
const HardwareInfo &hwInfo,
|
const HardwareInfo &hwInfo,
|
||||||
uint32_t scratchSize,
|
uint32_t scratchSize,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2020 Intel Corporation
|
* Copyright (C) 2018-2021 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -117,7 +117,7 @@ void PreambleHelper<GfxFamily>::programAdditionalFieldsInVfeState(VFE_STATE_TYPE
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
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>
|
template <typename GfxFamily>
|
||||||
uint32_t PreambleHelper<GfxFamily>::getScratchSizeValueToProgramMediaVfeState(uint32_t scratchSize) {
|
uint32_t PreambleHelper<GfxFamily>::getScratchSizeValueToProgramMediaVfeState(uint32_t scratchSize) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018-2020 Intel Corporation
|
* Copyright (C) 2018-2021 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -53,7 +53,7 @@ uint64_t PreambleHelper<GfxFamily>::programVFEState(LinearStream *pCommandStream
|
|||||||
cmd.setScratchSpaceBasePointerHigh(highAddress);
|
cmd.setScratchSpaceBasePointerHigh(highAddress);
|
||||||
|
|
||||||
programAdditionalFieldsInVfeState(&cmd, hwInfo);
|
programAdditionalFieldsInVfeState(&cmd, hwInfo);
|
||||||
appendProgramVFEState(hwInfo, kernelExecutionType, &cmd);
|
appendProgramVFEState(hwInfo, kernelExecutionType, additionalExecInfo, &cmd);
|
||||||
*pMediaVfeState = cmd;
|
*pMediaVfeState = cmd;
|
||||||
|
|
||||||
return scratchSpaceAddressOffset;
|
return scratchSpaceAddressOffset;
|
||||||
|
|||||||
Reference in New Issue
Block a user