Skip to content

chore: build android with vulkan and qualcomm backends#1028

Draft
msluszniak wants to merge 7 commits intomainfrom
@ms/add-vulkan-and-qualcomm-backends
Draft

chore: build android with vulkan and qualcomm backends#1028
msluszniak wants to merge 7 commits intomainfrom
@ms/add-vulkan-and-qualcomm-backends

Conversation

@msluszniak
Copy link
Copy Markdown
Member

Description

This PR adds vulkan and qualcomm backends to the android build.

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

Add android model exported on vulkan / qualcomm and check if it works correctly in our workflow.

Screenshots

Related issues

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

Additional notes

@msluszniak msluszniak self-assigned this Mar 30, 2026
@msluszniak msluszniak added platform: android Issues and tasks related to Android performance Related to all issues and tasks focused on improving performance 3rd party package Issue related to 3rd party packages, but not ExecuTorch, e.g. Expo labels Mar 30, 2026
@msluszniak msluszniak marked this pull request as draft March 30, 2026 13:33
msluszniak and others added 3 commits March 30, 2026 15:56
- Replace fat libexecutorch.so (with QNN) with Vulkan-only build
- Add ExecuTorch static libs for arm64-v8a (stripped of debug symbols)
- Switch kernel registration to liboptimized_native_cpu_ops_lib.a (208 kernels)
  covering all portable + optimized CPU ops required by RF-DETR and other models
- Add Vulkan, XNNPACK backends via --whole-archive static linking
- Update tokenizer include path to pytorch/tokenizers layout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@msluszniak
Copy link
Copy Markdown
Member Author

Confirmed that:

    if (ptr == nullptr)
      ptr = saved_ptr;

in executorch/backends/xnnpack/runtime/XNNWeightsCache.cpp right after void* saved_ptr = context->offset_to_addr(context, offset); is still needed.

@chmjkb
Copy link
Copy Markdown
Collaborator

chmjkb commented Mar 31, 2026

how does this influence the package size?

@msluszniak
Copy link
Copy Markdown
Member Author

how does this influence the package size?

This is more an experimental setup right now to run vulkan and qualcomm and test the benefits of both. Ultimately, we are forced to use selective builds before we move with these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3rd party package Issue related to 3rd party packages, but not ExecuTorch, e.g. Expo performance Related to all issues and tasks focused on improving performance platform: android Issues and tasks related to Android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants