Unverified Commit 0c42cb40 authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[CUDA] Support CUDA 9 and test different CUDA versions at CI (#3880)

* test different CUDA versions

* Update cuda.yml

* Update cuda.yml

* Update setup.sh

* Update setup.sh

* Update cuda.yml

* Update cuda.yml

* Update setup.sh

* Update setup.sh

* Update setup.sh

* Update setup.sh

* Update cuda.yml

* Update cuda.yml

* Update cuda.yml

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update cuda.yml

* Update cuda.yml

* Update cuda.yml

* Update CMakeLists.txt

* specify CUDA version in workflow job name
parent 8040ef94
...@@ -80,9 +80,15 @@ else # Linux ...@@ -80,9 +80,15 @@ else # Linux
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
apt-get update apt-get update
apt-get install --no-install-recommends -y \ apt-get install --no-install-recommends -y \
cmake \
curl \ curl \
lsb-release \
software-properties-common \
wget wget
curl -sL https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add -
apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" -y
apt-get update
apt-get install --no-install-recommends -y \
cmake
fi fi
if [[ $SETUP_CONDA != "false" ]]; then if [[ $SETUP_CONDA != "false" ]]; then
wget -q -O conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh wget -q -O conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
......
...@@ -17,7 +17,7 @@ env: ...@@ -17,7 +17,7 @@ env:
jobs: jobs:
test: test:
name: cuda ${{ matrix.method }} (linux, Python ${{ matrix.python_version }}) name: cuda ${{ matrix.cuda_version }} ${{ matrix.method }} (linux, Python ${{ matrix.python_version }})
runs-on: [self-hosted, linux] runs-on: [self-hosted, linux]
timeout-minutes: 60 timeout-minutes: 60
strategy: strategy:
...@@ -26,10 +26,13 @@ jobs: ...@@ -26,10 +26,13 @@ jobs:
include: include:
- method: source - method: source
python_version: 3.6 python_version: 3.6
cuda_version: "11.2.0"
- method: pip - method: pip
python_version: 3.7 python_version: 3.7
cuda_version: "10.0"
- method: wheel - method: wheel
python_version: 3.8 python_version: 3.8
cuda_version: "9.0"
steps: steps:
- name: Setup or update software on host machine - name: Setup or update software on host machine
run: | run: |
...@@ -40,8 +43,7 @@ jobs: ...@@ -40,8 +43,7 @@ jobs:
curl \ curl \
git \ git \
gnupg-agent \ gnupg-agent \
software-properties-common \ software-properties-common
wget
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" -y sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" -y
curl -sL https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - curl -sL https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
...@@ -82,7 +84,7 @@ jobs: ...@@ -82,7 +84,7 @@ jobs:
$ROOT_DOCKER_FOLDER/.ci/setup.sh || exit -1 $ROOT_DOCKER_FOLDER/.ci/setup.sh || exit -1
$ROOT_DOCKER_FOLDER/.ci/test.sh || exit -1 $ROOT_DOCKER_FOLDER/.ci/test.sh || exit -1
EOF EOF
docker run --env-file docker.env -v "$GITHUB_WORKSPACE":"$ROOT_DOCKER_FOLDER" --rm --gpus all nvidia/cuda:11.2.0-devel /bin/bash $ROOT_DOCKER_FOLDER/docker-script.sh docker run --env-file docker.env -v "$GITHUB_WORKSPACE":"$ROOT_DOCKER_FOLDER" --rm --gpus all "nvidia/cuda:${{ matrix.cuda_version }}-devel" /bin/bash $ROOT_DOCKER_FOLDER/docker-script.sh
all-successful: all-successful:
# https://github.community/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert # https://github.community/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert
runs-on: ubuntu-latest runs-on: ubuntu-latest
......
...@@ -156,7 +156,14 @@ if(USE_CUDA) ...@@ -156,7 +156,14 @@ if(USE_CUDA)
find_package(CUDA REQUIRED) find_package(CUDA REQUIRED)
include_directories(${CUDA_INCLUDE_DIRS}) include_directories(${CUDA_INCLUDE_DIRS})
LIST(APPEND CMAKE_CUDA_FLAGS -Xcompiler=${OpenMP_CXX_FLAGS} -Xcompiler=-fPIC -Xcompiler=-Wall) LIST(APPEND CMAKE_CUDA_FLAGS -Xcompiler=${OpenMP_CXX_FLAGS} -Xcompiler=-fPIC -Xcompiler=-Wall)
CUDA_SELECT_NVCC_ARCH_FLAGS(CUDA_ARCH_FLAGS 6.0 6.1 6.2 7.0 7.5+PTX)
set(CUDA_ARCHS "6.0" "6.1" "6.2" "7.0")
if(CUDA_VERSION VERSION_GREATER_EQUAL "10.0")
list(APPEND CUDA_ARCHS "7.5")
endif()
list(POP_BACK CUDA_ARCHS CUDA_LAST_SUPORTED_VERSION)
list(APPEND CUDA_ARCHS "${CUDA_LAST_SUPORTED_VERSION}+PTX")
CUDA_SELECT_NVCC_ARCH_FLAGS(CUDA_ARCH_FLAGS ${CUDA_ARCHS})
LIST(APPEND CMAKE_CUDA_FLAGS ${CUDA_ARCH_FLAGS}) LIST(APPEND CMAKE_CUDA_FLAGS ${CUDA_ARCH_FLAGS})
if(USE_DEBUG) if(USE_DEBUG)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment