-
Notifications
You must be signed in to change notification settings - Fork 788
[Vulkan] Fix Ninja build failure by removing wildcard dependencies #16394
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
base: main
Are you sure you want to change the base?
[Vulkan] Fix Ninja build failure by removing wildcard dependencies #16394
Conversation
…rd-shader-library [Vulkan] Fix Ninja build failure by removing wildcard dependencies
🔗 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. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit e8606eb with merge base c730feb ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Hi @Peddinti-Sriram-Bharadwaj! Thank you for your pull request and welcome to our community. Action RequiredIn 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. ProcessIn 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 If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
@pytorchbot label "release notes: build" |
|
@pytorchbot label "release notes: vulkan" |
| endif() | ||
|
|
||
| # Ninja cannot expand wildcards (*) in DEPENDS lists. | ||
| file(GLOB VULKAN_SHADERS "${shaders_path}/*.glsl") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not equivalent to the previous behavior.
What about other file extensions?
file(GLOB VULKAN_SHADERS
"${shaders_path}/*.glsl"
"${shaders_path}/*.glslh"
"${shaders_path}/*.yaml"
"${shaders_path}/*.h"
)
Changes to .yaml, .glslh, or .h files will not trigger a rebuild.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mergennachin thank you the feedback, I shall make a more exhaustive glob that takes into account these file extensions as well?
please let me know any other changes I have to make, I will put them together and submit a new pr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I shall make a more exhaustive glob that takes into account these file extensions as well?
Yes exactly.
please let me know any other changes I have to make, I will put them together and submit a new pr.
you can just update this PR directly, no need to create another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mergennachin I have updated the PR, please check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Peddinti-Sriram-Bharadwaj I don't see the change -- where is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Peddinti-Sriram-Bharadwaj I don't see the change -- where is it?
im sorry i thought i had commited changes to the main branch, but it was to my fix branch. now its updated for sure.
…rd-shader-library Fix/ninja wildcard shader library
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 theDEPENDSclause 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_runnerusing Ninja:rm -rf cmake-out-androidninja -C cmake-out-android-> Success (previously failed).executor_runnerto 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