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

Free loops dominated by summation loops requires merging with result #73

Open
fredrikbk opened this issue May 16, 2017 · 1 comment
Open
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@fredrikbk
Copy link
Contributor

fredrikbk commented May 16, 2017

The current lowering implementation does not support iteration graphs where both a summation variable dominates a free variable and the output is sparse (meaning we must merge with it). Sparse matrix multiplication where both inputs follow the same direction (e.g. CSR or CSC) suffers from this.

The issue with this is that the dominating summation loop causes locations in the output to be visited multiple times. If the output is sparse this means we have to do a (disjunctive) merge with the output. For assembly this means merging the operand index vectors into the result.

Another solution is to use a random access data structure that we can accumulate values into. This is sometimes called a workspace and other times a sparse accumulator. This is phrased as vertex splitting in the iteration graph.

@fredrikbk fredrikbk added the bug Indicates an unexpected problem or unintended behavior label May 16, 2017
@fredrikbk
Copy link
Contributor Author

The Kronecker product with a sparse result is also affected by this. See the test @Lugatod added in 4ce3583.

@fredrikbk fredrikbk changed the title Sparse Matrix Multiplication Free loops dominated by summation loops requires merging with result Jun 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant