refactor: correct programming of SLM size

Unify reading hw avaialble slm size:
Pre-Xe2 SLMSizeInKb stores total SLM size across all DSS
Xe2+ SLMSizeInKb stores SLM size per SS

apply restrictions for preferred/programmable SLM size

Related-To: NEO-12949
Signed-off-by: Marcel Skierkowski <marcel.skierkowski@intel.com>
This commit is contained in:
Marcel Skierkowski
2025-09-30 12:38:50 +00:00
committed by Compute-Runtime-Automation
parent 162f38972f
commit 047f6851f7
48 changed files with 302 additions and 17 deletions

View File

@@ -63,7 +63,13 @@ void MutableComputeWalkerHw<GfxFamily>::updateImplicitScalingData(const NEO::Dev
template <typename GfxFamily>
void MutableComputeWalkerHw<GfxFamily>::updateSlmSize(const NEO::Device &device, uint32_t slmTotalSize) {
auto slmSize = NEO::EncodeDispatchKernel<GfxFamily>::computeSlmValues(device.getHardwareInfo(), slmTotalSize, device.getReleaseHelper(), this->isHeapless);
auto &hwInfo = device.getHardwareInfo();
uint32_t actualHwSlmSizeKb = device.getProductHelper().getActualHwSlmSize(device.getRootDeviceEnvironment());
auto maxProgrammableSlmSizeKb = std::min(hwInfo.capabilityTable.maxProgrammableSlmSize, actualHwSlmSizeKb);
auto programmableSlmSize = std::min(slmTotalSize, static_cast<uint32_t>(maxProgrammableSlmSizeKb * MemoryConstants::kiloByte));
auto slmSize = NEO::EncodeDispatchKernel<GfxFamily>::computeSlmValues(device.getHardwareInfo(), programmableSlmSize, device.getReleaseHelper(), this->isHeapless);
if (NEO::debugManager.flags.OverrideSlmAllocationSize.get() != -1) {
slmSize = static_cast<uint32_t>(NEO::debugManager.flags.OverrideSlmAllocationSize.get());

View File

@@ -45,6 +45,14 @@ _default_config:
EnableDebugBreak: '0'
params:
- --verbose
bmg:
envs:
SetCommandStreamReceiver: '2'
NEOReadDebugKeys: '1'
PrintDebugMessages: '1'
EnableDebugBreak: '0'
ForcePreemptionMode: '1'
ForceKernelPreemptionMode: '1'
zello_arg_slm:
bmg: