slyubomirsky commented on code in PR #14394:
URL: https://github.com/apache/tvm/pull/14394#discussion_r1191580313
##########
python/tvm/relax/transform/lazy_transform_params.py:
##########
@@ -166,11 +165,15 @@ def visit_var_binding_(self, binding: relax.VarBinding)
-> None:
var_before_setitem = self.builder_.emit(value)
# rewrite set item
new_var = self.builder_.emit(
- relax.Call(
+ # TODO(@relax-team): This is wrong! This is not pure,
+ # but there is no other way to allow this inside a dataflow
block.
+ # Properly speaking, this pass should require ToNonDataflow
first,
+ # but the liveness analysis requires dataflow blocks. This
should be refactored
+ relax.call_pure_packed(
relax.ExternFunc("set_item"),
- [index, var_before_setitem],
- None,
- [relax.ObjectStructInfo()],
+ index,
+ var_before_setitem,
+ sinfo_args=(relax.ObjectStructInfo(),),
Review Comment:
This is a total hack to get tests to pass, see bug report #14829. I don't
think we should allow this call to be inserted inside a dataflow block.
--
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]