Skip to content
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

[TensorAlgebra] [BUG] TensorAlgebra.blockedperm does not handle empty tuple correctly #1458

Closed
ogauthe opened this issue May 23, 2024 · 3 comments
Labels
bug Something isn't working NDTensors Requires changes to the NDTensors.jl library.

Comments

@ogauthe
Copy link
Contributor

ogauthe commented May 23, 2024

using NDTensors.TensorAlgebra: TensorAlgebra
p1 = TensorAlgebra.blockedperm((),(2,1))
p2 = TensorAlgebra.blockedperm((),())
println(typeof(p1))
println(typeof(p2))
NDTensors.TensorAlgebra.BlockedPermutation{1, 2, Tuple{Tuple{Int64, Int64}}}
NDTensors.TensorAlgebra.BlockedPermutation{0, false, Tuple{}}

When both should be subtypes of NDTensors.TensorAlgebra.BlockedPermutation{2}

We previously discussed about removing this type and replacing it with a Tuple{Tuple} type. We need to decide whether to fix this or refactor the type.

@ogauthe ogauthe added bug Something isn't working NDTensors Requires changes to the NDTensors.jl library. labels May 23, 2024
@mtfishman
Copy link
Member

Thanks for the report, should be easy to fix.

@mtfishman
Copy link
Member

Seems like fixing this breaks some of the contract code since it is implicitly depending on this logic. I think some of the logic handling corner cases of fully contracted tensors is a bit misdesigned (related to #1428) so this will need to be fixed in conjunction with rewriting that logic.

@ogauthe
Copy link
Contributor Author

ogauthe commented May 29, 2024

fixed by #1459

@ogauthe ogauthe closed this as completed May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working NDTensors Requires changes to the NDTensors.jl library.
Projects
None yet
Development

No branches or pull requests

2 participants