From 20b4176dcbb0b4582c7fff49b4d4285532157dd3 Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Sat, 1 Nov 2025 14:08:49 +0100 Subject: [PATCH] tests: fix variable reference in mul_to_multimul_checker --- notebooks/dev_tutorials/extend.ipynb | 4 ++-- thunder/tests/test_extend.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/notebooks/dev_tutorials/extend.ipynb b/notebooks/dev_tutorials/extend.ipynb index 9b091b02d7..78422e1351 100644 --- a/notebooks/dev_tutorials/extend.ipynb +++ b/notebooks/dev_tutorials/extend.ipynb @@ -290,8 +290,8 @@ "# can't handle other inputs\n", "def mul_to_multimul_checker(a: Number | TensorProxy, b: Number | TensorProxy) -> bool:\n", " def is_cpu(x: Number | TensorProxy) -> bool:\n", - " if isinstance(a, TensorProxy):\n", - " return a.device.devicetype == DeviceType.CPU\n", + " if isinstance(x, TensorProxy):\n", + " return x.device.devicetype == DeviceType.CPU\n", " return True\n", "\n", " return all(is_cpu(x) for x in (a, b))" diff --git a/thunder/tests/test_extend.py b/thunder/tests/test_extend.py index 13b8d50ef1..0a204aa9d0 100644 --- a/thunder/tests/test_extend.py +++ b/thunder/tests/test_extend.py @@ -63,8 +63,8 @@ def mul_to_multimul(a: Number | TensorProxy, b: Number | TensorProxy) -> TensorP def mul_to_multimul_checker(a: Number | TensorProxy, b: Number | TensorProxy) -> bool: def is_cpu(x: Number | TensorProxy) -> bool: - if isinstance(a, TensorProxy): - return a.device.devicetype == devices.DeviceType.CPU + if isinstance(x, TensorProxy): + return x.device.devicetype == devices.DeviceType.CPU return True return all(is_cpu(x) for x in (a, b))