Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions backends/arm/test/passes/test_replace_inf_values_pass.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2025 Arm Limited and/or its affiliates.
# Copyright 2025-2026 Arm Limited and/or its affiliates.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
Expand Down Expand Up @@ -49,7 +49,7 @@ def _get_mask_buffer(graph_module: fx.GraphModule) -> torch.Tensor:
return buffers["mask"]


def test_replace_inf_values_pass_clamps_inf_constants():
def test_replace_inf_and_limit_values_no_target_clamps_inf_constants():
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The test function names were updated to use the pass token replace_inf_and_limit_values, but the module filename is still test_replace_inf_values_pass.py. In this directory, pass tests are typically named after the pass token (e.g., test_decompose_avg_pool2d_pass.py, test_promote_bool_operands_pass.py), so keeping the old filename makes it harder to find/grep the tests for ReplaceInfAndLimitValuesPass. Consider renaming the file to match the pass (and updating any references if present).

Copilot uses AI. Check for mistakes.
"""
Trace a module with infinities, run ReplaceInfAndLimitValuesPass, and expect the buffer and scalar
literals to be clamped to ±255 with no infinities left.
Expand All @@ -66,7 +66,7 @@ def test_replace_inf_values_pass_clamps_inf_constants():
assert sorted(_get_add_constants(result.graph_module)) == [-255, 255]


def test_replace_inf_values_respects_disallowed_nodes():
def test_replace_inf_and_limit_values_no_target_respects_disallowed_nodes():
"""
When nodes opt out of transforms, running the pass in TFA mode should leave the mask buffer
untouched while still clamping scalar literals to ±255.
Expand Down
Loading