Fix broken `test_cpu_amp_precision_context_manager` (#9809)

* @RunIf(min_gpus=1)

* dtype -> fast_dtype
This commit is contained in:
Danielle Pintz 2021-10-04 05:14:13 -07:00 committed by GitHub
parent 6d530373c0
commit 3392215ef6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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.")