forked from pytorch/executorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Define custom op for grid points generator of single level feature map (
pytorch#4395) Summary: Pull Request resolved: pytorch#4395 In order to lower `grid_priors` function that generate grids to Vulkan, we plan to implement this function in one shader due to several reasons like compilation issue of meshgrid, and reduce data copy. Define this function into one operator and will implement this op in the following diff. The spec of this op is: ``` (int height, int width, int stride, float offset) -> Tensor ``` Example: ``` height = 2 width = 3 stride = 1 offset = 0 output.shape = [3x2, 2] output = tensor([[0, 0], [1, 0], [2, 0], [0, 1], [1, 1], [2, 1]]) ``` Reviewed By: jorgep31415 Differential Revision: D60141165 fbshipit-source-id: f56f04671eb5ca75c6a06c4b70b4067a0dc43e2a
- Loading branch information
1 parent
dbf87b0
commit 77c905d
Showing
2 changed files
with
54 additions
and
2 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