Add sketch of new Tensor interface#2457
Open
dennisYatunin wants to merge 5 commits intomainfrom
Open
Conversation
d1c85a9 to
dc71352
Compare
271e3cd to
1f8a383
Compare
dennisYatunin
commented
Apr 24, 2026
Member
Author
dennisYatunin
left a comment
There was a problem hiding this comment.
This is looking pretty great! My main comments are that we should avoid allowing tensor adjoints to be specified in two different ways, and that a lot of the code remaining in conversions.jl can be simplified or eliminated. Also, it would be helpful to add detailed docstrings for Basis, Metric, Tensor, and TensorWithAnyBasis, with some examples that indicate how reshape works and when it gets called.
966abfc to
772a7fa
Compare
b6c3879 to
b9f7f37
Compare
cbda5a6 to
d22ecae
Compare
c0c36ea to
9c066c5
Compare
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 refactors the
Geometrymodule to use a much simpler interface, so that all vector/tensor operations can expressed using standard math operations instead of custom API functions. This will allow us to remove a large amount of duplicate code, reduce compilation latency, and speed up GPU runs by optimizing the geometry data passed to each kernel.