Repository navigation
vulkan : fix undeclared test identifiers when GGML_VULKAN_RUN_TESTS=ON - #29946
Closed
sanjeevafk wants to merge 1 commit into
Closed
sanjeevafk wants to merge 1 commit into
sanjeevafk wants to merge 1 commit into
Conversation
PR ggml-org#28732 moved test functions into ggml-vulkan-debug.cpp while keeping their static storage class, causing undeclared identifier and linkage errors when building with -DGGML_VULKAN_RUN_TESTS=ON from caller ggml-vulkan.cpp. - Add declarations in ggml-vulkan-common.h under GGML_VULKAN_RUN_TESTS - Remove static from ggml_vk_test_dequant, ggml_vk_test_dequant_matmul, and ggml_vk_test_matmul - Add explicit template instantiation for ggml_vk_test_matmul<ggml_fp16_t, float> - Move default argument bool mmq = false to header declaration - Fix signedness comparison in ggml_vk_test_dequant_matmul Fixes ggml-org#29909
Contributor
|
#29912 is already open for this. |
Author
|
Thanks @jeffbolznv, missed #29912. Closing in favor of that! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Fixes #29909.
When compiling with
-DGGML_VULKAN=ON -DGGML_VULKAN_RUN_TESTS=ON, the build fails due to undeclared identifiers and internal linkage:Following PR #28732 which split
ggml-vulkan.cpp, the test functions (ggml_vk_test_dequant,ggml_vk_test_dequant_matmul,ggml_vk_test_matmul) were moved intoggml-vulkan-debug.cppwithstaticstorage duration, while their call sites remained inggml-vulkan.cpp.This PR:
ggml-vulkan-common.hguarded under#if defined(GGML_VULKAN_RUN_TESTS).staticfromggml_vk_test_dequant,ggml_vk_test_dequant_matmul, andggml_vk_test_matmulinggml-vulkan-debug.cpp.ggml_vk_test_matmul<ggml_fp16_t, float>inggml-vulkan-debug.cppfor the callers inggml-vulkan.cpp.bool mmq = false) to the header declaration inggml-vulkan-common.h.shader_size >= dq_configs.size()) inggml-vulkan-debug.cpp.Additional information
Verified locally:
cmake -B build-vk -DGGML_VULKAN=ON -DGGML_VULKAN_RUN_TESTS=ON && cmake --build build-vk --target ggml-vulkancompiles and linkslibggml-vulkan.sowith 0 errors.cmake -B build-cpu -DGGML_VULKAN=OFF && cmake --build build-cpu --target llama-clicompiles cleanly without regressions.Requirements