-
Couldn't load subscription status.
- Fork 700
[ET-VK] Organize utils #2323
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
[ET-VK] Organize utils #2323
Conversation
Refactor our `OpUtils.*`, `StagingUtils.*`, and `Utils.*` which have accumulated helper functions during the redesign. We split them and move them into two new folders: 1. `ops/utils`: Used by files in `ops/` and `ops/impl/`. 2. `ops/impl/utils`: Used only by files in `ops/impl/`. In general, this helps to unflatten the `ops/` directory: ``` [[email protected] /data/users/jorgep31415/fbsource/xplat/executorch/backends/vulkan/runtime/graph/ops (98b0e789c)]$ tree . ├── ExecuteNode.cpp ├── ExecuteNode.h ├── impl │ ├── Arithmetic.cpp │ ├── Arithmetic.h │ ├── Staging.cpp │ ├── Staging.h │ └── utils │ ├── DimUtils.h │ ├── ScalarUtils.h │ ├── TensorUtils.cpp │ └── TensorUtils.h ├── OperatorRegistry.cpp ├── OperatorRegistry.h ├── PrepackNode.cpp ├── PrepackNode.h └── utils ├── BindingUtils.cpp ├── BindingUtils.h ├── StagingUtils.cpp └── StagingUtils.h 3 directories, 18 files ``` Since we're heavily updating include declarations, we also introduce the convention to only include the VK-API via ``` #include <ATen/native/vulkan/api/api.h> ``` instead of including more specific files, e.g., ``` #include <ATen/native/vulkan/api/Tensor.h> ``` Differential Revision: [D54690346](https://our.internmc.facebook.com/intern/diff/D54690346/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/2323
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New FailuresAs of commit 2a96ea8 with merge base 0b6add8 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D54690346 |
Refactor our `OpUtils.*`, `StagingUtils.*`, and `Utils.*` which have accumulated helper functions during the redesign.
We split them and move them into two new folders:
1. `ops/utils`: Used by files in `ops/` and `ops/impl/`.
2. `ops/impl/utils`: Used only by files in `ops/impl/`.
In general, this helps to unflatten the `ops/` directory:
```
[jorgep31415devvm15882.vll0 /data/users/jorgep31415/fbsource/xplat/executorch/backends/vulkan/runtime/graph/ops (98b0e789c)]$ tree
.
├── ExecuteNode.cpp
├── ExecuteNode.h
├── impl
│ ├── Arithmetic.cpp
│ ├── Arithmetic.h
│ ├── Staging.cpp
│ ├── Staging.h
│ └── utils
│ ├── DimUtils.h
│ ├── ScalarUtils.h
│ ├── TensorUtils.cpp
│ └── TensorUtils.h
├── OperatorRegistry.cpp
├── OperatorRegistry.h
├── PrepackNode.cpp
├── PrepackNode.h
└── utils
├── BindingUtils.cpp
├── BindingUtils.h
├── StagingUtils.cpp
└── StagingUtils.h
3 directories, 18 files
```
Since we're heavily updating include declarations, we also introduce the convention to only include the VK-API via
```
#include <ATen/native/vulkan/api/api.h>
```
instead of including more specific files, e.g.,
```
#include <ATen/native/vulkan/api/Tensor.h>
```
Differential Revision: [D54690346](https://our.internmc.facebook.com/intern/diff/D54690346/)
ghstack-source-id: 217990425
Pull Request resolved: #2323
|
This pull request has been merged in ac8267b. |
Stack from ghstack (oldest at bottom):
Refactor our
OpUtils.*,StagingUtils.*, andUtils.*which have accumulated helper functions during the redesign.We split them and move them into two new folders:
ops/utils: Used by files inops/andops/impl/.ops/impl/utils: Used only by files inops/impl/.In general, this helps to unflatten the
ops/directory:Since we're heavily updating include declarations, we also introduce the convention to only include the VK-API via
instead of including more specific files, e.g.,
Differential Revision: D54690346