discover VK_KHR_vulkan_memory_model#6121
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds support for the VK_KHR_vulkan_memory_model extension by defining its structures and macros, integrating detection in GpuInfo, enabling it during device creation, and appending its features in SPIR-V compilation.
- Introduce extension definitions in
vulkan_header_fix.h - Expose support/query methods in
GpuInfo(gpu.h/gpu.cpp) - Enable the extension in
VulkanDeviceand SPIR-V feature appending ingpu.cpp
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/vulkan_header_fix.h | Added VK_KHR_vulkan_memory_model macro and feature struct |
| src/gpu.h | Declared support/query methods for the new extension |
| src/gpu.cpp | Initialized flags, chained feature queries, enabled extension, and appended SPIR-V features |
Comments suppressed due to low confidence (3)
src/vulkan_header_fix.h:1640
- Consider adding the standard
VK_KHR_VULKAN_MEMORY_MODEL_SPEC_VERSIONandVK_KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAMEmacros to fully match the official Vulkan extension headers.
#define VK_KHR_vulkan_memory_model 1
src/gpu.h:342
- [nitpick] You may want to add a brief Doxygen or comment describing what this method checks and what its return value represents to keep the API docs consistent.
int support_VK_KHR_vulkan_memory_model() const;
src/gpu.cpp:1859
- There aren't any unit tests covering this new support flag. Consider adding tests that simulate devices with and without
VK_KHR_vulkan_memory_modelto validate the flag and query methods.
int GpuInfo::support_VK_KHR_vulkan_memory_model() const
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6121 +/- ##
==========================================
+ Coverage 95.70% 95.79% +0.09%
==========================================
Files 829 829
Lines 270340 270769 +429
==========================================
+ Hits 258724 259392 +668
+ Misses 11616 11377 -239 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The binary size change of libncnn.so (bytes)
|
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.
No description provided.