Conversation
|
@microsoft-github-policy-service agree |
Build on the existing converter from microsoft#2805. Unroll a static group count while preserving runtime offsets and logical output shapes. Add numerical, dynamic-input, empty-group, and compatibility tests. Assisted-by: ChatGPT
fad77e4 to
8e000b2
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3017 +/- ##
==========================================
+ Coverage 72.70% 72.76% +0.05%
==========================================
Files 265 265
Lines 32298 32339 +41
Branches 3059 3072 +13
==========================================
+ Hits 23481 23530 +49
+ Misses 7779 7770 -9
- Partials 1038 1039 +1 ☔ View full report in Codecov by Harness. |
|
Justin Chu (@justinchuby) Hi, now that #2805 is merged, this PR adds the offset-based layouts on top of it. It also fixes the I merged the latest main today, and the CI runs are waiting for approval. Could you review it when you have a chance? Thanks! |
Summary
Builds on the
aten_grouped_mmconverter added in #2805 and adds support for its offsets form. The existing dense, bias, and cast paths are unchanged.The converter now handles three layouts:
The number of groups must be known at export time, but offset values and input lengths can remain dynamic. If the final offset does not cover the full input, the converter keeps PyTorch's full output shape and fills the unwritten tail with zeros.
The offsets path does not currently support bias or changing the output dtype. The existing dense converter still supports both.
Testing
lintrunner -aandgit diff --checkpass.AI assistance
ChatGPT assisted with the implementation, tests, and result analysis. I reviewed the changes and the test results above.