diff --git a/torch/testing/_internal/opinfo/core.py b/torch/testing/_internal/opinfo/core.py index 2aa38511d4e97..cd94ff23a4391 100644 --- a/torch/testing/_internal/opinfo/core.py +++ b/torch/testing/_internal/opinfo/core.py @@ -1430,7 +1430,7 @@ def supported_backward_dtypes(self, device_type): else self.backward_dtypesIfCUDA ) elif device_type == "hpu": - backward_dtype = self.backward_dtypesIfHpu + backward_dtypes = self.backward_dtypesIfHpu else: backward_dtypes = self.backward_dtypes