Skip to content

Commit 86f95a1

Browse files
author
Kai Fricke
committed
Merge remote-tracking branch 'origin/ray-tune' into ray-tune
2 parents faccec1 + f5c061b commit 86f95a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+5617
-132
lines changed

.circleci/config.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
version: 2.1
22

3+
executors:
4+
windows-with-nvidia-gpu:
5+
machine:
6+
resource_class: windows.gpu.nvidia.medium
7+
image: windows-server-2019-nvidia:stable
8+
shell: bash.exe
9+
310
install_official_git_client: &install_official_git_client
411
name: Install Official Git Client
512
no_output_timeout: "1h"
@@ -175,6 +182,20 @@ pytorch_tutorial_build_manager_defaults: &pytorch_tutorial_build_manager_default
175182
resource_class: medium
176183
<<: *pytorch_tutorial_build_defaults
177184

185+
pytorch_windows_build: &pytorch_windows_build
186+
executor: windows-with-nvidia-gpu
187+
steps:
188+
- checkout
189+
- run:
190+
name: Install Cuda
191+
no_output_timeout: 30m
192+
command: |
193+
.circleci/scripts/windows_cuda_install.sh
194+
- run:
195+
name: test
196+
command: |
197+
.circleci/scripts/build_for_windows.sh
198+
178199
jobs:
179200
pytorch_tutorial_pr_build_worker_0:
180201
<<: *pytorch_tutorial_build_worker_defaults
@@ -302,6 +323,9 @@ jobs:
302323
pytorch_tutorial_master_build_manager:
303324
<<: *pytorch_tutorial_build_manager_defaults
304325

326+
pytorch_windows_build_worker:
327+
<<: *pytorch_windows_build
328+
305329
workflows:
306330
build:
307331
jobs:
@@ -538,3 +562,10 @@ workflows:
538562
branches:
539563
only:
540564
- master
565+
- pytorch_windows_build_worker:
566+
name: win_test_worker
567+
filters:
568+
branches:
569+
only:
570+
- master
571+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
set -eux -o pipefail
3+
4+
retry () {
5+
$* || (sleep 1 && $*) || (sleep 2 && $*)
6+
}
7+
8+
SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
9+
PROJECT_DIR="${SOURCE_DIR}/../.."
10+
pushd $SOURCE_DIR
11+
12+
#install wget and make
13+
curl -k https://ymu.dl.osdn.jp/mingw/68260/mingw-get-0.6.3-mingw32-pre-20170905-1-bin.zip -o mingw32.zip
14+
unzip mingw32.zip -d mingw32
15+
mingw32/bin/mingw-get.exe install mingw32-make
16+
mingw32/bin/mingw-get.exe install msys-findutils
17+
mv mingw32/bin/mingw32-make.exe mingw32/bin/make.exe
18+
curl -k https://eternallybored.org/misc/wget/1.20.3/64/wget.exe -o mingw32/bin/wget.exe
19+
export PATH="${SOURCE_DIR}/mingw32/bin:$PATH"
20+
21+
#install anaconda3
22+
export CONDA_HOME="${SOURCE_DIR}/conda"
23+
export tmp_conda="${SOURCE_DIR}/conda"
24+
export miniconda_exe="${SOURCE_DIR}/miniconda.exe"
25+
rm -rf conda miniconda.exe
26+
curl -k https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -o miniconda.exe
27+
./install_conda.bat
28+
export PATH="${tmp_conda}:${tmp_conda}/Library/usr/bin:${tmp_conda}/Library/bin:${tmp_conda}/Scripts:${tmp_conda}/bin:$PATH"
29+
30+
eval "$(conda shell.bash hook)"
31+
conda create -qyn testenv python=3.7
32+
conda activate testenv
33+
34+
conda install sphinx
35+
pip install sphinx_gallery==0.3.1 flask pandas spacy ipython scipy pySoundFile scikit-image
36+
pip install -e git+git://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
37+
conda install -yq -c pytorch "cudatoolkit=10.1" pytorch torchvision torchtext
38+
conda install torchaudio -c pytorch-test
39+
python -m spacy download de
40+
python -m spacy download en
41+
pushd ${PROJECT_DIR}
42+
DIR=.jenkins
43+
python $DIR/remove_runnable_code.py beginner_source/aws_distributed_training_tutorial.py beginner_source/aws_distributed_training_tutorial.py || true
44+
python $DIR/remove_runnable_code.py beginner_source/data_loading_tutorial.py beginner_source/data_loading_tutorial.py || true
45+
python $DIR/remove_runnable_code.py beginner_source/dcgan_faces_tutorial.py beginner_source/dcgan_faces_tutorial.py || true
46+
python $DIR/remove_runnable_code.py intermediate_source/model_parallel_tutorial.py intermediate_source/model_parallel_tutorial.py || true
47+
python $DIR/remove_runnable_code.py intermediate_source/memory_format_tutorial.py intermediate_source/memory_format_tutorial.py || true
48+
49+
make docs

.circleci/scripts/install_conda.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
start /wait "" "%miniconda_exe%" /S /InstallationType=JustMe /RegisterPython=0 /AddToPath=0 /D=%tmp_conda%
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
set -eux -o pipefail
3+
4+
curl --retry 3 -kLO https://ossci-windows.s3.amazonaws.com/cuda_10.1.243_426.00_win10.exe
5+
7z x cuda_10.1.243_426.00_win10.exe -ocuda_10.1.243_426.00_win10
6+
cd cuda_10.1.243_426.00_win10
7+
mkdir cuda_install_logs
8+
9+
set +e
10+
11+
./setup.exe -s nvcc_10.1 cuobjdump_10.1 nvprune_10.1 cupti_10.1 cublas_10.1 cublas_dev_10.1 cudart_10.1 cufft_10.1 cufft_dev_10.1 curand_10.1 curand_dev_10.1 cusolver_10.1 cusolver_dev_10.1 cusparse_10.1 cusparse_dev_10.1 nvgraph_10.1 nvgraph_dev_10.1 npp_10.1 npp_dev_10.1 nvrtc_10.1 nvrtc_dev_10.1 nvml_dev_10.1 -loglevel:6 -log:"$(pwd -W)/cuda_install_logs"
12+
13+
set -e
14+
15+
curl --retry 3 -kLO https://ossci-windows.s3.amazonaws.com/NvToolsExt.7z
16+
7z x NvToolsExt.7z -oNvToolsExt
17+
mkdir -p "C:/Program Files/NVIDIA Corporation/NvToolsExt"
18+
cp -r NvToolsExt/* "C:/Program Files/NVIDIA Corporation/NvToolsExt/"
19+
export NVTOOLSEXT_PATH="C:\\Program Files\\NVIDIA Corporation\\NvToolsExt\\"
20+
21+
if ! ls "/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/bin/nvcc.exe"
22+
then
23+
echo "CUDA installation failed"
24+
mkdir -p /c/w/build-results
25+
7z a "c:\\w\\build-results\\cuda_install_logs.7z" cuda_install_logs
26+
exit 1
27+
fi
28+
29+
cd ..
30+
rm -rf ./cuda_10.1.243_426.00_win10
31+
rm -f ./cuda_10.1.243_426.00_win10.exe

.jenkins/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export PATH=/opt/conda/bin:$PATH
1515
rm -rf src
1616
pip install -r $DIR/../requirements.txt
1717

18-
export PATH=/opt/conda/bin:$PATH
19-
pip install sphinx==1.8.2 pandas
18+
# export PATH=/opt/conda/bin:$PATH
19+
# pip install sphinx==1.8.2 pandas
2020

2121
# For Tensorboard. Until 1.14 moves to the release channel.
2222
pip install tb-nightly

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ download:
4343
mkdir -p advanced_source/data
4444
mkdir -p beginner_source/data
4545
mkdir -p intermediate_source/data
46+
mkdir -p prototype_source/data
4647

4748
# transfer learning tutorial data
4849
wget -N https://download.pytorch.org/tutorial/hymenoptera_data.zip -P $(DATADIR)
@@ -100,6 +101,14 @@ download:
100101
wget -N https://s3.amazonaws.com/pytorch-tutorial-assets/imagenet_1k.zip -P $(DATADIR)
101102
unzip $(ZIPOPTS) $(DATADIR)/imagenet_1k.zip -d advanced_source/data/
102103

104+
# Download model for prototype_source/graph_mode_static_quantization_tutorial.py
105+
wget -N https://download.pytorch.org/models/resnet18-5c106cde.pth -P $(DATADIR)
106+
cp $(DATADIR)/resnet18-5c106cde.pth prototype_source/data/resnet18_pretrained_float.pth
107+
108+
# Download dataset for prototype_source/graph_mode_static_quantization_tutorial.py
109+
wget -N https://s3.amazonaws.com/pytorch-tutorial-assets/imagenet_1k.zip -P $(DATADIR)
110+
unzip $(ZIPOPTS) $(DATADIR)/imagenet_1k.zip -d prototype_source/data/
111+
103112
docs:
104113
make download
105114
make html

_static/img/compare_output.png

26.4 KB
Loading

_static/img/compare_stub.png

22.3 KB
Loading

_static/img/rpc-images/batch.png

19.7 KB
Loading

_static/img/rpc_trace_img.png

307 KB
Loading

_static/img/shadow.png

15.2 KB
Loading
Loading
Loading
Loading
15.9 KB
Loading
17.6 KB
Loading
23.5 KB
Loading
34.9 KB
Loading

_static/img/trace_img.png

134 KB
Loading

0 commit comments

Comments
 (0)