comaniac commented on a change in pull request #8522:
URL: https://github.com/apache/tvm/pull/8522#discussion_r674422187



##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -2099,6 +2099,14 @@ def expand_shape(in_shape, shape):
             new_shape = _op.maximum(in_shape, shape)

Review comment:
       FoldConstant seems not help here, as it has been used after this 
function (L2110: `shape = fold_constant(expand_shape(in_shape, shape))`).
   
   Meanwhile, I also agree that using parameters to avoid dynamic ops is not a 
good practice. From compiler's perspective, they are "parameters" because their 
values can be changed anytime, so we should not make any assumption here. A 
good practice is going through `from_onnx -> bind_param_by_name -> 
fold_constant -> dynamic_to_static`. Since parameters become constants after 
binding, it's now safe to say these ops can be static.
   




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