Conversation
…nv-vk # Conflicts: # src/layer/vulkan/deformableconv2d_vulkan.cpp
|
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6618 +/- ##
==========================================
+ Coverage 93.42% 93.45% +0.02%
==========================================
Files 873 875 +2
Lines 275524 280881 +5357
==========================================
+ Hits 257406 262491 +5085
- Misses 18118 18390 +272 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
There was a problem hiding this comment.
Pull request overview
Adds a Vulkan backend for DeformableConv2D, including packed and GEMM-based compute shaders (with an optional cooperative-matrix path) and the corresponding Vulkan layer implementation.
Changes:
- Introduces Vulkan compute shaders for deformable conv2d in packed, packed+GEMM, and cooperative-matrix GEMM variants.
- Adds
DeformableConv2D_vulkanlayer implementation with pipeline creation, weight packing/upload, and runtime dispatch (mask/no-mask, GEMM vs non-GEMM, coop-mat vs non-coop). - Implements weight packing for both standard packed and cooperative-matrix layouts.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/layer/vulkan/shader/deformableconv2d_packed.comp | Packed direct deformable-conv compute shader (mask optional). |
| src/layer/vulkan/shader/deformableconv2d_packed_gemm.comp | Packed GEMM-style deformable-conv shader processing 4 spatial positions per invocation (mask optional). |
| src/layer/vulkan/shader/deformableconv2d_gemm_cm.comp | Cooperative-matrix GEMM deformable-conv shader (fp16 storage path, mask optional). |
| src/layer/vulkan/deformableconv2d_vulkan.h | Declares the Vulkan layer, pipelines, and cooperative-matrix tuning parameters. |
| src/layer/vulkan/deformableconv2d_vulkan.cpp | Implements pipeline creation, weight packing/upload, padding handling, and runtime dispatch across shader variants. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return -100; | ||
|
|
||
| const int num_output_packed = (num_output + 3) / 4 * 4; | ||
| const int c_iterations = channels / elempack; |
There was a problem hiding this comment.
channels is already the packed channel count (VkMat::c) for the bordered input. Dividing by elempack makes c_iterations incorrect when elempack>1 (e.g., pack4), and it no longer matches the value baked into the shader specialization constants (num_input / elempack). This can break execution if psc(c) falls back to push constants (e.g., dynamic specialization), and it’s also misleading even if currently unused. Use the packed channel count directly (or derive from the known num_input / elempack) instead of channels / elempack.
| const int c_iterations = channels / elempack; | |
| const int c_iterations = channels; |
No description provided.