Skip to content

Commit 17f61e7

Browse files
committed
Add support to half
1 parent 4b599e5 commit 17f61e7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

torchaudio/functional/functional.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ def _get_complex_dtype(real_dtype: torch.dtype):
130130
return torch.cdouble
131131
if real_dtype == torch.float:
132132
return torch.cfloat
133+
if real_dtype == torch.half:
134+
return torch.complex32
133135
raise ValueError(f'Unexpected dtype {real_dtype}')
134136

135137

0 commit comments

Comments
 (0)