slyubomirsky commented on code in PR #14394:
URL: https://github.com/apache/tvm/pull/14394#discussion_r1169033927
##########
src/relax/op/op.cc:
##########
@@ -292,7 +349,10 @@ RELAY_REGISTER_OP("relax.invoke_closure")
.set_num_inputs(2)
.add_argument("closure", "Expr", "The VMClosure.")
.add_argument("args", "Tuple", "The captured variables.")
- .set_attr<FInferStructInfo>("FInferStructInfo",
InferStructInfoInvokeClosure);
+ .set_attr<FInferStructInfo>("FInferStructInfo",
InferStructInfoInvokeClosure)
+ // TODO: This might be another case where we would want a macro or even
use an attr.
+ // It may depend on the particulars of the closure
+ .set_attr<Bool>("FPurity", Bool(false));
Review Comment:
Sort of, it's resolved with `invoke_pure_closure`. See the changes to
`LambdaLifting`: it reasons about whether the function that was turned into a
closure is pure.
--
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]