Skip to content

[ET-VK] Serialize all scalar types #2414

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

Closed
wants to merge 2 commits into from

Conversation

Copy link

pytorch-bot bot commented Mar 13, 2024

🔗 Helpful Links

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

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

❌ 1 New Failure, 1 Pending

As of commit 444352b with merge base 9ff2c0e (image):

NEW FAILURE - The following job has failed:

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 Mar 13, 2024
@facebook-github-bot
Copy link
Contributor

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

jorgep31415 added a commit that referenced this pull request Mar 13, 2024
Differential Revision: [D54873255](https://our.internmc.facebook.com/intern/diff/D54873255/)

ghstack-source-id: 218568548
Pull Request resolved: #2414
@facebook-github-bot
Copy link
Contributor

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

jorgep31415 added a commit that referenced this pull request Mar 13, 2024
Pull Request resolved: #2414

Adds all the [non-quantized scalar types from ATen Vulkan](https://github.com/pytorch/pytorch/blob/main/aten/src/ATen/native/vulkan/api/Types.h#L21-L26).
```
  _(uint8_t, VK_FORMAT_R8G8B8A8_UINT, Byte)              \
  _(int8_t, VK_FORMAT_R8G8B8A8_SINT, Char)               \
  _(int32_t, VK_FORMAT_R32G32B32A32_SINT, Int)           \
  _(bool, VK_FORMAT_R8G8B8A8_SINT, Bool)                 \
  _(unsigned short, VK_FORMAT_R16G16B16A16_SFLOAT, Half) \
  _(float, VK_FORMAT_FLOAT4, Float)                      \
```

Tensor images and buffers will now be created according to this `dtype`.

It's up to contributors to associate their shader to one of these dtypes, e.g., in [`all_shaders.yaml`](https://github.com/pytorch/executorch/blob/main/backends/vulkan/runtime/graph/ops/glsl/all_shaders.yaml#L32-L46).
```
image_to_nchw:
  ...
  generate_variant_forall:
    DTYPE:
      - VALUE: "half"
        SUFFIX: "half"
      - VALUE: "float"
        SUFFIX: "float"
  ...
```

Differential Revision: [D54873255](https://our.internmc.facebook.com/intern/diff/D54873255/)
ghstack-source-id: 218582139
@SS-JIA SS-JIA self-requested a review March 13, 2024 23:14
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 1eb9a15.

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 Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants