vulkan packing code clean, drop image storage type#6128
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6128 +/- ##
==========================================
- Coverage 95.81% 95.81% -0.01%
==========================================
Files 831 831
Lines 264935 264990 +55
==========================================
+ Hits 253843 253895 +52
- Misses 11092 11095 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The binary size change of libncnn.so (bytes)
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
Cleanup Vulkan packing code by removing image‐storage variants, unifying on a new cast_type model, and updating layer and GPU APIs to drop storage_type.
- Removed legacy
*_fp*_to_fp*shader files and storage‐type branches in shaders - Renamed
storage_type_from/totocast_type_from/toinPackingand shader code - Updated
convert_packingoverloads andget_utility_operatorto work withcast_typeonly
Reviewed Changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/layer/vulkan/shader/packing_pack4to1.comp | Unified on cast_type, removed storage‐type branching |
| src/layer/packing.h | Dropped storage_type fields, updated comments for cast_type |
| src/gpu.cpp | Added convert_packing overload, refactored get_utility_operator |
| src/command.cpp | Updated calls to convert_packing to pass cast_type_to |
Comments suppressed due to low confidence (1)
src/gpu.cpp:4226
- The new
convert_packingoverload withcast_type_tointroduces multiple cast branches (auto, fp32, fp16). Add unit or integration tests to cover eachcast_type_topath to ensure correct behavior.
void VulkanDevice::convert_packing(const VkMat& src, VkMat& dst, int dst_elempack, int cast_type_to, VkCompute& cmd, const Option& opt) const
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.