Skip to content

[quantization] Propagate qparam for expand#479

Merged
mhs4670go merged 1 commit intoSamsung:mainfrom
stamalakhov:fix_for_broadcast
Feb 10, 2026
Merged

[quantization] Propagate qparam for expand#479
mhs4670go merged 1 commit intoSamsung:mainfrom
stamalakhov:fix_for_broadcast

Conversation

@stamalakhov
Copy link
Contributor

@stamalakhov stamalakhov commented Feb 9, 2026

This PR propagates qparam forward for torch.ops.aten.expand.default .

It occurs that q_i @ k_i.transpose(-2, -1) expands k_i to match q_i shape. The expand operation is not quantized, so that its output is float32. Although o1 optimizer from ONE from handle such cases, let's try to support it here.

To find unquantized nodes just look for expand_1 in Netron and check its output.

./ccex test -k quantization.pass.test_propagate_quant_param.ExpandTest

RUN unit tests with -k quantization.pass.test_propagate_quant_param.ExpandTest ...
test_s16 (quantization.pass.test_propagate_quant_param.ExpandTest) ... ok

----------------------------------------------------------------------
Ran 1 test in 0.011s

OK

Draft: #436
TICO-DCO-1.0-Signed-off-by: s.malakhov s.malakhov@partner.samsung.com

@stamalakhov stamalakhov requested a review from mhs4670go February 9, 2026 11:08
@stamalakhov stamalakhov self-assigned this Feb 9, 2026
This PR propagates qparam forward for `torch.ops.aten.expand.default` .

TICO-DCO-1.0-Signed-off-by: s.malakhov <s.malakhov@partner.samsung.com>
Copy link
Contributor

@mhs4670go mhs4670go left a comment

Choose a reason for hiding this comment

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

LGTM

@mhs4670go mhs4670go merged commit 0395417 into Samsung:main Feb 10, 2026
7 checks passed
@stamalakhov stamalakhov deleted the fix_for_broadcast branch February 10, 2026 04:42
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