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

fix: Wrap perf benchmarks with no_grad #2466

Merged
merged 3 commits into from
Nov 15, 2023

Conversation

gs-olive
Copy link
Collaborator

@gs-olive gs-olive commented Nov 14, 2023

  • Benchmark script fix
  • torch.compile requires no_grad even during the initial compilation phase to avoid adding backward-pass instrumentation to the model

@gs-olive gs-olive requested a review from peri044 November 14, 2023 20:25
@gs-olive gs-olive added the WIP Work is in progress, pull request should not be merged yet label Nov 14, 2023
- Each benchmark is its own Python process
- All runners default to FP16
@gs-olive gs-olive removed the WIP Work is in progress, pull request should not be merged yet label Nov 14, 2023
Copy link
Collaborator

@peri044 peri044 left a comment

Choose a reason for hiding this comment

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

LGTM

tools/perf/perf_run.py Outdated Show resolved Hide resolved
@gs-olive gs-olive requested a review from peri044 November 15, 2023 00:53
@gs-olive gs-olive force-pushed the gradient_fix_benchmarks branch from 38bd3b7 to 813815d Compare November 15, 2023 01:12
@gs-olive gs-olive merged commit 4da330d into pytorch:main Nov 15, 2023
@gs-olive gs-olive deleted the gradient_fix_benchmarks branch November 15, 2023 01:20
gs-olive added a commit that referenced this pull request Nov 15, 2023
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