Skip to content

Commit 33898e7

Browse files
committed
[mlir][spirv] Ignore extra comma for category_args in gen_spirv_dialect.py
In the code being parsed, the comma separates following traits from the category args. If there's no category args, it is still present.
1 parent 774893d commit 33898e7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mlir/utils/spirv/gen_spirv_dialect.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -988,6 +988,7 @@ def extract_td_op_info(op_def):
988988
op_tmpl_params, _ = get_string_between_nested(op_def, "<", ">")
989989
opstringname, rest = get_string_between(op_tmpl_params, '"', '"')
990990
category_args = rest.split("[", 1)[0]
991+
category_args = category_args.rsplit(",", 1)[0]
991992

992993
# Get traits
993994
traits, _ = get_string_between_nested(rest, "[", "]")

0 commit comments

Comments
 (0)