refactor: modify sip kernel helpers

Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
Katarzyna Cencelewska
2024-01-08 16:22:40 +00:00
committed by Compute-Runtime-Automation
parent 8df4dab1a3
commit 5d2d3ed899
8 changed files with 24 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -208,7 +208,7 @@ bool SipKernel::initHexadecimalArraySipKernel(SipKernelType type, Device &device
auto &rootDeviceEnvironment = device.getRootDeviceEnvironment();
auto &gfxCoreHelper = device.getGfxCoreHelper();
gfxCoreHelper.setSipKernelData(sipKernelBinary, kernelBinarySize);
gfxCoreHelper.setSipKernelData(sipKernelBinary, kernelBinarySize, rootDeviceEnvironment);
const auto allocType = AllocationType::kernelIsaInternal;
AllocationProperties properties = {rootDeviceIndex, kernelBinarySize, allocType, device.getDeviceBitfield()};
properties.flags.use32BitFrontWindow = false;

View File

@@ -143,8 +143,8 @@ class GfxCoreHelper {
static uint32_t getSubDevicesCount(const HardwareInfo *pHwInfo);
virtual bool isSipKernelAsHexadecimalArrayPreferred() const = 0;
virtual void setSipKernelData(uint32_t *&sipKernelBinary, size_t &kernelBinarySize) const = 0;
virtual void adjustPreemptionSurfaceSize(size_t &csrSize) const = 0;
virtual void setSipKernelData(uint32_t *&sipKernelBinary, size_t &kernelBinarySize, const RootDeviceEnvironment &rootDeviceEnvironment) const = 0;
virtual void adjustPreemptionSurfaceSize(size_t &csrSize, const RootDeviceEnvironment &rootDeviceEnvironment) const = 0;
virtual size_t getSamplerStateSize() const = 0;
virtual bool preferInternalBcsEngine() const = 0;
virtual bool isScratchSpaceSurfaceStateAccessible() const = 0;
@@ -363,9 +363,9 @@ class GfxCoreHelperHw : public GfxCoreHelper {
bool isSipKernelAsHexadecimalArrayPreferred() const override;
void setSipKernelData(uint32_t *&sipKernelBinary, size_t &kernelBinarySize) const override;
void setSipKernelData(uint32_t *&sipKernelBinary, size_t &kernelBinarySize, const RootDeviceEnvironment &rootDeviceEnvironment) const override;
void adjustPreemptionSurfaceSize(size_t &csrSize) const override;
void adjustPreemptionSurfaceSize(size_t &csrSize, const RootDeviceEnvironment &rootDeviceEnvironment) const override;
bool isScratchSpaceSurfaceStateAccessible() const override;
uint32_t getMaxScratchSize() const override;
bool preferInternalBcsEngine() const override;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2023 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -595,7 +595,7 @@ bool GfxCoreHelperHw<GfxFamily>::isSipKernelAsHexadecimalArrayPreferred() const
}
template <typename GfxFamily>
void GfxCoreHelperHw<GfxFamily>::setSipKernelData(uint32_t *&sipKernelBinary, size_t &kernelBinarySize) const {
void GfxCoreHelperHw<GfxFamily>::setSipKernelData(uint32_t *&sipKernelBinary, size_t &kernelBinarySize, const RootDeviceEnvironment &rootDeviceEnvironment) const {
}
template <typename GfxFamily>
@@ -604,7 +604,7 @@ size_t GfxCoreHelperHw<GfxFamily>::getSipKernelMaxDbgSurfaceSize(const HardwareI
}
template <typename GfxFamily>
void GfxCoreHelperHw<GfxFamily>::adjustPreemptionSurfaceSize(size_t &csrSize) const {
void GfxCoreHelperHw<GfxFamily>::adjustPreemptionSurfaceSize(size_t &csrSize, const RootDeviceEnvironment &rootDeviceEnvironment) const {
}
template <typename GfxFamily>

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -164,7 +164,7 @@ int ProductHelper::configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo
static_cast<bool>(outHwInfo->featureTable.flags.ftrGpGpuMidBatchPreempt) && preemption);
outHwInfo->capabilityTable.requiredPreemptionSurfaceSize = outHwInfo->gtSystemInfo.CsrSizeInMb * MemoryConstants::megaByte;
gfxCoreHelper.adjustPreemptionSurfaceSize(outHwInfo->capabilityTable.requiredPreemptionSurfaceSize);
gfxCoreHelper.adjustPreemptionSurfaceSize(outHwInfo->capabilityTable.requiredPreemptionSurfaceSize, rootDeviceEnvironment);
auto &kmdNotifyProperties = outHwInfo->capabilityTable.kmdNotifyProperties;
KmdNotifyHelper::overrideFromDebugVariable(debugManager.flags.OverrideEnableKmdNotify.get(), kmdNotifyProperties.enableKmdNotify);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -38,7 +38,7 @@ int ProductHelper::configureHwInfoWddm(const HardwareInfo *inHwInfo, HardwareInf
outHwInfo->gtSystemInfo.CsrSizeInMb = static_cast<uint32_t>(debugManager.flags.OverridePreemptionSurfaceSizeInMb.get());
}
outHwInfo->capabilityTable.requiredPreemptionSurfaceSize = outHwInfo->gtSystemInfo.CsrSizeInMb * MemoryConstants::megaByte;
gfxCoreHelper.adjustPreemptionSurfaceSize(outHwInfo->capabilityTable.requiredPreemptionSurfaceSize);
gfxCoreHelper.adjustPreemptionSurfaceSize(outHwInfo->capabilityTable.requiredPreemptionSurfaceSize, rootDeviceEnvironment);
auto &kmdNotifyProperties = outHwInfo->capabilityTable.kmdNotifyProperties;
KmdNotifyHelper::overrideFromDebugVariable(debugManager.flags.OverrideEnableKmdNotify.get(), kmdNotifyProperties.enableKmdNotify);