Skip to content

[Relay][Frontend] SparseTensorDenseMatMul support for Tensorflow#6685

Merged
siju-samuel merged 4 commits intoapache:mainfrom
ANSHUMAN87:sparse-30
Nov 4, 2020
Merged

[Relay][Frontend] SparseTensorDenseMatMul support for Tensorflow#6685
siju-samuel merged 4 commits intoapache:mainfrom
ANSHUMAN87:sparse-30

Conversation

@ANSHUMAN87
Copy link
Copy Markdown
Contributor

SparseTensorDenseMatMul support added for Tensorflow frontend.

@ANSHUMAN87
Copy link
Copy Markdown
Contributor Author

@FrozenGene , @siju-samuel , @kevinthesun : please help review. Thanks!

@ANSHUMAN87
Copy link
Copy Markdown
Contributor Author

Looks like Tensorflow version in CI is older, may be we need to bump it!!!

@jroesch
Copy link
Copy Markdown
Member

jroesch commented Oct 16, 2020

cc @tkonolige

Comment thread python/tvm/relay/frontend/tensorflow.py Outdated
Comment thread python/tvm/relay/frontend/tensorflow.py Outdated
Comment thread python/tvm/relay/frontend/tensorflow.py
Comment thread tests/python/frontend/tensorflow/test_forward.py Outdated
Comment thread tests/python/frontend/tensorflow/test_forward.py Outdated
Comment thread tests/python/frontend/tensorflow/test_forward.py
Comment thread python/tvm/topi/cuda/sparse.py
Comment thread python/tvm/relay/frontend/tensorflow.py

# Create Numpy sparse Tensor(CSR)
weight_sp = sparse.csr_matrix(
(values_tensor, (rows, cols)), shape=tuple(dense_shape_tensor.tolist())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you swap rows and columns here you can avoid the sparse transpose below. This probably isn't much of a performance hit except for large matrices.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I totally agree with your comment, but as this PR is just an initial PR, i feel lets keep the code as it is, it provides better readability in terms of steps involved, later on, once all features are merged, we can work together to optimize it 🙂
Please let me know, in case you think otherwise!

@ANSHUMAN87
Copy link
Copy Markdown
Contributor Author

Gentle ping @tkonolige , @siju-samuel , Thanks!

Copy link
Copy Markdown
Contributor

@tkonolige tkonolige left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look pretty good to me. Just one change I think should be done.

What is the current review policy on TODO's in the code? Are they supposed to be tagged with a username?

Comment thread python/tvm/relay/frontend/tensorflow.py Outdated
Comment thread python/tvm/topi/cuda/sparse.py
@ANSHUMAN87
Copy link
Copy Markdown
Contributor Author

Look pretty good to me. Just one change I think should be done.

What is the current review policy on TODO's in the code? Are they supposed to be tagged with a username?

I am already working on it. Will tag with my id here!

@ANSHUMAN87
Copy link
Copy Markdown
Contributor Author

@tkonolige : I think all your comments are addressed now! Please check and approve. Thanks!

Copy link
Copy Markdown
Contributor

@tkonolige tkonolige left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. (I'm not an official reviewer, so you'll need someone else to approve it).

Copy link
Copy Markdown
Member

@siju-samuel siju-samuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@siju-samuel siju-samuel merged commit 0c02780 into apache:main Nov 4, 2020
@siju-samuel
Copy link
Copy Markdown
Member

Thanks @ANSHUMAN87 @tkonolige This PR is merged.
@ANSHUMAN87 please follow up the TODOs..

trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Dec 2, 2020
…che#6685)

* [Relay][Frontend] SparseTensorDenseMatMul support for Tensorflow

* Lint error resolved

* [1] Review comments handled

* [2] Review comments handled
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Dec 4, 2020
…che#6685)

* [Relay][Frontend] SparseTensorDenseMatMul support for Tensorflow

* Lint error resolved

* [1] Review comments handled

* [2] Review comments handled
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Dec 4, 2020
…che#6685)

* [Relay][Frontend] SparseTensorDenseMatMul support for Tensorflow

* Lint error resolved

* [1] Review comments handled

* [2] Review comments handled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants