discover VK_EXT_external_memory_host, vkhostallocator and use_weights_in_host_memory option#6531
Conversation
|
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6531 +/- ##
==========================================
- Coverage 93.04% 92.95% -0.10%
==========================================
Files 809 809
Lines 256244 256458 +214
==========================================
- Hits 238430 238394 -36
- Misses 17814 18064 +250 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds support for the Vulkan extension VK_EXT_external_memory_host, introduces a new VkHostAllocator class that can import host-allocated memory into Vulkan device memory, and adds a new option use_weights_in_host_memory to control whether to use this allocator for weight storage.
Changes:
- Added Vulkan extension definition for
VK_EXT_external_memory_hostin header fix file - Renamed reserved option field to
use_weights_in_host_memoryto enable host memory usage for weights - Implemented
VkHostAllocatorthat uses external memory import when the extension is available
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vulkan_header_fix.h | Adds structures and constants for VK_EXT_external_memory_host extension |
| src/option.h | Renames use_reserved_2 to use_weights_in_host_memory |
| src/option.cpp | Initializes use_weights_in_host_memory to false |
| src/net.cpp | Uses VkHostAllocator when use_weights_in_host_memory is enabled |
| src/gpu.h | Adds support query and function pointer for VK_EXT_external_memory_host |
| src/gpu.cpp | Implements extension detection and initialization for VK_EXT_external_memory_host |
| src/allocator.h | Declares VkHostAllocator class and allocate_import_host_memory method |
| src/allocator.cpp | Implements VkHostAllocator with external host memory import support and fixes Android Hardware Buffer mapped_ptr initialization |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.