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
OpenDAS
Torchaudio
Commits
3b9e9337
Unverified
Commit
3b9e9337
authored
Nov 09, 2020
by
moto
Committed by
GitHub
Nov 09, 2020
Browse files
Run GPU test for all PRs and fix setup (#1014)
parent
5e54c770
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
65 deletions
+34
-65
.circleci/config.yml
.circleci/config.yml
+7
-50
.circleci/config.yml.in
.circleci/config.yml.in
+7
-2
.circleci/regenerate.py
.circleci/regenerate.py
+0
-3
.circleci/unittest/linux/scripts/setup_env.sh
.circleci/unittest/linux/scripts/setup_env.sh
+11
-5
.circleci/unittest/windows/scripts/setup_env.sh
.circleci/unittest/windows/scripts/setup_env.sh
+9
-5
No files found.
.circleci/config.yml
View file @
3b9e9337
...
@@ -61,7 +61,7 @@ binary_common: &binary_common
...
@@ -61,7 +61,7 @@ binary_common: &binary_common
python_version
:
python_version
:
description
:
"
Python
version
to
build
against
(e.g.,
3.8)"
description
:
"
Python
version
to
build
against
(e.g.,
3.8)"
type
:
string
type
:
string
environment
:
environment
:
&environment
PYTHON_VERSION
:
<< parameters.python_version >>
PYTHON_VERSION
:
<< parameters.python_version >>
BUILD_VERSION
:
<< parameters.build_version >>
BUILD_VERSION
:
<< parameters.build_version >>
PYTORCH_VERSION
:
<< parameters.pytorch_version >>
PYTORCH_VERSION
:
<< parameters.pytorch_version >>
...
@@ -432,6 +432,7 @@ jobs:
...
@@ -432,6 +432,7 @@ jobs:
image
:
ubuntu-1604-cuda-10.1:201909-23
image
:
ubuntu-1604-cuda-10.1:201909-23
resource_class
:
gpu.small
resource_class
:
gpu.small
environment
:
environment
:
<<
:
*environment
image_name
:
"
pytorch/torchaudio_unittest_base:manylinux-cuda10.1"
image_name
:
"
pytorch/torchaudio_unittest_base:manylinux-cuda10.1"
steps
:
steps
:
-
checkout
-
checkout
...
@@ -444,9 +445,12 @@ jobs:
...
@@ -444,9 +445,12 @@ jobs:
keys
:
keys
:
-
env-v3-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/setup_env.sh" }}-{{ checksum "third_party/CMakeLists.txt" }}-{{ checksum ".cachekey" }}
-
env-v3-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/setup_env.sh" }}-{{ checksum "third_party/CMakeLists.txt" }}-{{ checksum ".cachekey" }}
-
run
:
name
:
Pull Docker image
command
:
docker pull --quiet "${image_name}"
-
run
:
-
run
:
name
:
Setup
name
:
Setup
command
:
docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/setup_env.sh
command
:
docker run -t --gpus all
-e PYTHON_VERSION
-v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/setup_env.sh
-
save_cache
:
-
save_cache
:
key
:
env-v3-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/setup_env.sh" }}-{{ checksum "third_party/CMakeLists.txt" }}-{{ checksum ".cachekey" }}
key
:
env-v3-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/setup_env.sh" }}-{{ checksum "third_party/CMakeLists.txt" }}-{{ checksum ".cachekey" }}
...
@@ -509,6 +513,7 @@ jobs:
...
@@ -509,6 +513,7 @@ jobs:
executor
:
executor
:
name
:
windows-gpu
name
:
windows-gpu
environment
:
environment
:
<<
:
*environment
CUDA_VERSION
:
"
10.1"
CUDA_VERSION
:
"
10.1"
steps
:
steps
:
-
checkout
-
checkout
...
@@ -760,40 +765,16 @@ workflows:
...
@@ -760,40 +765,16 @@ workflows:
requires
:
requires
:
-
download_third_parties_nix
-
download_third_parties_nix
-
unittest_linux_gpu
:
-
unittest_linux_gpu
:
filters
:
branches
:
only
:
-
master
-
nightly
-
release/*
tags
:
only
:
/v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name
:
unittest_linux_gpu_py3.6
name
:
unittest_linux_gpu_py3.6
python_version
:
'
3.6'
python_version
:
'
3.6'
requires
:
requires
:
-
download_third_parties_nix
-
download_third_parties_nix
-
unittest_linux_gpu
:
-
unittest_linux_gpu
:
filters
:
branches
:
only
:
-
master
-
nightly
-
release/*
tags
:
only
:
/v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name
:
unittest_linux_gpu_py3.7
name
:
unittest_linux_gpu_py3.7
python_version
:
'
3.7'
python_version
:
'
3.7'
requires
:
requires
:
-
download_third_parties_nix
-
download_third_parties_nix
-
unittest_linux_gpu
:
-
unittest_linux_gpu
:
filters
:
branches
:
only
:
-
master
-
nightly
-
release/*
tags
:
only
:
/v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name
:
unittest_linux_gpu_py3.8
name
:
unittest_linux_gpu_py3.8
python_version
:
'
3.8'
python_version
:
'
3.8'
requires
:
requires
:
...
@@ -808,36 +789,12 @@ workflows:
...
@@ -808,36 +789,12 @@ workflows:
name
:
unittest_windows_cpu_py3.8
name
:
unittest_windows_cpu_py3.8
python_version
:
'
3.8'
python_version
:
'
3.8'
-
unittest_windows_gpu
:
-
unittest_windows_gpu
:
filters
:
branches
:
only
:
-
master
-
nightly
-
release/*
tags
:
only
:
/v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name
:
unittest_windows_gpu_py3.6
name
:
unittest_windows_gpu_py3.6
python_version
:
'
3.6'
python_version
:
'
3.6'
-
unittest_windows_gpu
:
-
unittest_windows_gpu
:
filters
:
branches
:
only
:
-
master
-
nightly
-
release/*
tags
:
only
:
/v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name
:
unittest_windows_gpu_py3.7
name
:
unittest_windows_gpu_py3.7
python_version
:
'
3.7'
python_version
:
'
3.7'
-
unittest_windows_gpu
:
-
unittest_windows_gpu
:
filters
:
branches
:
only
:
-
master
-
nightly
-
release/*
tags
:
only
:
/v[0-9]+(\.[0-9]+)*-rc[0-9]+/
name
:
unittest_windows_gpu_py3.8
name
:
unittest_windows_gpu_py3.8
python_version
:
'
3.8'
python_version
:
'
3.8'
-
unittest_macos_cpu
:
-
unittest_macos_cpu
:
...
...
.circleci/config.yml.in
View file @
3b9e9337
...
@@ -61,7 +61,7 @@ binary_common: &binary_common
...
@@ -61,7 +61,7 @@ binary_common: &binary_common
python_version:
python_version:
description: "Python version to build against (e.g., 3.8)"
description: "Python version to build against (e.g., 3.8)"
type: string
type: string
environment:
environment:
&environment
PYTHON_VERSION: << parameters.python_version >>
PYTHON_VERSION: << parameters.python_version >>
BUILD_VERSION: << parameters.build_version >>
BUILD_VERSION: << parameters.build_version >>
PYTORCH_VERSION: << parameters.pytorch_version >>
PYTORCH_VERSION: << parameters.pytorch_version >>
...
@@ -432,6 +432,7 @@ jobs:
...
@@ -432,6 +432,7 @@ jobs:
image: ubuntu-1604-cuda-10.1:201909-23
image: ubuntu-1604-cuda-10.1:201909-23
resource_class: gpu.small
resource_class: gpu.small
environment:
environment:
<<: *environment
image_name: "pytorch/torchaudio_unittest_base:manylinux-cuda10.1"
image_name: "pytorch/torchaudio_unittest_base:manylinux-cuda10.1"
steps:
steps:
- checkout
- checkout
...
@@ -444,9 +445,12 @@ jobs:
...
@@ -444,9 +445,12 @@ jobs:
keys:
keys:
- env-v3-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/setup_env.sh" }}-{{ checksum "third_party/CMakeLists.txt" }}-{{ checksum ".cachekey" }}
- env-v3-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/setup_env.sh" }}-{{ checksum "third_party/CMakeLists.txt" }}-{{ checksum ".cachekey" }}
{% endraw %}
{% endraw %}
- run:
name: Pull Docker image
command: docker pull --quiet "${image_name}"
- run:
- run:
name: Setup
name: Setup
command: docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/setup_env.sh
command: docker run -t --gpus all
-e PYTHON_VERSION
-v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/setup_env.sh
- save_cache:
- save_cache:
{% raw %}
{% raw %}
key: env-v3-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/setup_env.sh" }}-{{ checksum "third_party/CMakeLists.txt" }}-{{ checksum ".cachekey" }}
key: env-v3-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/setup_env.sh" }}-{{ checksum "third_party/CMakeLists.txt" }}-{{ checksum ".cachekey" }}
...
@@ -509,6 +513,7 @@ jobs:
...
@@ -509,6 +513,7 @@ jobs:
executor:
executor:
name: windows-gpu
name: windows-gpu
environment:
environment:
<<: *environment
CUDA_VERSION: "10.1"
CUDA_VERSION: "10.1"
steps:
steps:
- checkout
- checkout
...
...
.circleci/regenerate.py
View file @
3b9e9337
...
@@ -147,9 +147,6 @@ def unittest_workflows(indentation=6):
...
@@ -147,9 +147,6 @@ def unittest_workflows(indentation=6):
"python_version"
:
python_version
,
"python_version"
:
python_version
,
}
}
if
device_type
==
'gpu'
:
job
[
'filters'
]
=
gen_filter_branch_tree
(
'master'
,
'nightly'
,
'release/*'
)
if
os_type
!=
"windows"
:
if
os_type
!=
"windows"
:
job
[
'requires'
]
=
[
'download_third_parties_nix'
]
job
[
'requires'
]
=
[
'download_third_parties_nix'
]
...
...
.circleci/unittest/linux/scripts/setup_env.sh
View file @
3b9e9337
...
@@ -21,20 +21,26 @@ esac
...
@@ -21,20 +21,26 @@ esac
# 1. Install conda at ./conda
# 1. Install conda at ./conda
if
[
!
-d
"
${
conda_dir
}
"
]
;
then
if
[
!
-d
"
${
conda_dir
}
"
]
;
then
printf
"* Installing conda
\n
"
printf
"* Installing conda
\n
"
wget
-O
miniconda.sh
"http://repo.continuum.io/miniconda/Miniconda3-latest-
${
os
}
-x86_64.sh"
wget
--quiet
-O
miniconda.sh
"http://repo.continuum.io/miniconda/Miniconda3-latest-
${
os
}
-x86_64.sh"
bash ./miniconda.sh
-b
-f
-p
"
${
conda_dir
}
"
bash ./miniconda.sh
-b
-f
-p
"
${
conda_dir
}
"
eval
"
$(
"
${
conda_dir
}
/bin/conda"
shell.bash hook
)
"
conda update
--quiet
-y
conda
printf
"* Updating the base Python version to %s
\n
"
"
${
PYTHON_VERSION
}
"
conda
install
--quiet
-y
python
=
"
${
PYTHON_VERSION
}
"
else
eval
"
$(
"
${
conda_dir
}
/bin/conda"
shell.bash hook
)
"
fi
fi
eval
"
$(
${
conda_dir
}
/bin/conda shell.bash hook
)
"
# 2. Create test environment at ./env
# 2. Create test environment at ./env
if
[
!
-d
"
${
env_dir
}
"
]
;
then
if
[
!
-d
"
${
env_dir
}
"
]
;
then
printf
"* Creating a test environment
\n
"
printf
"* Creating a test environment
with PYTHON_VERSION=%s
\n
"
"
${
PYTHON_VERSION
}
\n
"
conda create
--prefix
"
${
env_dir
}
"
-y
python
=
"
$PYTHON_VERSION
"
conda create
--prefix
"
${
env_dir
}
"
-y
python
=
"
$
{
PYTHON_VERSION
}
"
fi
fi
conda activate
"
${
env_dir
}
"
conda activate
"
${
env_dir
}
"
# 3. Install minimal build tools
# 3. Install minimal build tools
pip
install
cmake ninja
pip
--quiet
install
cmake ninja
# 4. Buld codecs
# 4. Buld codecs
mkdir
-p
third_party/build
mkdir
-p
third_party/build
...
...
.circleci/unittest/windows/scripts/setup_env.sh
View file @
3b9e9337
...
@@ -19,17 +19,21 @@ if [ ! -d "${conda_dir}" ]; then
...
@@ -19,17 +19,21 @@ if [ ! -d "${conda_dir}" ]; then
printf
"* Installing conda
\n
"
printf
"* Installing conda
\n
"
export
tmp_conda
=
"
$(
echo
$conda_dir
|
tr
'/'
'\\'
)
"
export
tmp_conda
=
"
$(
echo
$conda_dir
|
tr
'/'
'\\'
)
"
export
miniconda_exe
=
"
$(
echo
$root_dir
|
tr
'/'
'\\'
)
\\
miniconda.exe"
export
miniconda_exe
=
"
$(
echo
$root_dir
|
tr
'/'
'\\'
)
\\
miniconda.exe"
curl
--output
miniconda.exe https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe
-O
curl
--silent
--output
miniconda.exe https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe
-O
"
$this_dir
/install_conda.bat"
"
$this_dir
/install_conda.bat"
unset
tmp_conda
unset
tmp_conda
unset
miniconda_exe
unset
miniconda_exe
eval
"
$(
"
${
conda_dir
}
/Scripts/conda.exe"
'shell.bash'
'hook'
)
"
conda update
--quiet
-y
conda
printf
"* Updating the base Python version to %s
\n
"
"
${
PYTHON_VERSION
}
"
conda
install
--quiet
-y
python
=
"
$PYTHON_VERSION
"
else
eval
"
$(
"
${
conda_dir
}
/Scripts/conda.exe"
'shell.bash'
'hook'
)
"
fi
fi
eval
"
$(
${
conda_dir
}
/Scripts/conda.exe
'shell.bash'
'hook'
)
"
# 2. Create test environment at ./env
# 2. Create test environment at ./env
if
[
!
-d
"
${
env_dir
}
"
]
;
then
if
[
!
-d
"
${
env_dir
}
"
]
;
then
printf
"* Creating a test environment
\n
"
printf
"* Creating a test environment
with PYTHON_VERSION=%s
\n
"
"
${
PYTHON_VERSION
}
"
conda create
--prefix
"
${
env_dir
}
"
-y
python
=
"
$PYTHON_VERSION
"
conda create
--prefix
"
${
env_dir
}
"
-y
python
=
"
$
{
PYTHON_VERSION
}
"
fi
fi
conda activate
"
${
env_dir
}
"
conda activate
"
${
env_dir
}
"
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