mbs-octoml opened a new pull request #9693:
URL: https://github.com/apache/tvm/pull/9693
This is in support of #9613, which allows PlanDevices to be run
after lowering so as to flow memory constraints in and
out of PrimFuncs. That requires a way to insert device_copies
when the memory scopes chosen during separate lowering of fused
primitive functions clashes, but otherwise avoid device_copies when
scopes can be chosen so as to avoid them.
We support that by generalizing the "on_device" annotation to
allow the device constraint to be independently controlled for
its 'body' and 'result'.
# Standard user annotation: body is constrained to S
on_device(body, S)
# Used by PlanDevices to 'fix' expression to S
# (was is_fixed=True)
on_device(body, S, constrain_result=True)
# Used by PlanDevices to indicate a device_copy can be
# inserted if necessary.
on_device(body, S, constrain_body=False)
# Supported, but currently has no use.
on_device(body, S, constrain_result=True, constrain_body=False)
A few extra odd's 'n ends collected along the way:
- Some CallLowered cleanup which I found useful.
- The usual extra debugging output needed as I debugged.
In return I removed some particularly verbose logging I'd
added while tracking down unexpected object copies.
- Cleanup warnings from clang-12 as I touch files.
--
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]