Skip to content

x86 deformableconv2d packed unified elempack - #6567

Merged
nihui merged 4 commits into
Tencent:masterfrom
nihui:x86-deformableconv-unified
Feb 28, 2026
Merged

x86 deformableconv2d packed unified elempack#6567
nihui merged 4 commits into
Tencent:masterfrom
nihui:x86-deformableconv-unified

Conversation

@nihui

@nihui nihui commented Feb 28, 2026

Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions Bot added the x86 label Feb 28, 2026
@tencent-adm

Copy link
Copy Markdown
Member

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov-commenter

codecov-commenter commented Feb 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.15%. Comparing base (7f5c042) to head (75d97af).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6567      +/-   ##
==========================================
- Coverage   93.25%   93.15%   -0.10%     
==========================================
  Files         860      846      -14     
  Lines      269010   265642    -3368     
==========================================
- Hits       250857   247471    -3386     
- Misses      18153    18171      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the x86 DeformableConv2D implementation to use a single unified “packed” kernel implementation, replacing many specialized packX/packXtoY variants.

Changes:

  • Replace per-elempack/out-elempack dispatch (pack4/8/16 and conversions) with a single deformableconv2d_packed() implementation.
  • Update the x86 forward path to call the unified packed kernel for all non-(pack1→pack1) cases.
  • Remove the legacy specialized packed kernel header implementations that are no longer referenced.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/layer/x86/deformableconv2d_x86.cpp Switches to including deformableconv2d_packed.h and routes packed execution through a single unified call.
src/layer/x86/deformableconv2d_packed.h Adds unified packed deformableconv2d kernel handling multiple elempack/out_elempack combinations.
src/layer/x86/deformableconv2d_pack8to4.h Removes legacy specialized pack8→pack4 kernel.
src/layer/x86/deformableconv2d_pack8to16.h Removes legacy specialized pack8→pack16 kernel.
src/layer/x86/deformableconv2d_pack8to1.h Removes legacy specialized pack8→pack1 kernel.
src/layer/x86/deformableconv2d_pack8.h Removes legacy specialized pack8 kernel.
src/layer/x86/deformableconv2d_pack4to8.h Removes legacy specialized pack4→pack8 kernel.
src/layer/x86/deformableconv2d_pack4to16.h Removes legacy specialized pack4→pack16 kernel.
src/layer/x86/deformableconv2d_pack4to1.h Removes legacy specialized pack4→pack1 kernel.
src/layer/x86/deformableconv2d_pack4.h Removes legacy specialized pack4 kernel.
src/layer/x86/deformableconv2d_pack1to8.h Removes legacy specialized pack1→pack8 kernel.
src/layer/x86/deformableconv2d_pack1to4.h Removes legacy specialized pack1→pack4 kernel.
src/layer/x86/deformableconv2d_pack1to16.h Removes legacy specialized pack1→pack16 kernel.
src/layer/x86/deformableconv2d_pack16to8.h Removes legacy specialized pack16→pack8 kernel.
src/layer/x86/deformableconv2d_pack16to4.h Removes legacy specialized pack16→pack4 kernel.
src/layer/x86/deformableconv2d_pack16to1.h Removes legacy specialized pack16→pack1 kernel.
src/layer/x86/deformableconv2d_pack16.h Removes legacy specialized pack16 kernel.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/layer/x86/deformableconv2d_packed.h Outdated
@nihui
nihui merged commit fc507d2 into Tencent:master Feb 28, 2026
81 of 82 checks passed
vlordier pushed a commit to vlordier/ncnn that referenced this pull request Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants