From 0a916ae18ebbb7acb4015d5dc341a1372f6f8f1c Mon Sep 17 00:00:00 2001 From: Natasha Badami Date: Mon, 8 Sep 2025 12:42:04 -0700 Subject: [PATCH] remove Numpy-2.0 incompatible use of numpy.product Summary: Replaced with numpy.prod in Numpy 2.0+. Reviewed By: florazzz Differential Revision: D81945242 --- backends/cadence/aot/tests/test_ref_implementations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backends/cadence/aot/tests/test_ref_implementations.py b/backends/cadence/aot/tests/test_ref_implementations.py index 37a250c70f7..5497f625b86 100644 --- a/backends/cadence/aot/tests/test_ref_implementations.py +++ b/backends/cadence/aot/tests/test_ref_implementations.py @@ -214,12 +214,12 @@ def test_quantized_linear( expected_output: torch.Tensor, ) -> None: src = ( - torch.arange(np.product(src_shape)) + torch.arange(np.prod(src_shape)) .reshape(src_shape) .to(expected_output.dtype) ) weight = ( - torch.arange(np.product(weight_shape)) + torch.arange(np.prod(weight_shape)) .reshape(weight_shape) .to(expected_output.dtype) )