From 3392215ef69b483bff82bf7b0270c2349b33a73c Mon Sep 17 00:00:00 2001 From: Danielle Pintz <38207072+daniellepintz@users.noreply.github.com> Date: Mon, 4 Oct 2021 05:14:13 -0700 Subject: [PATCH] Fix broken `test_cpu_amp_precision_context_manager` (#9809) * @RunIf(min_gpus=1) * dtype -> fast_dtype --- tests/plugins/test_amp_plugins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/plugins/test_amp_plugins.py b/tests/plugins/test_amp_plugins.py index be666f3aa7..d039866312 100644 --- a/tests/plugins/test_amp_plugins.py +++ b/tests/plugins/test_amp_plugins.py @@ -209,7 +209,7 @@ def test_cpu_amp_precision_context_manager(tmpdir): assert not hasattr(plugin, "scaler") context_manager = plugin.autocast_context_manager() assert isinstance(context_manager, torch.cpu.amp.autocast) - assert context_manager.dtype == torch.bfloat16 + assert context_manager.fast_dtype == torch.bfloat16 @pytest.mark.skipif(not _TORCH_CPU_AMP_AVAILABLE, reason="Torch CPU AMP is not available.")