ANSHUMAN87 commented on a change in pull request #6685:
URL: https://github.com/apache/incubator-tvm/pull/6685#discussion_r508247633
##########
File path: python/tvm/topi/cuda/sparse.py
##########
@@ -367,9 +367,14 @@ def _alter_sparse_dense_layout(_attrs, inputs, _tinfos,
_out_type):
and isinstance(inputs[2], relay.Constant)
and isinstance(inputs[3], relay.Constant)
):
- sparse_matrix = sp.bsr_matrix(
- (inputs[1].data.asnumpy(), inputs[2].data.asnumpy(),
inputs[3].data.asnumpy())
- )
+ if len(inputs[1].data.asnumpy().shape) == 1:
Review comment:
On paper, I totally agree with you. But when it comes to implementation,
it differs always. For example, your data representation, csr.data & bsr.data
has different way of representation. As i could remember, it was an error while
deducing R & C parameter from csr.data, and that is quite expected, as the
block size is not provided, it will deduce it from the input.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]