-
Notifications
You must be signed in to change notification settings - Fork 33
Pass timer contexts in conditional SFNO #813
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
Conversation
|
These contexts are used more fully in the benchmarking branch #803, getting merged in parts. See that PR for an example plot of the timing split. |
Arcomano1234
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left 1 comment but it LGTM
| assert(x.shape[-1] == self.mmax) | ||
|
|
||
| with torch.autocast("cuda", enabled=False): | ||
| with timer.child("contraction"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you intend for both the SHT and ISHT to have the same contraction timer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of how child timers are nested, these are distinct timers, stored and plotted separately. But yes, I did intend the same name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that makes sense I didn't look too closely at the timers PR and just wanted to make sure
This PR updates the conditional sfno FourierNeuralOperatorBlock and its children to pass Timer contexts.
These will be used in a later PR to perform CUDA profiling. For now, they are added without breaking changes to the code.
Changes:
Updated conditional SFNO FourierNeuralOperatorBlock and its dependents to pass
timer: Timerarguments during forward pass and use them to record times during code segments.Tests added