-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GPU and CPU packages for ANN benchmarks (#1773)
Builds on top of #1769 - [x] Removes `libraft-ann-bench` C++ based package - [x] Creates `raft-ann-bench` packages that includes C++ tests as well as Python scripts - [x] `raft-ann-bench` package includes all tests for CPU and GPU - [x] `raft-ann-bench-cpu` package that does not depend on CUDA or RAFT GPU code - [x] Update docs - [x] Test artifacts and scripts in CI - [x] Minor code cleaning Some changes include: - Use `RAPIDS_DATASET_ROOT_DIR` env variable to indicate location of datasets (optional) consistent with other repos: https://docs.rapids.ai/maintainers/datasets/ - CPU and GPU packages are built in the existing GPU build GHA. Only the CUDA 12 jobs build the CPU packages. - Small change for invocation of scripts, for example: `python bench/ann/run.py --dataset deep-image-96-inner` is now `python -m raft-ann-bench.run --dataset deep-image-96-inner`, but still scripts meant to be invoked from the command line. Future improvements: - Remove use of popen python scripts from python scripts. - Improve printing and logging - Allow functions of package to be called from python scripts. Closes #1744 Authors: - Dante Gama Dessavre (https://github.com/dantegd) - Artem M. Chirkin (https://github.com/achirkin) - Divye Gala (https://github.com/divyegala) - Corey J. Nolet (https://github.com/cjnolet) Approvers: - Corey J. Nolet (https://github.com/cjnolet) - Divye Gala (https://github.com/divyegala) - AJ Schmidt (https://github.com/ajschmidt8) - Artem M. Chirkin (https://github.com/achirkin) URL: #1773
- Loading branch information
Showing
48 changed files
with
1,104 additions
and
492 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (c) 2022-2023, NVIDIA CORPORATION. | ||
|
||
./build.sh libraft --allgpuarch --compile-lib --build-metrics=compile_lib --incl-cache-stats --no-nvtx | ||
./build.sh libraft -v --allgpuarch --compile-lib --build-metrics=compile_lib --incl-cache-stats --no-nvtx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (c) 2022-2023, NVIDIA CORPORATION. | ||
|
||
./build.sh libraft --allgpuarch --no-nvtx | ||
./build.sh libraft -v --allgpuarch --no-nvtx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (c) 2022-2023, NVIDIA CORPORATION. | ||
|
||
./build.sh tests bench-prims --allgpuarch --no-nvtx --build-metrics=tests_bench_prims --incl-cache-stats | ||
./build.sh tests bench-prims -v --allgpuarch --no-nvtx --build-metrics=tests_bench_prims --incl-cache-stats | ||
cmake --install cpp/build --component testing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...recipes/libraft/build_libraft_nn_bench.sh → conda/recipes/raft-ann-bench-cpu/build.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (c) 2023, NVIDIA CORPORATION. | ||
|
||
./build.sh bench-ann --allgpuarch --no-nvtx --build-metrics=bench_ann --incl-cache-stats | ||
./build.sh bench-ann --cpu-only --no-nvtx --build-metrics=bench_ann_cpu --incl-cache-stats | ||
cmake --install cpp/build --component ann_bench |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
c_compiler_version: | ||
- 11 | ||
|
||
cxx_compiler_version: | ||
- 11 | ||
|
||
sysroot_version: | ||
- "2.17" | ||
|
||
cmake_version: | ||
- ">=3.26.4" | ||
|
||
glog_version: | ||
- ">=0.6.0" | ||
|
||
h5py_version: | ||
- ">=3.8.0" | ||
|
||
nlohmann_json_version: | ||
- ">=3.11.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Copyright (c) 2022-2023, NVIDIA CORPORATION. | ||
|
||
# Usage: | ||
# conda build . -c conda-forge -c nvidia -c rapidsai | ||
{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %} | ||
{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} | ||
{% set py_version = environ['CONDA_PY'] %} | ||
{% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %} | ||
{% set date_string = environ['RAPIDS_DATE_STRING'] %} | ||
|
||
package: | ||
name: raft-ann-bench-cpu | ||
version: {{ version }} | ||
script: build.sh | ||
|
||
source: | ||
git_url: ../../.. | ||
|
||
build: | ||
script_env: | ||
- AWS_ACCESS_KEY_ID | ||
- AWS_SECRET_ACCESS_KEY | ||
- AWS_SESSION_TOKEN | ||
- CMAKE_C_COMPILER_LAUNCHER | ||
- CMAKE_CUDA_COMPILER_LAUNCHER | ||
- CMAKE_CXX_COMPILER_LAUNCHER | ||
- CMAKE_GENERATOR | ||
- PARALLEL_LEVEL | ||
- RAPIDS_ARTIFACTS_DIR | ||
- SCCACHE_BUCKET | ||
- SCCACHE_IDLE_TIMEOUT | ||
- SCCACHE_REGION | ||
- SCCACHE_S3_KEY_PREFIX=libraft-aarch64 # [aarch64] | ||
- SCCACHE_S3_KEY_PREFIX=libraft-linux64 # [linux64] | ||
- SCCACHE_S3_USE_SSL | ||
number: {{ GIT_DESCRIBE_NUMBER }} | ||
string: py{{ py_version }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} | ||
|
||
requirements: | ||
build: | ||
- {{ compiler('c') }} | ||
- {{ compiler('cxx') }} | ||
- cmake {{ cmake_version }} | ||
- ninja | ||
- sysroot_{{ target_platform }} {{ sysroot_version }} | ||
|
||
host: | ||
- glog {{ glog_version }} | ||
- matplotlib | ||
- nlohmann_json {{ nlohmann_json_version }} | ||
- python | ||
- pyyaml | ||
|
||
run: | ||
- glog {{ glog_version }} | ||
- h5py {{ h5py_version }} | ||
- matplotlib | ||
- python | ||
- pyyaml | ||
|
||
about: | ||
home: https://rapids.ai/ | ||
license: Apache-2.0 | ||
summary: libraft ann bench |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (c) 2023, NVIDIA CORPORATION. | ||
|
||
./build.sh bench-ann -v --allgpuarch --no-nvtx --build-metrics=bench_ann --incl-cache-stats | ||
cmake --install cpp/build --component ann_bench |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
c_compiler_version: | ||
- 11 | ||
|
||
cxx_compiler_version: | ||
- 11 | ||
|
||
cuda_compiler: | ||
- cuda-nvcc | ||
|
||
cuda11_compiler: | ||
- nvcc | ||
|
||
sysroot_version: | ||
- "2.17" | ||
|
||
cmake_version: | ||
- ">=3.26.4" | ||
|
||
nccl_version: | ||
- ">=2.9.9" | ||
|
||
gtest_version: | ||
- ">=1.13.0" | ||
|
||
glog_version: | ||
- ">=0.6.0" | ||
|
||
faiss_version: | ||
- ">=1.7.1" | ||
|
||
h5py_version: | ||
- ">=3.8.0" | ||
|
||
nlohmann_json_version: | ||
- ">=3.11.2" | ||
|
||
# The CTK libraries below are missing from the conda-forge::cudatoolkit package | ||
# for CUDA 11. The "*_host_*" version specifiers correspond to `11.8` packages | ||
# and the "*_run_*" version specifiers correspond to `11.x` packages. | ||
|
||
cuda11_libcublas_host_version: | ||
- "=11.11.3.6" | ||
|
||
cuda11_libcublas_run_version: | ||
- ">=11.5.2.43,<12.0.0" | ||
|
||
cuda11_libcurand_host_version: | ||
- "=10.3.0.86" | ||
|
||
cuda11_libcurand_run_version: | ||
- ">=10.2.5.43,<10.3.1" | ||
|
||
cuda11_libcusolver_host_version: | ||
- "=11.4.1.48" | ||
|
||
cuda11_libcusolver_run_version: | ||
- ">=11.2.0.43,<11.4.2" | ||
|
||
cuda11_libcusparse_host_version: | ||
- "=11.7.5.86" | ||
|
||
cuda11_libcusparse_run_version: | ||
- ">=11.6.0.43,<12.0.0" | ||
|
||
# `cuda-profiler-api` only has `11.8.0` and `12.0.0` packages for all | ||
# architectures. The "*_host_*" version specifiers correspond to `11.8` packages and the | ||
# "*_run_*" version specifiers correspond to `11.x` packages. | ||
|
||
cuda11_cuda_profiler_api_host_version: | ||
- "=11.8.86" | ||
|
||
cuda11_cuda_profiler_api_run_version: | ||
- ">=11.4.240,<12" |
Oops, something went wrong.