From 63ec0d5c6e3fa07f07ac4e8d47af21a46eb8fb14 Mon Sep 17 00:00:00 2001 From: hualxie Date: Mon, 13 Apr 2026 14:42:21 +0800 Subject: [PATCH] test null case for support_activation=True --- src/winml/modelkit/pattern/op_input_gen/op_input_gen.py | 2 ++ tests/unit/analyze/core/test_qdq.py | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/winml/modelkit/pattern/op_input_gen/op_input_gen.py b/src/winml/modelkit/pattern/op_input_gen/op_input_gen.py index 45b436370..cb5cb880d 100644 --- a/src/winml/modelkit/pattern/op_input_gen/op_input_gen.py +++ b/src/winml/modelkit/pattern/op_input_gen/op_input_gen.py @@ -1164,6 +1164,8 @@ def iter_qdq_combinations( needs_weight_iteration = False for input_name, is_constant in is_constant_map.items(): + if kwargs.get(input_name) is None: + continue # Optional input not provided — nothing to QDQ-wrap, skip if input_name not in qdq_config: # Input not in QDQ config - skip this combination # All inputs must be explicitly defined in qdq_config diff --git a/tests/unit/analyze/core/test_qdq.py b/tests/unit/analyze/core/test_qdq.py index 144f0d78c..2af99af5f 100644 --- a/tests/unit/analyze/core/test_qdq.py +++ b/tests/unit/analyze/core/test_qdq.py @@ -1105,8 +1105,9 @@ class TestIterQDQCombinations: ), # shape 3 * finite attributes 2 * 2 * 2 * optional combinations 2 * 2 * 2 * 4 ( "Pad", - 512, - ), # shape 8 * mode 4 * QDQ 4 * is_constant pads 2 * Tind 2 (actually axes not used) + 1024, + ), # shape 8 * mode 4 * QDQ 4 * is_constant pads 2 * constant_value present/absent 2 + # * Tind 2 (axes not used) # All Reduce* use this and it is enough ( "ReduceSum",