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

Port pytorch/benchmarks/dynamo to the dynamo userbenchmark #1826

Closed
wants to merge 2 commits into from

Conversation

xuzhao9
Copy link
Contributor

@xuzhao9 xuzhao9 commented Aug 16, 2023

Copy the code from https://github.com/pytorch/pytorch/tree/main/benchmarks/dynamo to make it as a torchbench userbenchmark.
Need to refactor the code to work on pytorch nightly release.

Test plan:

$ python run_benchmark.py dynamo --performance --only resnet50 --training
WARNING:userbenchmark.dynamo.common:torch.cuda.is_available() == False, using CPU
loading model: 0it [00:18, ?it/s]
cpu  train resnet50
 15/ 16 +1 frames  -2s 12 graphs  3 graph calls  231/ 581 =  40% ops  32% time
$ python run_benchmark.py dynamo --performance --only resnet50 --training
loading model: 0it [00:06, ?it/s]
cuda train resnet50
 22/ 22 +0 frames   2s  4 graphs  4 graph calls  233/ 586 =  40% ops  51% time

@FindHao
Copy link
Member

FindHao commented Aug 16, 2023

For now, it only works with --only model_name, right? How can we run all models with this userbenchmark?

@xuzhao9
Copy link
Contributor Author

xuzhao9 commented Aug 16, 2023

@FindHao
Yes, it could iterate through all models, just remove the --only argument.

@xuzhao9 xuzhao9 requested a review from ezyang August 16, 2023 20:35
@facebook-github-bot
Copy link
Contributor

@xuzhao9 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Copy link
Member

@FindHao FindHao left a comment

Choose a reason for hiding this comment

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

Only serveral models failed the testing for training. Here is the log. run_log.txt
LGTM!

@xuzhao9
Copy link
Contributor Author

xuzhao9 commented Aug 17, 2023

It is fine, we can fix them when dynamo team is really using this.

@facebook-github-bot
Copy link
Contributor

@xuzhao9 merged this pull request in ee5266b.

@xuzhao9 xuzhao9 deleted the xz9/port-dynamo-bench branch August 17, 2023 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants