MarisaKirisame commented on a change in pull request #4644: [WIP] Relay op strategy URL: https://github.com/apache/incubator-tvm/pull/4644#discussion_r374619441
########## 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: why is this ok? suppose there is two Any in the code, do they get mapped to the same symbolic shape? ---------------------------------------------------------------- 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