Open qnzhou opened 6 years ago
Hi @qnzhou! I'm thrilled you're finding taco easy to use!
This is a cool problem that's come up in different variants in QCD and in optimizing expressions. You need to combine coordinates in some tensor dimension indexings, something like C(i x j, k x l) = A(i,j) * B(k,l)
. Building this into the code generator is in our roadmap, but tricky and will take some time.
An alternative solution we can have for you much quicker, is to provide a reshape routine. This has a performance cost since we have to move data, but perhaps that is acceptable. The first implementation could perhaps be implemented in C++
as follows:
Would this work for you? That is, what are your performance requirements?
Thanks Fredrik! The reshape approach works. I am not too worried about the performance at the moment.
Great, we'll figure out how to get it done as well as a timeline on our side then. We have meetings today so we should know more by tomorrow.
@qnzhou I'm experiencing the same problem with a Sparse matrix-vector multiplication with the matrix in BCSR format (4th order tensor). The output is a matrix instead of a vector. Is there a possibility of sharing your piece of code to perform this task? so I can just look it up and modify and put into my code. Thanks
I don't have any code to perform this task that works with taco, but I think it is on the todo list of the development team.
Hi, I've been working on a new lowering framework that will include coordinate combining, so it's definitely on our list.
The eta for this is August. @ofmla do you need the BCSR multiplication to go directly to a vector, or is a temporary data copy step acceptable to you?
The result mapped into a vector would be ideal but I can work on a matrix. Could I do a copy to a vector after just by using a loop and playing with indices right?
Hi, it has been a while since the opening of this issue. I wonder what is the status of supporting kronecker product or the reshape routine in taco? Thanks!
Hi there,
I am new to taco, but it has been amazingly easy to use so far. I am wondering if there is support for Kronecker product of matrices. e.g.
While the following is possible:
But the output needs to be a matrix instead of a 4th order tensor because it will be fed into a sparse solver. Is there any way of reshaping or flattening a tensor?