/* * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once #include "shared/offline_compiler/source/offline_compiler.h" #include "shared/source/device_binary_format/ar/ar_encoder.h" #include "shared/source/utilities/const_stringref.h" #include "compiler_options.h" #include "igfxfmid.h" #include #include #include namespace NEO { bool requestedFatBinary(const std::vector &args, OclocArgHelper *helper); inline bool requestedFatBinary(int argc, const char *argv[], OclocArgHelper *helper) { std::vector args; args.assign(argv, argv + argc); return requestedFatBinary(args, helper); } int buildFatBinary(const std::vector &args, OclocArgHelper *argHelper); inline int buildFatBinary(int argc, const char *argv[], OclocArgHelper *argHelper) { std::vector args; args.assign(argv, argv + argc); return buildFatBinary(args, argHelper); } bool isDeviceWithPlatformAbbreviation(ConstStringRef deviceArg, OclocArgHelper *argHelper); std::vector getAllSupportedTargetPlatforms(); std::vector getAllMatchedConfigs(const std::string device, OclocArgHelper *argHelper); std::vector getTargetConfigsForFatbinary(ConstStringRef deviceArg, OclocArgHelper *argHelper); std::vector getTargetPlatformsForFatbinary(ConstStringRef deviceArg, OclocArgHelper *argHelper); std::vector getProductConfigsForOpenRange(ConstStringRef openRange, OclocArgHelper *argHelper, bool rangeTo); std::vector getProductConfigsForClosedRange(ConstStringRef rangeFrom, ConstStringRef rangeTo, OclocArgHelper *argHelper); std::vector getPlatformsForClosedRange(ConstStringRef rangeFrom, ConstStringRef rangeTo, PRODUCT_FAMILY platformFrom, OclocArgHelper *argHelper); std::vector getPlatformsForOpenRange(ConstStringRef openRange, PRODUCT_FAMILY prodId, OclocArgHelper *argHelper, bool rangeTo); std::vector getProductConfigsForSpecificTargets(CompilerOptions::TokenizedString targets, OclocArgHelper *argHelper); std::vector getPlatformsForSpecificTargets(CompilerOptions::TokenizedString targets, OclocArgHelper *argHelper); std::vector toProductNames(const std::vector &productIds); PRODUCT_FAMILY asProductId(ConstStringRef product, const std::vector &allSupportedPlatforms); int buildFatBinaryForTarget(int retVal, const std::vector &argsCopy, std::string pointerSize, Ar::ArEncoder &fatbinary, OfflineCompiler *pCompiler, OclocArgHelper *argHelper, const std::string &deviceConfig); int appendGenericIr(Ar::ArEncoder &fatbinary, const std::string &inputFile, OclocArgHelper *argHelper); std::vector createEncodedElfWithSpirv(const ArrayRef &spirv); } // namespace NEO