Skip to content

Conversation

@Peddinti-Sriram-Bharadwaj
Copy link

@Peddinti-Sriram-Bharadwaj Peddinti-Sriram-Bharadwaj commented Dec 25, 2025

Summary

Fixes Ninja build support for the Vulkan backend by removing wildcard usage in DEPENDS.

Fixes #16354
Fixes #14984

The backends/vulkan/cmake/ShaderLibrary.cmake file previously used a wildcard (${shaders_path}/*) in the DEPENDS clause of a custom command. Ninja does not support wildcard expansion in dependencies, which caused the build to fail with:
ninja: error: '.../glsl/*', needed by 'vk_compute_shaders/spv.cpp', missing and no known rule to make it.

This PR replaces the wildcard usage with an explicit file(GLOB ...) command to resolve the source files before passing them to DEPENDS, making the build compatible with the Ninja generator.

Test plan

Verified the fix by rebuilding the Android executor_runner using Ninja:

  1. Clean Build: rm -rf cmake-out-android
  2. Configure:
    cmake . -G Ninja -DCMAKE_INSTALL_PREFIX=cmake-out-android \
      -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake \
      -DANDROID_ABI=arm64-v8a \
      -DANDROID_PLATFORM=android-26 \
      -DEXECUTORCH_BUILD_VULKAN=ON \
      -DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
      -DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \
      -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \
      -DEXECUTORCH_BUILD_EXTENSION_NAMED_DATA_MAP=ON \
      -DEXECUTORCH_BUILD_EXTENSION_LLM=OFF \
      -DPYTHON_EXECUTABLE=$(which python) \
      -Bcmake-out-android
  3. Build: ninja -C cmake-out-android -> Success (previously failed).
  4. Runtime Verification: Pushed the built executor_runner to an Android device and executed a MobileNetV2 model to ensure the binary loads and runs (confirmed same runtime behavior as the Make build).

cc @SS-JIA @manuelcandales @digantdesai @cbilgin

…rd-shader-library

[Vulkan] Fix Ninja build failure by removing wildcard dependencies
@pytorch-bot pytorch-bot bot added the module: vulkan Issues related to the Vulkan delegate and code under backends/vulkan/ label Dec 25, 2025
@pytorch-bot
Copy link

pytorch-bot bot commented Dec 25, 2025

🔗 Helpful Links

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

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

✅ No Failures

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

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

@meta-cla
Copy link

meta-cla bot commented Dec 25, 2025

Hi @Peddinti-Sriram-Bharadwaj!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla
Copy link

meta-cla bot commented Dec 25, 2025

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla 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 25, 2025
@Peddinti-Sriram-Bharadwaj
Copy link
Author

@pytorchbot label "release notes: build"

@pytorch-bot pytorch-bot bot added the release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc. label Dec 25, 2025
@Peddinti-Sriram-Bharadwaj
Copy link
Author

@pytorchbot label "release notes: vulkan"

@pytorch-bot pytorch-bot bot added the release notes: vulkan Changes to the Vulkan backend delegate label Dec 25, 2025
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. module: vulkan Issues related to the Vulkan delegate and code under backends/vulkan/ release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc. release notes: vulkan Changes to the Vulkan backend delegate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build for Android NDK with Vulkan fails [Build][Android] Ninja fails with wildcard error "glsl/*" on macOS (Darwin Kernel 26) / NDK 29

1 participant