Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
hehl2
Torchaudio
Commits
a9623854
"examples/vscode:/vscode.git/clone" did not exist on "38a664a3d61e27ab18cd698231422b3c38d6eebf"
Unverified
Commit
a9623854
authored
Jun 28, 2021
by
Caroline Chen
Committed by
GitHub
Jun 28, 2021
Browse files
Rename transducer to RNNT (#1603)
parent
76314a4b
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
26 additions
and
26 deletions
+26
-26
.circleci/torchscript_bc_test/common.sh
.circleci/torchscript_bc_test/common.sh
+1
-1
.circleci/unittest/linux/scripts/install.sh
.circleci/unittest/linux/scripts/install.sh
+1
-1
CMakeLists.txt
CMakeLists.txt
+1
-1
build_tools/setup_helpers/extension.py
build_tools/setup_helpers/extension.py
+2
-2
examples/libtorchaudio/CMakeLists.txt
examples/libtorchaudio/CMakeLists.txt
+1
-1
packaging/build_wheel.sh
packaging/build_wheel.sh
+1
-1
packaging/torchaudio/build.sh
packaging/torchaudio/build.sh
+1
-1
test/torchaudio_unittest/rnnt/autograd_cpu_test.py
test/torchaudio_unittest/rnnt/autograd_cpu_test.py
+2
-2
test/torchaudio_unittest/rnnt/autograd_cuda_test.py
test/torchaudio_unittest/rnnt/autograd_cuda_test.py
+2
-2
test/torchaudio_unittest/rnnt/rnnt_loss_cpu_test.py
test/torchaudio_unittest/rnnt/rnnt_loss_cpu_test.py
+2
-2
test/torchaudio_unittest/rnnt/rnnt_loss_cuda_test.py
test/torchaudio_unittest/rnnt/rnnt_loss_cuda_test.py
+2
-2
test/torchaudio_unittest/rnnt/torchscript_consistency_cpu_test.py
...chaudio_unittest/rnnt/torchscript_consistency_cpu_test.py
+2
-2
test/torchaudio_unittest/rnnt/torchscript_consistency_cuda_test.py
...haudio_unittest/rnnt/torchscript_consistency_cuda_test.py
+2
-2
test/torchaudio_unittest/rnnt/utils.py
test/torchaudio_unittest/rnnt/utils.py
+1
-1
torchaudio/csrc/CMakeLists.txt
torchaudio/csrc/CMakeLists.txt
+5
-5
No files found.
.circleci/torchscript_bc_test/common.sh
View file @
a9623854
...
...
@@ -67,5 +67,5 @@ build_master() {
printf
"* Installing torchaudio
\n
"
cd
"
${
_root_dir
}
"
||
exit
1
git submodule update
--init
--recursive
BUILD_
TRANSDUCER
=
1
BUILD_SOX
=
1 python setup.py clean
install
BUILD_
RNNT
=
1
BUILD_SOX
=
1 python setup.py clean
install
}
.circleci/unittest/linux/scripts/install.sh
View file @
a9623854
...
...
@@ -42,7 +42,7 @@ printf "Installing PyTorch with %s\n" "${cudatoolkit}"
# 2. Install torchaudio
printf
"* Installing torchaudio
\n
"
git submodule update
--init
--recursive
BUILD_
TRANSDUCER
=
1
BUILD_SOX
=
1 python setup.py
install
BUILD_
RNNT
=
1
BUILD_SOX
=
1 python setup.py
install
# 3. Install Test tools
printf
"* Installing test tools
\n
"
...
...
CMakeLists.txt
View file @
a9623854
...
...
@@ -56,7 +56,7 @@ endif()
# Options
option
(
BUILD_SOX
"Build libsox statically"
OFF
)
option
(
BUILD_KALDI
"Build kaldi statically"
ON
)
option
(
BUILD_
TRANSDUCER
"Enable transducer"
OFF
)
option
(
BUILD_
RNNT
"Enable
RNN
transducer"
OFF
)
option
(
BUILD_LIBTORCHAUDIO
"Build C++ Library"
ON
)
option
(
BUILD_TORCHAUDIO_PYTHON_EXTENSION
"Build Python extension"
OFF
)
option
(
USE_CUDA
"Enable CUDA support"
OFF
)
...
...
build_tools/setup_helpers/extension.py
View file @
a9623854
...
...
@@ -36,7 +36,7 @@ def _get_build(var, default=False):
_BUILD_SOX
=
False
if
platform
.
system
()
==
'Windows'
else
_get_build
(
"BUILD_SOX"
)
_BUILD_KALDI
=
False
if
platform
.
system
()
==
'Windows'
else
_get_build
(
"BUILD_KALDI"
,
True
)
_BUILD_
TRANSDUCER
=
_get_build
(
"BUILD_
TRANSDUCER
"
)
_BUILD_
RNNT
=
_get_build
(
"BUILD_
RNNT
"
)
_USE_ROCM
=
_get_build
(
"USE_ROCM"
)
_USE_CUDA
=
_get_build
(
"USE_CUDA"
,
torch
.
cuda
.
is_available
())
...
...
@@ -73,7 +73,7 @@ class CMakeBuild(build_ext):
f
"-DPython_INCLUDE_DIR=
{
distutils
.
sysconfig
.
get_python_inc
()
}
"
,
f
"-DBUILD_SOX:BOOL=
{
'ON'
if
_BUILD_SOX
else
'OFF'
}
"
,
f
"-DBUILD_KALDI:BOOL=
{
'ON'
if
_BUILD_KALDI
else
'OFF'
}
"
,
f
"-DBUILD_
TRANSDUCER
:BOOL=
{
'ON'
if
_BUILD_
TRANSDUCER
else
'OFF'
}
"
,
f
"-DBUILD_
RNNT
:BOOL=
{
'ON'
if
_BUILD_
RNNT
else
'OFF'
}
"
,
"-DBUILD_TORCHAUDIO_PYTHON_EXTENSION:BOOL=ON"
,
"-DBUILD_LIBTORCHAUDIO:BOOL=OFF"
,
f
"-DUSE_ROCM:BOOL=
{
'ON'
if
_USE_ROCM
else
'OFF'
}
"
,
...
...
examples/libtorchaudio/CMakeLists.txt
View file @
a9623854
...
...
@@ -6,7 +6,7 @@ SET(BUILD_LIBTORCHAUDIO ON CACHE BOOL "Build libtorchaudio")
SET
(
BUILD_SOX ON CACHE BOOL
"Build libsox into libtorchaudio"
)
SET
(
BUILD_KALDI OFF CACHE BOOL
"Build Kaldi into libtorchaudio"
)
SET
(
BUILD_
TRANSDUCER
OFF CACHE BOOL
"Build transducer into libtorchaudio"
)
SET
(
BUILD_
RNNT
OFF CACHE BOOL
"Build
RNN
transducer into libtorchaudio"
)
SET
(
BUILD_TORCHAUDIO_PYTHON_EXTENSION OFF CACHE BOOL
"Build Python binding"
)
find_package
(
Torch REQUIRED
)
...
...
packaging/build_wheel.sh
View file @
a9623854
...
...
@@ -15,5 +15,5 @@ if [[ "$OSTYPE" == "msys" ]]; then
python_tag
=
"
$(
echo
"cp
$PYTHON_VERSION
"
|
tr
-d
'.'
)
"
"
$script_dir
/vc_env_helper.bat"
python setup.py bdist_wheel
--plat-name
win_amd64
--python-tag
$python_tag
else
BUILD_
TRANSDUCER
=
1
BUILD_SOX
=
1 python setup.py bdist_wheel
BUILD_
RNNT
=
1
BUILD_SOX
=
1 python setup.py bdist_wheel
fi
packaging/torchaudio/build.sh
View file @
a9623854
#!/usr/bin/env bash
set
-ex
BUILD_
TRANSDUCER
=
1
BUILD_SOX
=
1 python setup.py
install
--single-version-externally-managed
--record
=
record.txt
BUILD_
RNNT
=
1
BUILD_SOX
=
1 python setup.py
install
--single-version-externally-managed
--record
=
record.txt
test/torchaudio_unittest/rnnt/autograd_cpu_test.py
View file @
a9623854
import
torch
from
.autograd_impl
import
Autograd
from
torchaudio_unittest
import
common_utils
from
.utils
import
skipIfNo
Transducer
from
.utils
import
skipIfNo
RNNT
@
skipIfNo
Transducer
@
skipIfNo
RNNT
class
TestAutograd
(
Autograd
,
common_utils
.
PytorchTestCase
):
dtype
=
torch
.
float32
device
=
torch
.
device
(
'cpu'
)
test/torchaudio_unittest/rnnt/autograd_cuda_test.py
View file @
a9623854
import
torch
from
.autograd_impl
import
Autograd
from
torchaudio_unittest
import
common_utils
from
.utils
import
skipIfNo
Transducer
from
.utils
import
skipIfNo
RNNT
@
skipIfNo
Transducer
@
skipIfNo
RNNT
@
common_utils
.
skipIfNoCuda
class
TestAutograd
(
Autograd
,
common_utils
.
PytorchTestCase
):
dtype
=
torch
.
float32
...
...
test/torchaudio_unittest/rnnt/rnnt_loss_cpu_test.py
View file @
a9623854
import
torch
from
torchaudio_unittest
import
common_utils
from
.utils
import
skipIfNo
Transducer
from
.utils
import
skipIfNo
RNNT
from
.rnnt_loss_impl
import
RNNTLossTest
@
skipIfNo
Transducer
@
skipIfNo
RNNT
class
TestRNNTLoss
(
RNNTLossTest
,
common_utils
.
PytorchTestCase
):
device
=
torch
.
device
(
'cpu'
)
test/torchaudio_unittest/rnnt/rnnt_loss_cuda_test.py
View file @
a9623854
import
torch
from
.rnnt_loss_impl
import
RNNTLossTest
from
torchaudio_unittest
import
common_utils
from
.utils
import
skipIfNo
Transducer
from
.utils
import
skipIfNo
RNNT
@
skipIfNo
Transducer
@
skipIfNo
RNNT
@
common_utils
.
skipIfNoCuda
class
TestRNNTLoss
(
RNNTLossTest
,
common_utils
.
PytorchTestCase
):
device
=
torch
.
device
(
'cuda'
)
test/torchaudio_unittest/rnnt/torchscript_consistency_cpu_test.py
View file @
a9623854
import
torch
from
torchaudio_unittest.common_utils
import
PytorchTestCase
from
.utils
import
skipIfNo
Transducer
from
.utils
import
skipIfNo
RNNT
from
.torchscript_consistency_impl
import
RNNTLossTorchscript
@
skipIfNo
Transducer
@
skipIfNo
RNNT
class
TestRNNTLoss
(
RNNTLossTorchscript
,
PytorchTestCase
):
device
=
torch
.
device
(
'cpu'
)
test/torchaudio_unittest/rnnt/torchscript_consistency_cuda_test.py
View file @
a9623854
import
torch
from
torchaudio_unittest.common_utils
import
PytorchTestCase
,
skipIfNoCuda
from
.utils
import
skipIfNo
Transducer
from
.utils
import
skipIfNo
RNNT
from
.torchscript_consistency_impl
import
RNNTLossTorchscript
@
skipIfNo
Transducer
@
skipIfNo
RNNT
@
skipIfNoCuda
class
TestRNNTLoss
(
RNNTLossTorchscript
,
PytorchTestCase
):
device
=
torch
.
device
(
'cuda'
)
test/torchaudio_unittest/rnnt/utils.py
View file @
a9623854
...
...
@@ -443,7 +443,7 @@ def numpy_to_torch(data, device, requires_grad=True):
return
data
def
skipIfNo
Transducer
(
test_item
):
def
skipIfNo
RNNT
(
test_item
):
try
:
torch
.
ops
.
torchaudio
.
rnnt_loss
return
test_item
...
...
torchaudio/csrc/CMakeLists.txt
View file @
a9623854
...
...
@@ -10,9 +10,9 @@ set(
utils.cpp
)
if
(
BUILD_
TRANSDUCER
)
if
(
BUILD_
RNNT
)
set
(
TRANSDUCER
_SOURCES
RNNT
_SOURCES
rnnt/cpu/compute_alphas.cpp
rnnt/cpu/compute_betas.cpp
rnnt/cpu/compute.cpp
...
...
@@ -24,15 +24,15 @@ if(BUILD_TRANSDUCER)
if
(
USE_CUDA
)
set
(
CUDA_
TRANSDUCER
_SOURCES
CUDA_
RNNT
_SOURCES
rnnt/gpu/compute_alphas.cu
rnnt/gpu/compute_betas.cu
rnnt/gpu/compute.cu
)
list
(
APPEND
TRANSDUCER
_SOURCES
${
CUDA_
TRANSDUCER
_SOURCES
}
)
list
(
APPEND
RNNT
_SOURCES
${
CUDA_
RNNT
_SOURCES
}
)
endif
()
list
(
APPEND LIBTORCHAUDIO_SOURCES
${
TRANSDUCER
_SOURCES
}
)
list
(
APPEND LIBTORCHAUDIO_SOURCES
${
RNNT
_SOURCES
}
)
endif
()
if
(
BUILD_KALDI
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment