-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
RemoveLocalScalarDenseOpsTransform
to tag scalar tensors as …
…well (#6069) Summary: Pull Request resolved: #6069 ## Context See the new docstrings added to `remove_local_scalar_dense_ops` for more details on what the pass is trying to achieve. The goal is to mark tensors that are consumed as scalars via `tensor[0].item()` as "scalar tensors" that will be represented as a `SymInt` object in the vulkan delegate instead of a regular `Tensor` object. This diff also adds an `__init__.py` file to the `_passes` folder to make it easier to include Vulkan passes from one place. ghstack-source-id: 247163956 exported-using-ghexport Reviewed By: jorgep31415 Differential Revision: D64139867 fbshipit-source-id: 88ba420e107654d7eadb2cbca78a3750a51f74b0
- Loading branch information
1 parent
7bfab21
commit 1a0c2c7
Showing
5 changed files
with
104 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from executorch.backends.vulkan._passes.remove_local_scalar_dense_ops import ( | ||
RemoveLocalScalarDenseOpsTransform, | ||
) | ||
|
||
__all__ = [ | ||
"RemoveLocalScalarDenseOpsTransform", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters