/* * Copyright (C) 2024-2025 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/helpers/string.h" #include "shared/source/release_helper/release_helper.h" #include "shared/source/xe3_core/hw_cmds_base.h" namespace NEO { template <> const std::string ReleaseHelperHw::getDeviceConfigString(uint32_t tileCount, uint32_t sliceCount, uint32_t subSliceCount, uint32_t euPerSubSliceCount) const { char configString[16] = {0}; auto err = snprintf_s(configString, sizeof(configString), sizeof(configString), "%utx%ux%ux%u", tileCount, sliceCount, subSliceCount, euPerSubSliceCount); UNRECOVERABLE_IF(err < 0); return configString; } template <> const SizeToPreferredSlmValueArray &ReleaseHelperHw::getSizeToPreferredSlmValue(bool isHeapless) const { using PREFERRED_SLM_ALLOCATION_SIZE = typename Xe3CoreFamily::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE; static const SizeToPreferredSlmValueArray sizeToPreferredSlmValue = {{ {0, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_SLM_ENCODES_0K}, {16 * MemoryConstants::kiloByte, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_SLM_ENCODES_16K}, {32 * MemoryConstants::kiloByte, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_SLM_ENCODES_32K}, {64 * MemoryConstants::kiloByte, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_SLM_ENCODES_64K}, {96 * MemoryConstants::kiloByte, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_SLM_ENCODES_96K}, {std::numeric_limits::max(), PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_SLM_ENCODES_128K}, }}; return sizeToPreferredSlmValue; } template <> bool ReleaseHelperHw::isStateCacheInvalidationWaRequired() const { auto enableStateCacheInvalidationWa = debugManager.flags.EnableStateCacheInvalidationWa.get(); if (enableStateCacheInvalidationWa != -1) { return enableStateCacheInvalidationWa; } return true; } } // namespace NEO