|
25 | 25 | V = GradedSpace{I}(labels[1] => 2, labels[2] => 2) |
26 | 26 | W = V ⊗ V ← V ⊗ V |
27 | 27 | 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) |
29 | 30 | for value in (sectorstructure(W), degeneracystructure(W), transformer) |
30 | 31 | bytes = @constinferred MemoizationKit.cachesize(value) |
31 | 32 | @test 0 < bytes <= Base.summarysize(value) |
|
39 | 40 | # retain its own size budget even if the degeneracy cache has been cleared. |
40 | 41 | MemoizationKit.set_cache_size!(TensorKit.treebraider, MemoizationKit.cachesize(transformer); by = MemoizationKit.cachesize) |
41 | 42 | 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) |
44 | 45 | MemoizationKit.empty_caches!(degeneracystructure) |
45 | 46 | cache = only(MemoizationKit.cache_info(TensorKit.treebraider)).second |
46 | 47 | stats = MemoizationKit.cache_stats(cache) |
|
51 | 52 |
|
52 | 53 | MemoizationKit.set_cache_size!(TensorKit.treebraider, 0; by = MemoizationKit.cachesize) |
53 | 54 | @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 |
55 | 56 | @test isempty(cache) |
56 | 57 | finally |
57 | 58 | MemoizationKit.set_cache_size!(TensorKit.treebraider, 10_000) |
|
0 commit comments