support concat batch inference by futz12 · Pull Request #7129 · Tencent/ncnn · GitHub
Skip to content

support concat batch inference - #7129

Open
futz12 wants to merge 1 commit into
Tencent:masterfrom
futz12:concat-batch
Open

futz12 wants to merge 1 commit into
Tencent:masterfrom
futz12:concat-batch

Conversation

@futz12

@futz12 futz12 commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8f3a24d86e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/layer/concat.cpp

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Emit the batch-axis sentinel from all model converters

When this feature is used through ONNX, Caffe, or MXNet conversion, the new batch branch is unreachable: ONNX writes source axis 0 as 0 (tools/onnx/onnx2ncnn.cpp:4234-4237), while Caffe and MXNet subtract one and write -1 (tools/caffe/caffe2ncnn.cpp:334-338 and tools/mxnet/mxnet2ncnn.cpp:1889-1892). With batched inputs those values are interpreted as per-sample axes, so axis-0 concat either rejects unequal batches or concatenates channels/width instead of summing Mat::n; map the source batch axis to -233 in these converters as pnnx now does.

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant