Conversation
Greptile SummaryThis PR extends natten (neighborhood attention) support from 2D-only to 1D, 2D, and 3D, exposes all three variants through Key changes:
Minor findings:
Important Files Changed
|
|
Hey @pzharrington - would it be possible to streamline the It looks like |
coreyjadams
left a comment
There was a problem hiding this comment.
Looks good! Approving, I don't want to hold this up! I think this works, I did make a suggestion that could make it easier to maintain long term, but I will leave it to you. I appreciate the work to make pyproject.toml managable. Such a pain with the installs...
I also like the addition of na1d and na3d in shard tensor (and in general!). We might advertise, in the docs, though not needed in this PR, that you could now use neighborhood attention layers and modules freely as building blocks with domain parallelism. Perhaps an update to the examples is in order! Let's do that next, though, not here, don't want to block you :)
|
/blossom-ci |
@coreyjadams yup this PR is just to get the ShardTensor and functional interfaces in place, next step is to move some of the attention layer modules into |
loliverhennigh
left a comment
There was a problem hiding this comment.
The natten is not in the FunctionSpec format but I can clean this up in a clean up PR I have for the functional unit tests.
|
/blossom-ci |
PhysicsNeMo Pull Request
Description
Extends support for 1D and 3D natten in addition to 2D, and exposes them in
nn.functional. The lightweight wrappers innn.functionalare used to more seamlessly supportShardTensorusage via theregister_function_handlerpattern (no more needing to importpartial_na2dfrom the natten patches file).This PR also pulls out the
nattendependency from thenn-extrasgroup into its own dedicated optional dependency group; uses the wheels they release against pinned torch+CUDA combos which is much faster than building natten each install.Checklist
Dependencies
Review Process
All PRs are reviewed by the PhysicsNeMo team before merging.
Depending on which files are changed, GitHub may automatically assign a maintainer for review.
We are also testing AI-based code review tools (e.g., Greptile), which may add automated comments with a confidence score.
This score reflects the AI’s assessment of merge readiness and is not a qualitative judgment of your work, nor is
it an indication that the PR will be accepted / rejected.
AI-generated feedback should be reviewed critically for usefulness.
You are not required to respond to every AI comment, but they are intended to help both authors and reviewers.
Please react to Greptile comments with 👍 or 👎 to provide feedback on their accuracy.