Skip to content

Commit f63be70

Browse files
nmacchionifacebook-github-bot
authored andcommitted
fix tritonbench parser
Summary: this doesn't work if `--isolate` is the last arg Reviewed By: xuzhao9 Differential Revision: D65837725 fbshipit-source-id: f24728ddb63623d8beb339feec12b35ca635d491
1 parent eba50ab commit f63be70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tritonbench/utils/parser.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def _find_param_loc(params, key: str) -> int:
200200
def _remove_params(params, loc):
201201
if loc == -1:
202202
return params
203-
if params[loc + 1].startswith("--"):
203+
if (loc + 1) < len(params) and params[loc + 1].startswith("--"):
204204
return params[:loc] + params[loc + 1 :]
205205
return params[:loc] + params[loc + 2 :]
206206

0 commit comments

Comments
 (0)