Skip to content

Commit c1822a8

Browse files
algoriddlefacebook-github-bot
authored andcommitted
cuda dependencies (facebookresearch#3230)
Summary: Pull Request resolved: facebookresearch#3230 Reviewed By: mlomeli1 Differential Revision: D53271742 Pulled By: algoriddle fbshipit-source-id: b0f09e26ab0b4cfcbdb10528b2f57e15c10f4265
1 parent 1d0e8d4 commit c1822a8

File tree

4 files changed

+63
-18
lines changed

4 files changed

+63
-18
lines changed

.circleci/config.yml

+40-13
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
command: |
141141
cd conda
142142
conda build faiss-gpu --variants '{ "cudatoolkit": "<<parameters.cuda>>", "c_compiler_version": "<<parameters.compiler_version>>", "cxx_compiler_version": "<<parameters.compiler_version>>" }' \
143-
-c pytorch -c nvidia/label/cuda-<<parameters.cuda>>
143+
-c pytorch -c nvidia/label/cuda-<<parameters.cuda>> -c nvidia
144144
- when:
145145
condition:
146146
and:
@@ -154,7 +154,7 @@ jobs:
154154
command: |
155155
cd conda
156156
conda build faiss-gpu --variants '{ "cudatoolkit": "<<parameters.cuda>>", "c_compiler_version": "<<parameters.compiler_version>>", "cxx_compiler_version": "<<parameters.compiler_version>>" }' \
157-
--user pytorch --label <<parameters.label>> -c pytorch -c nvidia/label/cuda-<<parameters.cuda>>
157+
--user pytorch --label <<parameters.label>> -c pytorch -c nvidia/label/cuda-<<parameters.cuda>> -c nvidia
158158
- when:
159159
condition:
160160
and:
@@ -168,7 +168,7 @@ jobs:
168168
command: |
169169
cd conda
170170
conda build faiss-gpu-raft --variants '{ "cudatoolkit": "<<parameters.cuda>>", "c_compiler_version": "<<parameters.compiler_version>>", "cxx_compiler_version": "<<parameters.compiler_version>>" }' \
171-
-c pytorch -c nvidia -c rapidsai-nightly -c conda-forge
171+
-c pytorch -c nvidia/label/cuda-<<parameters.cuda>> -c nvidia -c rapidsai-nightly -c conda-forge
172172
- when:
173173
condition:
174174
and:
@@ -182,7 +182,7 @@ jobs:
182182
command: |
183183
cd conda
184184
conda build faiss-gpu-raft --variants '{ "cudatoolkit": "<<parameters.cuda>>", "c_compiler_version": "<<parameters.compiler_version>>", "cxx_compiler_version": "<<parameters.compiler_version>>" }' \
185-
--user pytorch --label <<parameters.label>> -c pytorch -c nvidia/label/cuda-<<parameters.cuda>> -c rapidsai-nightly -c conda-forge
185+
--user pytorch --label <<parameters.label>> -c pytorch -c nvidia/label/cuda-<<parameters.cuda>> -c nvidia -c rapidsai-nightly -c conda-forge
186186
187187
build_cmake:
188188
parameters:
@@ -232,15 +232,17 @@ jobs:
232232
- run:
233233
name: Install env using conda-forge channel
234234
command: |
235-
conda install -y -q python=3.11 cmake make swig=4.0.2 mkl=2023 mkl-devel=2023 numpy scipy pytest gxx_linux-64 sysroot_linux-64=2.28 libraft cuda-version=11.8 -c rapidsai-nightly -c "nvidia/label/cuda-11.8.0" -c conda-forge
235+
conda install -y -q python=3.11 cmake make swig=4.0.2 mkl=2023 mkl-devel=2023 numpy scipy pytest gxx_linux-64 sysroot_linux-64=2.28 libraft cuda-version=11.8 cuda-toolkit -c rapidsai-nightly -c "nvidia/label/cuda-11.8.0" -c conda-forge
236236
- when:
237237
condition:
238-
equal: [ "ON", << parameters.gpu >> ]
238+
and:
239+
- equal: [ "ON", << parameters.gpu >> ]
240+
- equal: [ "OFF", << parameters.raft >> ]
239241
steps:
240242
- run:
241243
name: Install CUDA
242244
command: |
243-
conda install -y -q cuda-nvcc cuda-cudart-dev libcublas libcublas-dev cuda-toolkit -c "nvidia/label/cuda-11.8.0"
245+
conda install -y -q cuda-toolkit -c "nvidia/label/cuda-11.8.0"
244246
- run:
245247
name: Build all targets
246248
no_output_timeout: 30m
@@ -287,7 +289,7 @@ jobs:
287289
- run:
288290
name: Python tests (CPU + GPU)
289291
command: |
290-
conda install -y -q pytorch pytorch-cuda=11 -c pytorch -c nvidia/label/cuda-11.8.0
292+
conda install -y -q pytorch pytorch-cuda=11.8 -c pytorch -c nvidia/label/cuda-11.8.0
291293
pytest --junitxml=test-results/pytest/results.xml tests/test_*.py
292294
pytest --junitxml=test-results/pytest/results-torch.xml tests/torch_*.py
293295
cp tests/common_faiss_tests.py faiss/gpu/test
@@ -354,10 +356,10 @@ workflows:
354356
branches:
355357
ignore: /.*/
356358
- build_conda:
357-
name: Linux x86_64 GPU packages (CUDA 11.8)
359+
name: Linux x86_64 GPU packages (CUDA 11.8.0)
358360
exec: linux-x86_64-gpu
359361
label: main
360-
cuda: "11.8"
362+
cuda: "11.8.0"
361363
cuda_archs: "60-real;61-real;62-real;70-real;72-real;75-real;80;86-real"
362364
compiler_version: "11.2"
363365
filters:
@@ -366,11 +368,36 @@ workflows:
366368
branches:
367369
ignore: /.*/
368370
- build_conda:
369-
name: Linux x86_64 GPU w/ RAFT packages (CUDA 11.8)
371+
name: Linux x86_64 GPU w/ RAFT packages (CUDA 11.8.0)
370372
exec: linux-x86_64-gpu
371373
label: main
372374
raft: "ON"
373-
cuda: "11.8"
375+
cuda: "11.8.0"
376+
cuda_archs: "60-real;61-real;62-real;70-real;72-real;75-real;80;86-real"
377+
compiler_version: "11.2"
378+
filters:
379+
tags:
380+
only: /^v.*/
381+
branches:
382+
ignore: /.*/
383+
- build_conda:
384+
name: Linux x86_64 GPU packages (CUDA 12.1.0)
385+
exec: linux-x86_64-gpu
386+
label: main
387+
cuda: "12.1.0"
388+
cuda_archs: "60-real;61-real;62-real;70-real;72-real;75-real;80;86-real"
389+
compiler_version: "11.2"
390+
filters:
391+
tags:
392+
only: /^v.*/
393+
branches:
394+
ignore: /.*/
395+
- build_conda:
396+
name: Linux x86_64 GPU w/ RAFT packages (CUDA 12.1.0)
397+
exec: linux-x86_64-gpu
398+
label: main
399+
raft: "ON"
400+
cuda: "12.1.0"
374401
cuda_archs: "60-real;61-real;62-real;70-real;72-real;75-real;80;86-real"
375402
compiler_version: "11.2"
376403
filters:
@@ -420,7 +447,7 @@ workflows:
420447
exec: linux-x86_64-cpu
421448
label: nightly
422449
- build_conda:
423-
name: Linux x86_64 GPU nightlies (CUDA 11.8)
450+
name: Linux x86_64 GPU nightlies (CUDA 11.8.0)
424451
exec: linux-x86_64-gpu
425452
cuda: "11.8.0"
426453
cuda_archs: "60-real;61-real;62-real;70-real;72-real;75-real;80;86-real"

conda/conda_build_config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ python:
22
- 3.9
33
- 3.10
44
- 3.11
5-
- 3.12
5+
- 3.12 # [not aarch64]

conda/faiss-gpu-raft/meta.yaml

+12-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
{% set version = environ.get('GIT_DESCRIBE_TAG').lstrip('v') %}
77
{% set suffix = "_nightly" if environ.get('PACKAGE_TYPE') == 'nightly' else "" %}
88
{% set number = GIT_DESCRIBE_NUMBER %}
9+
{% if cudatoolkit == '11.8.0' %}
10+
{% set cuda_constraints=">=11.8,<11.9" %}
11+
{% set libcublas_constraints=">=11.11,<12" %}
12+
{% elif cudatoolkit == '12.1.0' %}
13+
{% set cuda_constraints=">=12.1,<12.2" %}
14+
{% set libcublas_constraints=">=12.1,<12.2" %}
15+
{% endif %}
916

1017
package:
1118
name: faiss-pkg
@@ -45,16 +52,18 @@ outputs:
4552
- make # [not win]
4653
- mkl-devel =2023 # [x86_64]
4754
- cuda-toolkit {{ cudatoolkit }}
48-
- pytorch-cuda
4955
host:
5056
- mkl =2023 # [x86_64]
5157
- openblas # [not x86_64]
5258
- libraft =24.02
59+
- cuda-version {{ cuda_constraints }}
5360
run:
5461
- mkl =2023 # [x86_64]
5562
- openblas # [not x86_64]
56-
- {{ pin_compatible('pytorch-cuda', max_pin='x') }}
63+
- cuda-cudart {{ cuda_constraints }}
64+
- libcublas {{ libcublas_constraints }}
5765
- libraft =24.02
66+
- cuda-version {{ cuda_constraints }}
5867
test:
5968
requires:
6069
- conda-build
@@ -92,6 +101,7 @@ outputs:
92101
- numpy
93102
- scipy
94103
- pytorch
104+
- pytorch-cuda {{ cuda_constraints }}
95105
commands:
96106
- python -X faulthandler -m unittest discover -v -s tests/ -p "test_*"
97107
- python -X faulthandler -m unittest discover -v -s tests/ -p "torch_*"

conda/faiss-gpu/meta.yaml

+10-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
{% set version = environ.get('GIT_DESCRIBE_TAG').lstrip('v') %}
77
{% set suffix = "_nightly" if environ.get('PACKAGE_TYPE') == 'nightly' else "" %}
88
{% set number = GIT_DESCRIBE_NUMBER %}
9+
{% if cudatoolkit == '11.8.0' %}
10+
{% set cuda_constraints=">=11.8,<11.9" %}
11+
{% set libcublas_constraints=">=11.11,<12" %}
12+
{% elif cudatoolkit == '12.1.0' %}
13+
{% set cuda_constraints=">=12.1,<12.2" %}
14+
{% set libcublas_constraints=">=12.1,<12.2" %}
15+
{% endif %}
916

1017
package:
1118
name: faiss-pkg
@@ -45,14 +52,14 @@ outputs:
4552
- make # [not win]
4653
- mkl-devel =2023 # [x86_64]
4754
- cuda-toolkit {{ cudatoolkit }}
48-
- pytorch-cuda
4955
host:
5056
- mkl =2023 # [x86_64]
5157
- openblas # [not x86_64]
5258
run:
5359
- mkl =2023 # [x86_64]
5460
- openblas # [not x86_64]
55-
- {{ pin_compatible('pytorch-cuda', max_pin='x') }}
61+
- cuda-cudart {{ cuda_constraints }}
62+
- libcublas {{ libcublas_constraints }}
5663
test:
5764
requires:
5865
- conda-build
@@ -90,6 +97,7 @@ outputs:
9097
- numpy
9198
- scipy
9299
- pytorch
100+
- pytorch-cuda {{ cuda_constraints }}
93101
commands:
94102
- python -X faulthandler -m unittest discover -v -s tests/ -p "test_*"
95103
- python -X faulthandler -m unittest discover -v -s tests/ -p "torch_*"

0 commit comments

Comments
 (0)