[Mlir-commits] [mlir] [mlir][spirv] Ignore extra comma for category_args in gen_spirv_dialect.py (PR #111776)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Oct 9 18:00:16 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Caio Oliveira (cmarcelo)
<details>
<summary>Changes</summary>
In the code being parsed, the comma separates following traits from the category args. If there's no category args, it is still present.
---
Full diff: https://github.com/llvm/llvm-project/pull/111776.diff
1 Files Affected:
- (modified) mlir/utils/spirv/gen_spirv_dialect.py (+1)
``````````diff
diff --git a/mlir/utils/spirv/gen_spirv_dialect.py b/mlir/utils/spirv/gen_spirv_dialect.py
index 78c1022428d8a1..1d185876decd50 100755
--- a/mlir/utils/spirv/gen_spirv_dialect.py
+++ b/mlir/utils/spirv/gen_spirv_dialect.py
@@ -988,6 +988,7 @@ def extract_td_op_info(op_def):
op_tmpl_params, _ = get_string_between_nested(op_def, "<", ">")
opstringname, rest = get_string_between(op_tmpl_params, '"', '"')
category_args = rest.split("[", 1)[0]
+ category_args = category_args.rsplit(",", 1)[0]
# Get traits
traits, _ = get_string_between_nested(rest, "[", "]")
``````````
</details>
https://github.com/llvm/llvm-project/pull/111776
More information about the Mlir-commits
mailing list