Skip to content

Commit

Permalink
Merge branch 'main' into update-handle-stream
Browse files Browse the repository at this point in the history
  • Loading branch information
junjieqi authored May 21, 2024
2 parents 2fca377 + 59e3ee1 commit 29c2e49
Show file tree
Hide file tree
Showing 46 changed files with 456 additions and 344 deletions.
14 changes: 7 additions & 7 deletions .github/actions/build_cmake/action.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
name: Build cmake
inputs:
opt_level:
description: 'The optimization level'
description: 'Compile options / optimization level.'
required: false
default: generic
gpu:
description: 'The GPU to use'
description: 'Enable GPU support.'
required: false
default: OFF
raft:
description: 'The raft to use'
description: 'Enable RAFT support.'
required: false
default: OFF
runs:
using: composite
steps:
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v3.0.3
uses: conda-incubator/setup-miniconda@v3
with:
python-version: '3.11'
miniconda-version: latest
- name: Set up environment
- name: Initialize Conda environment
shell: bash
run: |
conda config --set solver libmamba
conda update -y -q conda
- name: Configure conda environment
- name: Configure Conda environment
shell: bash
run: |
conda install -y -q -c conda-forge gxx_linux-64=11.2 sysroot_linux-64=2.28
Expand Down Expand Up @@ -97,7 +97,7 @@ runs:
FAISS_DISABLE_CPU_FEATURES=AVX2 LD_DEBUG=libs $CONDA/bin/python -c "import faiss" 2>&1 | grep faiss.so
LD_DEBUG=libs $CONDA/bin/python -c "import faiss" 2>&1 | grep faiss_avx2.so
- name: Upload test results
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v4
with:
name: test-results-${{ inputs.opt_level }}-${{ inputs.gpu }}-${{ inputs.raft }}
path: test-results
26 changes: 12 additions & 14 deletions .github/actions/build_conda/action.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
name: Build conda
description: Build conda
name: Conda build
description: Builds FAISS inside a Conda environment and uploads to repository when label is provided.
inputs:
label:
description: "Label"
description: "The label to be used for uploads to Conda."
default: ""
required: false
cuda:
description: "cuda"
description: "CUDA toolkit version to use."
default: ""
required: false
raft:
description: "raft"
description: "Enable RAFT support."
default: ""
required: false
compiler_version:
description: "compiler_version"
default: ""
default: "Compiler version for C/C++/CUDA."
required: false
runs:
using: composite
Expand All @@ -24,29 +24,27 @@ runs:
shell: bash
id: choose_shell
run: |
# if runner.os != 'Windows' use bash, else use pwsh
# Use pwsh on Windows; bash everywhere else
if [ "${{ runner.os }}" != "Windows" ]; then
echo "shell=bash" >> "$GITHUB_OUTPUT"
else
echo "shell=pwsh" >> "$GITHUB_OUTPUT"
fi
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v3.0.3
uses: conda-incubator/setup-miniconda@v3
with:
python-version: '3.11'
miniconda-version: latest
- name: Install conda build tools
shell: ${{ steps.choose_shell.outputs.shell }}
run: |
# conda config --set solver libmamba
# conda config --set verbosity 3
conda update -y -q conda
conda install -y -q conda-build
- name: Enable anaconda uploads
if: inputs.label != ''
shell: ${{ steps.choose_shell.outputs.shell }}
env:
PACKAGE_TYPE: inputs.label
PACKAGE_TYPE: ${{ inputs.label }}
run: |
conda install -y -q anaconda-client
conda config --set anaconda_upload yes
Expand All @@ -61,7 +59,7 @@ runs:
shell: ${{ steps.choose_shell.outputs.shell }}
working-directory: conda
env:
PACKAGE_TYPE: inputs.label
PACKAGE_TYPE: ${{ inputs.label }}
run: |
conda build faiss --user pytorch --label ${{ inputs.label }} -c pytorch
- name: Conda build (GPU)
Expand All @@ -76,7 +74,7 @@ runs:
shell: ${{ steps.choose_shell.outputs.shell }}
working-directory: conda
env:
PACKAGE_TYPE: inputs.label
PACKAGE_TYPE: ${{ inputs.label }}
run: |
conda build faiss-gpu --variants '{ "cudatoolkit": "${{ inputs.cuda }}", "c_compiler_version": "${{ inputs.compiler_version }}", "cxx_compiler_version": "${{ inputs.compiler_version }}" }' \
--user pytorch --label ${{ inputs.label }} -c pytorch -c nvidia/label/cuda-${{ inputs.cuda }} -c nvidia
Expand All @@ -92,7 +90,7 @@ runs:
shell: ${{ steps.choose_shell.outputs.shell }}
working-directory: conda
env:
PACKAGE_TYPE: inputs.label
PACKAGE_TYPE: ${{ inputs.label }}
run: |
conda build faiss-gpu-raft --variants '{ "cudatoolkit": "${{ inputs.cuda }}", "c_compiler_version": "${{ inputs.compiler_version }}", "cxx_compiler_version": "${{ inputs.compiler_version }}" }' \
--user pytorch --label ${{ inputs.label }} -c pytorch -c nvidia/label/cuda-${{ inputs.cuda }} -c nvidia -c rapidsai -c rapidsai-nightly -c conda-forge
93 changes: 80 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
- name: Install clang-format
run: |
sudo apt-get update -y
Expand All @@ -40,13 +40,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
- uses: ./.github/actions/build_cmake
linux-x86_64-AVX2-cmake:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
- uses: ./.github/actions/build_cmake
with:
opt_level: avx2
Expand All @@ -55,7 +55,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
- uses: ./.github/actions/build_cmake
with:
opt_level: avx512
Expand All @@ -64,15 +64,15 @@ jobs:
runs-on: 4-core-ubuntu-gpu-t4
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
- uses: ./.github/actions/build_cmake
with:
gpu: ON
linux-x86_64-GPU-w-RAFT-cmake:
runs-on: 4-core-ubuntu-gpu-t4
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
- uses: ./.github/actions/build_cmake
with:
gpu: ON
Expand All @@ -81,7 +81,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
Expand All @@ -90,7 +90,7 @@ jobs:
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
Expand All @@ -99,7 +99,7 @@ jobs:
runs-on: 2-core-ubuntu-arm
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
Expand All @@ -109,19 +109,86 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- uses: ./.github/actions/build_conda
with:
label: main
linux-x86_64-GPU-packages-CUDA-11-4-4:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: 4-core-ubuntu-gpu-t4
env:
CUDA_ARCHS: "60-real;61-real;62-real;70-real;72-real;75-real;80;86-real"
FAISS_FLATTEN_CONDA_INCLUDES: "1"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- uses: ./.github/actions/build_conda
with:
label: main
cuda: "11.4.4"
compiler_version: "11.2"
linux-x86_64-GPU-RAFT-packages-CUDA11-8-0:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: 4-core-ubuntu-gpu-t4
env:
CUDA_ARCHS: "70-real;72-real;75-real;80;86-real"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- uses: ./.github/actions/build_conda
with:
label: main
raft: "ON"
cuda: "11.8.0"
compiler_version: "11.2"
linux-x86_64-GPU-packages-CUDA-12-1-1:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: 4-core-ubuntu-gpu-t4
env:
CUDA_ARCHS: "70-real;72-real;75-real;80;86-real"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- uses: ./.github/actions/build_conda
with:
label: main
cuda: "12.1.1"
compiler_version: "11.2"
linux-x86_64-GPU-RAFT-packages-CUDA12-1-1:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: 4-core-ubuntu-gpu-t4
env:
CUDA_ARCHS: "70-real;72-real;75-real;80;86-real"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- uses: ./.github/actions/build_conda
with:
label: main
raft: "ON"
cuda: "12.1.1"
compiler_version: "11.2"
windows-x86_64-packages:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
Expand All @@ -133,7 +200,7 @@ jobs:
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
Expand All @@ -145,7 +212,7 @@ jobs:
runs-on: 2-core-ubuntu-arm
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
Expand Down
Loading

0 comments on commit 29c2e49

Please sign in to comment.