Skip to content

Commit

Permalink
fix tritonbench parser
Browse files Browse the repository at this point in the history
Summary: this doesn't work if `--isolate` is the last arg

Reviewed By: xuzhao9

Differential Revision: D65837725

fbshipit-source-id: f24728ddb63623d8beb339feec12b35ca635d491
  • Loading branch information
nmacchioni authored and facebook-github-bot committed Nov 13, 2024
1 parent eba50ab commit f63be70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tritonbench/utils/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def _find_param_loc(params, key: str) -> int:
def _remove_params(params, loc):
if loc == -1:
return params
if params[loc + 1].startswith("--"):
if (loc + 1) < len(params) and params[loc + 1].startswith("--"):
return params[:loc] + params[loc + 1 :]
return params[:loc] + params[loc + 2 :]

Expand Down

0 comments on commit f63be70

Please sign in to comment.