Skip to content

[RNE Rewrite] feat(models): add a Vulkan Supertonic variant - #1400

Closed
msluszniak wants to merge 2 commits into
@ms/platform-default-modelsfrom
@ms/supertonic-vulkan
Closed

[RNE Rewrite] feat(models): add a Vulkan Supertonic variant#1400
msluszniak wants to merge 2 commits into
@ms/platform-default-modelsfrom
@ms/supertonic-vulkan

Conversation

@msluszniak

Copy link
Copy Markdown
Member

Description

Adds a Vulkan fp16 build of Supertonic, covering all four sub-models. Vulkan leads BACKEND_ORDER.android, so this becomes the Android default for models.textToSpeech.SUPERTONIC.

Measured on a Galaxy S26 Ultra (Adreno 840), medians over interleaved rounds, at 512 text tokens and 1000 latent frames:

sub-model vulkan fp16 xnnpack fp32 speedup
duration_predictor 18.7 33.2 1.78x
text_encoder 72.3 140.9 1.95x
vector_estimator 682.5 1253.7 1.84x
vocoder 865.8 1284.3 1.48x

2.12x end to end at the default 8 flow-matching steps, where vector_estimator is 84% of the total. Outputs match the fp32 CPU references at cosine 1.000000, 0.999414, 0.999994 and 0.999977.

textToSpeech now provisions vulkan in download-libs. Without it the backend is never downloaded and the model silently falls back to XNNPACK.

Getting the model to lower correctly needed five ExecuTorch fixes, all open upstream and cherry-picked into the labs fork: pytorch/executorch#22399, #22401, #22402, #22403 and #22406. The Vulkan artifacts on the ExecuTorch 1.4.1 pre-release carry them.

Introduces a breaking change?

  • Yes
  • No

Type of change

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Documentation update (improves or adds clarity to existing documentation)
  • Other (chores, tests, code style improvements etc.)

Tested on

  • iOS
  • Android

Testing instructions

  1. Run apps/speech on an Android device.
  2. Open Text to Speech. The model picker now offers Vulkan (GPU) and starts on it.
  3. Synthesize; compare against the XNNPACK entry in the same picker.

Related issues

Stacked on #1392.

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings

All four sub-models lower to Vulkan. On a Galaxy S26 Ultra (Adreno 840),
medians over interleaved rounds, at 512 text tokens and 1000 latent frames:

                        vulkan   xnnpack
  duration_predictor      18.7      33.2   1.78x
  text_encoder            72.3     140.9   1.95x
  vector_estimator       682.5    1253.7   1.84x
  vocoder                865.8    1284.3   1.48x

2.12x end to end at the default 8 flow-matching steps, where vector_estimator
is 84% of the total. Outputs match the fp32 CPU references at cosine 1.000000,
0.999414, 0.999994 and 0.999977.

Vulkan leads BACKEND_ORDER.android, so this becomes the Android default.

textToSpeech now provisions vulkan in download-libs; without it the backend is
never downloaded and the model silently falls back to XNNPACK.

Needs the ExecuTorch fixes in pytorch/executorch#22399, #22401, #22402, #22403
and #22406, all cherry-picked into the labs fork and built into the 1.4.1
native libs.
Adds the Vulkan entry to the model picker and makes it the initial selection on
Android, which is also what SUPERTONIC.DEFAULT resolves to there.
@msluszniak

Copy link
Copy Markdown
Member Author

Folding these commits into #1392 instead.

@msluszniak msluszniak closed this Sep 1, 2026
@msluszniak
msluszniak deleted the @ms/supertonic-vulkan branch September 1, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant