[RFC] Runtime-derived ExecuTorch backend arguments#1262
[RFC] Runtime-derived ExecuTorch backend arguments#1262dbort wants to merge 1 commit intodbort/rfc/emptyfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/1262
Note: Links to docs will display an error until the docs builds have been completed. This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
A common interface is good as specifying backend properties in a consistent way is useful, even if partitioning is fixed. I assume the arguments can be of all types (see refs below but we pass bool, string, scalars) Only delta I see is that we have some interfaces with runtime_init time arguments, see ArmNN Instance level options in the below link. One route to implementation on android is TOSA on ACL (Cortex-A) and TOSA on GPU so having a common partitioner/ArmBackend in python and a delegate device which JiT’s to a specific target IP is quite likely. ArmNN has the same capabilities. The ArmNN api would also accept a target device and other properties at runtime if extended to consume a TOSA representation or other IR. https://arm-software.github.io/armnn/latest/runtimeoptions.html We’d also like to take Symint like data in future, which can be specialised with input sizes on devices which need to know this information statically. (finalise shapes at init time) We don’t need the ability to adjust options between execute() calls, most are build time and heavyweight and it’s expected a new instance is created for such heavy activities. |
|
Thanks for taking a look @robell, and for the detailed background.
Other backend authors gave the same feedback, so I'm going to de-prioritize that feature for now. There are some backends that could benefit from it, but I don't want to complicate the user experience unnecessarily until I hear specific requests for per-execute()-call-args.
Interesting, thanks for bringing this up. This is a different problem, and one that I think we could first try addressing with a convention rather than an API change. A couple possibilities, though I'm not sure of the subtleties of exactly when the setup needs to happen:
|
|
Follow up discussion in #10216 |
This document proposes a way for applications to pass runtime-derived arguments to backends, letting backends behave differently based on information only known at runtime.
Note that this is not an official RFC process, just something I put together to share this document.