3 ms·
The paper also talks about reordering matrix multiplications by automatically adding parentheses (despite the fact that floating point multiplication is non-ass
by fyp 7y ago
The paper also talks about reordering matrix multiplications by automatically adding parentheses (despite the fact that floating point multiplication is non-associative).
Is there a way to achieve this in Julia? If not what syntax might you introduce to do it? You can't really annotate just the matrices or multiplication operators since you are optimizing a whole expression.
- ChrisRackauckas 7y agoNeeds an update, but https://github.com/AustinPrivett/MatrixChainMultiply.jl https://github.com/AustinPrivett/MatrixChainMultiply.jl does it. Could probably be handled more automatically.
- photon-torpedo 7y agoMatrix chain multiplication can be seen a special case of tensor contraction, and the https://github.com/Jutho/TensorOperations.jl https://github.com/Jutho/TensorOperations.jl package has an implementation which tries to optimize the contraction order (macro @tensoropt).