You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/01/20 15:51:28 UTC

[GitHub] [tvm] ANSHUMAN87 commented on a change in pull request #7308: [FIX] Infer input shape in sparse_dense_padded's alter_op if one does not exist

ANSHUMAN87 commented on a change in pull request #7308:
URL: https://github.com/apache/tvm/pull/7308#discussion_r561071940



##########
File path: python/tvm/topi/cuda/sparse.py
##########
@@ -295,7 +295,14 @@ def is_valid_for_sparse_dense_padded(data, weight_data):
     """
     # pylint:disable=invalid-name
     warp_size = int(tvm.target.Target.current(allow_none=False).thread_warp_size)
-    m = get_const_tuple(data.checked_type.shape)[1]
+    # If there are multiple alter_ops in a model, the first alteration does not
+    # run type inference for the subsequent ones. In this case, we don't have
+    # the shape information, so we run the inferencer manually.
+    try:

Review comment:
       Is it possible to do it without try catch ?




----------------------------------------------------------------
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:
users@infra.apache.org