Skip to content

Commit

Permalink
Add --baseline flag to override baseline
Browse files Browse the repository at this point in the history
Summary: Per discussion in https://www.internalfb.com/diff/D58503025?transaction_fbid=1683162169162931

Reviewed By: xuzhao9, sijiac

Differential Revision: D58609789

fbshipit-source-id: 22701148ac1e1645c6dab40d1ef021a8e627a734
  • Loading branch information
int3 authored and facebook-github-bot committed Jun 15, 2024
1 parent 5831be0 commit 19ac876
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions torchbenchmark/util/triton_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,12 @@ def parse_args(
default=None,
help="Specify one or multiple operator implementations to run."
)
parser.add_argument(
"--baseline",
type=str,
default=None,
help="Override default baseline."
)
parser.add_argument(
"--num-inputs",
type=int,
Expand Down Expand Up @@ -451,6 +457,8 @@ def __init__(self, mode: str, device: str, extra_args: Optional[List[str]]=None)
self.DEFAULT_METRICS,
unprocessed_args
)
if self.tb_args.baseline:
BASELINE_BENCHMARKS[self.name] = self.tb_args.baseline
self.required_metrics = list(set(self.tb_args.metrics.split(",")))
self._only = _split_params_by_comma(self.tb_args.only)
self._input_id = self.tb_args.input_id
Expand Down

0 comments on commit 19ac876

Please sign in to comment.