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-586514793
 
 
   I though you provided
   ```
   v0.0.4
   fn (%a: Tensor[(10, 10), float32], %b: Tensor[(10, 10), float32]) -> 
Tensor[(10, 10), float32] {
     %0 = subtract(%a, %b) /* ty=Tensor[(10, 10), float32] */;
     %3 = fn (%in_1: Tensor[(10, 10), float32], %in_2: Tensor[(10, 10), 
float32]) -> Tensor[(10, 10), float32] {
       %1 = add(%in_1, %in_2) /* ty=Tensor[(10, 10), float32] */;
       %2 = add(%in_1, %1) /* ty=Tensor[(10, 10), float32] */;
       add(%2, %1) /* ty=Tensor[(10, 10), float32] */
     };
     %3(%0, %b) /* ty=Tensor[(10, 10), float32] */
   }
   ```
   as expected, instead of,
   
   ```
   v0.0.4
   fn (%a: Tensor[(10, 10), float32], %b: Tensor[(10, 10), float32]) -> 
Tensor[(10, 10), float32] {
     %0 = subtract(%a, %b) /* ty=Tensor[(10, 10), float32] */;
     %4 = fn (%x: Tensor[(10, 10), float32], %y: Tensor[(10, 10), float32], 
Primitive=1, Composite="add_add_add") -> Tensor[(10, 10), float32] {
       %1 = add(%x, %y) /* ty=Tensor[(10, 10), float32] */;
       %2 = add(%x, %1) /* ty=Tensor[(10, 10), float32] */;
       %3 = add(%x, %y) /* ty=Tensor[(10, 10), float32] */;
       add(%2, %3) /* ty=Tensor[(10, 10), float32] */
     };
     %4(%0, %b) /* ty=Tensor[(10, 10), float32] */
   }
   ```
   
   I just double checked. You are actually providing the latter as expected 
which is good. The mentioned bug (if it is) is actually a separate issue that 
doesn't block this PR. So we are good for this PR, right?

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

Reply via email to