Skip to content

Commit 81d9bf0

Browse files
JuthoCopilot
andcommitted
Fix treebraider calls in cache tests
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent 9bbb40d commit 81d9bf0

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎test/other/caches.jl‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ end
2525
V = GradedSpace{I}(labels[1] => 2, labels[2] => 2)
2626
W = V ⊗ V ← V ⊗ V
2727
p, levels = ((2, 1), (4, 3)), (1, 2, 3, 4)
28-
transformer = TensorKit.treebraider(Vector{Float64}, W, W, p, false, levels)
28+
twistmask = (false, false, false, false)
29+
transformer = TensorKit.treebraider(Vector{Float64}, W, W, p, false, levels, twistmask)
2930
for value in (sectorstructure(W), degeneracystructure(W), transformer)
3031
bytes = @constinferred MemoizationKit.cachesize(value)
3132
@test 0 < bytes <= Base.summarysize(value)
@@ -39,8 +40,8 @@ end
3940
# retain its own size budget even if the degeneracy cache has been cleared.
4041
MemoizationKit.set_cache_size!(TensorKit.treebraider, MemoizationKit.cachesize(transformer); by = MemoizationKit.cachesize)
4142
try
42-
TensorKit.treebraider(Vector{Float64}, W, W, p, false, levels)
43-
TensorKit.treebraider(Vector{Float64}, W, W, ((1, 2), (3, 4)), false, levels)
43+
TensorKit.treebraider(Vector{Float64}, W, W, p, false, levels, twistmask)
44+
TensorKit.treebraider(Vector{Float64}, W, W, ((1, 2), (3, 4)), false, levels, twistmask)
4445
MemoizationKit.empty_caches!(degeneracystructure)
4546
cache = only(MemoizationKit.cache_info(TensorKit.treebraider)).second
4647
stats = MemoizationKit.cache_stats(cache)
@@ -51,7 +52,7 @@ end
5152

5253
MemoizationKit.set_cache_size!(TensorKit.treebraider, 0; by = MemoizationKit.cachesize)
5354
@test isempty(cache)
54-
@test TensorKit.treebraider(Vector{Float64}, W, W, p, false, levels).data == transformer.data
55+
@test TensorKit.treebraider(Vector{Float64}, W, W, p, false, levels, twistmask).data == transformer.data
5556
@test isempty(cache)
5657
finally
5758
MemoizationKit.set_cache_size!(TensorKit.treebraider, 10_000)

0 commit comments

Comments
 (0)