-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[xnnpack][on-device] executor class #88778
Conversation
# Executor Class Executor object used to wrap our xnn_runtime object. The ideal flow of this object looks as such: ``` executor.set_inputs(vector<tensor> inputs, vector<tensor> outputs) executor.forward() ``` This will likely be returned by our delegate compile and given over to execute in order to run inference using the xnn runtime ##### Executorch Considerations ``` #include <ATen/Functions.h> #include <ATen/Utils.h> ``` These Aten functions are included in order to use at::Tensor when setting the inputs, this will change when used for Executorch because we will be switching from at::Tensor to whatever tensor abstraction is used for ET. Seems like they have the same call for `.data_ptr<float>()`, so realistically all logic here will be the same. ATen/Utils is used for TORCH_CHECK. We will switch to ET_CHECK_MESSAGE for executorch. Differential Revision: [D40733121](https://our.internmc.facebook.com/intern/diff/D40733121/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/88778
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 FailuresAs of commit 3dc5bea: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
# Executor Class Executor object used to wrap our xnn_runtime object. The ideal flow of this object looks as such: ``` executor.set_inputs(vector<tensor> inputs, vector<tensor> outputs) executor.forward() ``` This will likely be returned by our delegate compile and given over to execute in order to run inference using the xnn runtime ##### Executorch Considerations ``` #include <ATen/Functions.h> #include <ATen/Utils.h> ``` These Aten functions are included in order to use at::Tensor when setting the inputs, this will change when used for Executorch because we will be switching from at::Tensor to whatever tensor abstraction is used for ET. Seems like they have the same call for `.data_ptr<float>()`, so realistically all logic here will be the same. ATen/Utils is used for TORCH_CHECK. We will switch to ET_CHECK_MESSAGE for executorch. Differential Revision: [D40733121](https://our.internmc.facebook.com/intern/diff/D40733121/) ghstack-source-id: 172010559 Pull Request resolved: #88778
# Executor Class Executor object used to wrap our xnn_runtime object. The ideal flow of this object looks as such: ``` executor.set_inputs(vector<tensor> inputs, vector<tensor> outputs) executor.forward() ``` This will likely be returned by our delegate compile and given over to execute in order to run inference using the xnn runtime ##### Executorch Considerations ``` #include <ATen/Functions.h> #include <ATen/Utils.h> ``` These Aten functions are included in order to use at::Tensor when setting the inputs, this will change when used for Executorch because we will be switching from at::Tensor to whatever tensor abstraction is used for ET. Seems like they have the same call for `.data_ptr<float>()`, so realistically all logic here will be the same. ATen/Utils is used for TORCH_CHECK. We will switch to ET_CHECK_MESSAGE for executorch. Differential Revision: [D40733121](https://our.internmc.facebook.com/intern/diff/D40733121/) [ghstack-poisoned]
Pull Request resolved: #88778 # Executor Class Executor object used to wrap our xnn_runtime object. The ideal flow of this object looks as such: ``` executor.set_inputs(vector<tensor> inputs, vector<tensor> outputs) executor.forward() ``` This will likely be returned by our delegate compile and given over to execute in order to run inference using the xnn runtime ##### Executorch Considerations ``` #include <ATen/Functions.h> #include <ATen/Utils.h> ``` These Aten functions are included in order to use at::Tensor when setting the inputs, this will change when used for Executorch because we will be switching from at::Tensor to whatever tensor abstraction is used for ET. Seems like they have the same call for `.data_ptr<float>()`, so realistically all logic here will be the same. ATen/Utils is used for TORCH_CHECK. We will switch to ET_CHECK_MESSAGE for executorch. ghstack-source-id: 173215553 Differential Revision: [D40733121](https://our.internmc.facebook.com/intern/diff/D40733121/)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
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 |
# Executor Class Executor object used to wrap our xnn_runtime object. The ideal flow of this object looks as such: ``` executor.set_inputs(vector<tensor> inputs, vector<tensor> outputs) executor.forward() ``` This will likely be returned by our delegate compile and given over to execute in order to run inference using the xnn runtime ##### Executorch Considerations ``` #include <ATen/Functions.h> #include <ATen/Utils.h> ``` These Aten functions are included in order to use at::Tensor when setting the inputs, this will change when used for Executorch because we will be switching from at::Tensor to whatever tensor abstraction is used for ET. Seems like they have the same call for `.data_ptr<float>()`, so realistically all logic here will be the same. ATen/Utils is used for TORCH_CHECK. We will switch to ET_CHECK_MESSAGE for executorch. Differential Revision: [D40733121](https://our.internmc.facebook.com/intern/diff/D40733121/) Pull Request resolved: pytorch#88778 Approved by: https://github.com/digantdesai
Stack from ghstack (oldest at bottom):
Executor Class
Executor object used to wrap our xnn_runtime object. The ideal flow of this object looks as such:
This will likely be returned by our delegate compile and given over to execute in order to run inference using the xnn runtime
Executorch Considerations
These Aten functions are included in order to use at::Tensor when setting the inputs, this will change when used for Executorch because we will be switching from at::Tensor to whatever tensor abstraction is used for ET. Seems like they have the same call for
.data_ptr<float>()
, so realistically all logic here will be the same.ATen/Utils is used for TORCH_CHECK. We will switch to ET_CHECK_MESSAGE for executorch.
Differential Revision: D40733121