Skip to content

[16/17] DLA public integration and reshape cleanup - #2968

Draft
mgohil-png wants to merge 1 commit into
dla/review-15-dla-topk-and-dtype-compatibilityfrom
dla/review-16-dla-public-integration-and-reshape-cleanup
Draft

mgohil-png wants to merge 1 commit into
dla/review-15-dla-topk-and-dtype-compatibilityfrom
dla/review-16-dla-public-integration-and-reshape-cleanup

Conversation

@mgohil-png

@mgohil-png mgohil-png commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Type of change: new feature

Expose the ordered DLA pipeline as make_dla_compatible through the Python API, surgery registry, and CLI. Load external weights, apply each transform in sequence, infer shapes at defined boundaries, reorder and check the final graph, and save through the shared ONNX helper. Add final reshape cleanup and controls for QDQ removal and external output weights. The supported transformations are not exhaustive; additional passes can be needed for other model patterns.

Part 16/17. Depends on part 15; merge from the bottom of the stack upward.

Usage

from modelopt.onnx.graph_surgery import make_dla_compatible

make_dla_compatible("input.onnx", "output.onnx")
python -m modelopt.onnx.graph_surgery make-dla-compatible --input input.onnx --output output.onnx

Testing

  • Validated on this branch's current commit on Windows CPU with Python 3.10 and ONNX 1.21.0: 53 passed, 1 warning.
  • Public API/CLI registration, logged stage order, QDQ options, saved outputs, boundary adapters, and rewrite safety.
  • Repository pre-commit hooks passed for this slice; the commit is signed off and its SSH signature was verified.
python -m pytest tests/unit/onnx/graph_surgery/dla_transforms/test_dla_logged_pipeline.py tests/unit/onnx/graph_surgery/dla_transforms/test_dla_make_compatible.py tests/unit/onnx/graph_surgery/dla_transforms/test_dla_rewrite_safety.py --noconftest -o addopts= -q --tb=short --durations=5

Tests ran with Hugging Face offline mode and without the repository-wide conftest/addopts; test-module fixtures still ran. GPU execution and DLA compilation were not run. The final stacked branch also passed the combined focused suite: 317 passed, 2 warnings.

Before your PR is "Ready for review"

  • Backward compatible: yes; this slice adds DLA-specific functionality.
  • Third-party code/new runtime dependencies: no new runtime dependency; contribution and security guidance reviewed.
  • Necessary tests: included for this slice, with focused synthetic fixtures.
  • Changelog: updated for the public feature.
  • Claude approval: pending for the current commit. Submitted as a draft.

Additional Information

Base branch: dla/review-15-dla-topk-and-dtype-compatibility. Review this slice against that branch; subsequent slices are reviewed separately.

Merge order: PR1 (merged) → Part 2/17 → Part 3/17 → Part 4/17 → Part 5/17 → Part 6/17 → Part 7/17 → Part 8/17 → Part 9/17 → Part 10/17 → Part 11/17 → Part 12/17 → Part 13/17 → Part 14/17 → Part 15/17 → Part 16/17 → Part 17/17

@copy-pr-bot

copy-pr-bot Bot commented Oct 23, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@mgohil-png

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

@mgohil-png
mgohil-png force-pushed the dla/review-16-dla-public-integration-and-reshape-cleanup branch from 2b85ef4 to 83bf56d Compare October 23, 2026 08:49
@mgohil-png
mgohil-png force-pushed the dla/review-16-dla-public-integration-and-reshape-cleanup branch from 83bf56d to 3e065d4 Compare October 23, 2026 08:54
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://NVIDIA.github.io/Model-Optimizer/pr-preview/pr-2968/

Built to branch gh-pages at 2026-10-23 17:35 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@mgohil-png
mgohil-png force-pushed the dla/review-16-dla-public-integration-and-reshape-cleanup branch 2 times, most recently from 626fadb to 67dc3a9 Compare October 23, 2026 10:32
@mgohil-png
mgohil-png force-pushed the dla/review-16-dla-public-integration-and-reshape-cleanup branch from 67dc3a9 to b10ae90 Compare October 23, 2026 10:54
@mgohil-png
mgohil-png force-pushed the dla/review-16-dla-public-integration-and-reshape-cleanup branch 2 times, most recently from 70cd166 to 49f96ba Compare October 23, 2026 12:10
@mgohil-png
mgohil-png force-pushed the dla/review-16-dla-public-integration-and-reshape-cleanup branch from 49f96ba to fbeabac Compare October 23, 2026 12:28
@mgohil-png
mgohil-png force-pushed the dla/review-16-dla-public-integration-and-reshape-cleanup branch from fbeabac to d890ca9 Compare October 23, 2026 12:42
@mgohil-png
mgohil-png force-pushed the dla/review-16-dla-public-integration-and-reshape-cleanup branch from d890ca9 to b9cf201 Compare October 23, 2026 13:03
@mgohil-png
mgohil-png force-pushed the dla/review-16-dla-public-integration-and-reshape-cleanup branch from b9cf201 to 78b1efd Compare October 23, 2026 13:22
@mgohil-png
mgohil-png force-pushed the dla/review-16-dla-public-integration-and-reshape-cleanup branch 2 times, most recently from 74cd72a to ac2994d Compare October 23, 2026 14:22
@mgohil-png
mgohil-png force-pushed the dla/review-16-dla-public-integration-and-reshape-cleanup branch from ac2994d to 02fe9a2 Compare October 23, 2026 15:04
@mgohil-png
mgohil-png force-pushed the dla/review-16-dla-public-integration-and-reshape-cleanup branch from 02fe9a2 to 61b253b Compare October 23, 2026 15:22
@mgohil-png
mgohil-png force-pushed the dla/review-16-dla-public-integration-and-reshape-cleanup branch from 61b253b to 11b937c Compare October 23, 2026 15:39
@mgohil-png
mgohil-png force-pushed the dla/review-16-dla-public-integration-and-reshape-cleanup branch 2 times, most recently from d49f45a to 7fb3900 Compare October 23, 2026 17:06
@mgohil-png
mgohil-png force-pushed the dla/review-16-dla-public-integration-and-reshape-cleanup branch from 7fb3900 to efbe9a4 Compare October 23, 2026 17:25

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant