Skip to content
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] Modify conv 2d pw op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance. #7452

Merged

Conversation

… dispatch work accounting for linearity texture to improve performance.

This diff modifies the convolution 2D pointwise op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance.

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

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Dec 28, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 5fc83ae with merge base 45bb2dd (image):
💚 Looks good so far! There are no failures yet. 💚

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 28, 2024
@facebook-github-bot
Copy link
Contributor

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

trivedivivek added a commit that referenced this pull request Dec 28, 2024
… dispatch work accounting for linearity texture to improve performance.

This diff modifies the convolution 2D pointwise op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance.

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

ghstack-source-id: 259692390
Pull Request resolved: #7452
…to linearly dispatch work accounting for linearity texture to improve performance."

This diff modifies the convolution 2D pointwise op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance.

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

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

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

…to linearly dispatch work accounting for linearity texture to improve performance."

This diff modifies the convolution 2D pointwise op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance.

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

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

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

…to linearly dispatch work accounting for linearity texture to improve performance."

This diff modifies the convolution 2D pointwise op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance.

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

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

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

@facebook-github-bot facebook-github-bot merged commit 6bed7fb into gh/trivedivivek/31/base Jan 3, 2025
46 checks passed
@facebook-github-bot facebook-github-bot deleted the gh/trivedivivek/31/head branch January 3, 2025 22:46
trivedivivek added a commit that referenced this pull request Jan 4, 2025
… dispatch work accounting for linearity texture to improve performance. (#7501)

Pull Request resolved: #7452

This diff modifies the convolution 2D pointwise op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance.
ghstack-source-id: 260166247
@exported-using-ghexport

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

Co-authored-by: Vivek Trivedi <5340687+trivedivivek@users.noreply.github.com>
trivedivivek added a commit that referenced this pull request Jan 4, 2025
…al_wg_size to determine local wg size. (#7500)

* [ET-VK] Reduced int precision for all int storage in conv pw op to improve performance.

Pull Request resolved: #7447

This diff reduces the precision of all int storage in the conv pw op to improve performance. The code changes include adding the extension GL_EXT_shader_explicit_arithmetic_types_int16 and changing the data type of ints to uint16.

ghstack-source-id: 260166244
@exported-using-ghexport

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

* [ET-VK] Minor fix to conv 2d op using wg_size from create_conv2d_global_wg_size to determine local wg size.

Pull Request resolved: #7450

This diff contains changes to the Convolution.cpp file in the Vulkan backend of Executorch. The changes involve updating the code to use the create_conv2d_global_wg_size function to determine the local workgroup size for the convolution operation. This is done to ensure that the correct workgroup size is used for the operation, which can improve performance.

ghstack-source-id: 260166246
@exported-using-ghexport

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

* [ET-VK] Modify conv 2d pw op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance. (#7501)

Pull Request resolved: #7452

This diff modifies the convolution 2D pointwise op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance.
ghstack-source-id: 260166247
@exported-using-ghexport

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

Co-authored-by: Vivek Trivedi <5340687+trivedivivek@users.noreply.github.com>

---------

Co-authored-by: Vivek Trivedi <5340687+trivedivivek@users.noreply.github.com>
trivedivivek added a commit that referenced this pull request Jan 4, 2025
…r footprint. (#7502)

* [ET-VK] Reduced int precision for all int storage in conv pw op to improve performance.

Pull Request resolved: #7447

This diff reduces the precision of all int storage in the conv pw op to improve performance. The code changes include adding the extension GL_EXT_shader_explicit_arithmetic_types_int16 and changing the data type of ints to uint16.

ghstack-source-id: 260166244
@exported-using-ghexport

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

* [ET-VK] Minor fix to conv 2d op using wg_size from create_conv2d_global_wg_size to determine local wg size.

Pull Request resolved: #7450

This diff contains changes to the Convolution.cpp file in the Vulkan backend of Executorch. The changes involve updating the code to use the create_conv2d_global_wg_size function to determine the local workgroup size for the convolution operation. This is done to ensure that the correct workgroup size is used for the operation, which can improve performance.

ghstack-source-id: 260166246
@exported-using-ghexport

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

* [ET-VK] Modify conv 2d pw op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance.

Pull Request resolved: #7452

This diff modifies the convolution 2D pointwise op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance.
ghstack-source-id: 260166247
@exported-using-ghexport

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

* [ET-VK] Using vec2 to store output positions to reudce shader register footprint.

Pull Request resolved: #7474

The diff changes the use of `u16vec3` to `u16vec2` to store output positions in the conv2d_pw op. This change is made to reduce the shader register footprint and improve performance.
ghstack-source-id: 260166245
@exported-using-ghexport

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

---------

Co-authored-by: Vivek Trivedi <5340687+trivedivivek@users.noreply.github.com>
trivedivivek added a commit that referenced this pull request Jan 4, 2025
… up registers and improve performance. (#7503)

* [ET-VK] Reduced int precision for all int storage in conv pw op to improve performance.

Pull Request resolved: #7447

This diff reduces the precision of all int storage in the conv pw op to improve performance. The code changes include adding the extension GL_EXT_shader_explicit_arithmetic_types_int16 and changing the data type of ints to uint16.

ghstack-source-id: 260166244
@exported-using-ghexport

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

* [ET-VK] Minor fix to conv 2d op using wg_size from create_conv2d_global_wg_size to determine local wg size.

Pull Request resolved: #7450

This diff contains changes to the Convolution.cpp file in the Vulkan backend of Executorch. The changes involve updating the code to use the create_conv2d_global_wg_size function to determine the local workgroup size for the convolution operation. This is done to ensure that the correct workgroup size is used for the operation, which can improve performance.

ghstack-source-id: 260166246
@exported-using-ghexport

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

* [ET-VK] Modify conv 2d pw op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance.

Pull Request resolved: #7452

This diff modifies the convolution 2D pointwise op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance.
ghstack-source-id: 260166247
@exported-using-ghexport

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

* [ET-VK] Using vec2 to store output positions to reudce shader register footprint.

Pull Request resolved: #7474

The diff changes the use of `u16vec3` to `u16vec2` to store output positions in the conv2d_pw op. This change is made to reduce the shader register footprint and improve performance.
ghstack-source-id: 260166245
@exported-using-ghexport

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

* [ET-VK] Using shared variable to store calculated output pose to free up registers and improve performance.

Pull Request resolved: #7475

This diff introduces a shared variable to store calculated output pose in conv2d_pw op to free up registers and improve performance. The code changes include adding a shared variable to hold calculated positions and modifying the existing code to use the shared variable.
ghstack-source-id: 260166242

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

---------

Co-authored-by: Vivek Trivedi <5340687+trivedivivek@users.noreply.github.com>
trivedivivek added a commit that referenced this pull request Jan 4, 2025
…erformance. (#7504)

* [ET-VK] Reduced int precision for all int storage in conv pw op to improve performance.

Pull Request resolved: #7447

This diff reduces the precision of all int storage in the conv pw op to improve performance. The code changes include adding the extension GL_EXT_shader_explicit_arithmetic_types_int16 and changing the data type of ints to uint16.

ghstack-source-id: 260166244
@exported-using-ghexport

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

* [ET-VK] Minor fix to conv 2d op using wg_size from create_conv2d_global_wg_size to determine local wg size.

Pull Request resolved: #7450

This diff contains changes to the Convolution.cpp file in the Vulkan backend of Executorch. The changes involve updating the code to use the create_conv2d_global_wg_size function to determine the local workgroup size for the convolution operation. This is done to ensure that the correct workgroup size is used for the operation, which can improve performance.

ghstack-source-id: 260166246
@exported-using-ghexport

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

* [ET-VK] Modify conv 2d pw op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance.

Pull Request resolved: #7452

This diff modifies the convolution 2D pointwise op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance.
ghstack-source-id: 260166247
@exported-using-ghexport

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

* [ET-VK] Using vec2 to store output positions to reudce shader register footprint.

Pull Request resolved: #7474

The diff changes the use of `u16vec3` to `u16vec2` to store output positions in the conv2d_pw op. This change is made to reduce the shader register footprint and improve performance.
ghstack-source-id: 260166245
@exported-using-ghexport

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

* [ET-VK] Using shared variable to store calculated output pose to free up registers and improve performance.

Pull Request resolved: #7475

This diff introduces a shared variable to store calculated output pose in conv2d_pw op to free up registers and improve performance. The code changes include adding a shared variable to hold calculated positions and modifying the existing code to use the shared variable.
ghstack-source-id: 260166242

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

* [ET-VK] Changing texture access pattern for conv2d pw op to improve performance.

Pull Request resolved: #7476

This diff changes the texture access pattern for conv2d pw op to iterate first on x axis then y and then z to improve performance.
ghstack-source-id: 260166241
@exported-using-ghexport

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

---------

Co-authored-by: Vivek Trivedi <5340687+trivedivivek@users.noreply.github.com>
trivedivivek added a commit that referenced this pull request Jan 4, 2025
…performance. (#7505)

* [ET-VK] Reduced int precision for all int storage in conv pw op to improve performance.

Pull Request resolved: #7447

This diff reduces the precision of all int storage in the conv pw op to improve performance. The code changes include adding the extension GL_EXT_shader_explicit_arithmetic_types_int16 and changing the data type of ints to uint16.

ghstack-source-id: 260166244
@exported-using-ghexport

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

* [ET-VK] Minor fix to conv 2d op using wg_size from create_conv2d_global_wg_size to determine local wg size.

Pull Request resolved: #7450

This diff contains changes to the Convolution.cpp file in the Vulkan backend of Executorch. The changes involve updating the code to use the create_conv2d_global_wg_size function to determine the local workgroup size for the convolution operation. This is done to ensure that the correct workgroup size is used for the operation, which can improve performance.

ghstack-source-id: 260166246
@exported-using-ghexport

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

* [ET-VK] Modify conv 2d pw op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance.

Pull Request resolved: #7452

This diff modifies the convolution 2D pointwise op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance.
ghstack-source-id: 260166247
@exported-using-ghexport

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

* [ET-VK] Using vec2 to store output positions to reudce shader register footprint.

Pull Request resolved: #7474

The diff changes the use of `u16vec3` to `u16vec2` to store output positions in the conv2d_pw op. This change is made to reduce the shader register footprint and improve performance.
ghstack-source-id: 260166245
@exported-using-ghexport

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

* [ET-VK] Using shared variable to store calculated output pose to free up registers and improve performance.

Pull Request resolved: #7475

This diff introduces a shared variable to store calculated output pose in conv2d_pw op to free up registers and improve performance. The code changes include adding a shared variable to hold calculated positions and modifying the existing code to use the shared variable.
ghstack-source-id: 260166242

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

* [ET-VK] Changing texture access pattern for conv2d pw op to improve performance.

Pull Request resolved: #7476

This diff changes the texture access pattern for conv2d pw op to iterate first on x axis then y and then z to improve performance.
ghstack-source-id: 260166241
@exported-using-ghexport

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

* [ET-VK] Changing texture access pattern for conv2d dw op to improve performance.

Pull Request resolved: #7477

This diff changes the texture access pattern for convolutional depthwise (DW) operations in Executorch's Vulkan backend to iterate first on x axis then y and then z to improve performance.
ghstack-source-id: 260166240
@exported-using-ghexport

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

---------

Co-authored-by: Vivek Trivedi <5340687+trivedivivek@users.noreply.github.com>
trivedivivek added a commit that referenced this pull request Jan 4, 2025
…texel and kernel values for reuse. (#7506)

* [ET-VK] Reduced int precision for all int storage in conv pw op to improve performance.

Pull Request resolved: #7447

This diff reduces the precision of all int storage in the conv pw op to improve performance. The code changes include adding the extension GL_EXT_shader_explicit_arithmetic_types_int16 and changing the data type of ints to uint16.

ghstack-source-id: 260166244
@exported-using-ghexport

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

* [ET-VK] Minor fix to conv 2d op using wg_size from create_conv2d_global_wg_size to determine local wg size.

Pull Request resolved: #7450

This diff contains changes to the Convolution.cpp file in the Vulkan backend of Executorch. The changes involve updating the code to use the create_conv2d_global_wg_size function to determine the local workgroup size for the convolution operation. This is done to ensure that the correct workgroup size is used for the operation, which can improve performance.

ghstack-source-id: 260166246
@exported-using-ghexport

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

* [ET-VK] Modify conv 2d pw op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance.

Pull Request resolved: #7452

This diff modifies the convolution 2D pointwise op shader and dispatch settings to linearly dispatch work accounting for linearity texture to improve performance.
ghstack-source-id: 260166247
@exported-using-ghexport

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

* [ET-VK] Using vec2 to store output positions to reudce shader register footprint.

Pull Request resolved: #7474

The diff changes the use of `u16vec3` to `u16vec2` to store output positions in the conv2d_pw op. This change is made to reduce the shader register footprint and improve performance.
ghstack-source-id: 260166245
@exported-using-ghexport

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

* [ET-VK] Using shared variable to store calculated output pose to free up registers and improve performance.

Pull Request resolved: #7475

This diff introduces a shared variable to store calculated output pose in conv2d_pw op to free up registers and improve performance. The code changes include adding a shared variable to hold calculated positions and modifying the existing code to use the shared variable.
ghstack-source-id: 260166242

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

* [ET-VK] Changing texture access pattern for conv2d pw op to improve performance.

Pull Request resolved: #7476

This diff changes the texture access pattern for conv2d pw op to iterate first on x axis then y and then z to improve performance.
ghstack-source-id: 260166241
@exported-using-ghexport

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

* [ET-VK] Changing texture access pattern for conv2d dw op to improve performance.

Pull Request resolved: #7477

This diff changes the texture access pattern for convolutional depthwise (DW) operations in Executorch's Vulkan backend to iterate first on x axis then y and then z to improve performance.
ghstack-source-id: 260166240
@exported-using-ghexport

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

* [ET-VK] Adding batch processing to conv2d dw shader by caching input texel and kernel values for reuse.

Pull Request resolved: #7485

This diff adds batch processing to the conv2d dw shader by caching input texel and kernel values for reuse. This optimization reduces the number of texture lookups and kernel computations, improving the performance of the convolution operation.
ghstack-source-id: 260166243
@exported-using-ghexport

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

---------

Co-authored-by: Vivek Trivedi <5340687+trivedivivek@users.noreply.github.com>
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 topic: not user facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants