Conversation
Implements tensornet warp kernels copied from materialyzeai/matgl#709 as originally implemented by @zubatyuk. To work with the warp kernels the tensornet code has been refactored to use shapes [N,3,3,F] instead of the original [N,F,3,3]. This change required reshaping of weights from models trained by previous code. Older checkpoints are currently auto-detected using the presence of the check-errors flag which was removed in a recent commit. The loading method can also be set with a new compatibility_load=True|False flag. If the warp kernels fail to load the pure torch functions will be used. These have been refactored to match the call signatures and shapes of the warp kernels. The speedup of the warp kernels is approximately 3x for inference and training
stefdoerr
reviewed
Mar 4, 2026
stefdoerr
approved these changes
Mar 4, 2026
Collaborator
stefdoerr
left a comment
There was a problem hiding this comment.
ah I see it was for compatibility load. Looks good
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.
Implements tensornet warp kernels copied from Accelerated TensorNet with NVIDIA Warp Kernels materialyzeai/matgl#709 as originally implemented by @zubatyuk.
To work with the warp kernels the tensornet code has been refactored to use shapes [N,3,3,F] instead of the original [N,F,3,3]. This change required reshaping of weights from models trained by previous code. Older checkpoints are currently auto-detected using the presence of the check-errors flag which was removed in a recent commit (6634490) . The loading method can also be set with a new compatibility_load=True or False flag.
If the warp kernels fail to load the pure torch functions will be used. These have been refactored to match the call signatures and shapes of the warp kernels.
The speedup of the warp kernels is approximately 3x for inference and training
Note that the neighborlist gets converted from a COO format into a CSR format. I have tested with static_shapes=True and neighborlist mode 'brute' which seems to work correctly but there is the potential for subtle bugs to be introduced when static shapes are used.