-
Notifications
You must be signed in to change notification settings - Fork 633
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ghstack-source-id: 95de1f270b5341685c87d2952be25cef15da55b0 Pull Request resolved: #1359
- Loading branch information
Showing
6 changed files
with
46 additions
and
19 deletions.
There are no files selected for viewing
12 changes: 11 additions & 1 deletion
12
test/torchaudio_unittest/functional/kaldi_compatibility_cpu_test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
import torch | ||
|
||
from torchaudio_unittest.common_utils import PytorchTestCase | ||
from .kaldi_compatibility_test_impl import KaldiCPUOnly | ||
from .kaldi_compatibility_test_impl import Kaldi, KaldiCPUOnly | ||
|
||
|
||
class TestKaldiCPUOnly(KaldiCPUOnly, PytorchTestCase): | ||
dtype = torch.float32 | ||
device = torch.device('cpu') | ||
|
||
|
||
class TestKaldiFloat32(Kaldi, PytorchTestCase): | ||
dtype = torch.float32 | ||
device = torch.device('cpu') | ||
|
||
|
||
class TestKaldiFloat64(Kaldi, PytorchTestCase): | ||
dtype = torch.float64 | ||
device = torch.device('cpu') |
16 changes: 16 additions & 0 deletions
16
test/torchaudio_unittest/functional/kaldi_compatibility_cuda_test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import torch | ||
|
||
from torchaudio_unittest.common_utils import PytorchTestCase, skipIfNoCuda | ||
from .kaldi_compatibility_test_impl import Kaldi | ||
|
||
|
||
@skipIfNoCuda | ||
class TestKaldiFloat32(Kaldi, PytorchTestCase): | ||
dtype = torch.float32 | ||
device = torch.device('cuda') | ||
|
||
|
||
@skipIfNoCuda | ||
class TestKaldiFloat64(Kaldi, PytorchTestCase): | ||
dtype = torch.float64 | ||
device = torch.device('cuda') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters