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
2dd04029
Unverified
Commit
2dd04029
authored
May 14, 2020
by
peterjc123
Committed by
GitHub
May 13, 2020
Browse files
Enable CUDA tests for Windows (#637)
* Enable CUDA tests for Windows * Add back branch filters
parent
36a1e90e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
116 additions
and
4 deletions
+116
-4
.circleci/config.yml
.circleci/config.yml
+63
-0
.circleci/config.yml.in
.circleci/config.yml.in
+45
-0
.circleci/regenerate.py
.circleci/regenerate.py
+0
-2
.circleci/unittest/windows/scripts/install.sh
.circleci/unittest/windows/scripts/install.sh
+8
-2
No files found.
.circleci/config.yml
View file @
2dd04029
...
...
@@ -13,6 +13,12 @@ executors:
image
:
windows-server-2019-vs2019:stable
shell
:
bash.exe
windows-gpu
:
machine
:
resource_class
:
windows.gpu.nvidia.medium
image
:
windows-server-2019-nvidia:stable
shell
:
bash.exe
binary_common
:
&binary_common
parameters
:
# Edit these defaults to do a release
...
...
@@ -336,6 +342,45 @@ jobs:
-
store_test_results
:
path
:
test-results
unittest_windows_gpu
:
<<
:
*binary_common
executor
:
name
:
windows-gpu
environment
:
CUDA_VERSION
:
"
10.1"
steps
:
-
checkout
-
run
:
name
:
Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
command
:
echo "$(date +"%Y-%U")" > .circleci-weekly
-
restore_cache
:
keys
:
-
env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
-
run
:
name
:
Setup
command
:
.circleci/unittest/windows/scripts/setup_env.sh
-
save_cache
:
key
:
env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
paths
:
-
conda
-
env
-
run
:
name
:
Install torchaudio
command
:
.circleci/unittest/windows/scripts/install.sh
-
run
:
name
:
Run tests
command
:
.circleci/unittest/windows/scripts/run_test.sh
-
run
:
name
:
Post process
command
:
.circleci/unittest/windows/scripts/post_process.sh
-
store_test_results
:
path
:
test-results
workflows
:
build
:
jobs
:
...
...
@@ -414,6 +459,24 @@ workflows:
-
unittest_windows_cpu
:
name
:
unittest_windows_cpu_py3.8
python_version
:
'
3.8'
-
unittest_windows_gpu
:
filters
:
branches
:
only
:
master
name
:
unittest_windows_gpu_py3.6
python_version
:
'
3.6'
-
unittest_windows_gpu
:
filters
:
branches
:
only
:
master
name
:
unittest_windows_gpu_py3.7
python_version
:
'
3.7'
-
unittest_windows_gpu
:
filters
:
branches
:
only
:
master
name
:
unittest_windows_gpu_py3.8
python_version
:
'
3.8'
nightly
:
jobs
:
-
circleci_consistency
:
...
...
.circleci/config.yml.in
View file @
2dd04029
...
...
@@ -13,6 +13,12 @@ executors:
image: windows-server-2019-vs2019:stable
shell: bash.exe
windows-gpu:
machine:
resource_class: windows.gpu.nvidia.medium
image: windows-server-2019-nvidia:stable
shell: bash.exe
binary_common: &binary_common
parameters:
# Edit these defaults to do a release
...
...
@@ -336,6 +342,45 @@ jobs:
- store_test_results:
path: test-results
unittest_windows_gpu:
<<: *binary_common
executor:
name: windows-gpu
environment:
CUDA_VERSION: "10.1"
steps:
- checkout
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
command: echo "$(date +"%Y-%U")" > .circleci-weekly
- restore_cache:
{% raw %}
keys:
- env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
{% endraw %}
- run:
name: Setup
command: .circleci/unittest/windows/scripts/setup_env.sh
- save_cache:
{% raw %}
key: env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
{% endraw %}
paths:
- conda
- env
- run:
name: Install torchaudio
command: .circleci/unittest/windows/scripts/install.sh
- run:
name: Run tests
command: .circleci/unittest/windows/scripts/run_test.sh
- run:
name: Post process
command: .circleci/unittest/windows/scripts/post_process.sh
- store_test_results:
path: test-results
workflows:
build:
jobs:
...
...
.circleci/regenerate.py
View file @
2dd04029
...
...
@@ -114,8 +114,6 @@ def unittest_workflows(indentation=6):
jobs
=
[]
for
os_type
in
[
"linux"
,
"windows"
]:
for
device_type
in
[
"cpu"
,
"gpu"
]:
if
os_type
==
'windows'
and
device_type
==
'gpu'
:
continue
for
python_version
in
PYTHON_VERSIONS
:
job
=
{
"name"
:
f
"unittest_
{
os_type
}
_
{
device_type
}
_py
{
python_version
}
"
,
...
...
.circleci/unittest/windows/scripts/install.sh
View file @
2dd04029
...
...
@@ -10,8 +10,14 @@ set -e
eval
"
$(
./conda/Scripts/conda.exe
'shell.bash'
'hook'
)
"
conda activate ./env
printf
"* Installing PyTorch nightly build"
conda
install
-y
-c
pytorch-nightly pytorch cpuonly
if
[
-z
"
${
CUDA_VERSION
:-}
"
]
;
then
cudatoolkit
=
"cpuonly"
else
version
=
"
$(
python
-c
"print('.'.join(
\"
${
CUDA_VERSION
}
\"
.split('.')[:2]))"
)
"
cudatoolkit
=
"cudatoolkit=
${
version
}
"
fi
printf
"Installing PyTorch with %s
\n
"
"
${
cudatoolkit
}
"
conda
install
-y
-c
pytorch-nightly pytorch
"
${
cudatoolkit
}
"
printf
"* Installing torchaudio
\n
"
IS_CONDA
=
true
python setup.py develop
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