mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:11:16 +08:00
Optimize binaries' size by adjusting linkage of constants in headers
When header is included for the first time in translation unit, then preprocessor simply copy-pastes its content. If we define a constant in a header file and this constant has internal linkage then each and every translation unit, which includes this header will have its own copy of this constant. C++17 introduces inline variables, which are meant to allow creation of variables in header files, which do not cause multiple instances. The inline variable has a single instance when: - constexpr is used without static (constexpr implicitly implies inline) - inline is used without static - inline const is used without static (const does not imply internal linkage when used with inline) Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ffe8c75291
commit
c0342a0ab5
@@ -24,7 +24,7 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
const int maxHintCounter = 6;
|
||||
constexpr int maxHintCounter = 6;
|
||||
|
||||
bool containsHint(const char *providedHint, char *userData);
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
static constexpr auto *oclocStdoutLogName = "stdout.log";
|
||||
constexpr auto *oclocStdoutLogName = "stdout.log";
|
||||
|
||||
struct Source {
|
||||
const uint8_t *data;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace NEO {
|
||||
namespace Queries {
|
||||
static constexpr ConstStringRef queryNeoRevision = "NEO_REVISION";
|
||||
static constexpr ConstStringRef queryOCLDriverVersion = "OCL_DRIVER_VERSION";
|
||||
constexpr ConstStringRef queryNeoRevision = "NEO_REVISION";
|
||||
constexpr ConstStringRef queryOCLDriverVersion = "OCL_DRIVER_VERSION";
|
||||
}; // namespace Queries
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -11,9 +11,9 @@
|
||||
#include <limits>
|
||||
|
||||
namespace PageTableEntry {
|
||||
const uint32_t presentBit = 0;
|
||||
const uint32_t writableBit = 1;
|
||||
const uint32_t userSupervisorBit = 2;
|
||||
const uint32_t localMemoryBit = 11;
|
||||
const uint64_t nonValidBits = std::numeric_limits<uint64_t>::max();
|
||||
constexpr uint32_t presentBit = 0;
|
||||
constexpr uint32_t writableBit = 1;
|
||||
constexpr uint32_t userSupervisorBit = 2;
|
||||
constexpr uint32_t localMemoryBit = 11;
|
||||
constexpr uint64_t nonValidBits = std::numeric_limits<uint64_t>::max();
|
||||
} // namespace PageTableEntry
|
||||
|
||||
@@ -27,14 +27,14 @@ class Device;
|
||||
class SipKernel;
|
||||
class MemoryManager;
|
||||
|
||||
static constexpr ConstStringRef mediaKernelsBuildOptionsList[] = {
|
||||
constexpr ConstStringRef mediaKernelsBuildOptionsList[] = {
|
||||
"-D cl_intel_device_side_advanced_vme_enable",
|
||||
"-D cl_intel_device_side_avc_vme_enable",
|
||||
"-D cl_intel_device_side_vme_enable",
|
||||
"-D cl_intel_media_block_io",
|
||||
CompilerOptions::fastRelaxedMath};
|
||||
|
||||
static constexpr CompilerOptions::ConstConcatenation<> mediaKernelsBuildOptions{mediaKernelsBuildOptionsList};
|
||||
constexpr CompilerOptions::ConstConcatenation<> mediaKernelsBuildOptions{mediaKernelsBuildOptionsList};
|
||||
|
||||
struct BuiltinCode {
|
||||
enum class ECodeType {
|
||||
|
||||
@@ -15,29 +15,29 @@
|
||||
|
||||
namespace NEO {
|
||||
namespace CompilerOptions {
|
||||
static constexpr ConstStringRef greaterThan4gbBuffersRequired = "-cl-intel-greater-than-4GB-buffer-required";
|
||||
static constexpr ConstStringRef hasBufferOffsetArg = "-cl-intel-has-buffer-offset-arg";
|
||||
static constexpr ConstStringRef kernelDebugEnable = "-cl-kernel-debug-enable";
|
||||
static constexpr ConstStringRef arch32bit = "-m32";
|
||||
static constexpr ConstStringRef arch64bit = "-m64";
|
||||
static constexpr ConstStringRef debugKernelEnable = "-cl-kernel-debug-enable";
|
||||
static constexpr ConstStringRef optDisable = "-cl-opt-disable";
|
||||
static constexpr ConstStringRef argInfo = "-cl-kernel-arg-info";
|
||||
static constexpr ConstStringRef gtpinRera = "-cl-intel-gtpin-rera";
|
||||
static constexpr ConstStringRef finiteMathOnly = "-cl-finite-math-only";
|
||||
static constexpr ConstStringRef fastRelaxedMath = "-cl-fast-relaxed-math";
|
||||
static constexpr ConstStringRef preserveVec3Type = "-fpreserve-vec3-type";
|
||||
static constexpr ConstStringRef createLibrary = "-create-library";
|
||||
static constexpr ConstStringRef generateDebugInfo = "-g";
|
||||
static constexpr ConstStringRef bindlessMode = "-cl-intel-use-bindless-mode -cl-intel-use-bindless-advanced-mode";
|
||||
static constexpr ConstStringRef uniformWorkgroupSize = "-cl-uniform-work-group-size";
|
||||
static constexpr ConstStringRef forceEmuInt32DivRem = "-cl-intel-force-emu-int32divrem";
|
||||
static constexpr ConstStringRef forceEmuInt32DivRemSP = "-cl-intel-force-emu-sp-int32divrem";
|
||||
static constexpr ConstStringRef allowZebin = "-cl-intel-allow-zebin";
|
||||
static constexpr ConstStringRef enableImageSupport = "-D__IMAGE_SUPPORT__=1";
|
||||
static constexpr ConstStringRef optLevel = "-ze-opt-level=O";
|
||||
static constexpr ConstStringRef excludeIrFromZebin = "-exclude-ir-from-zebin";
|
||||
static constexpr ConstStringRef noRecompiledFromIr = "-Wno-recompiled-from-ir";
|
||||
constexpr ConstStringRef greaterThan4gbBuffersRequired = "-cl-intel-greater-than-4GB-buffer-required";
|
||||
constexpr ConstStringRef hasBufferOffsetArg = "-cl-intel-has-buffer-offset-arg";
|
||||
constexpr ConstStringRef kernelDebugEnable = "-cl-kernel-debug-enable";
|
||||
constexpr ConstStringRef arch32bit = "-m32";
|
||||
constexpr ConstStringRef arch64bit = "-m64";
|
||||
constexpr ConstStringRef debugKernelEnable = "-cl-kernel-debug-enable";
|
||||
constexpr ConstStringRef optDisable = "-cl-opt-disable";
|
||||
constexpr ConstStringRef argInfo = "-cl-kernel-arg-info";
|
||||
constexpr ConstStringRef gtpinRera = "-cl-intel-gtpin-rera";
|
||||
constexpr ConstStringRef finiteMathOnly = "-cl-finite-math-only";
|
||||
constexpr ConstStringRef fastRelaxedMath = "-cl-fast-relaxed-math";
|
||||
constexpr ConstStringRef preserveVec3Type = "-fpreserve-vec3-type";
|
||||
constexpr ConstStringRef createLibrary = "-create-library";
|
||||
constexpr ConstStringRef generateDebugInfo = "-g";
|
||||
constexpr ConstStringRef bindlessMode = "-cl-intel-use-bindless-mode -cl-intel-use-bindless-advanced-mode";
|
||||
constexpr ConstStringRef uniformWorkgroupSize = "-cl-uniform-work-group-size";
|
||||
constexpr ConstStringRef forceEmuInt32DivRem = "-cl-intel-force-emu-int32divrem";
|
||||
constexpr ConstStringRef forceEmuInt32DivRemSP = "-cl-intel-force-emu-sp-int32divrem";
|
||||
constexpr ConstStringRef allowZebin = "-cl-intel-allow-zebin";
|
||||
constexpr ConstStringRef enableImageSupport = "-D__IMAGE_SUPPORT__=1";
|
||||
constexpr ConstStringRef optLevel = "-ze-opt-level=O";
|
||||
constexpr ConstStringRef excludeIrFromZebin = "-exclude-ir-from-zebin";
|
||||
constexpr ConstStringRef noRecompiledFromIr = "-Wno-recompiled-from-ir";
|
||||
|
||||
constexpr size_t nullterminateSize = 1U;
|
||||
constexpr size_t spaceSeparatorSize = 1U;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,7 +12,7 @@
|
||||
namespace NEO {
|
||||
namespace CompilerWarnings {
|
||||
|
||||
static constexpr ConstStringRef recompiledFromIr = "warning: module got recompiled from IR because provided native binary is incompatible with underlying device and/or driver [-Wrecompiled-from-ir]";
|
||||
constexpr ConstStringRef recompiledFromIr = "warning: module got recompiled from IR because provided native binary is incompatible with underlying device and/or driver [-Wrecompiled-from-ir]";
|
||||
|
||||
} // namespace CompilerWarnings
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -15,9 +15,9 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
static constexpr ConstStringRef llvmBcMagic = "BC\xc0\xde";
|
||||
static constexpr ConstStringRef spirvMagic = "\x07\x23\x02\x03";
|
||||
static constexpr ConstStringRef spirvMagicInv = "\x03\x02\x23\x07";
|
||||
constexpr ConstStringRef llvmBcMagic = "BC\xc0\xde";
|
||||
constexpr ConstStringRef spirvMagic = "\x07\x23\x02\x03";
|
||||
constexpr ConstStringRef spirvMagicInv = "\x03\x02\x23\x07";
|
||||
|
||||
inline bool hasSameMagic(ConstStringRef expectedMagic, ArrayRef<const uint8_t> binary) {
|
||||
auto binaryMagicLen = std::min(expectedMagic.size(), binary.size());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,8 +12,8 @@
|
||||
namespace NEO {
|
||||
namespace Ar {
|
||||
|
||||
static constexpr ConstStringRef arMagic = "!<arch>\n";
|
||||
static constexpr ConstStringRef arFileEntryTrailingMagic = "\x60\x0A";
|
||||
constexpr ConstStringRef arMagic = "!<arch>\n";
|
||||
constexpr ConstStringRef arFileEntryTrailingMagic = "\x60\x0A";
|
||||
|
||||
struct ArFileEntryHeader {
|
||||
char identifier[16] = {'/', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '};
|
||||
@@ -27,9 +27,9 @@ struct ArFileEntryHeader {
|
||||
static_assert(60U == sizeof(ArFileEntryHeader), "");
|
||||
|
||||
namespace SpecialFileNames {
|
||||
static constexpr ConstStringRef longFileNamesFile = "//";
|
||||
static const char longFileNamePrefix = '/';
|
||||
static const char fileNameTerminator = '/';
|
||||
constexpr ConstStringRef longFileNamesFile = "//";
|
||||
constexpr char longFileNamePrefix = '/';
|
||||
constexpr char fileNameTerminator = '/';
|
||||
} // namespace SpecialFileNames
|
||||
|
||||
} // namespace Ar
|
||||
|
||||
@@ -521,38 +521,38 @@ static_assert(sizeof(ElfRela<EI_CLASS_32>) == 0xC, "");
|
||||
static_assert(sizeof(ElfRela<EI_CLASS_64>) == 0x18, "");
|
||||
|
||||
namespace SpecialSectionNames {
|
||||
static constexpr ConstStringRef bss = ".bss"; // uninitialized memory
|
||||
static constexpr ConstStringRef comment = ".comment"; // version control information
|
||||
static constexpr ConstStringRef data = ".data"; // initialized memory
|
||||
static constexpr ConstStringRef data1 = ".data1"; // initialized memory
|
||||
static constexpr ConstStringRef debug = ".debug"; // debug symbols
|
||||
static constexpr ConstStringRef debugInfo = ".debug_info"; // debug info
|
||||
static constexpr ConstStringRef dynamic = ".dynamic"; // dynamic linking information
|
||||
static constexpr ConstStringRef dynstr = ".dynstr"; // strings for dynamic linking
|
||||
static constexpr ConstStringRef dynsym = ".dynsym"; // dynamic linking symbol table
|
||||
static constexpr ConstStringRef fini = ".fini"; // executable instructions of program termination
|
||||
static constexpr ConstStringRef finiArray = ".fini_array"; // function pointers of termination array
|
||||
static constexpr ConstStringRef got = ".got"; // global offset table
|
||||
static constexpr ConstStringRef hash = ".hash"; // symnol hash table
|
||||
static constexpr ConstStringRef init = ".init"; // executable instructions of program initializaion
|
||||
static constexpr ConstStringRef initArray = ".init_array"; // function pointers of initialization array
|
||||
static constexpr ConstStringRef interp = ".interp"; // path name of program interpreter
|
||||
static constexpr ConstStringRef line = ".line"; // line number info for symbolic debugging
|
||||
static constexpr ConstStringRef note = ".note"; // note section
|
||||
static constexpr ConstStringRef plt = ".plt"; // procedure linkage table
|
||||
static constexpr ConstStringRef preinitArray = ".preinit_array"; // function pointers of pre-initialization array
|
||||
static constexpr ConstStringRef relPrefix = ".rel"; // prefix of .relNAME - relocations for NAME section
|
||||
static constexpr ConstStringRef relaPrefix = ".rela"; // prefix of .relaNAME - rela relocations for NAME section
|
||||
static constexpr ConstStringRef rodata = ".rodata"; // read-only data
|
||||
static constexpr ConstStringRef rodata1 = ".rodata1"; // read-only data
|
||||
static constexpr ConstStringRef shStrTab = ".shstrtab"; // section names (strings)
|
||||
static constexpr ConstStringRef strtab = ".strtab"; // strings
|
||||
static constexpr ConstStringRef symtab = ".symtab"; // symbol table
|
||||
static constexpr ConstStringRef symtabShndx = ".symtab_shndx"; // special symbol table section index array
|
||||
static constexpr ConstStringRef tbss = ".tbss"; // uninitialized thread-local data
|
||||
static constexpr ConstStringRef tadata = ".tdata"; // initialided thread-local data
|
||||
static constexpr ConstStringRef tdata1 = ".tdata1"; // initialided thread-local data
|
||||
static constexpr ConstStringRef text = ".text"; // executable instructions
|
||||
constexpr ConstStringRef bss = ".bss"; // uninitialized memory
|
||||
constexpr ConstStringRef comment = ".comment"; // version control information
|
||||
constexpr ConstStringRef data = ".data"; // initialized memory
|
||||
constexpr ConstStringRef data1 = ".data1"; // initialized memory
|
||||
constexpr ConstStringRef debug = ".debug"; // debug symbols
|
||||
constexpr ConstStringRef debugInfo = ".debug_info"; // debug info
|
||||
constexpr ConstStringRef dynamic = ".dynamic"; // dynamic linking information
|
||||
constexpr ConstStringRef dynstr = ".dynstr"; // strings for dynamic linking
|
||||
constexpr ConstStringRef dynsym = ".dynsym"; // dynamic linking symbol table
|
||||
constexpr ConstStringRef fini = ".fini"; // executable instructions of program termination
|
||||
constexpr ConstStringRef finiArray = ".fini_array"; // function pointers of termination array
|
||||
constexpr ConstStringRef got = ".got"; // global offset table
|
||||
constexpr ConstStringRef hash = ".hash"; // symnol hash table
|
||||
constexpr ConstStringRef init = ".init"; // executable instructions of program initializaion
|
||||
constexpr ConstStringRef initArray = ".init_array"; // function pointers of initialization array
|
||||
constexpr ConstStringRef interp = ".interp"; // path name of program interpreter
|
||||
constexpr ConstStringRef line = ".line"; // line number info for symbolic debugging
|
||||
constexpr ConstStringRef note = ".note"; // note section
|
||||
constexpr ConstStringRef plt = ".plt"; // procedure linkage table
|
||||
constexpr ConstStringRef preinitArray = ".preinit_array"; // function pointers of pre-initialization array
|
||||
constexpr ConstStringRef relPrefix = ".rel"; // prefix of .relNAME - relocations for NAME section
|
||||
constexpr ConstStringRef relaPrefix = ".rela"; // prefix of .relaNAME - rela relocations for NAME section
|
||||
constexpr ConstStringRef rodata = ".rodata"; // read-only data
|
||||
constexpr ConstStringRef rodata1 = ".rodata1"; // read-only data
|
||||
constexpr ConstStringRef shStrTab = ".shstrtab"; // section names (strings)
|
||||
constexpr ConstStringRef strtab = ".strtab"; // strings
|
||||
constexpr ConstStringRef symtab = ".symtab"; // symbol table
|
||||
constexpr ConstStringRef symtabShndx = ".symtab_shndx"; // special symbol table section index array
|
||||
constexpr ConstStringRef tbss = ".tbss"; // uninitialized thread-local data
|
||||
constexpr ConstStringRef tadata = ".tdata"; // initialided thread-local data
|
||||
constexpr ConstStringRef tdata1 = ".tdata1"; // initialided thread-local data
|
||||
constexpr ConstStringRef text = ".text"; // executable instructions
|
||||
} // namespace SpecialSectionNames
|
||||
|
||||
} // namespace Elf
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -49,13 +49,13 @@ static_assert(static_cast<uint32_t>(SHT_OPENCL_SOURCE) == static_cast<uint32_t>(
|
||||
static_assert(static_cast<uint32_t>(SHT_OPENCL_SPIRV_SC_VALUES) == static_cast<uint32_t>(SHT_OPENCL_RESERVED_END), "");
|
||||
|
||||
namespace SectionNamesOpenCl {
|
||||
static constexpr ConstStringRef buildOptions = "BuildOptions";
|
||||
static constexpr ConstStringRef spirvObject = "SPIRV Object";
|
||||
static constexpr ConstStringRef llvmObject = "Intel(R) OpenCL LLVM Object";
|
||||
static constexpr ConstStringRef deviceDebug = "Intel(R) OpenCL Device Debug";
|
||||
static constexpr ConstStringRef deviceBinary = "Intel(R) OpenCL Device Binary";
|
||||
static constexpr ConstStringRef spirvSpecConstIds = "SPIRV Specialization Constants Ids";
|
||||
static constexpr ConstStringRef spirvSpecConstValues = "SPIRV Specialization Constants Values";
|
||||
constexpr ConstStringRef buildOptions = "BuildOptions";
|
||||
constexpr ConstStringRef spirvObject = "SPIRV Object";
|
||||
constexpr ConstStringRef llvmObject = "Intel(R) OpenCL LLVM Object";
|
||||
constexpr ConstStringRef deviceDebug = "Intel(R) OpenCL Device Debug";
|
||||
constexpr ConstStringRef deviceBinary = "Intel(R) OpenCL Device Binary";
|
||||
constexpr ConstStringRef spirvSpecConstIds = "SPIRV Specialization Constants Ids";
|
||||
constexpr ConstStringRef spirvSpecConstValues = "SPIRV Specialization Constants Values";
|
||||
} // namespace SectionNamesOpenCl
|
||||
|
||||
} // namespace Elf
|
||||
|
||||
@@ -41,27 +41,27 @@ enum RELOC_TYPE_ZEBIN : uint32_t {
|
||||
};
|
||||
|
||||
namespace SectionsNamesZebin {
|
||||
static constexpr ConstStringRef textPrefix = ".text.";
|
||||
static constexpr ConstStringRef functions = ".text.Intel_Symbol_Table_Void_Program";
|
||||
static constexpr ConstStringRef dataConst = ".data.const";
|
||||
static constexpr ConstStringRef dataGlobalConst = ".data.global_const";
|
||||
static constexpr ConstStringRef dataGlobal = ".data.global";
|
||||
static constexpr ConstStringRef dataConstString = ".data.const.string";
|
||||
static constexpr ConstStringRef symtab = ".symtab";
|
||||
static constexpr ConstStringRef relTablePrefix = ".rel.";
|
||||
static constexpr ConstStringRef spv = ".spv";
|
||||
static constexpr ConstStringRef debugPrefix = ".debug_";
|
||||
static constexpr ConstStringRef debugInfo = ".debug_info";
|
||||
static constexpr ConstStringRef debugAbbrev = ".debug_abbrev";
|
||||
static constexpr ConstStringRef zeInfo = ".ze_info";
|
||||
static constexpr ConstStringRef gtpinInfo = ".gtpin_info";
|
||||
static constexpr ConstStringRef noteIntelGT = ".note.intelgt.compat";
|
||||
static constexpr ConstStringRef buildOptions = ".misc.buildOptions";
|
||||
static constexpr ConstStringRef vIsaAsmPrefix = ".visaasm.";
|
||||
static constexpr ConstStringRef externalFunctions = "Intel_Symbol_Table_Void_Program";
|
||||
constexpr ConstStringRef textPrefix = ".text.";
|
||||
constexpr ConstStringRef functions = ".text.Intel_Symbol_Table_Void_Program";
|
||||
constexpr ConstStringRef dataConst = ".data.const";
|
||||
constexpr ConstStringRef dataGlobalConst = ".data.global_const";
|
||||
constexpr ConstStringRef dataGlobal = ".data.global";
|
||||
constexpr ConstStringRef dataConstString = ".data.const.string";
|
||||
constexpr ConstStringRef symtab = ".symtab";
|
||||
constexpr ConstStringRef relTablePrefix = ".rel.";
|
||||
constexpr ConstStringRef spv = ".spv";
|
||||
constexpr ConstStringRef debugPrefix = ".debug_";
|
||||
constexpr ConstStringRef debugInfo = ".debug_info";
|
||||
constexpr ConstStringRef debugAbbrev = ".debug_abbrev";
|
||||
constexpr ConstStringRef zeInfo = ".ze_info";
|
||||
constexpr ConstStringRef gtpinInfo = ".gtpin_info";
|
||||
constexpr ConstStringRef noteIntelGT = ".note.intelgt.compat";
|
||||
constexpr ConstStringRef buildOptions = ".misc.buildOptions";
|
||||
constexpr ConstStringRef vIsaAsmPrefix = ".visaasm.";
|
||||
constexpr ConstStringRef externalFunctions = "Intel_Symbol_Table_Void_Program";
|
||||
} // namespace SectionsNamesZebin
|
||||
|
||||
static constexpr ConstStringRef IntelGtNoteOwnerName = "IntelGT";
|
||||
constexpr ConstStringRef IntelGtNoteOwnerName = "IntelGT";
|
||||
enum IntelGTSectionType : uint32_t {
|
||||
ProductFamily = 1,
|
||||
GfxCore = 2,
|
||||
@@ -114,209 +114,209 @@ static_assert(sizeof(ZebinTargetFlags) == sizeof(uint32_t), "");
|
||||
|
||||
namespace ZebinKernelMetadata {
|
||||
namespace Tags {
|
||||
static constexpr ConstStringRef kernels("kernels");
|
||||
static constexpr ConstStringRef version("version");
|
||||
static constexpr ConstStringRef globalHostAccessTable("global_host_access_table");
|
||||
static constexpr ConstStringRef functions("functions");
|
||||
constexpr ConstStringRef kernels("kernels");
|
||||
constexpr ConstStringRef version("version");
|
||||
constexpr ConstStringRef globalHostAccessTable("global_host_access_table");
|
||||
constexpr ConstStringRef functions("functions");
|
||||
|
||||
namespace Kernel {
|
||||
static constexpr ConstStringRef name("name");
|
||||
static constexpr ConstStringRef executionEnv("execution_env");
|
||||
static constexpr ConstStringRef debugEnv("debug_env");
|
||||
static constexpr ConstStringRef payloadArguments("payload_arguments");
|
||||
static constexpr ConstStringRef bindingTableIndices("binding_table_indices");
|
||||
static constexpr ConstStringRef perThreadPayloadArguments("per_thread_payload_arguments");
|
||||
static constexpr ConstStringRef perThreadMemoryBuffers("per_thread_memory_buffers");
|
||||
static constexpr ConstStringRef experimentalProperties("experimental_properties");
|
||||
constexpr ConstStringRef name("name");
|
||||
constexpr ConstStringRef executionEnv("execution_env");
|
||||
constexpr ConstStringRef debugEnv("debug_env");
|
||||
constexpr ConstStringRef payloadArguments("payload_arguments");
|
||||
constexpr ConstStringRef bindingTableIndices("binding_table_indices");
|
||||
constexpr ConstStringRef perThreadPayloadArguments("per_thread_payload_arguments");
|
||||
constexpr ConstStringRef perThreadMemoryBuffers("per_thread_memory_buffers");
|
||||
constexpr ConstStringRef experimentalProperties("experimental_properties");
|
||||
|
||||
namespace ExecutionEnv {
|
||||
static constexpr ConstStringRef barrierCount("barrier_count");
|
||||
static constexpr ConstStringRef disableMidThreadPreemption("disable_mid_thread_preemption");
|
||||
static constexpr ConstStringRef grfCount("grf_count");
|
||||
static constexpr ConstStringRef has4gbBuffers("has_4gb_buffers");
|
||||
static constexpr ConstStringRef hasDpas("has_dpas");
|
||||
static constexpr ConstStringRef hasFenceForImageAccess("has_fence_for_image_access");
|
||||
static constexpr ConstStringRef hasGlobalAtomics("has_global_atomics");
|
||||
static constexpr ConstStringRef hasMultiScratchSpaces("has_multi_scratch_spaces");
|
||||
static constexpr ConstStringRef hasNoStatelessWrite("has_no_stateless_write");
|
||||
static constexpr ConstStringRef hasStackCalls("has_stack_calls");
|
||||
static constexpr ConstStringRef hwPreemptionMode("hw_preemption_mode");
|
||||
static constexpr ConstStringRef inlineDataPayloadSize("inline_data_payload_size");
|
||||
static constexpr ConstStringRef offsetToSkipPerThreadDataLoad("offset_to_skip_per_thread_data_load");
|
||||
static constexpr ConstStringRef offsetToSkipSetFfidGp("offset_to_skip_set_ffid_gp");
|
||||
static constexpr ConstStringRef requiredSubGroupSize("required_sub_group_size");
|
||||
static constexpr ConstStringRef requiredWorkGroupSize("required_work_group_size");
|
||||
static constexpr ConstStringRef requireDisableEUFusion("require_disable_eufusion");
|
||||
static constexpr ConstStringRef simdSize("simd_size");
|
||||
static constexpr ConstStringRef slmSize("slm_size");
|
||||
static constexpr ConstStringRef subgroupIndependentForwardProgress("subgroup_independent_forward_progress");
|
||||
static constexpr ConstStringRef workGroupWalkOrderDimensions("work_group_walk_order_dimensions");
|
||||
static constexpr ConstStringRef threadSchedulingMode("thread_scheduling_mode");
|
||||
constexpr ConstStringRef barrierCount("barrier_count");
|
||||
constexpr ConstStringRef disableMidThreadPreemption("disable_mid_thread_preemption");
|
||||
constexpr ConstStringRef grfCount("grf_count");
|
||||
constexpr ConstStringRef has4gbBuffers("has_4gb_buffers");
|
||||
constexpr ConstStringRef hasDpas("has_dpas");
|
||||
constexpr ConstStringRef hasFenceForImageAccess("has_fence_for_image_access");
|
||||
constexpr ConstStringRef hasGlobalAtomics("has_global_atomics");
|
||||
constexpr ConstStringRef hasMultiScratchSpaces("has_multi_scratch_spaces");
|
||||
constexpr ConstStringRef hasNoStatelessWrite("has_no_stateless_write");
|
||||
constexpr ConstStringRef hasStackCalls("has_stack_calls");
|
||||
constexpr ConstStringRef hwPreemptionMode("hw_preemption_mode");
|
||||
constexpr ConstStringRef inlineDataPayloadSize("inline_data_payload_size");
|
||||
constexpr ConstStringRef offsetToSkipPerThreadDataLoad("offset_to_skip_per_thread_data_load");
|
||||
constexpr ConstStringRef offsetToSkipSetFfidGp("offset_to_skip_set_ffid_gp");
|
||||
constexpr ConstStringRef requiredSubGroupSize("required_sub_group_size");
|
||||
constexpr ConstStringRef requiredWorkGroupSize("required_work_group_size");
|
||||
constexpr ConstStringRef requireDisableEUFusion("require_disable_eufusion");
|
||||
constexpr ConstStringRef simdSize("simd_size");
|
||||
constexpr ConstStringRef slmSize("slm_size");
|
||||
constexpr ConstStringRef subgroupIndependentForwardProgress("subgroup_independent_forward_progress");
|
||||
constexpr ConstStringRef workGroupWalkOrderDimensions("work_group_walk_order_dimensions");
|
||||
constexpr ConstStringRef threadSchedulingMode("thread_scheduling_mode");
|
||||
namespace ThreadSchedulingMode {
|
||||
static constexpr ConstStringRef ageBased("age_based");
|
||||
static constexpr ConstStringRef roundRobin("round_robin");
|
||||
static constexpr ConstStringRef roundRobinStall("round_robin_stall");
|
||||
constexpr ConstStringRef ageBased("age_based");
|
||||
constexpr ConstStringRef roundRobin("round_robin");
|
||||
constexpr ConstStringRef roundRobinStall("round_robin_stall");
|
||||
} // namespace ThreadSchedulingMode
|
||||
} // namespace ExecutionEnv
|
||||
|
||||
namespace DebugEnv {
|
||||
static constexpr ConstStringRef debugSurfaceBTI("sip_surface_bti");
|
||||
constexpr ConstStringRef debugSurfaceBTI("sip_surface_bti");
|
||||
} // namespace DebugEnv
|
||||
|
||||
namespace PayloadArgument {
|
||||
static constexpr ConstStringRef argType("arg_type");
|
||||
static constexpr ConstStringRef argIndex("arg_index");
|
||||
static constexpr ConstStringRef offset("offset");
|
||||
static constexpr ConstStringRef size("size");
|
||||
static constexpr ConstStringRef addrmode("addrmode");
|
||||
static constexpr ConstStringRef addrspace("addrspace");
|
||||
static constexpr ConstStringRef accessType("access_type");
|
||||
static constexpr ConstStringRef samplerIndex("sampler_index");
|
||||
static constexpr ConstStringRef sourceOffset("source_offset");
|
||||
static constexpr ConstStringRef slmArgAlignment("slm_alignment");
|
||||
static constexpr ConstStringRef imageType("image_type");
|
||||
static constexpr ConstStringRef imageTransformable("image_transformable");
|
||||
static constexpr ConstStringRef samplerType("sampler_type");
|
||||
constexpr ConstStringRef argType("arg_type");
|
||||
constexpr ConstStringRef argIndex("arg_index");
|
||||
constexpr ConstStringRef offset("offset");
|
||||
constexpr ConstStringRef size("size");
|
||||
constexpr ConstStringRef addrmode("addrmode");
|
||||
constexpr ConstStringRef addrspace("addrspace");
|
||||
constexpr ConstStringRef accessType("access_type");
|
||||
constexpr ConstStringRef samplerIndex("sampler_index");
|
||||
constexpr ConstStringRef sourceOffset("source_offset");
|
||||
constexpr ConstStringRef slmArgAlignment("slm_alignment");
|
||||
constexpr ConstStringRef imageType("image_type");
|
||||
constexpr ConstStringRef imageTransformable("image_transformable");
|
||||
constexpr ConstStringRef samplerType("sampler_type");
|
||||
|
||||
namespace ArgType {
|
||||
static constexpr ConstStringRef localSize("local_size");
|
||||
static constexpr ConstStringRef groupCount("group_count");
|
||||
static constexpr ConstStringRef globalIdOffset("global_id_offset");
|
||||
static constexpr ConstStringRef globalSize("global_size");
|
||||
static constexpr ConstStringRef enqueuedLocalSize("enqueued_local_size");
|
||||
static constexpr ConstStringRef privateBaseStateless("private_base_stateless");
|
||||
static constexpr ConstStringRef argByvalue("arg_byvalue");
|
||||
static constexpr ConstStringRef argBypointer("arg_bypointer");
|
||||
static constexpr ConstStringRef bufferAddress("buffer_address");
|
||||
static constexpr ConstStringRef bufferOffset("buffer_offset");
|
||||
static constexpr ConstStringRef printfBuffer("printf_buffer");
|
||||
static constexpr ConstStringRef workDimensions("work_dimensions");
|
||||
static constexpr ConstStringRef implicitArgBuffer("implicit_arg_buffer");
|
||||
constexpr ConstStringRef localSize("local_size");
|
||||
constexpr ConstStringRef groupCount("group_count");
|
||||
constexpr ConstStringRef globalIdOffset("global_id_offset");
|
||||
constexpr ConstStringRef globalSize("global_size");
|
||||
constexpr ConstStringRef enqueuedLocalSize("enqueued_local_size");
|
||||
constexpr ConstStringRef privateBaseStateless("private_base_stateless");
|
||||
constexpr ConstStringRef argByvalue("arg_byvalue");
|
||||
constexpr ConstStringRef argBypointer("arg_bypointer");
|
||||
constexpr ConstStringRef bufferAddress("buffer_address");
|
||||
constexpr ConstStringRef bufferOffset("buffer_offset");
|
||||
constexpr ConstStringRef printfBuffer("printf_buffer");
|
||||
constexpr ConstStringRef workDimensions("work_dimensions");
|
||||
constexpr ConstStringRef implicitArgBuffer("implicit_arg_buffer");
|
||||
namespace Image {
|
||||
static constexpr ConstStringRef width("image_width");
|
||||
static constexpr ConstStringRef height("image_height");
|
||||
static constexpr ConstStringRef depth("image_depth");
|
||||
static constexpr ConstStringRef channelDataType("image_channel_data_type");
|
||||
static constexpr ConstStringRef channelOrder("image_channel_order");
|
||||
static constexpr ConstStringRef arraySize("image_array_size");
|
||||
static constexpr ConstStringRef numSamples("image_num_samples");
|
||||
static constexpr ConstStringRef numMipLevels("image_num_mip_levels");
|
||||
static constexpr ConstStringRef flatBaseOffset("flat_image_baseoffset");
|
||||
static constexpr ConstStringRef flatWidth("flat_image_width");
|
||||
static constexpr ConstStringRef flatHeight("flat_image_height");
|
||||
static constexpr ConstStringRef flatPitch("flat_image_pitch");
|
||||
constexpr ConstStringRef width("image_width");
|
||||
constexpr ConstStringRef height("image_height");
|
||||
constexpr ConstStringRef depth("image_depth");
|
||||
constexpr ConstStringRef channelDataType("image_channel_data_type");
|
||||
constexpr ConstStringRef channelOrder("image_channel_order");
|
||||
constexpr ConstStringRef arraySize("image_array_size");
|
||||
constexpr ConstStringRef numSamples("image_num_samples");
|
||||
constexpr ConstStringRef numMipLevels("image_num_mip_levels");
|
||||
constexpr ConstStringRef flatBaseOffset("flat_image_baseoffset");
|
||||
constexpr ConstStringRef flatWidth("flat_image_width");
|
||||
constexpr ConstStringRef flatHeight("flat_image_height");
|
||||
constexpr ConstStringRef flatPitch("flat_image_pitch");
|
||||
} // namespace Image
|
||||
namespace Sampler {
|
||||
static constexpr ConstStringRef snapWa("sampler_snap_wa");
|
||||
static constexpr ConstStringRef normCoords("sampler_normalized");
|
||||
static constexpr ConstStringRef addrMode("sampler_address");
|
||||
constexpr ConstStringRef snapWa("sampler_snap_wa");
|
||||
constexpr ConstStringRef normCoords("sampler_normalized");
|
||||
constexpr ConstStringRef addrMode("sampler_address");
|
||||
namespace Vme {
|
||||
static constexpr ConstStringRef blockType("vme_mb_block_type");
|
||||
static constexpr ConstStringRef subpixelMode("vme_subpixel_mode");
|
||||
static constexpr ConstStringRef sadAdjustMode("vme_sad_adjust_mode");
|
||||
static constexpr ConstStringRef searchPathType("vme_search_path_type");
|
||||
constexpr ConstStringRef blockType("vme_mb_block_type");
|
||||
constexpr ConstStringRef subpixelMode("vme_subpixel_mode");
|
||||
constexpr ConstStringRef sadAdjustMode("vme_sad_adjust_mode");
|
||||
constexpr ConstStringRef searchPathType("vme_search_path_type");
|
||||
} // namespace Vme
|
||||
} // namespace Sampler
|
||||
} // namespace ArgType
|
||||
namespace ImageType {
|
||||
static constexpr ConstStringRef imageTypeBuffer("image_buffer");
|
||||
static constexpr ConstStringRef imageType1D("image_1d");
|
||||
static constexpr ConstStringRef imageType1DArray("image_1d_array");
|
||||
static constexpr ConstStringRef imageType2D("image_2d");
|
||||
static constexpr ConstStringRef imageType2DArray("image_2d_array");
|
||||
static constexpr ConstStringRef imageType3D("image_3d");
|
||||
static constexpr ConstStringRef imageTypeCube("image_cube_array");
|
||||
static constexpr ConstStringRef imageTypeCubeArray("image_buffer");
|
||||
static constexpr ConstStringRef imageType2DDepth("image_2d_depth");
|
||||
static constexpr ConstStringRef imageType2DArrayDepth("image_2d_array_depth");
|
||||
static constexpr ConstStringRef imageType2DMSAA("image_2d_msaa");
|
||||
static constexpr ConstStringRef imageType2DMSAADepth("image_2d_msaa_depth");
|
||||
static constexpr ConstStringRef imageType2DArrayMSAA("image_2d_array_msaa");
|
||||
static constexpr ConstStringRef imageType2DArrayMSAADepth("image_2d_array_msaa_depth");
|
||||
static constexpr ConstStringRef imageType2DMedia("image_2d_media");
|
||||
static constexpr ConstStringRef imageType2DMediaBlock("image_2d_media_block");
|
||||
constexpr ConstStringRef imageTypeBuffer("image_buffer");
|
||||
constexpr ConstStringRef imageType1D("image_1d");
|
||||
constexpr ConstStringRef imageType1DArray("image_1d_array");
|
||||
constexpr ConstStringRef imageType2D("image_2d");
|
||||
constexpr ConstStringRef imageType2DArray("image_2d_array");
|
||||
constexpr ConstStringRef imageType3D("image_3d");
|
||||
constexpr ConstStringRef imageTypeCube("image_cube_array");
|
||||
constexpr ConstStringRef imageTypeCubeArray("image_buffer");
|
||||
constexpr ConstStringRef imageType2DDepth("image_2d_depth");
|
||||
constexpr ConstStringRef imageType2DArrayDepth("image_2d_array_depth");
|
||||
constexpr ConstStringRef imageType2DMSAA("image_2d_msaa");
|
||||
constexpr ConstStringRef imageType2DMSAADepth("image_2d_msaa_depth");
|
||||
constexpr ConstStringRef imageType2DArrayMSAA("image_2d_array_msaa");
|
||||
constexpr ConstStringRef imageType2DArrayMSAADepth("image_2d_array_msaa_depth");
|
||||
constexpr ConstStringRef imageType2DMedia("image_2d_media");
|
||||
constexpr ConstStringRef imageType2DMediaBlock("image_2d_media_block");
|
||||
} // namespace ImageType
|
||||
namespace SamplerType {
|
||||
static constexpr ConstStringRef samplerTypeTexture("texture");
|
||||
static constexpr ConstStringRef samplerType8x8("sample_8x8");
|
||||
static constexpr ConstStringRef samplerType2DConsolve8x8("sample_8x8_2dconvolve");
|
||||
static constexpr ConstStringRef samplerTypeErode8x8("sample_8x8_erode");
|
||||
static constexpr ConstStringRef samplerTypeDilate8x8("sample_8x8_dilate");
|
||||
static constexpr ConstStringRef samplerTypeMinMaxFilter8x8("sample_8x8_minmaxfilter");
|
||||
static constexpr ConstStringRef samplerTypeCentroid8x8("sample_8x8_centroid");
|
||||
static constexpr ConstStringRef samplerTypeBoolCentroid8x8("sample_8x8_bool_centroid");
|
||||
static constexpr ConstStringRef samplerTypeBoolSum8x8("sample_8x8_bool_sum");
|
||||
static constexpr ConstStringRef samplerTypeVD("vd");
|
||||
static constexpr ConstStringRef samplerTypeVE("ve");
|
||||
static constexpr ConstStringRef samplerTypeVME("vme");
|
||||
constexpr ConstStringRef samplerTypeTexture("texture");
|
||||
constexpr ConstStringRef samplerType8x8("sample_8x8");
|
||||
constexpr ConstStringRef samplerType2DConsolve8x8("sample_8x8_2dconvolve");
|
||||
constexpr ConstStringRef samplerTypeErode8x8("sample_8x8_erode");
|
||||
constexpr ConstStringRef samplerTypeDilate8x8("sample_8x8_dilate");
|
||||
constexpr ConstStringRef samplerTypeMinMaxFilter8x8("sample_8x8_minmaxfilter");
|
||||
constexpr ConstStringRef samplerTypeCentroid8x8("sample_8x8_centroid");
|
||||
constexpr ConstStringRef samplerTypeBoolCentroid8x8("sample_8x8_bool_centroid");
|
||||
constexpr ConstStringRef samplerTypeBoolSum8x8("sample_8x8_bool_sum");
|
||||
constexpr ConstStringRef samplerTypeVD("vd");
|
||||
constexpr ConstStringRef samplerTypeVE("ve");
|
||||
constexpr ConstStringRef samplerTypeVME("vme");
|
||||
} // namespace SamplerType
|
||||
namespace MemoryAddressingMode {
|
||||
static constexpr ConstStringRef stateless("stateless");
|
||||
static constexpr ConstStringRef stateful("stateful");
|
||||
static constexpr ConstStringRef bindless("bindless");
|
||||
static constexpr ConstStringRef sharedLocalMemory("slm");
|
||||
constexpr ConstStringRef stateless("stateless");
|
||||
constexpr ConstStringRef stateful("stateful");
|
||||
constexpr ConstStringRef bindless("bindless");
|
||||
constexpr ConstStringRef sharedLocalMemory("slm");
|
||||
} // namespace MemoryAddressingMode
|
||||
namespace AddrSpace {
|
||||
static constexpr ConstStringRef global("global");
|
||||
static constexpr ConstStringRef local("local");
|
||||
static constexpr ConstStringRef constant("constant");
|
||||
static constexpr ConstStringRef image("image");
|
||||
static constexpr ConstStringRef sampler("sampler");
|
||||
constexpr ConstStringRef global("global");
|
||||
constexpr ConstStringRef local("local");
|
||||
constexpr ConstStringRef constant("constant");
|
||||
constexpr ConstStringRef image("image");
|
||||
constexpr ConstStringRef sampler("sampler");
|
||||
} // namespace AddrSpace
|
||||
namespace AccessType {
|
||||
static constexpr ConstStringRef readonly("readonly");
|
||||
static constexpr ConstStringRef writeonly("writeonly");
|
||||
static constexpr ConstStringRef readwrite("readwrite");
|
||||
constexpr ConstStringRef readonly("readonly");
|
||||
constexpr ConstStringRef writeonly("writeonly");
|
||||
constexpr ConstStringRef readwrite("readwrite");
|
||||
} // namespace AccessType
|
||||
} // namespace PayloadArgument
|
||||
|
||||
namespace BindingTableIndex {
|
||||
static constexpr ConstStringRef btiValue("bti_value");
|
||||
static constexpr ConstStringRef argIndex("arg_index");
|
||||
constexpr ConstStringRef btiValue("bti_value");
|
||||
constexpr ConstStringRef argIndex("arg_index");
|
||||
} // namespace BindingTableIndex
|
||||
|
||||
namespace PerThreadPayloadArgument {
|
||||
static constexpr ConstStringRef argType("arg_type");
|
||||
static constexpr ConstStringRef offset("offset");
|
||||
static constexpr ConstStringRef size("size");
|
||||
constexpr ConstStringRef argType("arg_type");
|
||||
constexpr ConstStringRef offset("offset");
|
||||
constexpr ConstStringRef size("size");
|
||||
namespace ArgType {
|
||||
static constexpr ConstStringRef packedLocalIds("packed_local_ids");
|
||||
static constexpr ConstStringRef localId("local_id");
|
||||
constexpr ConstStringRef packedLocalIds("packed_local_ids");
|
||||
constexpr ConstStringRef localId("local_id");
|
||||
} // namespace ArgType
|
||||
} // namespace PerThreadPayloadArgument
|
||||
|
||||
namespace PerThreadMemoryBuffer {
|
||||
static constexpr ConstStringRef allocationType("type");
|
||||
static constexpr ConstStringRef memoryUsage("usage");
|
||||
static constexpr ConstStringRef size("size");
|
||||
static constexpr ConstStringRef isSimtThread("is_simt_thread");
|
||||
static constexpr ConstStringRef slot("slot");
|
||||
constexpr ConstStringRef allocationType("type");
|
||||
constexpr ConstStringRef memoryUsage("usage");
|
||||
constexpr ConstStringRef size("size");
|
||||
constexpr ConstStringRef isSimtThread("is_simt_thread");
|
||||
constexpr ConstStringRef slot("slot");
|
||||
namespace AllocationType {
|
||||
static constexpr ConstStringRef global("global");
|
||||
static constexpr ConstStringRef scratch("scratch");
|
||||
static constexpr ConstStringRef slm("slm");
|
||||
constexpr ConstStringRef global("global");
|
||||
constexpr ConstStringRef scratch("scratch");
|
||||
constexpr ConstStringRef slm("slm");
|
||||
} // namespace AllocationType
|
||||
namespace MemoryUsage {
|
||||
static constexpr ConstStringRef privateSpace("private_space");
|
||||
static constexpr ConstStringRef spillFillSpace("spill_fill_space");
|
||||
static constexpr ConstStringRef singleSpace("single_space");
|
||||
constexpr ConstStringRef privateSpace("private_space");
|
||||
constexpr ConstStringRef spillFillSpace("spill_fill_space");
|
||||
constexpr ConstStringRef singleSpace("single_space");
|
||||
} // namespace MemoryUsage
|
||||
} // namespace PerThreadMemoryBuffer
|
||||
namespace ExperimentalProperties {
|
||||
static constexpr ConstStringRef hasNonKernelArgLoad("has_non_kernel_arg_load");
|
||||
static constexpr ConstStringRef hasNonKernelArgStore("has_non_kernel_arg_store");
|
||||
static constexpr ConstStringRef hasNonKernelArgAtomic("has_non_kernel_arg_atomic");
|
||||
constexpr ConstStringRef hasNonKernelArgLoad("has_non_kernel_arg_load");
|
||||
constexpr ConstStringRef hasNonKernelArgStore("has_non_kernel_arg_store");
|
||||
constexpr ConstStringRef hasNonKernelArgAtomic("has_non_kernel_arg_atomic");
|
||||
} // namespace ExperimentalProperties
|
||||
} // namespace Kernel
|
||||
|
||||
namespace GlobalHostAccessTable {
|
||||
static constexpr ConstStringRef deviceName("device_name");
|
||||
static constexpr ConstStringRef hostName("host_name");
|
||||
constexpr ConstStringRef deviceName("device_name");
|
||||
constexpr ConstStringRef hostName("host_name");
|
||||
} // namespace GlobalHostAccessTable
|
||||
|
||||
namespace Function {
|
||||
static constexpr ConstStringRef name("name");
|
||||
static constexpr ConstStringRef executionEnv("execution_env");
|
||||
constexpr ConstStringRef name("name");
|
||||
constexpr ConstStringRef executionEnv("execution_env");
|
||||
using namespace Kernel::ExecutionEnv;
|
||||
} // namespace Function
|
||||
|
||||
@@ -367,32 +367,32 @@ using WorkgroupWalkOrderDimensionsT = int32_t[3];
|
||||
using ThreadSchedulingModeT = ThreadSchedulingMode;
|
||||
|
||||
namespace Defaults {
|
||||
static constexpr BarrierCountT barrierCount = 0;
|
||||
static constexpr DisableMidThreadPreemptionT disableMidThreadPreemption = false;
|
||||
static constexpr Has4GBBuffersT has4GBBuffers = false;
|
||||
static constexpr HasDpasT hasDpas = false;
|
||||
static constexpr HasFenceForImageAccessT hasFenceForImageAccess = false;
|
||||
static constexpr HasGlobalAtomicsT hasGlobalAtomics = false;
|
||||
static constexpr HasMultiScratchSpacesT hasMultiScratchSpaces = false;
|
||||
static constexpr HasNonKernelArgAtomicT hasNonKernelArgAtomic = false;
|
||||
static constexpr HasNonKernelArgLoadT hasNonKernelArgLoad = false;
|
||||
static constexpr HasNonKernelArgStoreT hasNonKernelArgStore = false;
|
||||
static constexpr HasNoStatelessWriteT hasNoStatelessWrite = false;
|
||||
static constexpr HasStackCallsT hasStackCalls = false;
|
||||
static constexpr HwPreemptionModeT hwPreemptionMode = -1;
|
||||
static constexpr InlineDataPayloadSizeT inlineDataPayloadSize = 0;
|
||||
static constexpr OffsetToSkipPerThreadDataLoadT offsetToSkipPerThreadDataLoad = 0;
|
||||
static constexpr OffsetToSkipSetFfidGpT offsetToSkipSetFfidGp = 0;
|
||||
static constexpr RequiredSubGroupSizeT requiredSubGroupSize = 0;
|
||||
static constexpr RequiredWorkGroupSizeT requiredWorkGroupSize = {0, 0, 0};
|
||||
static constexpr RequireDisableEUFusionT requireDisableEUFusion = false;
|
||||
static constexpr SlmSizeT slmSize = 0;
|
||||
static constexpr SubgroupIndependentForwardProgressT subgroupIndependentForwardProgress = false;
|
||||
static constexpr WorkgroupWalkOrderDimensionsT workgroupWalkOrderDimensions = {0, 1, 2};
|
||||
static constexpr ThreadSchedulingModeT threadSchedulingMode = ThreadSchedulingModeUnknown;
|
||||
constexpr BarrierCountT barrierCount = 0;
|
||||
constexpr DisableMidThreadPreemptionT disableMidThreadPreemption = false;
|
||||
constexpr Has4GBBuffersT has4GBBuffers = false;
|
||||
constexpr HasDpasT hasDpas = false;
|
||||
constexpr HasFenceForImageAccessT hasFenceForImageAccess = false;
|
||||
constexpr HasGlobalAtomicsT hasGlobalAtomics = false;
|
||||
constexpr HasMultiScratchSpacesT hasMultiScratchSpaces = false;
|
||||
constexpr HasNonKernelArgAtomicT hasNonKernelArgAtomic = false;
|
||||
constexpr HasNonKernelArgLoadT hasNonKernelArgLoad = false;
|
||||
constexpr HasNonKernelArgStoreT hasNonKernelArgStore = false;
|
||||
constexpr HasNoStatelessWriteT hasNoStatelessWrite = false;
|
||||
constexpr HasStackCallsT hasStackCalls = false;
|
||||
constexpr HwPreemptionModeT hwPreemptionMode = -1;
|
||||
constexpr InlineDataPayloadSizeT inlineDataPayloadSize = 0;
|
||||
constexpr OffsetToSkipPerThreadDataLoadT offsetToSkipPerThreadDataLoad = 0;
|
||||
constexpr OffsetToSkipSetFfidGpT offsetToSkipSetFfidGp = 0;
|
||||
constexpr RequiredSubGroupSizeT requiredSubGroupSize = 0;
|
||||
constexpr RequiredWorkGroupSizeT requiredWorkGroupSize = {0, 0, 0};
|
||||
constexpr RequireDisableEUFusionT requireDisableEUFusion = false;
|
||||
constexpr SlmSizeT slmSize = 0;
|
||||
constexpr SubgroupIndependentForwardProgressT subgroupIndependentForwardProgress = false;
|
||||
constexpr WorkgroupWalkOrderDimensionsT workgroupWalkOrderDimensions = {0, 1, 2};
|
||||
constexpr ThreadSchedulingModeT threadSchedulingMode = ThreadSchedulingModeUnknown;
|
||||
} // namespace Defaults
|
||||
|
||||
static constexpr ConstStringRef required[] = {
|
||||
constexpr ConstStringRef required[] = {
|
||||
Tags::Kernel::ExecutionEnv::grfCount,
|
||||
Tags::Kernel::ExecutionEnv::simdSize};
|
||||
|
||||
@@ -433,7 +433,7 @@ namespace DebugEnv {
|
||||
using DebugSurfaceBTIT = int32_t;
|
||||
|
||||
namespace Defaults {
|
||||
static constexpr DebugSurfaceBTIT debugSurfaceBTI = -1;
|
||||
constexpr DebugSurfaceBTIT debugSurfaceBTI = -1;
|
||||
} // namespace Defaults
|
||||
|
||||
struct DebugEnvBaseT {
|
||||
@@ -576,10 +576,10 @@ using SlmAlignmentT = uint8_t;
|
||||
using SamplerIndexT = int32_t;
|
||||
|
||||
namespace Defaults {
|
||||
static constexpr ArgIndexT argIndex = -1;
|
||||
static constexpr SlmAlignmentT slmArgAlignment = 16U;
|
||||
static constexpr SamplerIndexT samplerIndex = -1;
|
||||
static constexpr SourceOffseT sourceOffset = -1;
|
||||
constexpr ArgIndexT argIndex = -1;
|
||||
constexpr SlmAlignmentT slmArgAlignment = 16U;
|
||||
constexpr SamplerIndexT samplerIndex = -1;
|
||||
constexpr SourceOffseT sourceOffset = -1;
|
||||
} // namespace Defaults
|
||||
|
||||
struct PayloadArgumentBaseT {
|
||||
@@ -633,8 +633,8 @@ using IsSimtThreadT = bool;
|
||||
using Slot = int32_t;
|
||||
|
||||
namespace Defaults {
|
||||
static constexpr IsSimtThreadT isSimtThread = false;
|
||||
static constexpr Slot slot = 0U;
|
||||
constexpr IsSimtThreadT isSimtThread = false;
|
||||
constexpr Slot slot = 0U;
|
||||
} // namespace Defaults
|
||||
|
||||
struct PerThreadMemoryBufferBaseT {
|
||||
|
||||
@@ -21,52 +21,52 @@ using namespace Tags::Kernel::PayloadArgument::ArgType::Sampler;
|
||||
using namespace Tags::Kernel::PayloadArgument::ArgType::Sampler::Vme;
|
||||
using ArgType = Types::Kernel::ArgType;
|
||||
|
||||
static constexpr ConstStringRef name = "argument type";
|
||||
static constexpr LookupArray<ConstStringRef, ArgType, 34> lookup({{{packedLocalIds, ArgType::ArgTypePackedLocalIds},
|
||||
{localId, ArgType::ArgTypeLocalId},
|
||||
{localSize, ArgType::ArgTypeLocalSize},
|
||||
{groupCount, ArgType::ArgTypeGroupCount},
|
||||
{globalSize, ArgType::ArgTypeGlobalSize},
|
||||
{enqueuedLocalSize, ArgType::ArgTypeEnqueuedLocalSize},
|
||||
{globalIdOffset, ArgType::ArgTypeGlobalIdOffset},
|
||||
{privateBaseStateless, ArgType::ArgTypePrivateBaseStateless},
|
||||
{argByvalue, ArgType::ArgTypeArgByvalue},
|
||||
{argBypointer, ArgType::ArgTypeArgBypointer},
|
||||
{bufferAddress, ArgType::ArgTypeBufferAddress},
|
||||
{bufferOffset, ArgType::ArgTypeBufferOffset},
|
||||
{printfBuffer, ArgType::ArgTypePrintfBuffer},
|
||||
{workDimensions, ArgType::ArgTypeWorkDimensions},
|
||||
{implicitArgBuffer, ArgType::ArgTypeImplicitArgBuffer},
|
||||
{width, ArgType::ArgTypeImageWidth},
|
||||
{height, ArgType::ArgTypeImageHeight},
|
||||
{depth, ArgType::ArgTypeImageDepth},
|
||||
{channelDataType, ArgType::ArgTypeImageChannelDataType},
|
||||
{channelOrder, ArgType::ArgTypeImageChannelOrder},
|
||||
{arraySize, ArgType::ArgTypeImageArraySize},
|
||||
{numSamples, ArgType::ArgTypeImageNumSamples},
|
||||
{numMipLevels, ArgType::ArgTypeImageMipLevels},
|
||||
{flatBaseOffset, ArgType::ArgTypeImageFlatBaseOffset},
|
||||
{flatWidth, ArgType::ArgTypeImageFlatWidth},
|
||||
{flatHeight, ArgType::ArgTypeImageFlatHeight},
|
||||
{flatPitch, ArgType::ArgTypeImageFlatPitch},
|
||||
{snapWa, ArgType::ArgTypeSamplerSnapWa},
|
||||
{normCoords, ArgType::ArgTypeSamplerNormCoords},
|
||||
{addrMode, ArgType::ArgTypeSamplerAddrMode},
|
||||
{blockType, ArgType::ArgTypeVmeMbBlockType},
|
||||
{subpixelMode, ArgType::ArgTypeVmeSubpixelMode},
|
||||
{sadAdjustMode, ArgType::ArgTypeVmeSadAdjustMode},
|
||||
{searchPathType, ArgType::ArgTypeVmeSearchPathType}}});
|
||||
constexpr ConstStringRef name = "argument type";
|
||||
constexpr LookupArray<ConstStringRef, ArgType, 34> lookup({{{packedLocalIds, ArgType::ArgTypePackedLocalIds},
|
||||
{localId, ArgType::ArgTypeLocalId},
|
||||
{localSize, ArgType::ArgTypeLocalSize},
|
||||
{groupCount, ArgType::ArgTypeGroupCount},
|
||||
{globalSize, ArgType::ArgTypeGlobalSize},
|
||||
{enqueuedLocalSize, ArgType::ArgTypeEnqueuedLocalSize},
|
||||
{globalIdOffset, ArgType::ArgTypeGlobalIdOffset},
|
||||
{privateBaseStateless, ArgType::ArgTypePrivateBaseStateless},
|
||||
{argByvalue, ArgType::ArgTypeArgByvalue},
|
||||
{argBypointer, ArgType::ArgTypeArgBypointer},
|
||||
{bufferAddress, ArgType::ArgTypeBufferAddress},
|
||||
{bufferOffset, ArgType::ArgTypeBufferOffset},
|
||||
{printfBuffer, ArgType::ArgTypePrintfBuffer},
|
||||
{workDimensions, ArgType::ArgTypeWorkDimensions},
|
||||
{implicitArgBuffer, ArgType::ArgTypeImplicitArgBuffer},
|
||||
{width, ArgType::ArgTypeImageWidth},
|
||||
{height, ArgType::ArgTypeImageHeight},
|
||||
{depth, ArgType::ArgTypeImageDepth},
|
||||
{channelDataType, ArgType::ArgTypeImageChannelDataType},
|
||||
{channelOrder, ArgType::ArgTypeImageChannelOrder},
|
||||
{arraySize, ArgType::ArgTypeImageArraySize},
|
||||
{numSamples, ArgType::ArgTypeImageNumSamples},
|
||||
{numMipLevels, ArgType::ArgTypeImageMipLevels},
|
||||
{flatBaseOffset, ArgType::ArgTypeImageFlatBaseOffset},
|
||||
{flatWidth, ArgType::ArgTypeImageFlatWidth},
|
||||
{flatHeight, ArgType::ArgTypeImageFlatHeight},
|
||||
{flatPitch, ArgType::ArgTypeImageFlatPitch},
|
||||
{snapWa, ArgType::ArgTypeSamplerSnapWa},
|
||||
{normCoords, ArgType::ArgTypeSamplerNormCoords},
|
||||
{addrMode, ArgType::ArgTypeSamplerAddrMode},
|
||||
{blockType, ArgType::ArgTypeVmeMbBlockType},
|
||||
{subpixelMode, ArgType::ArgTypeVmeSubpixelMode},
|
||||
{sadAdjustMode, ArgType::ArgTypeVmeSadAdjustMode},
|
||||
{searchPathType, ArgType::ArgTypeVmeSearchPathType}}});
|
||||
static_assert(lookup.size() == ArgType::ArgTypeMax - 1, "Every enum field must be present");
|
||||
} // namespace ArgType
|
||||
|
||||
namespace MemoryAddressingMode {
|
||||
namespace AddrModeTag = Tags::Kernel::PayloadArgument::MemoryAddressingMode;
|
||||
using AddrMode = Types::Kernel::PayloadArgument::MemoryAddressingMode;
|
||||
static constexpr LookupArray<ConstStringRef, AddrMode, 4> lookup({{{AddrModeTag::stateless, AddrMode::MemoryAddressingModeStateless},
|
||||
{AddrModeTag::stateful, AddrMode::MemoryAddressingModeStateful},
|
||||
{AddrModeTag::bindless, AddrMode::MemoryAddressingModeBindless},
|
||||
{AddrModeTag::sharedLocalMemory, AddrMode::MemoryAddressingModeSharedLocalMemory}}});
|
||||
static constexpr ConstStringRef name = "addressing mode";
|
||||
constexpr LookupArray<ConstStringRef, AddrMode, 4> lookup({{{AddrModeTag::stateless, AddrMode::MemoryAddressingModeStateless},
|
||||
{AddrModeTag::stateful, AddrMode::MemoryAddressingModeStateful},
|
||||
{AddrModeTag::bindless, AddrMode::MemoryAddressingModeBindless},
|
||||
{AddrModeTag::sharedLocalMemory, AddrMode::MemoryAddressingModeSharedLocalMemory}}});
|
||||
constexpr ConstStringRef name = "addressing mode";
|
||||
static_assert(lookup.size() == AddrMode::MemoryAddressIngModeMax - 1, "Every enum field must be present");
|
||||
} // namespace MemoryAddressingMode
|
||||
|
||||
@@ -74,12 +74,12 @@ namespace AddressSpace {
|
||||
using namespace Tags::Kernel::PayloadArgument::AddrSpace;
|
||||
using AddrSpace = Types::Kernel::PayloadArgument::AddressSpace;
|
||||
|
||||
static constexpr ConstStringRef name = "address space";
|
||||
static constexpr LookupArray<ConstStringRef, AddrSpace, 5> lookup({{{global, AddrSpace::AddressSpaceGlobal},
|
||||
{local, AddrSpace::AddressSpaceLocal},
|
||||
{constant, AddrSpace::AddressSpaceConstant},
|
||||
{image, AddrSpace::AddressSpaceImage},
|
||||
{sampler, AddrSpace::AddressSpaceSampler}}});
|
||||
constexpr ConstStringRef name = "address space";
|
||||
constexpr LookupArray<ConstStringRef, AddrSpace, 5> lookup({{{global, AddrSpace::AddressSpaceGlobal},
|
||||
{local, AddrSpace::AddressSpaceLocal},
|
||||
{constant, AddrSpace::AddressSpaceConstant},
|
||||
{image, AddrSpace::AddressSpaceImage},
|
||||
{sampler, AddrSpace::AddressSpaceSampler}}});
|
||||
static_assert(lookup.size() == AddrSpace::AddressSpaceMax - 1, "Every enum field must be present");
|
||||
} // namespace AddressSpace
|
||||
|
||||
@@ -87,82 +87,82 @@ namespace AccessType {
|
||||
using namespace Tags::Kernel::PayloadArgument::AccessType;
|
||||
using AccessType = Types::Kernel::PayloadArgument::AccessType;
|
||||
|
||||
static constexpr ConstStringRef name = "access type";
|
||||
static constexpr LookupArray<ConstStringRef, AccessType, 3> lookup({{{readonly, AccessType::AccessTypeReadonly},
|
||||
{writeonly, AccessType::AccessTypeWriteonly},
|
||||
{readwrite, AccessType::AccessTypeReadwrite}}});
|
||||
constexpr ConstStringRef name = "access type";
|
||||
constexpr LookupArray<ConstStringRef, AccessType, 3> lookup({{{readonly, AccessType::AccessTypeReadonly},
|
||||
{writeonly, AccessType::AccessTypeWriteonly},
|
||||
{readwrite, AccessType::AccessTypeReadwrite}}});
|
||||
static_assert(lookup.size() == AccessType::AccessTypeMax - 1, "Every enum field must be present");
|
||||
} // namespace AccessType
|
||||
|
||||
namespace AllocationType {
|
||||
using namespace Tags::Kernel::PerThreadMemoryBuffer::AllocationType;
|
||||
using AllocType = Types::Kernel::PerThreadMemoryBuffer::AllocationType;
|
||||
static constexpr ConstStringRef name = "allocation type";
|
||||
static constexpr LookupArray<ConstStringRef, AllocType, 3> lookup({{{global, AllocType::AllocationTypeGlobal},
|
||||
{scratch, AllocType::AllocationTypeScratch},
|
||||
{slm, AllocType::AllocationTypeSlm}}});
|
||||
constexpr ConstStringRef name = "allocation type";
|
||||
constexpr LookupArray<ConstStringRef, AllocType, 3> lookup({{{global, AllocType::AllocationTypeGlobal},
|
||||
{scratch, AllocType::AllocationTypeScratch},
|
||||
{slm, AllocType::AllocationTypeSlm}}});
|
||||
static_assert(lookup.size() == AllocType::AllocationTypeMax - 1, "Every enum field must be present");
|
||||
} // namespace AllocationType
|
||||
|
||||
namespace MemoryUsage {
|
||||
using namespace NEO::Elf::ZebinKernelMetadata::Tags::Kernel::PerThreadMemoryBuffer::MemoryUsage;
|
||||
using MemoryUsage = NEO::Elf::ZebinKernelMetadata::Types::Kernel::PerThreadMemoryBuffer::MemoryUsage;
|
||||
static constexpr ConstStringRef name = "memory usage";
|
||||
static constexpr LookupArray<ConstStringRef, MemoryUsage, 3> lookup({{{privateSpace, MemoryUsage::MemoryUsagePrivateSpace},
|
||||
{spillFillSpace, MemoryUsage::MemoryUsageSpillFillSpace},
|
||||
{singleSpace, MemoryUsage::MemoryUsageSingleSpace}}});
|
||||
constexpr ConstStringRef name = "memory usage";
|
||||
constexpr LookupArray<ConstStringRef, MemoryUsage, 3> lookup({{{privateSpace, MemoryUsage::MemoryUsagePrivateSpace},
|
||||
{spillFillSpace, MemoryUsage::MemoryUsageSpillFillSpace},
|
||||
{singleSpace, MemoryUsage::MemoryUsageSingleSpace}}});
|
||||
static_assert(lookup.size() == MemoryUsage::MemoryUsageMax - 1, "Every enum field must be present");
|
||||
} // namespace MemoryUsage
|
||||
|
||||
namespace ImageType {
|
||||
using namespace Tags::Kernel::PayloadArgument::ImageType;
|
||||
using ImageType = Types::Kernel::PayloadArgument::ImageType;
|
||||
static constexpr ConstStringRef name = "image type";
|
||||
static constexpr LookupArray<ConstStringRef, ImageType, 16> lookup({{{imageTypeBuffer, ImageType::ImageTypeBuffer},
|
||||
{imageType1D, ImageType::ImageType1D},
|
||||
{imageType1DArray, ImageType::ImageType1DArray},
|
||||
{imageType2D, ImageType::ImageType2D},
|
||||
{imageType2DArray, ImageType::ImageType2DArray},
|
||||
{imageType3D, ImageType::ImageType3D},
|
||||
{imageTypeCube, ImageType::ImageTypeCube},
|
||||
{imageTypeCubeArray, ImageType::ImageTypeCubeArray},
|
||||
{imageType2DDepth, ImageType::ImageType2DDepth},
|
||||
{imageType2DArrayDepth, ImageType::ImageType2DArrayDepth},
|
||||
{imageType2DMSAA, ImageType::ImageType2DMSAA},
|
||||
{imageType2DMSAADepth, ImageType::ImageType2DMSAADepth},
|
||||
{imageType2DArrayMSAA, ImageType::ImageType2DArrayMSAA},
|
||||
{imageType2DArrayMSAADepth, ImageType::ImageType2DArrayMSAADepth},
|
||||
{imageType2DMedia, ImageType::ImageType2DMedia},
|
||||
{imageType2DMediaBlock, ImageType::ImageType2DMediaBlock}}});
|
||||
constexpr ConstStringRef name = "image type";
|
||||
constexpr LookupArray<ConstStringRef, ImageType, 16> lookup({{{imageTypeBuffer, ImageType::ImageTypeBuffer},
|
||||
{imageType1D, ImageType::ImageType1D},
|
||||
{imageType1DArray, ImageType::ImageType1DArray},
|
||||
{imageType2D, ImageType::ImageType2D},
|
||||
{imageType2DArray, ImageType::ImageType2DArray},
|
||||
{imageType3D, ImageType::ImageType3D},
|
||||
{imageTypeCube, ImageType::ImageTypeCube},
|
||||
{imageTypeCubeArray, ImageType::ImageTypeCubeArray},
|
||||
{imageType2DDepth, ImageType::ImageType2DDepth},
|
||||
{imageType2DArrayDepth, ImageType::ImageType2DArrayDepth},
|
||||
{imageType2DMSAA, ImageType::ImageType2DMSAA},
|
||||
{imageType2DMSAADepth, ImageType::ImageType2DMSAADepth},
|
||||
{imageType2DArrayMSAA, ImageType::ImageType2DArrayMSAA},
|
||||
{imageType2DArrayMSAADepth, ImageType::ImageType2DArrayMSAADepth},
|
||||
{imageType2DMedia, ImageType::ImageType2DMedia},
|
||||
{imageType2DMediaBlock, ImageType::ImageType2DMediaBlock}}});
|
||||
static_assert(lookup.size() == ImageType::ImageTypeMax - 1, "Every enum field must be present");
|
||||
} // namespace ImageType
|
||||
|
||||
namespace SamplerType {
|
||||
using namespace Tags::Kernel::PayloadArgument::SamplerType;
|
||||
using SamplerType = Types::Kernel::PayloadArgument::SamplerType;
|
||||
static constexpr ConstStringRef name = "sampler type";
|
||||
static constexpr LookupArray<ConstStringRef, SamplerType, 12> lookup({{{samplerTypeTexture, SamplerType::SamplerTypeTexture},
|
||||
{samplerType8x8, SamplerType::SamplerType8x8},
|
||||
{samplerType2DConsolve8x8, SamplerType::SamplerType2DConvolve8x8},
|
||||
{samplerTypeErode8x8, SamplerType::SamplerTypeErode8x8},
|
||||
{samplerTypeDilate8x8, SamplerType::SamplerTypeDilate8x8},
|
||||
{samplerTypeMinMaxFilter8x8, SamplerType::SamplerTypeMinMaxFilter8x8},
|
||||
{samplerTypeCentroid8x8, SamplerType::SamplerTypeBoolCentroid8x8},
|
||||
{samplerTypeBoolCentroid8x8, SamplerType::SamplerTypeBoolCentroid8x8},
|
||||
{samplerTypeBoolSum8x8, SamplerType::SamplerTypeBoolSum8x8},
|
||||
{samplerTypeVME, SamplerType::SamplerTypeVME},
|
||||
{samplerTypeVE, SamplerType::SamplerTypeVE},
|
||||
{samplerTypeVD, SamplerType::SamplerTypeVD}}});
|
||||
constexpr ConstStringRef name = "sampler type";
|
||||
constexpr LookupArray<ConstStringRef, SamplerType, 12> lookup({{{samplerTypeTexture, SamplerType::SamplerTypeTexture},
|
||||
{samplerType8x8, SamplerType::SamplerType8x8},
|
||||
{samplerType2DConsolve8x8, SamplerType::SamplerType2DConvolve8x8},
|
||||
{samplerTypeErode8x8, SamplerType::SamplerTypeErode8x8},
|
||||
{samplerTypeDilate8x8, SamplerType::SamplerTypeDilate8x8},
|
||||
{samplerTypeMinMaxFilter8x8, SamplerType::SamplerTypeMinMaxFilter8x8},
|
||||
{samplerTypeCentroid8x8, SamplerType::SamplerTypeBoolCentroid8x8},
|
||||
{samplerTypeBoolCentroid8x8, SamplerType::SamplerTypeBoolCentroid8x8},
|
||||
{samplerTypeBoolSum8x8, SamplerType::SamplerTypeBoolSum8x8},
|
||||
{samplerTypeVME, SamplerType::SamplerTypeVME},
|
||||
{samplerTypeVE, SamplerType::SamplerTypeVE},
|
||||
{samplerTypeVD, SamplerType::SamplerTypeVD}}});
|
||||
static_assert(lookup.size() == SamplerType::SamplerTypeMax - 1, "Every enum field must be present");
|
||||
} // namespace SamplerType
|
||||
|
||||
namespace ThreadSchedulingMode {
|
||||
using namespace Tags::Kernel::ExecutionEnv::ThreadSchedulingMode;
|
||||
using ThreadSchedulingMode = Types::Kernel::ExecutionEnv::ThreadSchedulingMode;
|
||||
static constexpr ConstStringRef name = "thread scheduling mode";
|
||||
static constexpr LookupArray<ConstStringRef, ThreadSchedulingMode, 3> lookup({{{ageBased, ThreadSchedulingMode::ThreadSchedulingModeAgeBased},
|
||||
{roundRobin, ThreadSchedulingMode::ThreadSchedulingModeRoundRobin},
|
||||
{roundRobinStall, ThreadSchedulingMode::ThreadSchedulingModeRoundRobinStall}}});
|
||||
constexpr ConstStringRef name = "thread scheduling mode";
|
||||
constexpr LookupArray<ConstStringRef, ThreadSchedulingMode, 3> lookup({{{ageBased, ThreadSchedulingMode::ThreadSchedulingModeAgeBased},
|
||||
{roundRobin, ThreadSchedulingMode::ThreadSchedulingModeRoundRobin},
|
||||
{roundRobinStall, ThreadSchedulingMode::ThreadSchedulingModeRoundRobinStall}}});
|
||||
static_assert(lookup.size() == ThreadSchedulingMode::ThreadSchedulingModeMax - 1, "Every enum field must be present");
|
||||
} // namespace ThreadSchedulingMode
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ constexpr const char *consumeStringLiteral(ConstStringRef wholeText, const char
|
||||
|
||||
using TokenId = uint32_t;
|
||||
|
||||
static constexpr TokenId invalidTokenId = std::numeric_limits<TokenId>::max();
|
||||
constexpr TokenId invalidTokenId = std::numeric_limits<TokenId>::max();
|
||||
|
||||
struct Token {
|
||||
enum Type : uint8_t { Identifier,
|
||||
@@ -280,7 +280,7 @@ constexpr ConstStringRef inlineCollectionYamlErrorMsg = "NEO::Yaml : Inline coll
|
||||
bool tokenize(ConstStringRef text, LinesCache &outLines, TokensCache &outTokens, std::string &outErrReason, std::string &outWarning);
|
||||
|
||||
using NodeId = uint32_t;
|
||||
static constexpr NodeId invalidNodeID = std::numeric_limits<NodeId>::max();
|
||||
constexpr NodeId invalidNodeID = std::numeric_limits<NodeId>::max();
|
||||
|
||||
struct alignas(32) Node {
|
||||
TokenId key = invalidTokenId;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
static constexpr NEO::Elf::ZebinKernelMetadata::Types::Version zeInfoDecoderVersion{1, 15};
|
||||
constexpr NEO::Elf::ZebinKernelMetadata::Types::Version zeInfoDecoderVersion{1, 15};
|
||||
|
||||
struct ZebinSections {
|
||||
using SectionHeaderData = NEO::Elf::Elf<Elf::EI_CLASS_64>::SectionHeaderAndData;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
static const std::vector<unsigned short> ehlDeviceIds{
|
||||
inline const std::vector<unsigned short> ehlDeviceIds{
|
||||
0x4500,
|
||||
0x4541,
|
||||
0x4551,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
static const std::vector<unsigned short> icllpDeviceIds{
|
||||
inline const std::vector<unsigned short> icllpDeviceIds{
|
||||
0xFF05,
|
||||
0x8A56,
|
||||
0x8A58,
|
||||
|
||||
@@ -10,5 +10,5 @@
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
static const std::vector<unsigned short> lkfDeviceIds{0x9840};
|
||||
inline const std::vector<unsigned short> lkfDeviceIds{0x9840};
|
||||
} // namespace NEO
|
||||
|
||||
@@ -10,5 +10,5 @@
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
static const std::vector<unsigned short> adlnDeviceIds{0x46D0, 0x46D1, 0x46D2};
|
||||
inline const std::vector<unsigned short> adlnDeviceIds{0x46D0, 0x46D1, 0x46D2};
|
||||
} // namespace NEO
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
static const std::vector<unsigned short> adlpDeviceIds{
|
||||
inline const std::vector<unsigned short> adlpDeviceIds{
|
||||
0x46A0,
|
||||
0x46B0,
|
||||
0x46A1,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
static const std::vector<unsigned short> adlsDeviceIds{
|
||||
inline const std::vector<unsigned short> adlsDeviceIds{
|
||||
0x4680,
|
||||
0x4682,
|
||||
0x4688,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
static const std::vector<unsigned short> dg1DeviceIds{
|
||||
inline const std::vector<unsigned short> dg1DeviceIds{
|
||||
0x4905,
|
||||
0x4906,
|
||||
0x4907,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
static const std::vector<unsigned short> rklDeviceIds{
|
||||
inline const std::vector<unsigned short> rklDeviceIds{
|
||||
0x4C80,
|
||||
0x4C8A,
|
||||
0x4C8B,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
static const std::vector<unsigned short> tgllpDeviceIds{
|
||||
inline const std::vector<unsigned short> tgllpDeviceIds{
|
||||
0xFF20,
|
||||
0x9A49,
|
||||
0x9A40,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
static const std::vector<unsigned short> bdwDeviceIds{
|
||||
inline const std::vector<unsigned short> bdwDeviceIds{
|
||||
0x1602,
|
||||
0x160A,
|
||||
0x1606,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
static const std::vector<unsigned short> bxtDeviceIds{
|
||||
inline const std::vector<unsigned short> bxtDeviceIds{
|
||||
0x9906,
|
||||
0x9907,
|
||||
0x0A84,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
static const std::vector<unsigned short> cflDeviceIds{
|
||||
inline const std::vector<unsigned short> cflDeviceIds{
|
||||
0x3E90,
|
||||
0x3E93,
|
||||
0x3E99,
|
||||
@@ -31,14 +31,14 @@ static const std::vector<unsigned short> cflDeviceIds{
|
||||
0x9BA0,
|
||||
0x9BC0};
|
||||
|
||||
static const std::vector<unsigned short> whlDeviceIds{
|
||||
inline const std::vector<unsigned short> whlDeviceIds{
|
||||
0x3EA1,
|
||||
0x3EA3,
|
||||
0x3EA4,
|
||||
0x3EA0,
|
||||
0x3EA2};
|
||||
|
||||
static const std::vector<unsigned short> cmlDeviceIds{
|
||||
inline const std::vector<unsigned short> cmlDeviceIds{
|
||||
0x9B21,
|
||||
0x9B41,
|
||||
0x9BA2,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
static const std::vector<unsigned short> glkDeviceIds{
|
||||
inline const std::vector<unsigned short> glkDeviceIds{
|
||||
0x3184,
|
||||
0x3185};
|
||||
} // namespace NEO
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
static const std::vector<unsigned short> amlDeviceIds{0x591C};
|
||||
static const std::vector<unsigned short> kblDeviceIds{
|
||||
inline const std::vector<unsigned short> amlDeviceIds{0x591C};
|
||||
inline const std::vector<unsigned short> kblDeviceIds{
|
||||
0x5902,
|
||||
0x590B,
|
||||
0x590A,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
static const std::vector<unsigned short> sklDeviceIds{
|
||||
inline const std::vector<unsigned short> sklDeviceIds{
|
||||
0x1902,
|
||||
0x190B,
|
||||
0x190A,
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
static const size_t maxFlushSubrangeCount = 126;
|
||||
inline const size_t maxFlushSubrangeCount = 126;
|
||||
struct L3Range {
|
||||
static constexpr uint64_t minAlignment = MemoryConstants::pageSize;
|
||||
static constexpr uint64_t minAlignmentMask = minAlignment - 1ULL;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -9,8 +9,8 @@
|
||||
#include <cstdint>
|
||||
|
||||
namespace NEO {
|
||||
const uint32_t pipelineSelectEnablePipelineSelectMaskBits = 0x3;
|
||||
const uint32_t pipelineSelectMediaSamplerDopClockGateMaskBits = 0x10;
|
||||
const uint32_t pipelineSelectMediaSamplerPowerClockGateMaskBits = 0x40;
|
||||
const uint32_t pipelineSelectSystolicModeEnableMaskBits = 0x80;
|
||||
constexpr uint32_t pipelineSelectEnablePipelineSelectMaskBits = 0x3;
|
||||
constexpr uint32_t pipelineSelectMediaSamplerDopClockGateMaskBits = 0x10;
|
||||
constexpr uint32_t pipelineSelectMediaSamplerPowerClockGateMaskBits = 0x40;
|
||||
constexpr uint32_t pipelineSelectSystolicModeEnableMaskBits = 0x80;
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -9,12 +9,12 @@
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
static const int ptrGarbageContent[16] = {
|
||||
inline const int ptrGarbageContent[16] = {
|
||||
0x0131, 0x133, 0xA, 0xEF,
|
||||
0x0131, 0x133, 0xA, 0xEF,
|
||||
0x0131, 0x133, 0xA, 0xEF,
|
||||
0x0131, 0x133, 0xA, 0xEF};
|
||||
static const auto ptrGarbage = (void *)ptrGarbageContent;
|
||||
inline const auto ptrGarbage = (void *)ptrGarbageContent;
|
||||
|
||||
template <typename T>
|
||||
inline T ptrOffset(T ptrBefore, size_t offset) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -188,7 +188,7 @@ struct ArgTypeTraits {
|
||||
};
|
||||
|
||||
namespace {
|
||||
static constexpr auto ArgTypeMetadataSize = sizeof(ArgTypeTraits);
|
||||
constexpr auto ArgTypeMetadataSize = sizeof(ArgTypeTraits);
|
||||
static_assert(ArgTypeMetadataSize <= 4, "Keep it small");
|
||||
} // namespace
|
||||
|
||||
|
||||
@@ -55,12 +55,12 @@ UUID('285208b2-c5e0-5fcb-90bb-7576ed7a9697')
|
||||
*/
|
||||
|
||||
using ClassNamesArray = std::array<std::pair<const char *, const std::string>, size_t(DrmResourceClass::MaxSize)>;
|
||||
const ClassNamesArray classNamesToUuid = {std::make_pair("I915_UUID_CLASS_ELF_BINARY", "31203221-8069-5a0a-9d43-94a4d3395ee1"),
|
||||
std::make_pair("I915_UUID_CLASS_ISA_BYTECODE", "53baed0a-12c3-5d19-aa69-ab9c51aa1039"),
|
||||
std::make_pair("I915_UUID_L0_MODULE_AREA", "a411e82e-16c9-58b7-bfb5-b209b8601d5f"),
|
||||
std::make_pair("I915_UUID_L0_SIP_AREA", "21fd6baf-f918-53cc-ba74-f09aaaea2dc0"),
|
||||
std::make_pair("I915_UUID_L0_SBA_AREA", "ec45189d-97d3-58e2-80d1-ab52c72fdcc1"),
|
||||
std::make_pair("L0_ZEBIN_MODULE", "88d347c1-c79b-530a-b68f-e0db7d575e04")};
|
||||
inline const ClassNamesArray classNamesToUuid = {std::make_pair("I915_UUID_CLASS_ELF_BINARY", "31203221-8069-5a0a-9d43-94a4d3395ee1"),
|
||||
std::make_pair("I915_UUID_CLASS_ISA_BYTECODE", "53baed0a-12c3-5d19-aa69-ab9c51aa1039"),
|
||||
std::make_pair("I915_UUID_L0_MODULE_AREA", "a411e82e-16c9-58b7-bfb5-b209b8601d5f"),
|
||||
std::make_pair("I915_UUID_L0_SIP_AREA", "21fd6baf-f918-53cc-ba74-f09aaaea2dc0"),
|
||||
std::make_pair("I915_UUID_L0_SBA_AREA", "ec45189d-97d3-58e2-80d1-ab52c72fdcc1"),
|
||||
std::make_pair("L0_ZEBIN_MODULE", "88d347c1-c79b-530a-b68f-e0db7d575e04")};
|
||||
|
||||
constexpr auto uuidL0CommandQueueName = "L0_COMMAND_QUEUE";
|
||||
constexpr auto uuidL0CommandQueueHash = "285208b2-c5e0-5fcb-90bb-7576ed7a9697"; // L0_UUID('L0_COMMAND_QUEUE')
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
static const std::vector<unsigned short> pvcXlDeviceIds{0x0BD0};
|
||||
static const std::vector<unsigned short> pvcXtDeviceIds{0x0BD5, 0x0BD6, 0x0BD7, 0x0BD8, 0x0BD9, 0x0BDA, 0x0BDB};
|
||||
inline const std::vector<unsigned short> pvcXlDeviceIds{0x0BD0};
|
||||
inline const std::vector<unsigned short> pvcXtDeviceIds{0x0BD5, 0x0BD6, 0x0BD7, 0x0BD8, 0x0BD9, 0x0BDA, 0x0BDB};
|
||||
} // namespace NEO
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
static const std::vector<unsigned short> dg2G10DeviceIds{
|
||||
inline const std::vector<unsigned short> dg2G10DeviceIds{
|
||||
0x4F80,
|
||||
0x4F81,
|
||||
0x4F82,
|
||||
@@ -24,7 +24,7 @@ static const std::vector<unsigned short> dg2G10DeviceIds{
|
||||
0x56A2,
|
||||
0x56C0};
|
||||
|
||||
static const std::vector<unsigned short> dg2G11DeviceIds{
|
||||
inline const std::vector<unsigned short> dg2G11DeviceIds{
|
||||
0x4F87,
|
||||
0x4F88,
|
||||
0x5693,
|
||||
@@ -36,7 +36,7 @@ static const std::vector<unsigned short> dg2G11DeviceIds{
|
||||
0x56B1,
|
||||
0x56C1};
|
||||
|
||||
static const std::vector<unsigned short> dg2G12DeviceIds{
|
||||
inline const std::vector<unsigned short> dg2G12DeviceIds{
|
||||
0x5696,
|
||||
0x5697,
|
||||
0x56A3,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <dxgi.h>
|
||||
|
||||
namespace NEO {
|
||||
static constexpr auto error = 1;
|
||||
constexpr auto error = 1;
|
||||
|
||||
class UltDxCoreAdapter : public IDXCoreAdapter {
|
||||
public:
|
||||
|
||||
@@ -10,9 +10,10 @@
|
||||
#include "shared/source/os_interface/windows/gdi_interface.h"
|
||||
#include "shared/source/os_interface/windows/wddm/adapter_info.h"
|
||||
|
||||
static constexpr D3DKMT_HANDLE validHandle = 0x7;
|
||||
static constexpr auto error = STATUS_SUCCESS + 1;
|
||||
static const wchar_t *driverStorePathStr = L"some/path/fffff";
|
||||
constexpr D3DKMT_HANDLE validHandle = 0x7;
|
||||
constexpr auto error = STATUS_SUCCESS + 1;
|
||||
inline const wchar_t *driverStorePathStr = L"some/path/fffff";
|
||||
|
||||
struct QueryAdapterInfoMock {
|
||||
static NTSTATUS(APIENTRY queryadapterinfo)(
|
||||
const D3DKMT_QUERYADAPTERINFO *queryAdapterInfo) {
|
||||
|
||||
Reference in New Issue
Block a user