1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
|
// Copyright (c) 2020 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
// to deal in the Materials without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Materials, and to permit persons to whom the
// Materials are furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Materials.
//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
// IN THE MATERIALS.
// The header is for SPIR-V to LLVM IR internal definitions, that are not a part
// of Khronos SPIR-V specification.
#include "spirv/unified1/spirv.hpp"
#ifndef spirv_internal_HPP
#define spirv_internal_HPP
namespace spv {
namespace internal {
enum InternalSourceLanguageNonSemanticDI {
ISourceLanguagePython = 200,
ISourceLanguageJulia = 201,
ISourceLanguageRust = 202,
ISourceLanguageD = 203,
ISourceLanguageFortran77 = 204,
ISourceLanguageFortran90 = 205,
ISourceLanguageFortran95 = 206,
ISourceLanguageFortran2003 = 207,
ISourceLanguageFortran2008 = 208,
ISourceLanguageFortran2018 = 209,
ISourceLanguageC = 210,
ISourceLanguageC99 = 211,
ISourceLanguageC11 = 212,
ISourceLanguageC17 = 213,
ISourceLanguageCPP = 214,
ISourceLanguageCPP03 = 215,
ISourceLanguageCPP11 = 216,
ISourceLanguageCPP14 = 217,
ISourceLanguageCPP17 = 218,
ISourceLanguageCPP20 = 219,
};
enum InternalLinkageType {
ILTPrev = LinkageTypeMax - 2,
ILTInternal
};
enum InternalOp {
IOpTypeTokenINTEL = 6113,
IOpConvertFToBF16INTEL = 6116,
IOpConvertBF16ToFINTEL = 6117,
IOpTypeJointMatrixINTEL = 6119,
IOpJointMatrixLoadINTEL = 6120,
IOpJointMatrixStoreINTEL = 6121,
IOpJointMatrixMadINTEL = 6122,
IOpJointMatrixSUMadINTEL = 6128,
IOpJointMatrixUSMadINTEL = 6129,
IOpJointMatrixUUMadINTEL = 6130,
IOpTaskSequenceCreateINTEL = 6163,
IOpTaskSequenceAsyncINTEL = 6164,
IOpTaskSequenceGetINTEL = 6165,
IOpTaskSequenceReleaseINTEL = 6166,
IOpTypeJointMatrixINTELv2 = 6184,
IOpCooperativeMatrixLoadCheckedINTEL = 6193,
IOpCooperativeMatrixStoreCheckedINTEL = 6194,
IOpCooperativeMatrixConstructCheckedINTEL = 6195,
IOpJointMatrixWorkItemLengthINTEL = 6410,
IOpTypeTaskSequenceINTEL = 6199,
IOpComplexFMulINTEL = 6415,
IOpComplexFDivINTEL = 6416,
IOpRoundFToTF32INTEL = 6426,
IOpMaskedGatherINTEL = 6428,
IOpMaskedScatterINTEL = 6429,
IOpJointMatrixGetElementCoordINTEL = 6440,
IOpCooperativeMatrixApplyFunctionINTEL = 6448,
IOpCooperativeMatrixPrefetchINTEL = 6449,
IOpConvertHandleToImageINTEL = 6529,
IOpConvertHandleToSamplerINTEL = 6530,
IOpConvertHandleToSampledImageINTEL = 6531,
IOpPrev = OpMax - 2,
IOpForward
};
enum InternalDecoration {
IDecRuntimeAlignedINTEL = 5940,
IDecCallableFunctionINTEL = 6087,
IDecHostAccessINTEL = 6147,
IDecInitModeINTEL = 6148,
IDecImplementInCSRINTEL = 6149,
IDecArgumentAttributeINTEL = 6409,
};
enum InternalCapability {
ICapTokenTypeINTEL = 6112,
ICapBfloat16ConversionINTEL = 6115,
ICapabilityJointMatrixINTEL = 6118,
ICapabilityHWThreadQueryINTEL = 6134,
ICapGlobalVariableDecorationsINTEL = 6146,
ICapabilityTaskSequenceINTEL = 6162,
ICapabilityCooperativeMatrixCheckedInstructionsINTEL = 6192,
ICapabilityCooperativeMatrixPrefetchINTEL = 6411,
ICapabilityComplexFloatMulDivINTEL = 6414,
ICapabilityTensorFloat32RoundingINTEL = 6425,
ICapabilityMaskedGatherScatterINTEL = 6427,
ICapabilityJointMatrixWIInstructionsINTEL = 6435,
ICapabilityCooperativeMatrixInvocationInstructionsINTEL = 6435,
ICapabilityJointMatrixTF32ComponentTypeINTEL = 6436,
ICapabilityJointMatrixBF16ComponentTypeINTEL = 6437,
ICapabilityJointMatrixPackedInt2ComponentTypeINTEL = 6438,
ICapabilityJointMatrixPackedInt4ComponentTypeINTEL = 6439,
ICapabilitySubgroupRequirementsINTEL = 6445,
ICapabilityBindlessImagesINTEL = 6528
};
enum InternalExecutionMode {
IExecModeNamedSubgroupSizeINTEL = 6446,
};
constexpr LinkageType LinkageTypeInternal =
static_cast<LinkageType>(ILTInternal);
enum InternalJointMatrixLayout {
RowMajor = 0,
ColumnMajor = 1,
PackedA = 2,
PackedB = 3
};
enum InternalJointMatrixUse { MatrixA = 0, MatrixB = 1, Accumulator = 2 };
enum InternalJointMatrixCTI {
None = 0,
TF32 = 1,
Bfloat16 = 2,
PackedInt2 = 3,
PackedInt4 = 4
};
enum InternalBuiltIn {
IBuiltInSubDeviceIDINTEL = 6135,
IBuiltInGlobalHWThreadIDINTEL = 6136,
};
#define _SPIRV_OP(x, y) constexpr x x##y = static_cast<x>(I##x##y);
_SPIRV_OP(Capability, JointMatrixINTEL)
_SPIRV_OP(Capability, JointMatrixWIInstructionsINTEL)
_SPIRV_OP(Capability, JointMatrixTF32ComponentTypeINTEL)
_SPIRV_OP(Capability, JointMatrixBF16ComponentTypeINTEL)
_SPIRV_OP(Capability, JointMatrixPackedInt2ComponentTypeINTEL)
_SPIRV_OP(Capability, JointMatrixPackedInt4ComponentTypeINTEL)
_SPIRV_OP(Op, TypeJointMatrixINTEL)
_SPIRV_OP(Op, TypeJointMatrixINTELv2)
_SPIRV_OP(Op, JointMatrixLoadINTEL)
_SPIRV_OP(Op, JointMatrixStoreINTEL)
_SPIRV_OP(Op, JointMatrixMadINTEL)
_SPIRV_OP(Op, JointMatrixSUMadINTEL)
_SPIRV_OP(Op, JointMatrixUSMadINTEL)
_SPIRV_OP(Op, JointMatrixUUMadINTEL)
_SPIRV_OP(Op, JointMatrixWorkItemLengthINTEL)
_SPIRV_OP(Op, JointMatrixGetElementCoordINTEL)
_SPIRV_OP(Capability, CooperativeMatrixPrefetchINTEL)
_SPIRV_OP(Op, CooperativeMatrixPrefetchINTEL)
_SPIRV_OP(Capability, CooperativeMatrixCheckedInstructionsINTEL)
_SPIRV_OP(Op, CooperativeMatrixLoadCheckedINTEL)
_SPIRV_OP(Op, CooperativeMatrixStoreCheckedINTEL)
_SPIRV_OP(Op, CooperativeMatrixConstructCheckedINTEL)
_SPIRV_OP(Capability, CooperativeMatrixInvocationInstructionsINTEL)
_SPIRV_OP(Op, CooperativeMatrixApplyFunctionINTEL)
_SPIRV_OP(Capability, HWThreadQueryINTEL)
_SPIRV_OP(BuiltIn, SubDeviceIDINTEL)
_SPIRV_OP(BuiltIn, GlobalHWThreadIDINTEL)
_SPIRV_OP(Capability, ComplexFloatMulDivINTEL)
_SPIRV_OP(Op, ComplexFMulINTEL)
_SPIRV_OP(Op, ComplexFDivINTEL)
_SPIRV_OP(Capability, MaskedGatherScatterINTEL)
_SPIRV_OP(Op, MaskedGatherINTEL)
_SPIRV_OP(Op, MaskedScatterINTEL)
_SPIRV_OP(Capability, TensorFloat32RoundingINTEL)
_SPIRV_OP(Op, RoundFToTF32INTEL)
_SPIRV_OP(Capability, SubgroupRequirementsINTEL)
_SPIRV_OP(Capability, TaskSequenceINTEL)
_SPIRV_OP(Op, TaskSequenceCreateINTEL)
_SPIRV_OP(Op, TaskSequenceAsyncINTEL)
_SPIRV_OP(Op, TaskSequenceGetINTEL)
_SPIRV_OP(Op, TaskSequenceReleaseINTEL)
_SPIRV_OP(Op, TypeTaskSequenceINTEL)
_SPIRV_OP(Capability, BindlessImagesINTEL)
_SPIRV_OP(Op, ConvertHandleToImageINTEL)
_SPIRV_OP(Op, ConvertHandleToSamplerINTEL)
_SPIRV_OP(Op, ConvertHandleToSampledImageINTEL)
#undef _SPIRV_OP
constexpr SourceLanguage SourceLanguagePython =
static_cast<SourceLanguage>(ISourceLanguagePython);
constexpr SourceLanguage SourceLanguageJulia =
static_cast<SourceLanguage>(ISourceLanguageJulia);
constexpr SourceLanguage SourceLanguageRust =
static_cast<SourceLanguage>(ISourceLanguageRust);
constexpr SourceLanguage SourceLanguageD =
static_cast<SourceLanguage>(ISourceLanguageD);
constexpr SourceLanguage SourceLanguageFortran77 =
static_cast<SourceLanguage>(ISourceLanguageFortran77);
constexpr SourceLanguage SourceLanguageFortran90 =
static_cast<SourceLanguage>(ISourceLanguageFortran90);
constexpr SourceLanguage SourceLanguageFortran95 =
static_cast<SourceLanguage>(ISourceLanguageFortran95);
constexpr SourceLanguage SourceLanguageFortran2003 =
static_cast<SourceLanguage>(ISourceLanguageFortran2003);
constexpr SourceLanguage SourceLanguageFortran2008 =
static_cast<SourceLanguage>(ISourceLanguageFortran2008);
constexpr SourceLanguage SourceLanguageFortran2018 =
static_cast<SourceLanguage>(ISourceLanguageFortran2018);
constexpr SourceLanguage SourceLanguageC =
static_cast<SourceLanguage>(ISourceLanguageC);
constexpr SourceLanguage SourceLanguageC99 =
static_cast<SourceLanguage>(ISourceLanguageC99);
constexpr SourceLanguage SourceLanguageC11 =
static_cast<SourceLanguage>(ISourceLanguageC11);
constexpr SourceLanguage SourceLanguageC17 =
static_cast<SourceLanguage>(ISourceLanguageC17);
constexpr SourceLanguage SourceLanguageCPP =
static_cast<SourceLanguage>(ISourceLanguageCPP);
constexpr SourceLanguage SourceLanguageCPP03 =
static_cast<SourceLanguage>(ISourceLanguageCPP03);
constexpr SourceLanguage SourceLanguageCPP11 =
static_cast<SourceLanguage>(ISourceLanguageCPP11);
constexpr SourceLanguage SourceLanguageCPP14 =
static_cast<SourceLanguage>(ISourceLanguageCPP14);
constexpr SourceLanguage SourceLanguageCPP17 =
static_cast<SourceLanguage>(ISourceLanguageCPP17);
constexpr SourceLanguage SourceLanguageCPP20 =
static_cast<SourceLanguage>(ISourceLanguageCPP20);
constexpr Op OpForward = static_cast<Op>(IOpForward);
constexpr Op OpTypeTokenINTEL = static_cast<Op>(IOpTypeTokenINTEL);
constexpr Op OpConvertFToBF16INTEL = static_cast<Op>(IOpConvertFToBF16INTEL);
constexpr Op OpConvertBF16ToFINTEL = static_cast<Op>(IOpConvertBF16ToFINTEL);
constexpr Decoration DecorationRuntimeAlignedINTEL =
static_cast<Decoration>(IDecRuntimeAlignedINTEL);
constexpr Decoration DecorationHostAccessINTEL =
static_cast<Decoration>(IDecHostAccessINTEL);
constexpr Decoration DecorationInitModeINTEL =
static_cast<Decoration>(IDecInitModeINTEL);
constexpr Decoration DecorationImplementInCSRINTEL =
static_cast<Decoration>(IDecImplementInCSRINTEL);
constexpr Decoration DecorationArgumentAttributeINTEL =
static_cast<Decoration>(IDecArgumentAttributeINTEL);
constexpr Capability CapabilityTokenTypeINTEL =
static_cast<Capability>(ICapTokenTypeINTEL);
constexpr Capability CapabilityBfloat16ConversionINTEL =
static_cast<Capability>(ICapBfloat16ConversionINTEL);
constexpr Capability CapabilityGlobalVariableDecorationsINTEL =
static_cast<Capability>(ICapGlobalVariableDecorationsINTEL);
constexpr ExecutionMode ExecutionModeNamedSubgroupSizeINTEL =
static_cast<ExecutionMode>(IExecModeNamedSubgroupSizeINTEL);
} // namespace internal
} // namespace spv
#endif // #ifndef spirv_internal_HPP
|