L0phTg commented on PR #15290:
URL: https://github.com/apache/tvm/pull/15290#issuecomment-1630103093

   if we call `relax.analysis.remove_all_unused` to update this function, will 
cause bugs in build stage
   ```python
   @R.function
   def main(
       shape_tensor: R.Tensor((3,), dtype="int64")
   ) -> R.Tensor(dtype="int32", ndim=3):
       m = T.int64()
       n = T.int64()
       k = T.int64()
       with R.dataflow():
           lv: R.Shape(ndim=3) = R.call_pure_packed(
               "vm.builtin.tensor_to_shape", shape_tensor, 
sinfo_args=(R.Shape(ndim=3),)
           )
           lv1: R.Shape([m, n, k]) = R.match_cast(lv, R.Shape([m, n, k]))
           lv2: R.Tensor((m, 1, k), dtype="int32") = R.full(
               R.shape([m, 1, k]), R.const(1, "int32"), dtype="int32"
           )
           gv: R.Tensor((m, 1, k), dtype="int32") = lv2
           R.output(gv)
       return gv
   ```


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