From 482cedd0ae6f93c1934e5bd3df21d57665c89514 Mon Sep 17 00:00:00 2001 From: Zhaoheng Ni Date: Tue, 15 Feb 2022 19:28:12 +0000 Subject: [PATCH] fix device mismatch in torchscript test --- .../functional/torchscript_consistency_impl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/torchaudio_unittest/functional/torchscript_consistency_impl.py b/test/torchaudio_unittest/functional/torchscript_consistency_impl.py index b2a1f08615d..98644c92d84 100644 --- a/test/torchaudio_unittest/functional/torchscript_consistency_impl.py +++ b/test/torchaudio_unittest/functional/torchscript_consistency_impl.py @@ -654,7 +654,7 @@ def func(tensor): def test_compute_power_spectral_density_matrix_with_mask(self): def func(tensor): - mask = torch.rand(201, 100) + mask = torch.rand(201, 100, device=tensor.device) return F.compute_power_spectral_density_matrix(tensor, mask=mask) tensor = torch.rand(2, 201, 100, dtype=torch.cfloat)