soiferj edited a comment 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-586527376 This is actually a good exercise, as some other tests are actually failing now due to the graphs not being the same. For example, `test_branch_merge`. @mbarrett97, I'll push the changes, let me know what you think. Expected: ``` fn (%a: Tensor[(10, 10), float32], %b: Tensor[(10, 10), float32], %c: Tensor[(10, 10), float32]) -> Tensor[(10, 10), float32] { %2 = fn (%in_1: Tensor[(10, 10), float32], %in_2: Tensor[(10, 10), float32], Composite="add_sub_mul", Primitive=1) -> Tensor[(10, 10), float32] { %0 = add(%in_1, %in_2) /* ty=Tensor[(10, 10), float32] */; %1 = subtract(%in_1, %in_2) /* ty=Tensor[(10, 10), float32] */; multiply(%0, %1) /* ty=Tensor[(10, 10), float32] */ }; %3 = %2(%a, %b) /* ty=Tensor[(10, 10), float32] */; %4 = %2(%c, %3) /* ty=Tensor[(10, 10), float32] */; nn.relu(%4) /* ty=Tensor[(10, 10), float32] */ } ``` Result: ``` fn (%a: Tensor[(10, 10), float32], %b: Tensor[(10, 10), float32], %c: Tensor[(10, 10), float32]) -> Tensor[(10, 10), float32] { %2 = fn (%x: Tensor[(10, 10), float32], %y: Tensor[(10, 10), float32], Primitive=1, Composite="add_sub_mul") -> Tensor[(10, 10), float32] { %0 = add(%x, %y) /* ty=Tensor[(10, 10), float32] */; %1 = subtract(%x, %y) /* ty=Tensor[(10, 10), float32] */; multiply(%0, %1) /* ty=Tensor[(10, 10), float32] */ }; %3 = %2(%a, %b) /* ty=Tensor[(10, 10), float32] */; %6 = fn (%x1: Tensor[(10, 10), float32], %y1: Tensor[(10, 10), float32], Primitive=1, Composite="add_sub_mul") -> Tensor[(10, 10), float32] { %4 = add(%x1, %y1) /* ty=Tensor[(10, 10), float32] */; %5 = subtract(%x1, %y1) /* ty=Tensor[(10, 10), float32] */; multiply(%4, %5) /* ty=Tensor[(10, 10), float32] */ }; %7 = %6(%c, %3) /* ty=Tensor[(10, 10), float32] */; nn.relu(%7) /* ty=Tensor[(10, 10), float32] */ } ``` +1 that we should confirm which order is expected for alpha_equals.
---------------------------------------------------------------- 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