/* * Copyright (C) 2020-2021 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/helpers/hw_helper.h" #include "shared/source/program/kernel_info.h" #include "opencl/source/helpers/cl_hw_helper.h" #include "opencl/source/helpers/dispatch_info.h" namespace NEO { template inline bool ClHwHelperHw::requiresNonAuxMode(const ArgDescPointer &argAsPtr, const HardwareInfo &hwInfo) const { return !argAsPtr.isPureStateful(); } template inline bool ClHwHelperHw::requiresAuxResolves(const KernelInfo &kernelInfo, const HardwareInfo &hwInfo) const { return hasStatelessAccessToBuffer(kernelInfo); } template inline bool ClHwHelperHw::hasStatelessAccessToBuffer(const KernelInfo &kernelInfo) const { for (const auto &arg : kernelInfo.kernelDescriptor.payloadMappings.explicitArgs) { if (arg.is() && !arg.as().isPureStateful()) { return true; } } return false; } template inline bool ClHwHelperHw::allowCompressionForContext(const ClDevice &clDevice, const Context &context) const { return true; } template inline bool ClHwHelperHw::getQueueFamilyName(std::string &name, EngineGroupType type) const { return false; } template inline bool ClHwHelperHw::preferBlitterForLocalToLocalTransfers() const { return false; } template bool ClHwHelperHw::isSupportedKernelThreadArbitrationPolicy() const { return true; } template std::vector ClHwHelperHw::getSupportedThreadArbitrationPolicies() const { return std::vector{CL_KERNEL_EXEC_INFO_THREAD_ARBITRATION_POLICY_OLDEST_FIRST_INTEL, CL_KERNEL_EXEC_INFO_THREAD_ARBITRATION_POLICY_ROUND_ROBIN_INTEL, CL_KERNEL_EXEC_INFO_THREAD_ARBITRATION_POLICY_AFTER_DEPENDENCY_ROUND_ROBIN_INTEL}; } template bool ClHwHelperHw::allowImageCompression(cl_image_format format) const { return true; } } // namespace NEO