/* * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/helpers/hw_helper.h" #include "shared/source/helpers/hw_info.h" namespace NEO { template void HwHelperHw::adjustDefaultEngineType(HardwareInfo *pHwInfo) { } template uint32_t HwHelperHw::getComputeUnitsUsedForScratch(const HardwareInfo *pHwInfo) const { return pHwInfo->gtSystemInfo.MaxSubSlicesSupported * pHwInfo->gtSystemInfo.MaxEuPerSubSlice * pHwInfo->gtSystemInfo.ThreadCount / pHwInfo->gtSystemInfo.EUCount; } template inline uint32_t HwHelperHw::getGlobalTimeStampBits() const { return 36; } template bool HwHelperHw::isLocalMemoryEnabled(const HardwareInfo &hwInfo) const { return false; } template bool HwHelperHw::hvAlign4Required() const { return true; } template bool HwHelperHw::timestampPacketWriteSupported() const { return false; } template bool HwHelperHw::isTimestampWaitSupported() const { return false; } template bool HwHelperHw::isAssignEngineRoundRobinSupported() const { return false; } template const EngineInstancesContainer HwHelperHw::getGpgpuEngineInstances(const HardwareInfo &hwInfo) const { return { {aub_stream::ENGINE_RCS, EngineUsage::Regular}, {aub_stream::ENGINE_RCS, EngineUsage::LowPriority}, {aub_stream::ENGINE_RCS, EngineUsage::Internal}, }; } template EngineGroupType HwHelperHw::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 HwHelperHw::getExtensions() const { return ""; } template uint32_t HwHelperHw::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 HwHelperHw::calculateAvailableThreadCount(PRODUCT_FAMILY family, uint32_t grfCount, uint32_t euCount, uint32_t threadsPerEu) { return threadsPerEu * euCount; } template uint64_t HwHelperHw::getGpuTimeStampInNS(uint64_t timeStamp, double frequency) const { return static_cast(timeStamp * frequency); } template inline bool HwHelperHw::preferSmallWorkgroupSizeForKernel(const size_t size, const HardwareInfo &hwInfo) const { return false; } constexpr uint32_t planarYuvMaxHeight = 16352; template uint32_t HwHelperHw::getPlanarYuvMaxHeight() const { return planarYuvMaxHeight; } template aub_stream::MMIOList HwHelperHw::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::setPipeControlExtraProperties(typename GfxFamily::PIPE_CONTROL &pipeControl, PipeControlArgs &args) { } template bool MemorySynchronizationCommands::isPipeControlWArequired(const HardwareInfo &hwInfo) { return false; } template inline void MemorySynchronizationCommands::setPipeControlWAFlags(PIPE_CONTROL &pipeControl) { pipeControl.setCommandStreamerStallEnable(true); } template bool HwHelperHw::unTypedDataPortCacheFlushRequired() const { return false; } template bool HwHelperHw::isScratchSpaceSurfaceStateAccessible() const { return false; } template inline bool HwHelperHw::platformSupportsImplicitScaling(const NEO::HardwareInfo &hwInfo) const { return false; } template inline bool HwHelperHw::isLinuxCompletionFenceSupported() const { return false; } } // namespace NEO