Skip to content

Add sketch of new Tensor interface#2457

Open
dennisYatunin wants to merge 5 commits intomainfrom
dy/tensors
Open

Add sketch of new Tensor interface#2457
dennisYatunin wants to merge 5 commits intomainfrom
dy/tensors

Conversation

@dennisYatunin
Copy link
Copy Markdown
Member

This PR refactors the Geometry module 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.

  • Code follows the style guidelines OR N/A.
  • Unit tests are included OR N/A.
  • Code is exercised in an integration test OR N/A.
  • Documentation has been added/updated OR N/A.

@dennisYatunin dennisYatunin force-pushed the dy/tensors branch 23 times, most recently from d1c85a9 to dc71352 Compare February 21, 2026 03:40
@dennisYatunin dennisYatunin force-pushed the dy/tensors branch 6 times, most recently from 271e3cd to 1f8a383 Compare February 25, 2026 06:57
Copy link
Copy Markdown
Member Author

@dennisYatunin dennisYatunin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread test/runtests.jl Outdated
Comment thread test/Spaces/opt_spaces.jl Outdated
Comment thread test/Operators/finitedifference/tensor.jl Outdated
Comment thread test/MatrixFields/gpu_compat_bidiag_matrix_row.jl Outdated
Comment thread test/Geometry/tensor_conversion_benchmarks.jl Outdated
Comment thread src/Geometry/localgeometry.jl Outdated
Comment thread src/Geometry/rmul_with_projection.jl Outdated
Comment thread src/Grids/spectralelement.jl Outdated
Comment thread src/Operators/finitedifference.jl Outdated
Comment thread src/Spaces/pointspace.jl Outdated
@nefrathenrici nefrathenrici force-pushed the dy/tensors branch 13 times, most recently from 966abfc to 772a7fa Compare April 30, 2026 00:32
@nefrathenrici nefrathenrici marked this pull request as ready for review April 30, 2026 00:32
@nefrathenrici nefrathenrici force-pushed the dy/tensors branch 2 times, most recently from b6c3879 to b9f7f37 Compare April 30, 2026 19:40
@nefrathenrici nefrathenrici force-pushed the dy/tensors branch 3 times, most recently from cbda5a6 to d22ecae Compare May 1, 2026 19:35
@nefrathenrici nefrathenrici force-pushed the dy/tensors branch 3 times, most recently from c0c36ea to 9c066c5 Compare May 1, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants