From 87b071f120c5fe2b4829543293c3a98b3654d179 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 2 May 2026 03:45:41 +0000 Subject: [PATCH 1/2] Initial plan From c9c7759d2b2a5c877d536758cd3ffbab9ffbb1c6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 2 May 2026 04:00:48 +0000 Subject: [PATCH 2/2] Fix breaking CIs: reshape-reshape rule test and logsumexp float16 tolerance Agent-Logs-Url: https://github.com/microsoft/onnxscript/sessions/cb0312cb-87e4-4b34-845d-32155f2f2eb0 Co-authored-by: justinchuby <11205048+justinchuby@users.noreply.github.com> --- onnxscript/rewriter/rules/common/_basic_rules_test.py | 6 +++++- tests/function_libs/torch_lib/ops_test_data.py | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/onnxscript/rewriter/rules/common/_basic_rules_test.py b/onnxscript/rewriter/rules/common/_basic_rules_test.py index 7d4e9d9b33..67ebdaa495 100644 --- a/onnxscript/rewriter/rules/common/_basic_rules_test.py +++ b/onnxscript/rewriter/rules/common/_basic_rules_test.py @@ -528,7 +528,11 @@ def test_reshape_reshape_dynamic_rule(self, input_shape, shape2, allowzero2=0): # Check inference. inputs = np.random.default_rng(7).random(input_shape, dtype="float32") - testing.assert_numerically_equal(model, updated_model, (inputs,), atol=0, rtol=0) + # Use the reference implementation to avoid ORT incorrectly folding/rewriting + # the original two-reshape model (e.g. ignoring allowzero=1). + testing.assert_numerically_equal( + model, updated_model, (inputs,), atol=0, rtol=0, use_reference=True + ) @parameterized.parameterized.expand( [ diff --git a/tests/function_libs/torch_lib/ops_test_data.py b/tests/function_libs/torch_lib/ops_test_data.py index a40535f4ba..5e66204c6c 100644 --- a/tests/function_libs/torch_lib/ops_test_data.py +++ b/tests/function_libs/torch_lib/ops_test_data.py @@ -838,7 +838,9 @@ def _where_input_wrangler( "logcumsumexp", core_ops.aten_logcumsumexp, tolerance={torch.float16: (1e-2, 1e-1)} ), TorchLibOpInfo("logdet", core_ops.aten_logdet), - TorchLibOpInfo("logsumexp", core_ops.aten_logsumexp), + TorchLibOpInfo( + "logsumexp", core_ops.aten_logsumexp, tolerance={torch.float16: (2e-2, 1e-4)} + ), TorchLibOpInfo("lt", core_ops.aten_lt), TorchLibOpInfo("masked_fill", core_ops.aten_masked_fill).xfail( dtypes=(torch.bool,),