Skip to content

[DO NOT REVIEW]: [MLAS] Hoist some input channel invariant code above a loop in the NCHWc conv#27792

Open
hariharans29 wants to merge 2 commits intomainfrom
hari/snchwc_opt_1
Open

[DO NOT REVIEW]: [MLAS] Hoist some input channel invariant code above a loop in the NCHWc conv#27792
hariharans29 wants to merge 2 commits intomainfrom
hari/snchwc_opt_1

Conversation

@hariharans29
Copy link
Member

Description

As title

Motivation and Context

Avoid redundant metadata setup

@hariharans29 hariharans29 requested a review from Copilot March 21, 2026 04:10
@hariharans29 hariharans29 changed the title Hoist some input channel invariant code above a loop in the NCHWc conv [MLAS] Hoist some input channel invariant code above a loop in the NCHWc conv Mar 21, 2026
Copy link
Contributor

Copilot AI left a comment

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 optimizes the MLAS NCHWc direct-convolution path by moving output-row–dependent kernel-parameter setup out of the per-input-channel-block loop, reducing redundant effective-kernel computation when processing multiple input-channel blocks.

Changes:

  • Reordered loops to iterate output rows (work) before iterating input-channel blocks (ic).
  • Hoisted ComputeEffectiveKernel(...) so it executes once per output row and is reused across all ic blocks for that row.

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

@hariharans29 hariharans29 changed the title [MLAS] Hoist some input channel invariant code above a loop in the NCHWc conv [DO NOT REVIEW]: [MLAS] Hoist some input channel invariant code above a loop in the NCHWc conv Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants