[nativert] Expose ModelRunner to public through pmpl type ModelRunnerHandle.#159989
[nativert] Expose ModelRunner to public through pmpl type ModelRunnerHandle.#159989
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/159989
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 49b5793 with merge base 0afaeb7 ( UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D79751098 |
| // incomplete ModelRunner here. | ||
| class ModelRunner; | ||
|
|
||
| class TORCH_API ModelRunnerHandle { |
There was a problem hiding this comment.
So going to have to add every function we end up needing from nativeRT in ET desktop to these handls over time?
There was a problem hiding this comment.
yeah for now. hopefully there should be <10 of them
…Handle. (#159989) Summary: Pull Request resolved: #159989 Today users outside of pytorch core cannot `#include <torch/nativert/ModelRunner.h>`. It turns out that we should place a header inside `torch/csrc/api/include/`. Placing every single nativert header here would pollute the namespace a lot and that's not what we want in general. Therefore here we just create a Handle type which hold a pointer to decouple the actual type from header definition. Test Plan: CI Rollback Plan: Differential Revision: D79751098
|
This pull request was exported from Phabricator. Differential Revision: D79751098 |
0b752ff to
49b5793
Compare
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…Handle. (pytorch#159989) Summary: Today users outside of pytorch core cannot `#include <torch/nativert/ModelRunner.h>`. It turns out that we should place a header inside `torch/csrc/api/include/`. Placing every single nativert header here would pollute the namespace a lot and that's not what we want in general. Therefore here we just create a Handle type which hold a pointer to decouple the actual type from header definition. Test Plan: CI Rollback Plan: Differential Revision: D79751098 Pull Request resolved: pytorch#159989 Approved by: https://github.com/dolpm
Summary:
Today users outside of pytorch core cannot
#include <torch/nativert/ModelRunner.h>.It turns out that we should place a header inside
torch/csrc/api/include/. Placing every single nativert header here would pollute the namespace a lot and that's not what we want in general. Therefore here we just create a Handle type which hold a pointer to decouple the actual type from header definition.Test Plan:
CI
Rollback Plan:
Differential Revision: D79751098