Skip to content
This repository was archived by the owner on Sep 25, 2023. It is now read-only.

Commit c0657ef

Browse files
authored
Build CUDA 11.8 and Python 3.10 Packages (#533)
This PR updates `cusignal` to build against branch [cuda-118](https://github.com/rapidsai/shared-action-workflows/compare/cuda-118) of the `shared-action-workflow` repository. That branch contains updates for CUDA 11.8 and Python 3.10 packages. I enabled `sm_90` support in builds using CUDA 11.8+. It also includes some minor file renames. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Ray Douglass (https://github.com/raydouglass) URL: #533
1 parent eedd6e8 commit c0657ef

File tree

9 files changed

+67
-50
lines changed

9 files changed

+67
-50
lines changed

.github/workflows/build.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ concurrency:
2828
jobs:
2929
python-build:
3030
secrets: inherit
31-
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-matrix-build.yaml@main
31+
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@cuda-118
3232
with:
3333
build_type: ${{ inputs.build_type || 'branch' }}
3434
branch: ${{ inputs.branch }}
@@ -37,7 +37,7 @@ jobs:
3737
upload-conda:
3838
needs: [python-build]
3939
secrets: inherit
40-
uses: rapidsai/shared-action-workflows/.github/workflows/conda-upload-packages.yaml@main
40+
uses: rapidsai/shared-action-workflows/.github/workflows/conda-upload-packages.yaml@cuda-118
4141
with:
4242
build_type: ${{ inputs.build_type || 'branch' }}
4343
branch: ${{ inputs.branch }}

.github/workflows/pr.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,26 @@ jobs:
1717
- conda-python-tests
1818
- conda-notebook-tests
1919
secrets: inherit
20-
uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@main
20+
uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@cuda-118
2121
checks:
2222
secrets: inherit
23-
uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@main
23+
uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@cuda-118
2424
conda-python-build:
2525
needs: checks
2626
secrets: inherit
27-
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-matrix-build.yaml@main
27+
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@cuda-118
2828
with:
2929
build_type: pull-request
3030
conda-python-tests:
3131
needs: conda-python-build
3232
secrets: inherit
33-
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@main
33+
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@cuda-118
3434
with:
3535
build_type: pull-request
3636
conda-notebook-tests:
3737
needs: conda-python-build
3838
secrets: inherit
39-
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@main
39+
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@cuda-118
4040
with:
4141
build_type: pull-request
4242
node_type: "gpu-latest-1"

.github/workflows/test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
jobs:
1717
conda-python-tests:
1818
secrets: inherit
19-
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@main
19+
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@cuda-118
2020
with:
2121
build_type: nightly
2222
branch: ${{ inputs.branch }}

README.md

+33-33
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ num_samps = int(1e8)
4242
resample_up = 2
4343
resample_down = 3
4444

45-
cx = np.linspace(start, stop, num_samps, endpoint=False)
45+
cx = np.linspace(start, stop, num_samps, endpoint=False)
4646
cy = np.cos(-cx**2/6.0)
4747

4848
%%timeit
@@ -61,7 +61,7 @@ num_samps = int(1e8)
6161
resample_up = 2
6262
resample_down = 3
6363

64-
gx = cp.linspace(start, stop, num_samps, endpoint=False)
64+
gx = cp.linspace(start, stop, num_samps, endpoint=False)
6565
gy = cp.cos(-gx**2/6.0)
6666

6767
%%timeit
@@ -84,7 +84,7 @@ resample_up = 2
8484
resample_down = 3
8585

8686
# Generate Data on CPU with NumPy
87-
cx = np.linspace(start, stop, num_samps, endpoint=False)
87+
cx = np.linspace(start, stop, num_samps, endpoint=False)
8888
cy = np.cos(-cx**2/6.0)
8989

9090
# Create shared memory between CPU and GPU and load with CPU signal (cy)
@@ -112,7 +112,7 @@ resample_up = 2
112112
resample_down = 3
113113

114114
# Generate Data on CPU
115-
cx = np.linspace(start, stop, num_samps, endpoint=False)
115+
cx = np.linspace(start, stop, num_samps, endpoint=False)
116116
cy = np.cos(-cx**2/6.0)
117117

118118
%%time
@@ -132,9 +132,9 @@ cuSignal can be installed with ([Miniconda](https://docs.conda.io/en/latest/mini
132132
conda install -c rapidsai -c conda-forge -c nvidia \
133133
cusignal
134134
135-
# To specify a certain CUDA or Python version (e.g. 11.5 and 3.8, respectively)
135+
# To specify a certain CUDA or Python version (e.g. 11.8 and 3.8, respectively)
136136
conda install -c rapidsai -c conda-forge -c nvidia \
137-
cusignal python=3.8 cudatoolkit=11.5
137+
cusignal python=3.8 cudatoolkit=11.8
138138
```
139139

140140
For the nightly verison of `cusignal`, which includes pre-release features:
@@ -143,9 +143,9 @@ For the nightly verison of `cusignal`, which includes pre-release features:
143143
conda install -c rapidsai-nightly -c conda-forge -c nvidia \
144144
cusignal
145145
146-
# To specify a certain CUDA or Python version (e.g. 11.5 and 3.8, respectively)
146+
# To specify a certain CUDA or Python version (e.g. 11.8 and 3.8, respectively)
147147
conda install -c rapidsai-nightly -c conda-forge -c nvidia \
148-
cusignal python=3.8 cudatoolkit=11.5
148+
cusignal python=3.8 cudatoolkit=11.8
149149
```
150150

151151
While only CUDA versions >= 11.2 are officially supported, cuSignal has been confirmed to work with CUDA version 10.2 and above. If you run into any issues with the conda install, please follow the source installation instructions, below.
@@ -179,7 +179,7 @@ Since the Jetson platform is based on the arm chipset, we need to use an aarch64
179179
```bash
180180
export CUPY_NVCC_GENERATE_CODE="arch=compute_XX,code=sm_XX"
181181
```
182-
182+
183183
where `XX` is your GPU's [compute capability](https://developer.nvidia.com/cuda-gpus#compute). If you'd like to compile to multiple architectures (e.g Nano and Xavier), concatenate the `arch=...` string with semicolins.
184184

185185
3. Activate created conda environment
@@ -268,9 +268,9 @@ Since the Jetson platform is based on the arm chipset, we need to use an aarch64
268268
269269
### Source, Windows OS
270270
271-
We have confirmed that cuSignal successfully builds and runs on Windows by using [CUDA on WSL](https://docs.nvidia.com/cuda/wsl-user-guide/index.html). Please follow the instructions in the link to install WSL 2 and the associated CUDA drivers. You can then proceed to follow the cuSignal source build instructions, below.
271+
We have confirmed that cuSignal successfully builds and runs on Windows by using [CUDA on WSL](https://docs.nvidia.com/cuda/wsl-user-guide/index.html). Please follow the instructions in the link to install WSL 2 and the associated CUDA drivers. You can then proceed to follow the cuSignal source build instructions, below.
272272
273-
1. Download and install [Andaconda](https://www.anaconda.com/distribution/) for Windows. In an Anaconda Prompt, navigate to your checkout of cuSignal.
273+
1. Download and install [Anaconda](https://www.anaconda.com/distribution/) for Windows. In an Anaconda Prompt, navigate to your checkout of cuSignal.
274274
275275
2. Create cuSignal conda environment
276276
@@ -287,7 +287,7 @@ We have confirmed that cuSignal successfully builds and runs on Windows by using
287287
pip install cupy-cudaXXX
288288
```
289289
290-
Where XXX is the version of the CUDA toolkit you have installed. 11.5, for example is `cupy-cuda115`. See the [CuPy Documentation](https://docs-cupy.chainer.org/en/stable/install.html#install-cupy) for information on getting Windows wheels for other versions of CUDA.
290+
Where XXX is the version of the CUDA toolkit you have installed. 11.5, for example is `cupy-cuda115`. See the [CuPy Documentation](https://docs-cupy.chainer.org/en/stable/install.html#install-cupy) for information on getting wheels for other versions of CUDA.
291291
292292
5. Install cuSignal module
293293
@@ -301,7 +301,7 @@ We have confirmed that cuSignal successfully builds and runs on Windows by using
301301
pip install pytest pytest-benchmark
302302
pytest
303303
```
304-
304+
305305
306306
### Docker - All RAPIDS Libraries, including cuSignal
307307
@@ -360,7 +360,7 @@ As with the standard pytest tool, the user can use the `-v` and `-k` flags for v
360360
To reduce columns in benchmark result's table, add `--benchmark-columns=LABELS`, like `--benchmark-columns=min,max,mean`.
361361
For more information on `pytest-benchmark` please visit the [Usage Guide](https://pytest-benchmark.readthedocs.io/en/latest/usage.html).
362362

363-
Parameter `--benchmark-gpu-disable` is to disable memory checks from [Rapids GPU benchmark tool](https://github.com/rapidsai/benchmark).
363+
Parameter `--benchmark-gpu-disable` is to disable memory checks from [Rapids GPU benchmark tool](https://github.com/rapidsai/benchmark).
364364
Doing so speeds up benchmarking.
365365

366366
If you wish to skip benchmarks of SciPy functions add `-m "not cpu"`
@@ -376,26 +376,26 @@ cusignal/test/test_filtering.py ..................
376376
377377
378378
---------- benchmark 'UpFirDn2d': 18 tests -----------
379-
Name (time in us, mem in bytes) Mean
379+
Name (time in us, mem in bytes) Mean
380380
------------------------------------------------------
381-
test_upfirdn2d_gpu[-1-1-3-256] 195.2299 (1.0)
382-
test_upfirdn2d_gpu[-1-9-3-256] 196.1766 (1.00)
383-
test_upfirdn2d_gpu[-1-1-7-256] 196.2881 (1.01)
384-
test_upfirdn2d_gpu[0-2-3-256] 196.9984 (1.01)
385-
test_upfirdn2d_gpu[0-9-3-256] 197.5675 (1.01)
386-
test_upfirdn2d_gpu[0-1-7-256] 197.9015 (1.01)
387-
test_upfirdn2d_gpu[-1-9-7-256] 198.0923 (1.01)
388-
test_upfirdn2d_gpu[-1-2-7-256] 198.3325 (1.02)
389-
test_upfirdn2d_gpu[0-2-7-256] 198.4676 (1.02)
390-
test_upfirdn2d_gpu[0-9-7-256] 198.6437 (1.02)
391-
test_upfirdn2d_gpu[0-1-3-256] 198.7477 (1.02)
392-
test_upfirdn2d_gpu[-1-2-3-256] 200.1589 (1.03)
393-
test_upfirdn2d_gpu[-1-2-2-256] 213.0316 (1.09)
394-
test_upfirdn2d_gpu[0-1-2-256] 213.0944 (1.09)
395-
test_upfirdn2d_gpu[-1-9-2-256] 214.6168 (1.10)
396-
test_upfirdn2d_gpu[0-2-2-256] 214.6975 (1.10)
397-
test_upfirdn2d_gpu[-1-1-2-256] 216.4033 (1.11)
398-
test_upfirdn2d_gpu[0-9-2-256] 217.1675 (1.11)
381+
test_upfirdn2d_gpu[-1-1-3-256] 195.2299 (1.0)
382+
test_upfirdn2d_gpu[-1-9-3-256] 196.1766 (1.00)
383+
test_upfirdn2d_gpu[-1-1-7-256] 196.2881 (1.01)
384+
test_upfirdn2d_gpu[0-2-3-256] 196.9984 (1.01)
385+
test_upfirdn2d_gpu[0-9-3-256] 197.5675 (1.01)
386+
test_upfirdn2d_gpu[0-1-7-256] 197.9015 (1.01)
387+
test_upfirdn2d_gpu[-1-9-7-256] 198.0923 (1.01)
388+
test_upfirdn2d_gpu[-1-2-7-256] 198.3325 (1.02)
389+
test_upfirdn2d_gpu[0-2-7-256] 198.4676 (1.02)
390+
test_upfirdn2d_gpu[0-9-7-256] 198.6437 (1.02)
391+
test_upfirdn2d_gpu[0-1-3-256] 198.7477 (1.02)
392+
test_upfirdn2d_gpu[-1-2-3-256] 200.1589 (1.03)
393+
test_upfirdn2d_gpu[-1-2-2-256] 213.0316 (1.09)
394+
test_upfirdn2d_gpu[0-1-2-256] 213.0944 (1.09)
395+
test_upfirdn2d_gpu[-1-9-2-256] 214.6168 (1.10)
396+
test_upfirdn2d_gpu[0-2-2-256] 214.6975 (1.10)
397+
test_upfirdn2d_gpu[-1-1-2-256] 216.4033 (1.11)
398+
test_upfirdn2d_gpu[0-9-2-256] 217.1675 (1.11)
399399
------------------------------------------------------
400400
```
401401

build.sh

+8-3
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ RETURN_ALL(){
132132
--generate-code arch=compute_62,code=sm_62 \
133133
--generate-code arch=compute_70,code=sm_70 \
134134
--generate-code arch=compute_72,code=sm_72"
135-
135+
136136
if [ "$NVCC_MAJOR" -lt 11 ]; then
137137
GPU_ARCH="${GPU_ARCH} --generate-code arch=compute_75,code=[sm_75,compute_75]"
138138
echo -e "\t including: CUDA 10.X - {50,52,53,60,61,62,70,72,75}"
@@ -141,10 +141,15 @@ RETURN_ALL(){
141141
if [ "$NVCC_MINOR" -eq 0 ]; then
142142
GPU_ARCH="${GPU_ARCH} --generate-code arch=compute_80,code=[sm_80,compute_80]"
143143
echo -e "\t including: CUDA 11.0 - {50,52,53,60,61,62,70,72,75,80}"
144-
else
144+
elif [ "$NVCC_MINOR" -lt 8 ]; then
145145
GPU_ARCH="${GPU_ARCH} --generate-code arch=compute_80,code=sm_80 \
146146
--generate-code arch=compute_86,code=[sm_86,compute_86]"
147147
echo -e "\t including: CUDA 11.1+ - {50,52,53,60,61,62,70,72,75,80,86}"
148+
else
149+
GPU_ARCH="${GPU_ARCH} --generate-code arch=compute_80,code=sm_80 \
150+
--generate-code arch=compute_86,code=[sm_86,compute_86] \
151+
--generate-code arch=compute_90,code=[sm_90,compute_90]"
152+
echo -e "\t including: CUDA 11.8+ - {50,52,53,60,61,62,70,72,75,80,86,90}"
148153
fi
149154
fi
150155
}
@@ -178,7 +183,7 @@ if (( ${BUILD_ALL_GPU_ARCH} == 0 )); then
178183
GPU_ARCH="${GPU_ARCH} --generate-code arch=compute_${MAJOR}${MINOR},code=sm_${MAJOR}${MINOR}"
179184
done
180185
fi
181-
186+
182187
else
183188
RETURN_ALL
184189
fi

ci/test_notebooks.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ rapids-logger "Generate notebook testing dependencies"
99
rapids-dependency-file-generator \
1010
--output conda \
1111
--file_key test_notebooks \
12-
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" | tee env.yaml
12+
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml
1313

1414
rapids-mamba-retry env create --force -f env.yaml -n test
1515

conda/environments/all_cuda-115_arch-x86_64.yaml conda/environments/all_cuda-118_arch-x86_64.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ channels:
66
- conda-forge
77
- nvidia
88
dependencies:
9-
- cudatoolkit=11.5
9+
- cudatoolkit=11.8
1010
- cupy >=10,<12.0.0a0
1111
- ipython
1212
- matplotlib-base
@@ -18,7 +18,7 @@ dependencies:
1818
- pytest-benchmark
1919
- pytest-cov
2020
- pytest-xdist
21-
- python>=3.8,<3.10
21+
- python>=3.8,<3.11
2222
- pytorch <=1.12.1
2323
- scipy >=1.6.0
24-
name: all_cuda-115_arch-x86_64
24+
name: all_cuda-118_arch-x86_64

conda/recipes/cusignal/meta.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ build:
1616
noarch: python
1717

1818
requirements:
19+
build:
20+
- {{ compiler('c') }}
21+
- {{ compiler('cxx') }}
22+
- {{ compiler('cuda') }} {{ cuda_version }}
1923
host:
2024
- python
2125
- setuptools

dependencies.yaml

+10-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ files:
33
all:
44
output: conda
55
matrix:
6-
cuda: ["11.5"]
6+
cuda: ["11.8"]
77
arch: [x86_64]
88
includes:
99
- checks
@@ -51,6 +51,10 @@ dependencies:
5151
cuda: "11.5"
5252
packages:
5353
- cudatoolkit=11.5
54+
- matrix:
55+
cuda: "11.8"
56+
packages:
57+
- cudatoolkit=11.8
5458
checks:
5559
common:
5660
- output_types: [conda, requirements]
@@ -68,9 +72,13 @@ dependencies:
6872
py: "3.9"
6973
packages:
7074
- python=3.9
75+
- matrix:
76+
py: "3.10"
77+
packages:
78+
- python=3.10
7179
- matrix:
7280
packages:
73-
- python>=3.8,<3.10
81+
- python>=3.8,<3.11
7482
run:
7583
common:
7684
- output_types: [conda, requirements]

0 commit comments

Comments
 (0)