LLVM  9.0.0svn
AMDGPUMetadata.h
Go to the documentation of this file.
1 //===--- AMDGPUMetadata.h ---------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 /// \file
10 /// AMDGPU metadata definitions and in-memory representations.
11 ///
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_SUPPORT_AMDGPUMETADATA_H
16 #define LLVM_SUPPORT_AMDGPUMETADATA_H
17 
18 #include <cstdint>
19 #include <string>
20 #include <system_error>
21 #include <vector>
22 
23 namespace llvm {
24 namespace AMDGPU {
25 
26 //===----------------------------------------------------------------------===//
27 // HSA metadata.
28 //===----------------------------------------------------------------------===//
29 namespace HSAMD {
30 
31 /// HSA metadata major version.
32 constexpr uint32_t VersionMajor = 1;
33 /// HSA metadata minor version.
34 constexpr uint32_t VersionMinor = 0;
35 
36 /// HSA metadata beginning assembler directive.
37 constexpr char AssemblerDirectiveBegin[] = ".amd_amdgpu_hsa_metadata";
38 /// HSA metadata ending assembler directive.
39 constexpr char AssemblerDirectiveEnd[] = ".end_amd_amdgpu_hsa_metadata";
40 
41 /// Access qualifiers.
42 enum class AccessQualifier : uint8_t {
43  Default = 0,
44  ReadOnly = 1,
45  WriteOnly = 2,
46  ReadWrite = 3,
47  Unknown = 0xff
48 };
49 
50 /// Address space qualifiers.
51 enum class AddressSpaceQualifier : uint8_t {
52  Private = 0,
53  Global = 1,
54  Constant = 2,
55  Local = 3,
56  Generic = 4,
57  Region = 5,
58  Unknown = 0xff
59 };
60 
61 /// Value kinds.
62 enum class ValueKind : uint8_t {
63  ByValue = 0,
64  GlobalBuffer = 1,
66  Sampler = 3,
67  Image = 4,
68  Pipe = 5,
69  Queue = 6,
73  HiddenNone = 10,
74  HiddenPrintfBuffer = 11,
75  HiddenDefaultQueue = 12,
77  Unknown = 0xff
78 };
79 
80 /// Value types.
81 enum class ValueType : uint8_t {
82  Struct = 0,
83  I8 = 1,
84  U8 = 2,
85  I16 = 3,
86  U16 = 4,
87  F16 = 5,
88  I32 = 6,
89  U32 = 7,
90  F32 = 8,
91  I64 = 9,
92  U64 = 10,
93  F64 = 11,
94  Unknown = 0xff
95 };
96 
97 //===----------------------------------------------------------------------===//
98 // Kernel Metadata.
99 //===----------------------------------------------------------------------===//
100 namespace Kernel {
101 
102 //===----------------------------------------------------------------------===//
103 // Kernel Attributes Metadata.
104 //===----------------------------------------------------------------------===//
105 namespace Attrs {
106 
107 namespace Key {
108 /// Key for Kernel::Attr::Metadata::mReqdWorkGroupSize.
109 constexpr char ReqdWorkGroupSize[] = "ReqdWorkGroupSize";
110 /// Key for Kernel::Attr::Metadata::mWorkGroupSizeHint.
111 constexpr char WorkGroupSizeHint[] = "WorkGroupSizeHint";
112 /// Key for Kernel::Attr::Metadata::mVecTypeHint.
113 constexpr char VecTypeHint[] = "VecTypeHint";
114 /// Key for Kernel::Attr::Metadata::mRuntimeHandle.
115 constexpr char RuntimeHandle[] = "RuntimeHandle";
116 } // end namespace Key
117 
118 /// In-memory representation of kernel attributes metadata.
119 struct Metadata final {
120  /// 'reqd_work_group_size' attribute. Optional.
121  std::vector<uint32_t> mReqdWorkGroupSize = std::vector<uint32_t>();
122  /// 'work_group_size_hint' attribute. Optional.
123  std::vector<uint32_t> mWorkGroupSizeHint = std::vector<uint32_t>();
124  /// 'vec_type_hint' attribute. Optional.
125  std::string mVecTypeHint = std::string();
126  /// External symbol created by runtime to store the kernel address
127  /// for enqueued blocks.
128  std::string mRuntimeHandle = std::string();
129 
130  /// Default constructor.
131  Metadata() = default;
132 
133  /// \returns True if kernel attributes metadata is empty, false otherwise.
134  bool empty() const {
135  return !notEmpty();
136  }
137 
138  /// \returns True if kernel attributes metadata is not empty, false otherwise.
139  bool notEmpty() const {
140  return !mReqdWorkGroupSize.empty() || !mWorkGroupSizeHint.empty() ||
141  !mVecTypeHint.empty() || !mRuntimeHandle.empty();
142  }
143 };
144 
145 } // end namespace Attrs
146 
147 //===----------------------------------------------------------------------===//
148 // Kernel Argument Metadata.
149 //===----------------------------------------------------------------------===//
150 namespace Arg {
151 
152 namespace Key {
153 /// Key for Kernel::Arg::Metadata::mName.
154 constexpr char Name[] = "Name";
155 /// Key for Kernel::Arg::Metadata::mTypeName.
156 constexpr char TypeName[] = "TypeName";
157 /// Key for Kernel::Arg::Metadata::mSize.
158 constexpr char Size[] = "Size";
159 /// Key for Kernel::Arg::Metadata::mOffset.
160 constexpr char Offset[] = "Offset";
161 /// Key for Kernel::Arg::Metadata::mAlign.
162 constexpr char Align[] = "Align";
163 /// Key for Kernel::Arg::Metadata::mValueKind.
164 constexpr char ValueKind[] = "ValueKind";
165 /// Key for Kernel::Arg::Metadata::mValueType.
166 constexpr char ValueType[] = "ValueType";
167 /// Key for Kernel::Arg::Metadata::mPointeeAlign.
168 constexpr char PointeeAlign[] = "PointeeAlign";
169 /// Key for Kernel::Arg::Metadata::mAddrSpaceQual.
170 constexpr char AddrSpaceQual[] = "AddrSpaceQual";
171 /// Key for Kernel::Arg::Metadata::mAccQual.
172 constexpr char AccQual[] = "AccQual";
173 /// Key for Kernel::Arg::Metadata::mActualAccQual.
174 constexpr char ActualAccQual[] = "ActualAccQual";
175 /// Key for Kernel::Arg::Metadata::mIsConst.
176 constexpr char IsConst[] = "IsConst";
177 /// Key for Kernel::Arg::Metadata::mIsRestrict.
178 constexpr char IsRestrict[] = "IsRestrict";
179 /// Key for Kernel::Arg::Metadata::mIsVolatile.
180 constexpr char IsVolatile[] = "IsVolatile";
181 /// Key for Kernel::Arg::Metadata::mIsPipe.
182 constexpr char IsPipe[] = "IsPipe";
183 } // end namespace Key
184 
185 /// In-memory representation of kernel argument metadata.
186 struct Metadata final {
187  /// Name. Optional.
188  std::string mName = std::string();
189  /// Type name. Optional.
190  std::string mTypeName = std::string();
191  /// Size in bytes. Required.
192  uint32_t mSize = 0;
193  /// Offset in bytes. Required for code object v3, unused for code object v2.
194  uint32_t mOffset = 0;
195  /// Alignment in bytes. Required.
196  uint32_t mAlign = 0;
197  /// Value kind. Required.
199  /// Value type. Required.
201  /// Pointee alignment in bytes. Optional.
202  uint32_t mPointeeAlign = 0;
203  /// Address space qualifier. Optional.
205  /// Access qualifier. Optional.
207  /// Actual access qualifier. Optional.
209  /// True if 'const' qualifier is specified. Optional.
210  bool mIsConst = false;
211  /// True if 'restrict' qualifier is specified. Optional.
212  bool mIsRestrict = false;
213  /// True if 'volatile' qualifier is specified. Optional.
214  bool mIsVolatile = false;
215  /// True if 'pipe' qualifier is specified. Optional.
216  bool mIsPipe = false;
217 
218  /// Default constructor.
219  Metadata() = default;
220 };
221 
222 } // end namespace Arg
223 
224 //===----------------------------------------------------------------------===//
225 // Kernel Code Properties Metadata.
226 //===----------------------------------------------------------------------===//
227 namespace CodeProps {
228 
229 namespace Key {
230 /// Key for Kernel::CodeProps::Metadata::mKernargSegmentSize.
231 constexpr char KernargSegmentSize[] = "KernargSegmentSize";
232 /// Key for Kernel::CodeProps::Metadata::mGroupSegmentFixedSize.
233 constexpr char GroupSegmentFixedSize[] = "GroupSegmentFixedSize";
234 /// Key for Kernel::CodeProps::Metadata::mPrivateSegmentFixedSize.
235 constexpr char PrivateSegmentFixedSize[] = "PrivateSegmentFixedSize";
236 /// Key for Kernel::CodeProps::Metadata::mKernargSegmentAlign.
237 constexpr char KernargSegmentAlign[] = "KernargSegmentAlign";
238 /// Key for Kernel::CodeProps::Metadata::mWavefrontSize.
239 constexpr char WavefrontSize[] = "WavefrontSize";
240 /// Key for Kernel::CodeProps::Metadata::mNumSGPRs.
241 constexpr char NumSGPRs[] = "NumSGPRs";
242 /// Key for Kernel::CodeProps::Metadata::mNumVGPRs.
243 constexpr char NumVGPRs[] = "NumVGPRs";
244 /// Key for Kernel::CodeProps::Metadata::mMaxFlatWorkGroupSize.
245 constexpr char MaxFlatWorkGroupSize[] = "MaxFlatWorkGroupSize";
246 /// Key for Kernel::CodeProps::Metadata::mIsDynamicCallStack.
247 constexpr char IsDynamicCallStack[] = "IsDynamicCallStack";
248 /// Key for Kernel::CodeProps::Metadata::mIsXNACKEnabled.
249 constexpr char IsXNACKEnabled[] = "IsXNACKEnabled";
250 /// Key for Kernel::CodeProps::Metadata::mNumSpilledSGPRs.
251 constexpr char NumSpilledSGPRs[] = "NumSpilledSGPRs";
252 /// Key for Kernel::CodeProps::Metadata::mNumSpilledVGPRs.
253 constexpr char NumSpilledVGPRs[] = "NumSpilledVGPRs";
254 } // end namespace Key
255 
256 /// In-memory representation of kernel code properties metadata.
257 struct Metadata final {
258  /// Size in bytes of the kernarg segment memory. Kernarg segment memory
259  /// holds the values of the arguments to the kernel. Required.
260  uint64_t mKernargSegmentSize = 0;
261  /// Size in bytes of the group segment memory required by a workgroup.
262  /// This value does not include any dynamically allocated group segment memory
263  /// that may be added when the kernel is dispatched. Required.
264  uint32_t mGroupSegmentFixedSize = 0;
265  /// Size in bytes of the private segment memory required by a workitem.
266  /// Private segment memory includes arg, spill and private segments. Required.
267  uint32_t mPrivateSegmentFixedSize = 0;
268  /// Maximum byte alignment of variables used by the kernel in the
269  /// kernarg memory segment. Required.
270  uint32_t mKernargSegmentAlign = 0;
271  /// Wavefront size. Required.
272  uint32_t mWavefrontSize = 0;
273  /// Total number of SGPRs used by a wavefront. Optional.
274  uint16_t mNumSGPRs = 0;
275  /// Total number of VGPRs used by a workitem. Optional.
276  uint16_t mNumVGPRs = 0;
277  /// Maximum flat work-group size supported by the kernel. Optional.
278  uint32_t mMaxFlatWorkGroupSize = 0;
279  /// True if the generated machine code is using a dynamically sized
280  /// call stack. Optional.
281  bool mIsDynamicCallStack = false;
282  /// True if the generated machine code is capable of supporting XNACK.
283  /// Optional.
284  bool mIsXNACKEnabled = false;
285  /// Number of SGPRs spilled by a wavefront. Optional.
286  uint16_t mNumSpilledSGPRs = 0;
287  /// Number of VGPRs spilled by a workitem. Optional.
288  uint16_t mNumSpilledVGPRs = 0;
289 
290  /// Default constructor.
291  Metadata() = default;
292 
293  /// \returns True if kernel code properties metadata is empty, false
294  /// otherwise.
295  bool empty() const {
296  return !notEmpty();
297  }
298 
299  /// \returns True if kernel code properties metadata is not empty, false
300  /// otherwise.
301  bool notEmpty() const {
302  return true;
303  }
304 };
305 
306 } // end namespace CodeProps
307 
308 //===----------------------------------------------------------------------===//
309 // Kernel Debug Properties Metadata.
310 //===----------------------------------------------------------------------===//
311 namespace DebugProps {
312 
313 namespace Key {
314 /// Key for Kernel::DebugProps::Metadata::mDebuggerABIVersion.
315 constexpr char DebuggerABIVersion[] = "DebuggerABIVersion";
316 /// Key for Kernel::DebugProps::Metadata::mReservedNumVGPRs.
317 constexpr char ReservedNumVGPRs[] = "ReservedNumVGPRs";
318 /// Key for Kernel::DebugProps::Metadata::mReservedFirstVGPR.
319 constexpr char ReservedFirstVGPR[] = "ReservedFirstVGPR";
320 /// Key for Kernel::DebugProps::Metadata::mPrivateSegmentBufferSGPR.
321 constexpr char PrivateSegmentBufferSGPR[] = "PrivateSegmentBufferSGPR";
322 /// Key for
323 /// Kernel::DebugProps::Metadata::mWavefrontPrivateSegmentOffsetSGPR.
325  "WavefrontPrivateSegmentOffsetSGPR";
326 } // end namespace Key
327 
328 /// In-memory representation of kernel debug properties metadata.
329 struct Metadata final {
330  /// Debugger ABI version. Optional.
331  std::vector<uint32_t> mDebuggerABIVersion = std::vector<uint32_t>();
332  /// Consecutive number of VGPRs reserved for debugger use. Must be 0 if
333  /// mDebuggerABIVersion is not set. Optional.
334  uint16_t mReservedNumVGPRs = 0;
335  /// First fixed VGPR reserved. Must be uint16_t(-1) if
336  /// mDebuggerABIVersion is not set or mReservedFirstVGPR is 0. Optional.
337  uint16_t mReservedFirstVGPR = uint16_t(-1);
338  /// Fixed SGPR of the first of 4 SGPRs used to hold the scratch V# used
339  /// for the entire kernel execution. Must be uint16_t(-1) if
340  /// mDebuggerABIVersion is not set or SGPR not used or not known. Optional.
341  uint16_t mPrivateSegmentBufferSGPR = uint16_t(-1);
342  /// Fixed SGPR used to hold the wave scratch offset for the entire
343  /// kernel execution. Must be uint16_t(-1) if mDebuggerABIVersion is not set
344  /// or SGPR is not used or not known. Optional.
345  uint16_t mWavefrontPrivateSegmentOffsetSGPR = uint16_t(-1);
346 
347  /// Default constructor.
348  Metadata() = default;
349 
350  /// \returns True if kernel debug properties metadata is empty, false
351  /// otherwise.
352  bool empty() const {
353  return !notEmpty();
354  }
355 
356  /// \returns True if kernel debug properties metadata is not empty, false
357  /// otherwise.
358  bool notEmpty() const {
359  return !mDebuggerABIVersion.empty();
360  }
361 };
362 
363 } // end namespace DebugProps
364 
365 namespace Key {
366 /// Key for Kernel::Metadata::mName.
367 constexpr char Name[] = "Name";
368 /// Key for Kernel::Metadata::mSymbolName.
369 constexpr char SymbolName[] = "SymbolName";
370 /// Key for Kernel::Metadata::mLanguage.
371 constexpr char Language[] = "Language";
372 /// Key for Kernel::Metadata::mLanguageVersion.
373 constexpr char LanguageVersion[] = "LanguageVersion";
374 /// Key for Kernel::Metadata::mAttrs.
375 constexpr char Attrs[] = "Attrs";
376 /// Key for Kernel::Metadata::mArgs.
377 constexpr char Args[] = "Args";
378 /// Key for Kernel::Metadata::mCodeProps.
379 constexpr char CodeProps[] = "CodeProps";
380 /// Key for Kernel::Metadata::mDebugProps.
381 constexpr char DebugProps[] = "DebugProps";
382 } // end namespace Key
383 
384 /// In-memory representation of kernel metadata.
385 struct Metadata final {
386  /// Kernel source name. Required.
387  std::string mName = std::string();
388  /// Kernel descriptor name. Required.
389  std::string mSymbolName = std::string();
390  /// Language. Optional.
391  std::string mLanguage = std::string();
392  /// Language version. Optional.
393  std::vector<uint32_t> mLanguageVersion = std::vector<uint32_t>();
394  /// Attributes metadata. Optional.
396  /// Arguments metadata. Optional.
397  std::vector<Arg::Metadata> mArgs = std::vector<Arg::Metadata>();
398  /// Code properties metadata. Optional.
400  /// Debug properties metadata. Optional.
402 
403  /// Default constructor.
404  Metadata() = default;
405 };
406 
407 } // end namespace Kernel
408 
409 namespace Key {
410 /// Key for HSA::Metadata::mVersion.
411 constexpr char Version[] = "Version";
412 /// Key for HSA::Metadata::mPrintf.
413 constexpr char Printf[] = "Printf";
414 /// Key for HSA::Metadata::mKernels.
415 constexpr char Kernels[] = "Kernels";
416 } // end namespace Key
417 
418 /// In-memory representation of HSA metadata.
419 struct Metadata final {
420  /// HSA metadata version. Required.
421  std::vector<uint32_t> mVersion = std::vector<uint32_t>();
422  /// Printf metadata. Optional.
423  std::vector<std::string> mPrintf = std::vector<std::string>();
424  /// Kernels metadata. Required.
425  std::vector<Kernel::Metadata> mKernels = std::vector<Kernel::Metadata>();
426 
427  /// Default constructor.
428  Metadata() = default;
429 };
430 
431 /// Converts \p String to \p HSAMetadata.
432 std::error_code fromString(std::string String, Metadata &HSAMetadata);
433 
434 /// Converts \p HSAMetadata to \p String.
435 std::error_code toString(Metadata HSAMetadata, std::string &String);
436 
437 //===----------------------------------------------------------------------===//
438 // HSA metadata for v3 code object.
439 //===----------------------------------------------------------------------===//
440 namespace V3 {
441 /// HSA metadata major version.
442 constexpr uint32_t VersionMajor = 1;
443 /// HSA metadata minor version.
444 constexpr uint32_t VersionMinor = 0;
445 
446 /// HSA metadata beginning assembler directive.
447 constexpr char AssemblerDirectiveBegin[] = ".amdgpu_metadata";
448 /// HSA metadata ending assembler directive.
449 constexpr char AssemblerDirectiveEnd[] = ".end_amdgpu_metadata";
450 } // end namespace V3
451 
452 } // end namespace HSAMD
453 
454 //===----------------------------------------------------------------------===//
455 // PAL metadata.
456 //===----------------------------------------------------------------------===//
457 namespace PALMD {
458 
459 /// PAL metadata (old linear format) assembler directive.
460 constexpr char AssemblerDirective[] = ".amd_amdgpu_pal_metadata";
461 
462 /// PAL metadata (new MsgPack format) beginning assembler directive.
463 constexpr char AssemblerDirectiveBegin[] = ".amdgpu_pal_metadata";
464 
465 /// PAL metadata (new MsgPack format) ending assembler directive.
466 constexpr char AssemblerDirectiveEnd[] = ".end_amdgpu_pal_metadata";
467 
468 /// PAL metadata keys.
469 enum Key : uint32_t {
482 
483  LS_NUM_USED_VGPRS = 0x10000021,
484  HS_NUM_USED_VGPRS = 0x10000022,
485  ES_NUM_USED_VGPRS = 0x10000023,
486  GS_NUM_USED_VGPRS = 0x10000024,
487  VS_NUM_USED_VGPRS = 0x10000025,
488  PS_NUM_USED_VGPRS = 0x10000026,
489  CS_NUM_USED_VGPRS = 0x10000027,
490 
491  LS_NUM_USED_SGPRS = 0x10000028,
492  HS_NUM_USED_SGPRS = 0x10000029,
493  ES_NUM_USED_SGPRS = 0x1000002a,
494  GS_NUM_USED_SGPRS = 0x1000002b,
495  VS_NUM_USED_SGPRS = 0x1000002c,
496  PS_NUM_USED_SGPRS = 0x1000002d,
497  CS_NUM_USED_SGPRS = 0x1000002e,
498 
499  LS_SCRATCH_SIZE = 0x10000044,
500  HS_SCRATCH_SIZE = 0x10000045,
501  ES_SCRATCH_SIZE = 0x10000046,
502  GS_SCRATCH_SIZE = 0x10000047,
503  VS_SCRATCH_SIZE = 0x10000048,
504  PS_SCRATCH_SIZE = 0x10000049,
505  CS_SCRATCH_SIZE = 0x1000004a
506 };
507 
508 } // end namespace PALMD
509 } // end namespace AMDGPU
510 } // end namespace llvm
511 
512 #endif // LLVM_SUPPORT_AMDGPUMETADATA_H
constexpr char IsXNACKEnabled[]
Key for Kernel::CodeProps::Metadata::mIsXNACKEnabled.
In-memory representation of HSA metadata.
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
constexpr char GroupSegmentFixedSize[]
Key for Kernel::CodeProps::Metadata::mGroupSegmentFixedSize.
This class represents lattice values for constants.
Definition: AllocatorList.h:23
constexpr char IsVolatile[]
Key for Kernel::Arg::Metadata::mIsVolatile.
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
constexpr char PointeeAlign[]
Key for Kernel::Arg::Metadata::mPointeeAlign.
constexpr char ReqdWorkGroupSize[]
Key for Kernel::Attr::Metadata::mReqdWorkGroupSize.
constexpr char KernargSegmentAlign[]
Key for Kernel::CodeProps::Metadata::mKernargSegmentAlign.
constexpr char RuntimeHandle[]
Key for Kernel::Attr::Metadata::mRuntimeHandle.
constexpr char ReservedFirstVGPR[]
Key for Kernel::DebugProps::Metadata::mReservedFirstVGPR.
constexpr char NumSpilledSGPRs[]
Key for Kernel::CodeProps::Metadata::mNumSpilledSGPRs.
constexpr char PrivateSegmentBufferSGPR[]
Key for Kernel::DebugProps::Metadata::mPrivateSegmentBufferSGPR.
constexpr char Language[]
Key for Kernel::Metadata::mLanguage.
constexpr char KernargSegmentSize[]
Key for Kernel::CodeProps::Metadata::mKernargSegmentSize.
In-memory representation of kernel debug properties metadata.
constexpr char SymbolName[]
Key for Kernel::Metadata::mSymbolName.
constexpr char AddrSpaceQual[]
Key for Kernel::Arg::Metadata::mAddrSpaceQual.
constexpr char Printf[]
Key for HSA::Metadata::mPrintf.
constexpr char DebuggerABIVersion[]
Key for Kernel::DebugProps::Metadata::mDebuggerABIVersion.
std::error_code fromString(std::string String, Metadata &HSAMetadata)
Converts String to HSAMetadata.
Key
PAL metadata keys.
constexpr char Attrs[]
Key for Kernel::Metadata::mAttrs.
constexpr char IsPipe[]
Key for Kernel::Arg::Metadata::mIsPipe.
constexpr char AssemblerDirectiveBegin[]
HSA metadata beginning assembler directive.
This is an important base class in LLVM.
Definition: Constant.h:41
In-memory representation of kernel metadata.
constexpr char WavefrontSize[]
Key for Kernel::CodeProps::Metadata::mWavefrontSize.
ValueKind
Value kinds.
In-memory representation of kernel argument metadata.
constexpr char TypeName[]
Key for Kernel::Arg::Metadata::mTypeName.
constexpr char ActualAccQual[]
Key for Kernel::Arg::Metadata::mActualAccQual.
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
constexpr char AssemblerDirectiveEnd[]
HSA metadata ending assembler directive.
constexpr char IsDynamicCallStack[]
Key for Kernel::CodeProps::Metadata::mIsDynamicCallStack.
constexpr char AssemblerDirective[]
PAL metadata (old linear format) assembler directive.
In-memory representation of kernel attributes metadata.
constexpr char Version[]
Key for HSA::Metadata::mVersion.
constexpr char NumSGPRs[]
Key for Kernel::CodeProps::Metadata::mNumSGPRs.
AccessQualifier
Access qualifiers.
constexpr char IsRestrict[]
Key for Kernel::Arg::Metadata::mIsRestrict.
constexpr char CodeProps[]
Key for Kernel::Metadata::mCodeProps.
ValueType
Value types.
constexpr char LanguageVersion[]
Key for Kernel::Metadata::mLanguageVersion.
constexpr uint32_t VersionMinor
HSA metadata minor version.
constexpr char MaxFlatWorkGroupSize[]
Key for Kernel::CodeProps::Metadata::mMaxFlatWorkGroupSize.
constexpr char NumVGPRs[]
Key for Kernel::CodeProps::Metadata::mNumVGPRs.
constexpr char Kernels[]
Key for HSA::Metadata::mKernels.
constexpr char PrivateSegmentFixedSize[]
Key for Kernel::CodeProps::Metadata::mPrivateSegmentFixedSize.
std::error_code toString(Metadata HSAMetadata, std::string &String)
Converts HSAMetadata to String.
constexpr char NumSpilledVGPRs[]
Key for Kernel::CodeProps::Metadata::mNumSpilledVGPRs.
constexpr char DebugProps[]
Key for Kernel::Metadata::mDebugProps.
AddressSpaceQualifier
Address space qualifiers.
constexpr char VecTypeHint[]
Key for Kernel::Attr::Metadata::mVecTypeHint.
constexpr char AccQual[]
Key for Kernel::Arg::Metadata::mAccQual.
uint32_t Size
Definition: Profile.cpp:46
In-memory representation of kernel code properties metadata.
constexpr char IsConst[]
Key for Kernel::Arg::Metadata::mIsConst.
constexpr char WorkGroupSizeHint[]
Key for Kernel::Attr::Metadata::mWorkGroupSizeHint.
constexpr char Offset[]
Key for Kernel::Arg::Metadata::mOffset.
constexpr char WavefrontPrivateSegmentOffsetSGPR[]
Key for Kernel::DebugProps::Metadata::mWavefrontPrivateSegmentOffsetSGPR.
constexpr char ReservedNumVGPRs[]
Key for Kernel::DebugProps::Metadata::mReservedNumVGPRs.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
constexpr uint32_t VersionMajor
HSA metadata major version.