-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
fix: ggml: fix vulkan-shaders-gen build #10448
Conversation
@jeffbolznv , @0cc4m |
@sparkleholic @jeffbolznv I understand, I'm sorry that a few PRs are getting delayed because of me. I'm currently ill, but getting better and I should be able to catch up with all of them later this week. Maybe you can resolve the merge conflict already? |
No rush, get well! I'm not an expert at cmake or cross compilation, so I don't think I should review the change. |
e9b3777
to
bf43351
Compare
@0cc4m |
I can confirm this still works as usual on my system, but I'm also not a CMake expert. Maybe @bandoti can take a look? |
I am happy to take a look. The one thing that comes to mind here after initial look through is being able to customize the compiler in this case. In particular, It would be worthwhile to add a default toolchain file for the build and allow one to customize by passing This would allow one to use a desire toolchain—maybe clang, etc. And a lot of those switches passed to ExternalProject_Add() can of course be moved to the toolchain file instead. |
@bandoti I have updated the code to handle the Please review the updated code once again. |
@bandoti Can you take another look? |
@sparkleholic Sorry for the delay! I had these review comments in but forgot to submit them. 🤦♂️ |
@sparkleholic Just following up on this change. If you need further assistance please let me know I am happy to help. |
@bandoti < Sorry for the late reply. |
5cb143f
to
49c225f
Compare
Rebased branch to latest master. |
49c225f
to
7c1a685
Compare
@sparkleholic No worries on the delay! Your contribution is greatly appreciated :) It appears as though the test failure is unrelated to this. I'm wondering if merging the latest and rerunning the tests will clear the status. I have only one minor question in the review. |
@sparkleholic I have submitted a pull request to your master_fix branch which updates to latest and resolves a minor merge conflict. Please merge it into your branch so we can get the CI fixed here and merge these changes in! Here's the PR for reference: sparkleholic#2 |
@bandoti < Thanks a lot! |
@sparkleholic A regular merge commit (the default) should be good. Our changes here will get squashed once they merge it into master. 😊 I just made one change, FYI, which adds |
Fix compile error not finding vulkan-shaders-gen
d1aec44
to
b6ebd4f
Compare
Fix build issues with vulkan-shaders-gen: - Add target dependency for correct build order - Use CMAKE_HOST_SYSTEM_NAME for executable suffix - Fix MSVC output directory in host toolchain - Normalize path handling for cross-compilation
fix: normalize vulkan-shaders-gen output path for MSVC
Improve host compiler detection for vulkan shader generation: - Add NO_CMAKE_FIND_ROOT_PATH to all compiler searches - Consolidate compiler detection logic - Fix Windows-specific MSVC detection - Ensure correct compiler search in cross-compilation
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.
Everything seems good to me except my one comment on detect_host_compiler
. After that (whether the suggestion works or not and we keep it as-is) I am happy to move forward!
Simplified the CMake function to improve the process of detecting the host compiler.
Please hold on merging this patch for a moment. I'm checking my cross-compilation environment one last time. |
Since `vulkan-shader-gen.cpp` only requires the `glslc` executable and not the Vulkan headers or libraries, CMakeLists.txt needs to be corrected. (See: ecc93d0)
FYI: @jeffbolznv |
@bandoti < |
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.
Looks good to me!
This change is not related to my part. I was added because you pushed a merge commit or rebase. Please ask for people who maintains the vulkan backend. |
- Rename host_toolchain.cmake.in to cmake/host-toolchain.cmake.in
Rename the macro GGML_SHADERS_GEN_TOOLCHAIN to GGML_VULKAN_SHADERS_GEN_TOOLCHAIN
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.
Thank you for your patience with all the feedback. I tested it and found no issues.
The vulkan-shaders-gen target was not being built correctly in case of cross-compilation.
Other outputs need to be built for the cross compile target, but vulkan-shaders-gen needs to be built for the host.