psrivas2 commented on issue #14240:
URL: https://github.com/apache/tvm/issues/14240#issuecomment-1460945726

   Interesting choice. Does that also hold for vars used in shape expressions 
or attributes?
   
   The following module passes well formed check even though var `m` is used in 
shape expression across functions.
   ```python
   bb = relax.BlockBuilder()
   m = tir.Var("m", dtype="int64")
   x = relax.Var("x", R.Tensor((m,), "float32"))
   y = relax.Var("y", R.Tensor((m,), "float32"))
   
   with bb.function("main", [x]):
       with bb.dataflow():
           gv = bb.emit_output(relax.op.add(x, x))
       bb.emit_func_output(gv)
   with bb.function("foo", [y]):
       with bb.dataflow():
           gv = bb.emit_output(relax.op.multiply(y, y))
       bb.emit_func_output(gv)
   mod = bb.get()
   ```


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