zhiics commented on issue #4879: [Relay][Pass] Fix bug in re-processing call node in MergeComposite pass URL: https://github.com/apache/incubator-tvm/pull/4879#issuecomment-586505085 hmm, I just tried this: ```python def test(): tt = relay.TensorType([10, 10], "float32") a = relay.Var("a", tt) b = relay.Var("b", tt) sub = relay.subtract(a, b) x = relay.Var("x", tt) y = relay.Var("y", tt) add1 = x + y add2 = x + add1 add3 = x + y add4 = add2 + add3 fn = relay.Function([x, y], add4) fn = fn.set_attribute("Primitive", tvm.tir.IntImm("int32", 1)) fn = fn.set_attribute("Composite", tvm.tir.StringImm("add_add_add")) fn_call = relay.Call(fn, [sub, b]) func = relay.Function([a, b], fn_call) func = run_opt_pass(func, relay.transform.InferType()) print(func) tt0 = relay.TensorType([10, 10], "float32") a0 = relay.Var("a0", tt0) b0 = relay.Var("b0", tt0) sub0 = relay.subtract(a0, b0) x0 = relay.Var("x0", tt0) y0 = relay.Var("y0", tt0) add01 = x0 + y0 add02 = x0 + add01 add03 = add02 + add01 fn0 = relay.Function([x0, y0], add03) fn_call0 = relay.Call(fn0, [sub0, b0]) func0 = relay.Function([a0, b0], fn_call0) func0 = run_opt_pass(func0, relay.transform.InferType()) print(func0) assert alpha_equal(func, func0) ``` It could not pass alpha_equal. Are we missing something here? Can you double check if the program I provided are identical yours here?
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
