lixiaoquan commented on pull request #9723:
URL: https://github.com/apache/tvm/pull/9723#issuecomment-992346440


   I just feel that in `one to many` case, the original tensor/layer name 
should be attached to the last node in the group. Because that's where the 
computational result (and tensor type) matches between original graph and relay 
IR. And we may need to find the last node of a group frequently, keep original 
layer's name there can make it easier.
   
   For example, a LSTM can become thousands of nodes in relay IR. If its name 
is not attached to the last, we'll have to try to search layer_DERIVED_xxxx 
many times to find the end.
   
   ```text
   def @main(%input: Tensor[(?, ?, 3, 1), float32]) {
   %10 = shape_of(%input, dtype="int32") /* Shape /;
   %11 = strided_slice(%10, begin=[0], end=[1], strides=[1], axes=None) / 
strided_slice_PART_0) /;
   %12 = squeeze(%11) / strided_slice /;
   %13 = expand_dims(%12, axis=0) / stack_PART_0 /;
   %14 = expand_dims(3, axis=0) / stack_PART_1 /;
   %15 = expand_dims(3, axis=0) / stack_PART_2 /;
   %16 = (%13, %14, %15) / stack_PART_3 /;
   %17 = concatenate(%16) / stack /;
   dyn.reshape(%input, %17, newshape=[]) / output */
   }
   ```
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to