Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow benchmark runner config: openxla for inference runs. #5939

Merged
merged 3 commits into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ python xla/benchmarks/experiment_runner.py \
You can change the flags to add the configurations you are interested in. The
`experiment_runner.py` will expand the options to all supported configurations.
For example, in the case above, it will consider all the possible combinations
among the flags `--dynamo`, `--xla`, and `--test`, 4 of which are supported:
among the flags `--dynamo`, `--xla`, and `--test`, 5 of which are supported:

- `dynamo=openxla_eval`, `xla=PJRT`, `test=eval`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think you have to remove this line. It will still be 4 configs overall.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if I get why that is the case. Isn't the following combination supported in addition to the ones already specified in the readme?

  • dynamo=openxla, xla=PJRT, test=eval

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I misunderstand this change then. I thought you were getting rid of openxla_eval in favor of openxla. My thought was we'd have to remove dynamo=openxla_eval here.

- `dynamo=openxla`, `xla=PJRT`, `test=eval`
- `dynamo=openxla`, `xla=PJRT`, `test=train`
- `dynamo=inductor`, `xla=None`, `test=eval`
- `dynamo=inductor`, `xla=None`, `test=train`
Expand Down
3 changes: 1 addition & 2 deletions benchmarks/benchmark_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ def is_available(self, experiment_config):
if experiment_config["dynamo"] == "openxla_eval" and not (
experiment_config["xla"] and experiment_config["test"] == "eval"):
return False
if experiment_config["dynamo"] == "openxla" and not (
experiment_config["xla"] and experiment_config["test"] == "train"):
if experiment_config["dynamo"] == "openxla" and not experiment_config["xla"]:
return False
if (experiment_config["xla"] and
not is_xla_device_available(experiment_config["accelerator"].upper())):
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/experiment_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def parse_args(args=None):
"--collect-full-output",
action="store_true",
help="""Whether to collect full output for training. Set this to true if we
want to verify the numerical correctness of graidents. But that may
want to verify the numerical correctness of gradients. But that may
cause time measurement not accurate""",
)

Expand Down Expand Up @@ -557,13 +557,13 @@ def parse_args(args=None):
type=str,
default="./output/",
help="Directory specifying where to dump profiling information (summary, and trace)",
),
)

parser.add_argument(
"--profile-cuda-cpu-collect",
action="store_true",
help="Whether to collect CPU/GPU profiling information in the resulting file.",
),
)

parser.add_argument(
"--xla-flags",
Expand Down