-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
similar
does not work if storagetype is a PtrArray
#194
Comments
Thanks for reporting this; this is definitely an oversight and unintentional. We will try to fix asap (and include it in our tests). |
@Qiaoyi-Li , could you possibly provide a more high-level example that illustrates where the call to |
Sure. using TensorKit
using TensorKit.TensorOperations: ManualAllocator
A = randn(Rep[U₁ × SU₂]((0, 0)=>1) ⊗ Rep[U₁ × SU₂]((0, 1/2)=>1, (1, 0)=>1, (-1, 0)=>1), Rep[U₁ × SU₂]((0, 1/2)=>1, (1, 0)=>1, (-1, 0)=>1) ⊗ Rep[U₁ × SU₂]((0, 0)=>1))
B = randn(Rep[U₁ × SU₂]((0, 0)=>1), Rep[U₁ × SU₂]((0, 0)=>1))
C = randn((Rep[U₁ × SU₂]((0, 0)=>1, (0, 1)=>1, (1, 1/2)=>2, (-1, 1/2)=>2) ⊗ Rep[U₁ × SU₂]((0, 1/2)=>1, (1, 0)=>1, (-1, 0)=>1)), Rep[U₁ × SU₂]((0, 1/2)=>1, (1, 0)=>1, (-1, 0)=>1))
@tensor allocator = ManualAllocator() D[b g f; h d] := ((A[b c d e] * B[e f]) * C[g h c]) This is the case that triggers this error in my code. |
It seems that TensorKit.jl v0.14.1 is currently not well compatible with TensorOperations.jl. I try to use the new feature
allocator = ManualAllocator()
to decrease the memory pressure, which however results in an error in certain cases. The error is finally due to asimilar
call in@tensor
macro, when a permutation is needed. Below is a minimal code example to reproduce the error:Temporarily, I add a constructor
to make my code continue running. Since there is not a
tensorfree!
for this tensor in@tensor
, I construct a common tensor to avoid potential memory leaks. Is this necessary?Any suggestions on the temporary solution would be greatly appreciated. I also hope the future version of TensorKit.jl can provide an official one to fix this issue.
The text was updated successfully, but these errors were encountered: