icemelon9 commented on a change in pull request #4644: [WIP] Relay op strategy URL: https://github.com/apache/incubator-tvm/pull/4644#discussion_r374821520
########## File path: python/tvm/relay/backend/compile_engine.py ########## @@ -63,6 +83,316 @@ def _get_cache_key(source_func, target): return source_func +def get_shape(shape): + """Convert the shape to correct dtype and vars.""" + ret = [] + for dim in shape: + if isinstance(dim, tvm.expr.IntImm): + val = int(dim) + assert val <= np.iinfo(np.int32).max + ret.append(tvm.expr.IntImm("int32", val)) + elif isinstance(dim, tvm.expr.Any): + ret.append(tvm.var("any_dim", "int32")) Review comment: Each time encounters Any, it will create a new var. These vars are different because they have different pointer. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services