[Mlir-commits] [mlir] [mlir][spirv] Make gen_spirv_dialect.py more precise when finding inst_category (PR #111777)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Oct 10 19:37:14 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 0bc02b999a9686ba240b7a68d3f1cbbf037d2170...5eda04f74868841eb2a29b71476f8644fcb8de32 mlir/utils/spirv/gen_spirv_dialect.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- gen_spirv_dialect.py 2024-10-11 02:33:07.000000 +0000
+++ gen_spirv_dialect.py 2024-10-11 02:36:45.374965 +0000
@@ -977,11 +977,12 @@
opname = opname[0]
# Get instruction category
prefix = "SPIRV_"
inst_category = [
- o[len(prefix) :] for o in re.findall(prefix + r"\w+Op\b", op_def.split(":", 1)[1])
+ o[len(prefix) :]
+ for o in re.findall(prefix + r"\w+Op\b", op_def.split(":", 1)[1])
]
assert len(inst_category) <= 1, "more than one ops in the same section!"
inst_category = inst_category[0] if len(inst_category) == 1 else "Op"
# Get category_args
``````````
</details>
https://github.com/llvm/llvm-project/pull/111777
More information about the Mlir-commits
mailing list