Pass timer contexts in conditional SFNO#813
Merged
Conversation
Contributor
Author
|
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
approved these changes
Feb 10, 2026
Contributor
Arcomano1234
left a comment
There was a problem hiding this comment.
Left 1 comment but it LGTM
| assert(x.shape[-1] == self.mmax) | ||
|
|
||
| with torch.autocast("cuda", enabled=False): | ||
| with timer.child("contraction"): |
Contributor
There was a problem hiding this comment.
Did you intend for both the SHT and ISHT to have the same contraction timer?
Contributor
Author
There was a problem hiding this comment.
Because of how child timers are nested, these are distinct timers, stored and plotted separately. But yes, I did intend the same name.
Contributor
There was a problem hiding this comment.
I see that makes sense I didn't look too closely at the timers PR and just wanted to make sure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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