Skip to content

NVFuser microbenchmarks and filtering tool #793

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

Closed

Conversation

davidberard98
Copy link
Contributor

@davidberard98 davidberard98 commented Mar 12, 2022

davidberard98 added a commit that referenced this pull request Mar 12, 2022
ghstack-source-id: 6a88815
Pull Request resolved: #793
davidberard98 added a commit that referenced this pull request Mar 12, 2022
ghstack-source-id: 9f6c265
Pull Request resolved: #793
davidberard98 added a commit that referenced this pull request Mar 14, 2022
ghstack-source-id: d550326
Pull Request resolved: #793
@davidberard98 davidberard98 requested a review from eellison March 14, 2022 22:13
import time


# TODO - a lot of this was copied from pytorch/jit/scripts/log_extract.py, should we put it somewhere in torch? (and where?)
Copy link
Contributor

Choose a reason for hiding this comment

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

why cant we just use that directly ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eellison is there a way to import from pytorch/scripts/jit/log_extract.py? I was planning to move move some of the functions from log_extract.py into somewhere like torch.testing so we could import it

@davidberard98 davidberard98 changed the title [WIP] NVFuser microbenchmarks and filtering tool NVFuser microbenchmarks and filtering tool Mar 14, 2022
return graph


def compress_graph(graph):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eellison this is the script which can be used to reduce the number of fusion groups

import time


# TODO - a lot of this was copied from pytorch/jit/scripts/log_extract.py, should we put it somewhere in torch? (and where?)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eellison is there a way to import from pytorch/scripts/jit/log_extract.py? I was planning to move move some of the functions from log_extract.py into somewhere like torch.testing so we could import it

def run():
parser = argparse.ArgumentParser(description="Run nvfuser microbenchmarks")
parser.add_argument("--filter", nargs="*", default=[], help='List of benchmarks to test')
parser.add_argument("--fusers", nargs="*", default=[], help='List of fusers to run tests on (options include "no_fuser", "fuser0", "fuser1", "fuser2")')
Copy link
Contributor

@xuzhao9 xuzhao9 Mar 16, 2022

Choose a reason for hiding this comment

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

You can use choices=['no_fuser', 'fuser0', 'fuser1', 'fuser2'] to enumerate possible options.

@davidberard98 davidberard98 marked this pull request as ready for review March 16, 2022 00:23
@davidberard98
Copy link
Contributor Author

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

@davidberard98 davidberard98 requested a review from xuzhao9 March 16, 2022 21:11
Copy link
Contributor

@xuzhao9 xuzhao9 left a comment

Choose a reason for hiding this comment

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

LGTM. I will make some changes after merging this to make it work better for other customers.

davidberard98 added a commit that referenced this pull request Mar 17, 2022
ghstack-source-id: 15605a1
Pull Request resolved: #793
@davidberard98
Copy link
Contributor Author

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

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.

4 participants