-
Notifications
You must be signed in to change notification settings - Fork 607
Support int8 texture tensors without requiring int8 buffers #4485
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/4485
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit c269cf9 with merge base 1090bcd ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D60536832 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D60536832 |
ad47a9a
to
e61fc08
Compare
…4485) Summary: Pull Request resolved: pytorch#4485 ## Context By default, storage buffers in Vulkan must contain 32 bit data types; using 8 bit and 16 bit data types in buffers can be enabled optionally by supporting the [VK_KHR_8bit_storage](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_8bit_storage.html) extension or the [VK_KHR_16bit_storage](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_16bit_storage.html) extension respectively. Previously, 8-bit and 16-bit tensors were enabled by using those extensions; however, this meant that 8-bit and 16-bit tensors could not be used if the Vulkan driver does not support the corresponding extension. This diff adds support for 8-bit texture-backed tensors without the need for the VK_KHR_8bit_storage extension. This is done by introducing shaders that manually pack and repack 4 8-bit integers into a single int32 value. Once the tensor data has been transferred to an image texture (which will use the `VK_FORMAT_R8G8B8A8_SINT` image format) the extension will no longer be required. Differential Revision: D60536832
…4485) Summary: Pull Request resolved: pytorch#4485 ## Context By default, storage buffers in Vulkan must contain 32 bit data types; using 8 bit and 16 bit data types in buffers can be enabled optionally by supporting the [VK_KHR_8bit_storage](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_8bit_storage.html) extension or the [VK_KHR_16bit_storage](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_16bit_storage.html) extension respectively. Previously, 8-bit and 16-bit tensors were enabled by using those extensions; however, this meant that 8-bit and 16-bit tensors could not be used if the Vulkan driver does not support the corresponding extension. This diff adds support for 8-bit texture-backed tensors without the need for the VK_KHR_8bit_storage extension. This is done by introducing shaders that manually pack and repack 4 8-bit integers into a single int32 value. Once the tensor data has been transferred to an image texture (which will use the `VK_FORMAT_R8G8B8A8_SINT` image format) the extension will no longer be required. Differential Revision: D60536832
This pull request was exported from Phabricator. Differential Revision: D60536832 |
e61fc08
to
c08a603
Compare
…4485) Summary: Pull Request resolved: pytorch#4485 ## Context By default, storage buffers in Vulkan must contain 32 bit data types; using 8 bit and 16 bit data types in buffers can be enabled optionally by supporting the [VK_KHR_8bit_storage](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_8bit_storage.html) extension or the [VK_KHR_16bit_storage](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_16bit_storage.html) extension respectively. Previously, 8-bit and 16-bit tensors were enabled by using those extensions; however, this meant that 8-bit and 16-bit tensors could not be used if the Vulkan driver does not support the corresponding extension. This diff adds support for 8-bit texture-backed tensors without the need for the VK_KHR_8bit_storage extension. This is done by introducing shaders that manually pack and repack 4 8-bit integers into a single int32 value. Once the tensor data has been transferred to an image texture (which will use the `VK_FORMAT_R8G8B8A8_SINT` image format) the extension will no longer be required. Reviewed By: jorgep31415 Differential Revision: D60536832
This pull request was exported from Phabricator. Differential Revision: D60536832 |
c08a603
to
c269cf9
Compare
This pull request has been merged in 448c7d3. |
Changes following from #4485 to support `texture2d` and support `uint8`, respectively. Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/) [ghstack-poisoned]
Changes following from #4485 to support `texture2d` and support `uint8`, respectively. Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/) ghstack-source-id: 246607065 Pull Request resolved: #5934
…ture" Changes following from #4485 to support `texture2d` and support `uint8`, respectively. Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/) [ghstack-poisoned]
Changes following from #4485 to support `texture2d` and support `uint8`, respectively. Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/) [ghstack-poisoned]
Pull Request resolved: #5934 Changes following from #4485 to support `texture2d` and support `uint8`, respectively. ghstack-source-id: 246658454 @exported-using-ghexport Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/)
…ture" "bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support `texture2d` and support `uint8`, respectively. Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/) [ghstack-poisoned]
"bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support `texture2d` and support `uint8`, respectively. Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/) [ghstack-poisoned]
Pull Request resolved: #5934 "bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support `texture2d` and support `uint8`, respectively. ghstack-source-id: 246672275 @exported-using-ghexport Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/)
…ture" "bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support `texture2d` and support `uint8`, respectively. Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/) [ghstack-poisoned]
"bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support `texture2d` and support `uint8`, respectively. Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/) [ghstack-poisoned]
Pull Request resolved: #5934 "bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support `texture2d` and support `uint8`, respectively. ghstack-source-id: 246725187 @exported-using-ghexport Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/)
Pull Request resolved: #5934 "bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support `texture2d` and support `uint8`, respectively. ghstack-source-id: 246850704 @exported-using-ghexport Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/)
…ture" "bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support `texture2d` and support `uint8`, respectively. Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/) [ghstack-poisoned]
"bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support `texture2d` and support `uint8`, respectively. Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/) [ghstack-poisoned]
…ture" "bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support `texture2d` and support `uint8`, respectively. Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/) [ghstack-poisoned]
"bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support `texture2d` and support `uint8`, respectively. Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/) [ghstack-poisoned]
Pull Request resolved: #5934 "bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support `texture2d` and support `uint8`, respectively. ghstack-source-id: 246869292 @exported-using-ghexport Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/)
…ture" "bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support `texture2d` and support `uint8`, respectively. Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/) [ghstack-poisoned]
"bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support `texture2d` and support `uint8`, respectively. Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/) [ghstack-poisoned]
Pull Request resolved: #5934 "bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support `texture2d` and support `uint8`, respectively. ghstack-source-id: 246872869 @exported-using-ghexport Differential Revision: [D63918659](https://our.internmc.facebook.com/intern/diff/D63918659/)
Summary: Pull Request resolved: #5934 "bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support `texture2d` and support `uint8`, respectively. ghstack-source-id: 246872869 exported-using-ghexport bypass-github-export-checks bypass-github-pytorch-ci-checks bypass-github-executorch-ci-checks Reviewed By: SS-JIA Differential Revision: D63918659 fbshipit-source-id: d4095228fac24be118af8bb0bf42b453ca0a03a2
…ge, take 2" "bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support texture2d and support uint8, respectively. Differential Revision: [D64076249](https://our.internmc.facebook.com/intern/diff/D64076249/) [ghstack-poisoned]
"bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support texture2d and support uint8, respectively. Differential Revision: [D64076249](https://our.internmc.facebook.com/intern/diff/D64076249/) [ghstack-poisoned]
…ge, take 2" "bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support texture2d and support uint8, respectively. Differential Revision: [D64076249](https://our.internmc.facebook.com/intern/diff/D64076249/) [ghstack-poisoned]
"bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support texture2d and support uint8, respectively. Differential Revision: [D64076249](https://our.internmc.facebook.com/intern/diff/D64076249/) [ghstack-poisoned]
Summary: Pull Request resolved: #6028 "bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from #4485 to support `texture2d` and support `uint8`, respectively. (Redo of #5934) ghstack-source-id: 247078906 Reviewed By: SS-JIA Differential Revision: D64076249 fbshipit-source-id: 541cfddf92c55ebd4c6e39c6bd041fb5aa78b3b9
Pull Request resolved: pytorch/executorch#6028 "bitw8" = bit width 8, which is equivalent to 8-bit. We use "bitw8" as the name since shader compilation disallows names starting with a digit. Changes follow from pytorch/executorch#4485 to support `texture2d` and support `uint8`, respectively. (Redo of pytorch/executorch#5934) ghstack-source-id: 247078906 Differential Revision: [D64076249](https://our.internmc.facebook.com/intern/diff/D64076249/)
Summary:
Context
By default, storage buffers in Vulkan must contain 32 bit data types; using 8 bit and 16 bit data types in buffers can be enabled optionally by supporting the VK_KHR_8bit_storage extension or the VK_KHR_16bit_storage extension respectively.
Previously, 8-bit and 16-bit tensors were enabled by using those extensions; however, this meant that 8-bit and 16-bit tensors could not be used if the Vulkan driver does not support the corresponding extension.
This diff adds support for 8-bit texture-backed tensors without the need for the VK_KHR_8bit_storage extension. This is done by introducing shaders that manually pack and repack 4 8-bit integers into a single int32 value. Once the tensor data has been transferred to an image texture (which will use the
VK_FORMAT_R8G8B8A8_SINT
image format) the extension will no longer be required.Differential Revision: D60536832