/* * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/helpers/engine_node_helper.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/helpers/hw_info.h" namespace NEO { template void GfxCoreHelperHw::adjustDefaultEngineType(HardwareInfo *pHwInfo, const ProductHelper &productHelper) { } template uint32_t GfxCoreHelperHw::getComputeUnitsUsedForScratch(const RootDeviceEnvironment &rootDeviceEnvironment) const { auto hwInfo = rootDeviceEnvironment.getHardwareInfo(); return hwInfo->gtSystemInfo.MaxSubSlicesSupported * hwInfo->gtSystemInfo.MaxEuPerSubSlice * hwInfo->gtSystemInfo.ThreadCount / hwInfo->gtSystemInfo.EUCount; } template inline uint32_t GfxCoreHelperHw::getGlobalTimeStampBits() const { return 36; } template bool GfxCoreHelperHw::isLocalMemoryEnabled(const HardwareInfo &hwInfo) const { return false; } template bool GfxCoreHelperHw::hvAlign4Required() const { return true; } template bool GfxCoreHelperHw::timestampPacketWriteSupported() const { return false; } template bool GfxCoreHelperHw::isTimestampWaitSupportedForQueues() const { return false; } template bool GfxCoreHelperHw::isUpdateTaskCountFromWaitSupported() const { return false; } template const EngineInstancesContainer GfxCoreHelperHw::getGpgpuEngineInstances(const RootDeviceEnvironment &rootDeviceEnvironment) const { return { {aub_stream::ENGINE_RCS, EngineUsage::Regular}, {aub_stream::ENGINE_RCS, EngineUsage::LowPriority}, {aub_stream::ENGINE_RCS, EngineUsage::Internal}, }; } template EngineGroupType GfxCoreHelperHw::getEngineGroupType(aub_stream::EngineType engineType, EngineUsage engineUsage, const HardwareInfo &hwInfo) const { switch (engineType) { case aub_stream::ENGINE_RCS: return EngineGroupType::RenderCompute; default: UNRECOVERABLE_IF(true); } } template std::string GfxCoreHelperHw::getExtensions(const RootDeviceEnvironment &rootDeviceEnvironment) const { return ""; } template uint32_t GfxCoreHelperHw::getMocsIndex(const GmmHelper &gmmHelper, bool l3enabled, bool l1enabled) const { if (l3enabled) { return gmmHelper.getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER) >> 1; } return gmmHelper.getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED) >> 1; } template uint32_t GfxCoreHelperHw::calculateAvailableThreadCount(const HardwareInfo &hwInfo, uint32_t grfCount) const { return hwInfo.gtSystemInfo.ThreadCount; } template uint64_t GfxCoreHelperHw::getGpuTimeStampInNS(uint64_t timeStamp, double frequency) const { return static_cast(timeStamp * frequency); } template inline bool GfxCoreHelperHw::preferSmallWorkgroupSizeForKernel(const size_t size, const RootDeviceEnvironment &rootDeviceEnvironment) const { return false; } constexpr uint32_t planarYuvMaxHeight = 16352; template uint32_t GfxCoreHelperHw::getPlanarYuvMaxHeight() const { return planarYuvMaxHeight; } template aub_stream::MMIOList GfxCoreHelperHw::getExtraMmioList(const HardwareInfo &hwInfo, const GmmHelper &gmmHelper) const { return {}; } template inline void MemorySynchronizationCommands::setPostSyncExtraProperties(PipeControlArgs &args, const HardwareInfo &hwInfo) { } template inline void MemorySynchronizationCommands::setCacheFlushExtraProperties(PipeControlArgs &args) { } template inline void MemorySynchronizationCommands::setBarrierExtraProperties(void *barrierCmd, PipeControlArgs &args) { } template bool MemorySynchronizationCommands::isBarrierWaRequired(const RootDeviceEnvironment &rootDeviceEnvironment) { return false; } template inline void MemorySynchronizationCommands::setBarrierWaFlags(void *barrierCmd) { reinterpret_cast(barrierCmd)->setCommandStreamerStallEnable(true); } template bool GfxCoreHelperHw::unTypedDataPortCacheFlushRequired() const { return false; } template bool GfxCoreHelperHw::isScratchSpaceSurfaceStateAccessible() const { return false; } template uint32_t GfxCoreHelperHw::getMaxScratchSize() const { return 2 * MB; } template inline bool GfxCoreHelperHw::platformSupportsImplicitScaling(const NEO::RootDeviceEnvironment &rootDeviceEnvironment) const { return false; } template inline bool GfxCoreHelperHw::preferInternalBcsEngine() const { return false; } template uint32_t GfxCoreHelperHw::getMinimalScratchSpaceSize() const { return 1024U; } } // namespace NEO