Skip to content

Commit 762dd03

Browse files
authored
[CI] cuda 11.3 update (#235)
1 parent aa9a9f2 commit 762dd03

File tree

10 files changed

+75
-99
lines changed

10 files changed

+75
-99
lines changed

.circleci/config.yml

Lines changed: 44 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ binary_common: &binary_common
110110
wheel_docker_image:
111111
description: "Wheel only: what docker image to use"
112112
type: string
113-
default: "pytorch/manylinux-cuda102"
113+
default: "pytorch/manylinux-cuda113"
114114
conda_docker_image:
115115
description: "Conda only: what docker image to use"
116116
type: string
@@ -218,20 +218,21 @@ jobs:
218218
<<: *binary_common
219219

220220
docker:
221-
- image: "pytorch/manylinux-cuda102"
221+
- image: "pytorch/manylinux-cuda113"
222222
resource_class: 2xlarge+
223223

224224
environment:
225225
TAR_OPTIONS: --no-same-owner
226226
PYTHON_VERSION: << parameters.python_version >>
227+
CU_VERSION: << parameters.cu_version >>
227228

228229
steps:
229230
- checkout
230231
- designate_upload_channel
231-
- run:
232-
name: Generate cache key
233-
# This will refresh cache on Sundays, nightly build should generate new cache.
234-
command: echo "$(date +"%Y-%U")" > .circleci-weekly
232+
# - run:
233+
# name: Generate cache key
234+
# # This will refresh cache on Sundays, nightly build should generate new cache.
235+
# command: echo "$(date +"%Y-%U")" > .circleci-weekly
235236
# - restore_cache:
236237
# keys:
237238
# - env-v2-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
@@ -262,20 +263,21 @@ jobs:
262263
unittest_linux_gpu:
263264
<<: *binary_common
264265
machine:
265-
image: ubuntu-1604-cuda-10.2:202012-01
266+
image: ubuntu-2004-cuda-11.4:202110-01
266267
resource_class: gpu.nvidia.medium
267268
environment:
268-
image_name: "pytorch/manylinux-cuda102"
269+
image_name: "pytorch/manylinux-cuda113"
269270
TAR_OPTIONS: --no-same-owner
270271
PYTHON_VERSION: << parameters.python_version >>
272+
CU_VERSION: << parameters.cu_version >>
271273

272274
steps:
273275
- checkout
274276
- designate_upload_channel
275-
- run:
276-
name: Generate cache key
277-
# This will refresh cache on Sundays, nightly build should generate new cache.
278-
command: echo "$(date +"%Y-%U")" > .circleci-weekly
277+
# - run:
278+
# name: Generate cache key
279+
# # This will refresh cache on Sundays, nightly build should generate new cache.
280+
# command: echo "$(date +"%Y-%U")" > .circleci-weekly
279281
# - restore_cache:
280282
#
281283
# keys:
@@ -294,7 +296,7 @@ jobs:
294296
- run:
295297
# Here we create an envlist file that contains some env variables that we want the docker container to be aware of.
296298
# Normally, the CIRCLECI variable is set and available on all CI workflows: https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables.
297-
# They're availble in all the other workflows (OSX and Windows).
299+
# They're available in all the other workflows (OSX and Windows).
298300
# But here, we're running the unittest_linux_gpu workflows in a docker container, where those variables aren't accessible.
299301
# So instead we dump the variables we need in env.list and we pass that file when invoking "docker run".
300302
name: export CIRCLECI env var
@@ -314,28 +316,29 @@ jobs:
314316
unittest_linux_optdeps_gpu:
315317
<<: *binary_common
316318
machine:
317-
image: ubuntu-1604-cuda-10.2:202012-01
319+
image: ubuntu-2004-cuda-11.4:202110-01
318320
resource_class: gpu.nvidia.medium
319321
environment:
320-
image_name: "pytorch/manylinux-cuda102"
322+
image_name: "pytorch/manylinux-cuda113"
321323
TAR_OPTIONS: --no-same-owner
322324
PYTHON_VERSION: << parameters.python_version >>
325+
CU_VERSION: << parameters.cu_version >>
323326

324327
steps:
325328
- checkout
326329
- designate_upload_channel
327-
- run:
328-
name: Generate cache key
329-
# This will refresh cache on Sundays, nightly build should generate new cache.
330-
command: echo "$(date +"%Y-%U")" > .circleci-weekly
330+
# - run:
331+
# name: Generate cache key
332+
# # This will refresh cache on Sundays, nightly build should generate new cache.
333+
# command: echo "$(date +"%Y-%U")" > .circleci-weekly
331334
# - restore_cache:
332335
#
333336
# keys:
334337
# - env-v3-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux_optdeps/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
335338

336339
- run:
337340
name: Setup
338-
command: docker run -e PYTHON_VERSION -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux_optdeps/scripts/setup_env.sh
341+
command: .circleci/unittest/linux_optdeps/scripts/setup_env.sh
339342
# - save_cache:
340343
#
341344
# key: env-v3-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux_optdeps/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
@@ -346,7 +349,7 @@ jobs:
346349
- run:
347350
# Here we create an envlist file that contains some env variables that we want the docker container to be aware of.
348351
# Normally, the CIRCLECI variable is set and available on all CI workflows: https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables.
349-
# They're availble in all the other workflows (OSX and Windows).
352+
# They're available in all the other workflows (OSX and Windows).
350353
# But here, we're running the unittest_linux_gpu workflows in a docker container, where those variables aren't accessible.
351354
# So instead we dump the variables we need in env.list and we pass that file when invoking "docker run".
352355
name: export CIRCLECI env var
@@ -367,20 +370,21 @@ jobs:
367370
<<: *binary_common
368371

369372
docker:
370-
- image: "pytorch/manylinux-cuda102"
373+
- image: "pytorch/manylinux-cuda113"
371374
resource_class: 2xlarge+
372375

373376
environment:
374377
TAR_OPTIONS: --no-same-owner
375378
PYTHON_VERSION: << parameters.python_version >>
379+
CU_VERSION: << parameters.cu_version >>
376380

377381
steps:
378382
- checkout
379383
- designate_upload_channel
380-
- run:
381-
name: Generate cache key
382-
# This will refresh cache on Sundays, nightly build should generate new cache.
383-
command: echo "$(date +"%Y-%U")" > .circleci-weekly
384+
# - run:
385+
# name: Generate cache key
386+
# # This will refresh cache on Sundays, nightly build should generate new cache.
387+
# command: echo "$(date +"%Y-%U")" > .circleci-weekly
384388
# - restore_cache:
385389
#
386390
# keys:
@@ -412,20 +416,21 @@ jobs:
412416
unittest_linux_stable_gpu:
413417
<<: *binary_common
414418
machine:
415-
image: ubuntu-1604-cuda-10.2:202012-01
419+
image: ubuntu-2004-cuda-11.4:202110-01
416420
resource_class: gpu.nvidia.medium
417421
environment:
418-
image_name: "pytorch/manylinux-cuda102"
422+
image_name: "pytorch/manylinux-cuda113"
419423
TAR_OPTIONS: --no-same-owner
420424
PYTHON_VERSION: << parameters.python_version >>
425+
CU_VERSION: << parameters.cu_version >>
421426

422427
steps:
423428
- checkout
424429
- designate_upload_channel
425-
- run:
426-
name: Generate cache key
427-
# This will refresh cache on Sundays, nightly build should generate new cache.
428-
command: echo "$(date +"%Y-%U")" > .circleci-weekly
430+
# - run:
431+
# name: Generate cache key
432+
# # This will refresh cache on Sundays, nightly build should generate new cache.
433+
# command: echo "$(date +"%Y-%U")" > .circleci-weekly
429434
# - restore_cache:
430435
#
431436
# keys:
@@ -474,10 +479,10 @@ jobs:
474479
name: Install wget
475480
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install wget
476481
# Disable brew auto update which is very slow
477-
- run:
478-
name: Generate cache key
479-
# This will refresh cache on Sundays, nightly build should generate new cache.
480-
command: echo "$(date +"%Y-%U")" > .circleci-weekly
482+
# - run:
483+
# name: Generate cache key
484+
# # This will refresh cache on Sundays, nightly build should generate new cache.
485+
# command: echo "$(date +"%Y-%U")" > .circleci-weekly
481486
# - restore_cache:
482487
#
483488
# keys:
@@ -526,12 +531,12 @@ workflows:
526531
python_version: '3.8'
527532

528533
- unittest_linux_gpu:
529-
cu_version: cu102
534+
cu_version: cu113
530535
name: unittest_linux_gpu_py3.8
531536
python_version: '3.8'
532537

533538
- unittest_linux_optdeps_gpu:
534-
cu_version: cu102
539+
cu_version: cu113
535540
name: unittest_linux_optdeps_gpu_py3.8
536541
python_version: '3.8'
537542

@@ -541,6 +546,6 @@ workflows:
541546
python_version: '3.8'
542547

543548
- unittest_linux_stable_gpu:
544-
cu_version: cu102
549+
cu_version: cu113
545550
name: unittest_linux_stable_gpu_py3.8
546551
python_version: '3.8'

.circleci/unittest/linux/scripts/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ if [ "${CU_VERSION:-}" == cpu ] ; then
4242
pip3 install torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html --pre
4343
fi
4444
else
45-
pip3 install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cu102
45+
pip3 install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cu113
4646
fi
4747

4848
printf "Installing functorch\n"
@@ -53,7 +53,7 @@ pip install "git+https://github.com/pytorch/functorch.git"
5353
python -c "import functorch"
5454

5555
printf "* Installing torchrl\n"
56-
python setup.py develop
56+
pip install -e .
5757

5858
if [[ $OSTYPE == 'darwin'* ]]; then
5959
PRIVATE_MUJOCO_GL=glfw

.circleci/unittest/linux/scripts/run_test.sh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@ lib_dir="${env_dir}/lib"
1616

1717
# solves ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found
1818
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$lib_dir
19-
#if [[ $OSTYPE == 'darwin'* ]]; then
20-
# PRIVATE_MUJOCO_GL=glfw
21-
#else
22-
# PRIVATE_MUJOCO_GL=egl
23-
#fi
24-
## pygame.error: No available video device
25-
#export SDL_VIDEODRIVER=dummy
26-
## solves AttributeError: 'NoneType' object has no attribute 'eglQueryString'
27-
#export MUJOCO_GL=$PRIVATE_MUJOCO_GL
2819

2920
pytest test/smoke_test.py -v --durations 20
3021
pytest test/smoke_test_deps.py -v --durations 20

.circleci/unittest/linux/scripts/setup_env.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,4 @@ printf "* Installing dependencies (except PyTorch)\n"
5353
echo " - python=${PYTHON_VERSION}" >> "${this_dir}/environment.yml"
5454
cat "${this_dir}/environment.yml"
5555

56-
#conda install -y -c conda-forge glfw
57-
#conda install -y -c conda-forge mesa
58-
#conda install -y -c menpo osmesa
59-
#conda install -y -c conda-forge glew
60-
6156
conda env update --file "${this_dir}/environment.yml" --prune

.circleci/unittest/linux_optdeps/scripts/install.sh

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,17 @@ esac
3232
# submodules
3333
git submodule sync && git submodule update --init --recursive
3434

35-
#printf "Installing PyTorch with %s\n" "${cudatoolkit}"
36-
#if [ "${os}" == "MacOSX" ]; then
37-
# conda install -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}" pytest
38-
#else
39-
# conda install -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}"::pytorch[build="*${version}*"] "${cudatoolkit}" pytest
40-
#fi
41-
42-
#printf "Installing PyTorch with %s\n" "${CU_VERSION}"
35+
printf "Installing PyTorch with %s\n" "${CU_VERSION}"
4336
if [ "${CU_VERSION:-}" == cpu ] ; then
37+
# conda install -y pytorch torchvision cpuonly -c pytorch-nightly
4438
# use pip to install pytorch as conda can frequently pick older release
45-
pip install torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html --pre
39+
if [[ $OSTYPE == 'darwin'* ]]; then
40+
pip3 install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu
41+
else
42+
pip3 install torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html --pre
43+
fi
4644
else
47-
conda install -y pytorch cudatoolkit=10.2 -c pytorch-nightly
45+
pip3 install --pre torch --extra-index-url https://download.pytorch.org/whl/nightly/cu113
4846
fi
4947

5048
printf "Installing functorch\n"
@@ -55,7 +53,7 @@ pip install "git+https://github.com/pytorch/functorch.git"
5553
python -c "import functorch"
5654

5755
printf "* Installing torchrl\n"
58-
python setup.py develop
56+
pip install -e .
5957

6058
# smoke test
6159
python -c "import torchrl"

.circleci/unittest/linux_stable/scripts/install.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ conda activate ./env
1313
if [ "${CU_VERSION:-}" == cpu ] ; then
1414
cudatoolkit="cpuonly"
1515
version="cpu"
16+
echo "Using cpu build"
1617
else
1718
if [[ ${#CU_VERSION} -eq 4 ]]; then
1819
CUDA_VERSION="${CU_VERSION:2:1}.${CU_VERSION:3:1}"
@@ -38,7 +39,7 @@ if [ "${CU_VERSION:-}" == cpu ] ; then
3839
# use pip to install pytorch as conda can frequently pick older release
3940
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
4041
else
41-
pip3 install torch torchvision torchaudio
42+
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
4243
fi
4344

4445
printf "Installing functorch\n"
@@ -51,7 +52,7 @@ printf "* Installing torchrl\n"
5152
printf "g++ version: "
5253
gcc --version
5354

54-
python setup.py install
55+
pip install -e .
5556

5657
if [[ $OSTYPE == 'darwin'* ]]; then
5758
PRIVATE_MUJOCO_GL=glfw

.circleci/unittest/linux_stable/scripts/run_test.sh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@ lib_dir="${env_dir}/lib"
1616

1717
# solves ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found
1818
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$lib_dir
19-
#if [[ $OSTYPE == 'darwin'* ]]; then
20-
# PRIVATE_MUJOCO_GL=glfw
21-
#else
22-
# PRIVATE_MUJOCO_GL=egl
23-
#fi
24-
## pygame.error: No available video device
25-
#export SDL_VIDEODRIVER=dummy
26-
## solves AttributeError: 'NoneType' object has no attribute 'eglQueryString'
27-
#export MUJOCO_GL=$PRIVATE_MUJOCO_GL
2819

2920
pytest test/smoke_test.py -v --durations 20
3021
pytest test/smoke_test_deps.py -v --durations 20

.circleci/unittest/linux_stable/scripts/setup_env.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,4 @@ printf "* Installing dependencies (except PyTorch)\n"
5353
echo " - python=${PYTHON_VERSION}" >> "${this_dir}/environment.yml"
5454
cat "${this_dir}/environment.yml"
5555

56-
#conda install -y -c conda-forge glfw
57-
#conda install -y -c conda-forge mesa
58-
##conda install -y -c menpo osmesa
59-
#conda install -y -c conda-forge glew
60-
6156
conda env update --file "${this_dir}/environment.yml" --prune

build_tools/setup_helpers/extension.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ def _get_build(var, default=False):
4646
False if platform.system() == "Windows" else _get_build("BUILD_KALDI", True)
4747
)
4848
_BUILD_RNNT = _get_build("BUILD_RNNT", True)
49-
_USE_ROCM = _get_build(
50-
"USE_ROCM", torch.cuda.is_available() and torch.version.hip is not None
51-
)
52-
_USE_CUDA = _get_build(
53-
"USE_CUDA", torch.cuda.is_available() and torch.version.hip is None
54-
)
49+
_USE_ROCM = False # _get_build(
50+
# "USE_ROCM", torch.cuda.is_available() and torch.version.hip is not None
51+
# )
52+
_USE_CUDA = False # _get_build(
53+
# "USE_CUDA", torch.cuda.is_available() and torch.version.hip is None
54+
# )
5555
_USE_OPENMP = (
5656
_get_build("USE_OPENMP", True)
5757
and "ATen parallel backend: OpenMP" in torch.__config__.parallel_info()

0 commit comments

Comments
 (0)