[Mlir-commits] [mlir] [mlir][gpu] Add metadata attributes for storing kernel metadata in GPU objects (PR #95292)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Aug 27 14:17:04 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r fd36a7b9443921a4aa571549543244c5f1c9b6f8...9eaaba1cbcaf2f579194cc553ee030c7ec12970b mlir/test/python/dialects/gpu/dialect.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- dialect.py 2024-08-27 21:11:45.000000 +0000
+++ dialect.py 2024-08-27 21:16:31.640334 +0000
@@ -55,10 +55,12 @@
# CHECK: #gpu.object<#nvvm.target, "//\0A// Generated by LLVM NVPTX Back-End\0A//\0A\0A.version 6.0\0A.target sm_50">
print(o)
assert o.object == object
object = b"BC\xc0\xde5\x14\x00\x00\x05\x00\x00\x00b\x0c0$MY\xbef"
- kernelTable = Attribute.parse("#gpu.kernel_table<[#gpu.kernel_metadata<\"kernel\", () -> ()>]>")
+ kernelTable = Attribute.parse(
+ '#gpu.kernel_table<[#gpu.kernel_metadata<"kernel", () -> ()>]>'
+ )
o = gpu.ObjectAttr.get(target, format, object, kernels=kernelTable)
# CHECK: #gpu.object<#nvvm.target, kernels = <[#gpu.kernel_metadata<"kernel", () -> ()>]>, "BC\C0\DE5\14\00\00\05\00\00\00b\0C0$MY\BEf">
print(o)
assert o.kernels == kernelTable
``````````
</details>
https://github.com/llvm/llvm-project/pull/95292
More information about the Mlir-commits
mailing list