File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
iree_kernel_benchmark/gemmbench Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,11 @@ def compile_gemm(
75
75
help = "Regular expression for allowed benchmark tags. Defaults to all tags allowed." ,
76
76
default = ".*" ,
77
77
)
78
+ parser .add_argument (
79
+ "--config_regex" ,
80
+ help = "Regular expression for allowed benchmark configurations. Defaults to all allowed." ,
81
+ default = ".*" ,
82
+ )
78
83
parser .add_argument (
79
84
"--roofline" ,
80
85
help = "Comma separated csv file list to generate roofline plot with" ,
@@ -130,6 +135,7 @@ def compile_gemm(
130
135
requested_dtypes ,
131
136
requested_variants ,
132
137
args .tag_regex ,
138
+ args .config_regex ,
133
139
args .raw_accumulators ,
134
140
)
135
141
print (f"Generated { len (configs )} gemm configs." )
Original file line number Diff line number Diff line change @@ -1114,9 +1114,11 @@ def get_matching_configs(
1114
1114
dtypes : list [str ],
1115
1115
variants : list [str ],
1116
1116
tag_regex : str ,
1117
+ config_regex : str ,
1117
1118
raw_accumulators : bool ,
1118
1119
) -> list [tuple [str , GemmConfig ]]:
1119
1120
tag_re = re .compile (tag_regex )
1121
+ config_re = re .compile (config_regex )
1120
1122
matching_configs : list [tuple [str , GemmConfig ]] = []
1121
1123
for tag , config in tagged_configs :
1122
1124
if config .operand_element_type not in dtypes :
@@ -1125,6 +1127,8 @@ def get_matching_configs(
1125
1127
continue
1126
1128
if not tag_re .match (tag ):
1127
1129
continue
1130
+ if not config_re .match (config .get_name ()):
1131
+ continue
1128
1132
# The raw_accumulators arg means "test configs where the result element
1129
1133
# type is different from what it would be in the default mode".
1130
1134
# We can't just test for (result_element_type == accumulator_element_type),
You can’t perform that action at this time.
0 commit comments