You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 558f527
Browse filesBrowse the repository at this point in the historyBrowse files
Convert twist indices to a mask and forward backend/allocator in AD rules
Follow-up to the review comments on #599:
- `twist`/`twist!` convert `inds` to an `NTuple{numind, Bool}` mask on entry,
dispatching to a mask method, which also removes the ambiguity workaround in
`spacecheck_transform` and lets tensors accept a mask like fusion trees do.
- Enzyme and Mooncake rules for `permute!`/`transpose!`/`braid!`/`twist!`
forward `backend` and `allocator` to the intermediate out-of-place call,
which now also always copies.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/src/Changelog.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ When releasing a new version, move the "Unreleased" changes to a new version sec
28
28
29
29
### Changed
30
30
31
+
-`twist` and `twist!` on tensors also accept a `Bool` mask over all indices, like the fusion tree `twist`; any collection of indices is converted to such a mask first, so the rest of the implementation is compiled once per number of indices
31
32
-`planartrace!` precomputes and caches a `TraceTransformer` with the subblock positions and recoupling coefficients, and executes it with a kernel shared by all sectortypes, analogous to the index manipulations; `planar_trace` is now also defined for `FusionTreeBlock`s, and GPU tensors use a dedicated kernel (internal)
32
33
- Caching is provided by [MemoizationKit.jl](https://github.com/QuantumKitHub/MemoizationKit.jl), which can inspect, resize and configure TensorKit's caches, also by memory size; this replaces the internal `@cached` machinery and the LRUCache.jl dependency
33
34
@@ -37,6 +38,9 @@ When releasing a new version, move the "Unreleased" changes to a new version sec
37
38
38
39
### Fixed
39
40
41
+
- The Enzyme and Mooncake rules of `permute!`, `transpose!`, `braid!` and `twist!` forward the `backend` and `allocator` to the intermediate out-of-place call, which now also always copies
42
+
-`twist` of a fusion tree pair or block throws for a `Bool` mask of the wrong length, instead of interpreting it as indices
43
+
40
44
### Performance
41
45
42
46
-`twist!` and `twist` on a `TensorMap`, a `DiagonalTensorMap` or their adjoints use a cached tree transformer and the index manipulation kernel instead of a loop over all fusion trees, which removes the per-subblock bookkeeping and turns a twist of a GPU tensor, diagonal or not, into a single kernel launch ([#595](https://github.com/QuantumKitHub/TensorKit.jl/issues/595))
0 commit comments