/* * Copyright (C) 2017-2018 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "runtime/aub_mem_dump/aub_mem_dump.h" #include "runtime/helpers/hw_helper.h" #include "runtime/helpers/hw_info.h" #include "runtime/memory_manager/memory_constants.h" namespace OCLRT { template void HwHelperHw::setCapabilityCoherencyFlag(const HardwareInfo *pHwInfo, bool &coherencyFlag) { coherencyFlag = true; } template void HwHelperHw::adjustDefaultEngineType(HardwareInfo *pHwInfo) { } template bool HwHelperHw::isLocalMemoryEnabled(const HardwareInfo &hwInfo) { return false; } template void HwHelperHw::setupHardwareCapabilities(HardwareCapabilities *caps, const HardwareInfo &hwInfo) { caps->image3DMaxHeight = 16384; caps->image3DMaxWidth = 16384; //With statefull messages we have an allocation cap of 4GB //Reason to subtract 8KB is that driver may pad the buffer with addition pages for over fetching.. caps->maxMemAllocSize = (4ULL * MemoryConstants::gigaByte) - (8ULL * MemoryConstants::kiloByte); caps->isStatelesToStatefullWithOffsetSupported = true; caps->localMemorySupported = isLocalMemoryEnabled(hwInfo); } template uint32_t HwHelperHw::getComputeUnitsUsedForScratch(const HardwareInfo *pHwInfo) const { return pHwInfo->pSysInfo->MaxSubSlicesSupported * pHwInfo->pSysInfo->MaxEuPerSubSlice * pHwInfo->pSysInfo->ThreadCount / pHwInfo->pSysInfo->EUCount; } template SipKernelType HwHelperHw::getSipKernelType(bool debuggingActive) { if (!debuggingActive) { return SipKernelType::Csr; } return SipKernelType::DbgCsr; } template uint32_t HwHelperHw::getConfigureAddressSpaceMode() { return 0u; } template bool HwHelperHw::setupPreemptionRegisters(HardwareInfo *pHwInfo, bool enable) { return false; } template size_t HwHelperHw::getMaxBarrierRegisterPerSlice() const { return 32; } template const AubMemDump::LrcaHelper &HwHelperHw::getCsTraits(EngineInstanceT engineInstance) const { return *AUBFamilyMapper::csTraits[engineInstance.type]; } template bool HwHelperHw::isPageTableManagerSupported(const HardwareInfo &hwInfo) const { return false; } template bool HwHelperHw::supportsYTiling() const { return true; } template bool HwHelperHw::timestampPacketWriteSupported() const { return false; } } // namespace OCLRT