AndrewZhaoLuo commented on code in PR #11047:
URL: https://github.com/apache/tvm/pull/11047#discussion_r854787543


##########
python/tvm/relay/frontend/onnx.py:
##########
@@ -1203,11 +1203,14 @@ def _impl_v1(cls, inputs, attr, params):
 
     @classmethod
     def _impl_v5(cls, inputs, attr, params):
+        allowzero = False

Review Comment:
   suggest attr.get('allowzero', False)



##########
tests/python/contrib/test_cmsisnn/utils.py:
##########
@@ -290,7 +290,7 @@ def generate_ref_data_tflite(model):
 
 
 def create_conv2d_tflite_model(ifm_shape, kernel_shape, strides, dilation, 
padding, activation):
-    """ This method prepares TFlite graph with a single Conv2d layer """

Review Comment:
   probably undo this change to not gum up the commit log



##########
python/tvm/script/tir/__init__.pyi:
##########
@@ -226,6 +226,7 @@ def alloc_buffer(
 """
 special_stmt - Reads/Writes
 """
+

Review Comment:
   probably undo this change to not gum up the commit log



##########
python/tvm/relay/op/dyn/_transform.py:
##########
@@ -45,12 +45,15 @@ def _reshape_shape_func_input_data(data_shape, newshape, 
ndim):
     for i in const_range(len(newshape)):
         if skip > 0:
             skip -= 1
-        elif newshape[i] > 0:
+        elif newshape[i] >= 0:
             out[dst_idx] = int64(newshape[i])
             src_idx += 1
             dst_idx += 1
         elif newshape[i] == 0:

Review Comment:
   won't this codepath not be hit now? this seems a little sus (since above is 
>= 0 now). That seems incorrect to cover the case where allowzero != 0



##########
python/tvm/relay/op/dyn/_transform.py:
##########
@@ -45,12 +45,15 @@ def _reshape_shape_func_input_data(data_shape, newshape, 
ndim):
     for i in const_range(len(newshape)):
         if skip > 0:
             skip -= 1
-        elif newshape[i] > 0:
+        elif newshape[i] >= 0:
             out[dst_idx] = int64(newshape[i])
             src_idx += 1
             dst_idx += 1
         elif newshape[i] == 0:

Review Comment:
   Isn't > 0 the comparison we want?



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@tvm.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to