Skip to content

Commit 67c4857

Browse files
authored
[mlir][spirv] Ignore extra comma for category_args in gen_spirv_dialect.py (#111776)
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 04e876e commit 67c4857

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
@@ -989,6 +989,7 @@ def extract_td_op_info(op_def):
989989
op_tmpl_params, _ = get_string_between_nested(op_def, "<", ">")
990990
opstringname, rest = get_string_between(op_tmpl_params, '"', '"')
991991
category_args = rest.split("[", 1)[0]
992+
category_args = category_args.rsplit(",", 1)[0]
992993

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

0 commit comments

Comments
 (0)