summaryrefslogtreecommitdiff
path: root/mlir/lib/CAPI/Dialect/GPU.cpp
AgeCommit message (Collapse)Author
2024-08-27[mlir][gpu] Add metadata attributes for storing kernel metadata in GPU ↵Fabian Mora
objects (#95292) This patch adds the `#gpu.kernel_metadata` and `#gpu.kernel_table` attributes. The `#gpu.kernel_metadata` attribute allows storing metadata related to a compiled kernel, for example, the number of scalar registers used by the kernel. The attribute only has 2 required parameters, the name and function type. It also has 2 optional parameters, the arguments attributes and generic dictionary for storing all other metadata. The `#gpu.kernel_table` stores a table of `#gpu.kernel_metadata`, mapping the name of the kernel to the metadata. Finally, the function `ROCDL::getAMDHSAKernelsELFMetadata` was added to collect ELF metadata from a binary, and to test the class methods in both attributes. Example: ```mlir gpu.binary @binary [#gpu.object<#rocdl.target<chip = "gfx900">, kernels = #gpu.kernel_table<[ #gpu.kernel_metadata<"kernel0", (i32) -> (), metadata = {sgpr_count = 255}>, #gpu.kernel_metadata<"kernel1", (i32, f32) -> (), arg_attrs = [{llvm.read_only}, {}]> ]> , bin = "BLOB">] ``` The motivation behind these attributes is to provide useful information for things like tunning. --------- Co-authored-by: Mehdi Amini <joker.eph@gmail.com>
2024-06-24[mlir][gpu] Add py binding for AsyncTokenType (#96466)Guray Ozen
The PR adds py binding for `AsyncTokenType`
2024-04-18[mlir][python] add binding to `#gpu.object` (#88992)Maksim Levental
2022-06-09[mlir][gpu] Move GPU headers into IR/ and Transforms/Mogball
Depends on D127350 Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D127352
2021-04-28[mlir][python] Add basic python support for GPU dialect and passesNicolas Vasilache
Differential Revision: https://reviews.llvm.org/D101449