summaryrefslogtreecommitdiff
path: root/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp
AgeCommit message (Collapse)Author
2025-11-11Remove unused <utility> inclusionserge-sans-paille
Per https://llvm.org/docs/CodingStandards.html#include-as-little-as-possible this improves compilation time, while not being too intrusive on the codebase.
2025-09-15[AMDGPU] Add the support for `.cluster_dims` code object metadata (#158721)Shilei Tian
Co-authored-by: Ivan Kosarev <ivan.kosarev@amd.com>
2025-08-26NFC: remove some instances of deprecated capture (#154884)Jeremy Kun
``` warning: implicit capture of 'this' with a capture default of '=' is deprecated [-Wdeprecated-this-capture] ``` Co-authored-by: Jeremy Kun <j2kun@users.noreply.github.com>
2024-01-04[AMDGPU] Add dynamic LDS size implicit kernel argument to CO-v5 (#65273)Chaitanya
"hidden_dynamic_lds_size" argument will be added in the reserved section at offset 120 of the implicit argument layout. Add "isDynamicLDSUsed" flag to AMDGPUMachineFunction to identify if a function uses dynamic LDS. hidden argument will be added in below cases: - LDS global is used in the kernel. - Kernel calls a function which uses LDS global. - LDS pointer is passed as argument to kernel itself.
2023-12-03[llvm] Stop including map (NFC)Kazu Hirata
Identified with clangd.
2023-01-05[AMDGPU] Add .uniform_work_group_size metadata to v5Vang Thao
Amdgpu kernel with function attribute "uniform-work-group-size"="true" requires uniform work group size (i.e. each dimension of global size is a multiple of corresponding dimension of work group size). hipExtModuleLaunchKernel allows to launch HIP kernel with non-uniform workgroup size, which makes it necessary for runtime to check and enforce uniform workgroup size if kernel requires it. To let runtime be able to enforce that, this metadata is needed to indicate that the kernel requires uniform workgroup size. Reviewed By: kzhuravl, arsenm Differential Revision: https://reviews.llvm.org/D141012
2022-12-16[BinaryFormat] Use std::optional instead of llvm::Optional (NFC)Kazu Hirata
This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2022-12-13[AMDGPU] Add `.workgroup_processor_mode` to v5 MDPierre van Houtryve
Adds Workgroup Processor Mode (WGP) to the HSA Metadata for Code Object v5/GFX10+. The field is already present as an asm directive and in the compute program resource register but is also needed in the MD. Reviewed By: kzhuravl Differential Revision: https://reviews.llvm.org/D139931
2022-12-06[llvm] Don't include STLForwardCompat.h (NFC)Kazu Hirata
STLForwardCompat.h defines remove_cvref and remove_cvref_t. These source files use neither one of those.
2022-07-18[AMDGPU] Add the uses_dynamic_stack field to the kernel descriptor and the ↵Abinav Puthan Purayil
kernel metadata map This change introduces the dynamic stack boolean field to code-object-v3 and above under the code properties of the kernel descriptor and under the kernel metadata map of NT_AMDGPU_METADATA. This field corresponds to the is_dynamic_callstack field of amd_kernel_code_t. Differential Revision: https://reviews.llvm.org/D128344
2022-02-25[AMDGPU][NFC]: Emit metadata for hidden_heap_v1 kernargChangpeng Fang
Summary: Emit metadata for hidden_heap_v1 kernarg Reviewers: sameerds, b-sumner Fixes: SWDEV-307188 Differential Revision: https://reviews.llvm.org/D119027
2022-01-31AMDGPU {NFC}: Add code object v5 support and generate metadata for implicit ↵Changpeng Fang
kernel args Summary: Add code object v5 support (deafult is still v4) Generate metadata for implicit kernel args for the new ABI Set the metadata version to be 1.2 Reviewers: t-tye, b-sumner, arsenm, and bcahoon Fixes: SWDEV-307188, SWDEV-307189 Differential Revision: https://reviews.llvm.org/D118272
2022-01-26Cleanup headers for BinaryFormatserge-sans-paille
A few header removal, some forward declarations. As usual, this can break your build due to false dependencies, the most notable change are: - "llvm/BinaryFormat/AMDGPUMetadataVerifier.h" no longer includes "llvm/BinaryFormat/MsgPackDocument.h" The impact on generated preprocessed lines for LLVMBinaryFormat is pretty nice: $ clang++ -E -Iinclude -I../llvm/include ../llvm/lib/BinaryFormat/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l before this patch: 705281 after this patch: 751456 Discourse thread on the topic: https://llvm.discourse.group/t/include-what-you-use-include-cleanup
2021-12-11Use llvm::any_of and llvm::all_of (NFC)Kazu Hirata
2020-07-10AMDGPU: Remove .value_type from kernel metadataMatt Arsenault
This doesn't appear used for anything, and is emitted incorrectly based on the description. This also depends on the IR type, and pointee element type.
2020-02-29Avoid including FileSystem.h from MemoryBuffer.hReid Kleckner
Lots of headers pass around MemoryBuffer objects, but very few open them. Let those that do include FileSystem.h. Saves ~250 includes of Chrono.h & FileSystem.h: $ diff -u thedeps-before.txt thedeps-after.txt | grep '^[-+] ' | sort | uniq -c | sort -nr 254 - ../llvm/include/llvm/Support/FileSystem.h 253 - ../llvm/include/llvm/Support/Chrono.h 237 - ../llvm/include/llvm/Support/NativeFormatting.h 237 - ../llvm/include/llvm/Support/FormatProviders.h 192 - ../llvm/include/llvm/ADT/StringSwitch.h 190 - ../llvm/include/llvm/Support/FormatVariadicDetails.h ... This requires duplicating the file_t typedef, which is unfortunate. I sunk the choice of mapping mode down into the cpp file using variable template specializations instead of class members in headers.
2019-11-20[AMDGPU] add support for hostcall buffer pointer as hidden kernel argumentSameer Sahasrabuddhe
Hostcall is a service that allows a kernel to submit requests to the host using shared buffers, and block until a response is received. This will eventually replace the shared buffer currently used for printf, and repurposes the same hidden kernel argument. This change introduces a new ValueKind in the HSA metadata to represent the hostcall buffer. Differential Revision: https://reviews.llvm.org/D70038
2019-07-05[AMDGPU] Added a new metadata for multi grid sync implicit argumentYaxun Liu
Patch by Christudasan Devadasan. Differential Revision: https://reviews.llvm.org/D63886 llvm-svn: 365217
2019-03-13[AMDGPU] Switched HSA metadata to use MsgPackDocumentTim Renouf
Summary: MsgPackDocument is the lighter-weight replacement for MsgPackTypes. This commit switches AMDGPU HSA metadata processing to use MsgPackDocument instead of MsgPackTypes. Differential Revision: https://reviews.llvm.org/D57024 Change-Id: I0751668013abe8c87db01db1170831a76079b3a6 llvm-svn: 356081
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
2018-12-12[AMDGPU] Emit MessagePack HSA Metadata for v3 code objectScott Linder
Continue to present HSA metadata as YAML in ASM and when output by tools (e.g. llvm-readobj), but encode it in Messagepack in the code object. Differential Revision: https://reviews.llvm.org/D48179 llvm-svn: 348963