CoLA Sparse operator is not producing the same result as torch coo sparse #106
Unanswered
alireza78h
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently using CoLA version 0.0.6 (which seems uses COO format for Sparse operator) and PyTorch version 2.3.1, and I’ve encountered an issue when working with sparse matrices. I’ve noticed that I get inconsistent results when comparing the dense representations of sparse matrices created using torch.sparse_coo_tensor and CoLA's Sparse operator. Here's a simplified version of my code:
The issue arises when I compare the dense matrix representations of the CoLA sparse matrix and the PyTorch sparse matrix. The result of torch.isclose(...).all() is False, suggesting a mismatch between the two.
However, when I sort the row and column indices before creating the sparse matrix, the results match, as shown in this modified version:
I'm not sure why this is happening. I'm not sure if this is a bug or something I haven't understoond.
Beta Was this translation helpful? Give feedback.
All reactions