ANSHUMAN87 commented on a change in pull request #7267:
URL: https://github.com/apache/tvm/pull/7267#discussion_r563293629
##########
File path: python/tvm/relay/frontend/tensorflow.py
##########
@@ -941,9 +934,48 @@ def _impl(inputs, attr, params, mod):
(values_tensor, (rows, cols)),
shape=tuple(dense_shape_tensor.tolist())
)
+ # As per tensorflow implementation, we have 4 possible input
combination
+ # and the first input(A) is always sparse and second input(B) is
always dense.
+ # Case 1: A , B , adjoint_a=False, adjoint_b=False --> A * B
+ # Case 2: A , B , adjoint_a=True, adjoint_b=False --> A.T * B
+ # Case 3: A , B , adjoint_a=False, adjoint_b=True --> A * B.T
+ # Case 4: A , B , adjoint_a=True, adjoint_b=True --> (A.T * B.T).T
+ #
+ # Topi implementation for sparse_dense(matmul) has 2 possible input
+ # combination where first input(A) is always dense
+ # and second input(B) is always sparse.
+ # Case 1: A , B, sparse_lhs = False --> A * B.T
+ # Case 2: A , B, sparse_lhs = True --> B * A.T
+ #
+ # The mapping would be as below:
+ # TF Case 1: A , B , adjoint_a=False, adjoint_b=False
Review comment:
This part is already explained in the above comment section, it is
implicit. I think it is okay.
----------------------------------------------------------------
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]