Skip to content

[ET-VK] Introduce generalized shaders for transfer ops and use it for select and slice #11255

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

Merged
merged 7 commits into from
Jun 2, 2025

Conversation

SS-JIA
Copy link
Contributor

@SS-JIA SS-JIA commented May 30, 2025

Stack from ghstack (oldest at bottom):

Changes

  • Introduce transfer_buffer.glsl and transfer_texture.glsl, and Transfer.cpp which generalizes shaders where each element of the output is copied from a unique element of the input.
  • Update Slice.cpp and Select.cpp to use Transfer.cpp
  • Remove old implementations of slice and select

Motivation

With this new implementation, the op can now support both buffers and textures of any packing. There are also benefits of code consolidation.

Differential Revision: D75686050

… select and slice

## Changes

* Introduce `transfer_buffer.glsl` and `transfer_texture.glsl`, and `Transfer.cpp` which generalizes shaders where each element of the output is copied from a unique element of the input.
* Update `Slice.cpp` and `Select.cpp` to use `Transfer.cpp`
* Remove old implementations of slice and select

## Motivation

With this new implementation, the op can now support both buffers and textures of any packing. There are also benefits of code consolidation.

Differential Revision: [D75686050](https://our.internmc.facebook.com/intern/diff/D75686050/)

[ghstack-poisoned]
Copy link

pytorch-bot bot commented May 30, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/11255

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 1 Pending, 2 Unrelated Failures

As of commit 046b4fa with merge base ce8359d (image):

NEW FAILURE - The following job has failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75686050

… use it for select and slice"

## Changes

* Introduce `transfer_buffer.glsl` and `transfer_texture.glsl`, and `Transfer.cpp` which generalizes shaders where each element of the output is copied from a unique element of the input.
* Update `Slice.cpp` and `Select.cpp` to use `Transfer.cpp`
* Remove old implementations of slice and select

## Motivation

With this new implementation, the op can now support both buffers and textures of any packing. There are also benefits of code consolidation.

Differential Revision: [D75686050](https://our.internmc.facebook.com/intern/diff/D75686050/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75686050

… use it for select and slice"

## Changes

* Introduce `transfer_buffer.glsl` and `transfer_texture.glsl`, and `Transfer.cpp` which generalizes shaders where each element of the output is copied from a unique element of the input.
* Update `Slice.cpp` and `Select.cpp` to use `Transfer.cpp`
* Remove old implementations of slice and select

## Motivation

With this new implementation, the op can now support both buffers and textures of any packing. There are also benefits of code consolidation.

Differential Revision: [D75686050](https://our.internmc.facebook.com/intern/diff/D75686050/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75686050

… use it for select and slice"

## Changes

* Introduce `transfer_buffer.glsl` and `transfer_texture.glsl`, and `Transfer.cpp` which generalizes shaders where each element of the output is copied from a unique element of the input.
* Update `Slice.cpp` and `Select.cpp` to use `Transfer.cpp`
* Remove old implementations of slice and select

## Motivation

With this new implementation, the op can now support both buffers and textures of any packing. There are also benefits of code consolidation.

Differential Revision: [D75686050](https://our.internmc.facebook.com/intern/diff/D75686050/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75686050

… use it for select and slice"

## Changes

* Introduce `transfer_buffer.glsl` and `transfer_texture.glsl`, and `Transfer.cpp` which generalizes shaders where each element of the output is copied from a unique element of the input.
* Update `Slice.cpp` and `Select.cpp` to use `Transfer.cpp`
* Remove old implementations of slice and select

## Motivation

With this new implementation, the op can now support both buffers and textures of any packing. There are also benefits of code consolidation.

Differential Revision: [D75686050](https://our.internmc.facebook.com/intern/diff/D75686050/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75686050

@SS-JIA SS-JIA added the release notes: vulkan Changes to the Vulkan backend delegate label May 30, 2025
… use it for select and slice"

## Changes

* Introduce `transfer_buffer.glsl` and `transfer_texture.glsl`, and `Transfer.cpp` which generalizes shaders where each element of the output is copied from a unique element of the input.
* Update `Slice.cpp` and `Select.cpp` to use `Transfer.cpp`
* Remove old implementations of slice and select

## Motivation

With this new implementation, the op can now support both buffers and textures of any packing. There are also benefits of code consolidation.

Differential Revision: [D75686050](https://our.internmc.facebook.com/intern/diff/D75686050/)

[ghstack-poisoned]
SS-JIA added a commit that referenced this pull request Jun 2, 2025
… select and slice

Pull Request resolved: #11255

## Changes

* Introduce `transfer_buffer.glsl` and `transfer_texture.glsl`, and `Transfer.cpp` which generalizes shaders where each element of the output is copied from a unique element of the input.
* Update `Slice.cpp` and `Select.cpp` to use `Transfer.cpp`
* Remove old implementations of slice and select

## Motivation

With this new implementation, the op can now support both buffers and textures of any packing. There are also benefits of code consolidation.
ghstack-source-id: 287701563
@exported-using-ghexport

Differential Revision: [D75686050](https://our.internmc.facebook.com/intern/diff/D75686050/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75686050

… use it for select and slice"

## Changes

* Introduce `transfer_buffer.glsl` and `transfer_texture.glsl`, and `Transfer.cpp` which generalizes shaders where each element of the output is copied from a unique element of the input.
* Update `Slice.cpp` and `Select.cpp` to use `Transfer.cpp`
* Remove old implementations of slice and select

## Motivation

With this new implementation, the op can now support both buffers and textures of any packing. There are also benefits of code consolidation.

Differential Revision: [D75686050](https://our.internmc.facebook.com/intern/diff/D75686050/)

[ghstack-poisoned]
SS-JIA added a commit that referenced this pull request Jun 2, 2025
… select and slice

Pull Request resolved: #11255

## Changes

* Introduce `transfer_buffer.glsl` and `transfer_texture.glsl`, and `Transfer.cpp` which generalizes shaders where each element of the output is copied from a unique element of the input.
* Update `Slice.cpp` and `Select.cpp` to use `Transfer.cpp`
* Remove old implementations of slice and select

## Motivation

With this new implementation, the op can now support both buffers and textures of any packing. There are also benefits of code consolidation.
ghstack-source-id: 287711104
@exported-using-ghexport

Differential Revision: [D75686050](https://our.internmc.facebook.com/intern/diff/D75686050/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75686050

@facebook-github-bot facebook-github-bot merged commit 6ace81a into gh/SS-JIA/231/base Jun 2, 2025
93 of 98 checks passed
@facebook-github-bot facebook-github-bot deleted the gh/SS-JIA/231/head branch June 2, 2025 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported release notes: vulkan Changes to the Vulkan backend delegate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants