Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
matrix:
cuda_version:
- '12.9.1'
- '13.0.0'
- '13.0.2'
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
matrix:
cuda_version:
- '12.9.1'
- '13.0.0'
- '13.0.2'
with:
build_type: pull-request
node_type: "gpu-l4-latest-1"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
matrix:
cuda_version:
- '12.9.1'
- '13.0.0'
- '13.0.2'
with:
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
*.jar
target
**/.DS_Store
cuvs-workdir
1 change: 1 addition & 0 deletions RAPIDS_BRANCH
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
main
18 changes: 18 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@ function hasArg {
(( NUMARGS != 0 )) && (echo " ${ARGS} " | grep -q " $1 ")
}

if hasArg --build-cuvs-java; then
CUVS_WORKDIR="cuvs-workdir"
CUVS_GIT_REPO="https://github.com/rapidsai/cuvs.git"
if [[ -d "$CUVS_WORKDIR" && -n "$(ls -A "$CUVS_WORKDIR")" ]]; then
echo "Directory '$CUVS_WORKDIR' exists and is not empty."
pushd $CUVS_WORKDIR
git pull
else
BRANCH=$(cat "RAPIDS_BRANCH")
echo "Directory '$CUVS_WORKDIR' does not exist or is empty. Cloning the cuvs's '$BRANCH' branch."
# Correct branch selection is crucial to avoid version mismatch issues when testing.
git clone --branch "$BRANCH" $CUVS_GIT_REPO $CUVS_WORKDIR
pushd $CUVS_WORKDIR
fi
./build.sh java
popd
fi

MAVEN_VERIFY_ARGS=()
if ! hasArg --run-java-tests; then
MAVEN_VERIFY_ARGS=("-DskipTests")
Expand Down
3 changes: 3 additions & 0 deletions ci/build_java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ if [[ "${1:-}" == "--run-java-tests" ]]; then
EXTRA_BUILD_ARGS+=("--run-java-tests")
fi

# Always build cuvs-java when running the pipeline
EXTRA_BUILD_ARGS+=("--build-cuvs-java")

# shellcheck disable=SC1091
. /opt/conda/etc/profile.d/conda.sh

Expand Down
4 changes: 4 additions & 0 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ PATCH_PEP440=$(python -c "from packaging.version import Version; print(Version('

# Log update context
if [[ "${RUN_CONTEXT}" == "main" ]]; then
RAPIDS_BRANCH_NAME="main"
echo "Preparing development branch update $CURRENT_TAG => $NEXT_FULL_TAG (targeting main branch)"
elif [[ "${RUN_CONTEXT}" == "release" ]]; then
RAPIDS_BRANCH_NAME="release/${NEXT_SHORT_TAG}"
echo "Preparing release branch update $CURRENT_TAG => $NEXT_FULL_TAG (targeting release/${NEXT_SHORT_TAG} branch)"
fi

Expand All @@ -98,6 +100,7 @@ function sed_runner() {

# Centralized version file update
echo "${NEXT_FULL_TAG}" > VERSION
echo "${RAPIDS_BRANCH_NAME}" > RAPIDS_BRANCH

# Update Java version
NEXT_FULL_JAVA_TAG="${NEXT_SHORT_TAG}.${PATCH_PEP440}"
Expand All @@ -111,5 +114,6 @@ for FILE in dependencies.yaml conda/environments/*.yaml; do
done

for FILE in .github/workflows/*.yaml; do
sed_runner "/shared-workflows/ s|@.*|@${RAPIDS_BRANCH_NAME}|g" "${FILE}"
sed_runner "s/:[0-9]*\\.[0-9]*-/:${NEXT_SHORT_TAG}-/g" "${FILE}"
done
2 changes: 2 additions & 0 deletions conda/environments/all_cuda-129_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ channels:
- conda-forge
- rapidsai-nightly
dependencies:
- cmake>=3.30.4
- cuda-cudart-dev
- cuda-nvtx-dev
- cuda-profiler-api
Expand All @@ -14,5 +15,6 @@ dependencies:
- libcusparse-dev
- libcuvs==26.02.*
- maven
- ninja
- openjdk=22.*
name: all_cuda-129_arch-aarch64
2 changes: 2 additions & 0 deletions conda/environments/all_cuda-129_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ channels:
- conda-forge
- rapidsai-nightly
dependencies:
- cmake>=3.30.4
- cuda-cudart-dev
- cuda-nvtx-dev
- cuda-profiler-api
Expand All @@ -14,5 +15,6 @@ dependencies:
- libcusparse-dev
- libcuvs==26.02.*
- maven
- ninja
- openjdk=22.*
name: all_cuda-129_arch-x86_64
2 changes: 2 additions & 0 deletions conda/environments/all_cuda-130_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ channels:
- conda-forge
- rapidsai-nightly
dependencies:
- cmake>=3.30.4
- cuda-cudart-dev
- cuda-nvtx-dev
- cuda-profiler-api
Expand All @@ -14,5 +15,6 @@ dependencies:
- libcusparse-dev
- libcuvs==26.02.*
- maven
- ninja
- openjdk=22.*
name: all_cuda-130_arch-aarch64
2 changes: 2 additions & 0 deletions conda/environments/all_cuda-130_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ channels:
- conda-forge
- rapidsai-nightly
dependencies:
- cmake>=3.30.4
- cuda-cudart-dev
- cuda-nvtx-dev
- cuda-profiler-api
Expand All @@ -14,5 +15,6 @@ dependencies:
- libcusparse-dev
- libcuvs==26.02.*
- maven
- ninja
- openjdk=22.*
name: all_cuda-130_arch-x86_64
2 changes: 2 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,7 @@ dependencies:
common:
- output_types: conda
packages:
- cmake>=3.30.4
- maven
- ninja
- openjdk=22.*
2 changes: 0 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
<maven.compiler.source>21</maven.compiler.source>
</properties>



<dependencies>
<dependency>
<groupId>org.apache.lucene</groupId>
Expand Down
29 changes: 29 additions & 0 deletions src/main/java/com/nvidia/cuvs/lucene/FilterCuVSProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@

import com.nvidia.cuvs.BruteForceIndex;
import com.nvidia.cuvs.CagraIndex;
import com.nvidia.cuvs.CagraIndexParams;
import com.nvidia.cuvs.CagraIndexParams.CuvsDistanceType;
import com.nvidia.cuvs.CagraIndexParams.HnswHeuristicType;
import com.nvidia.cuvs.CuVSMatrix;
import com.nvidia.cuvs.CuVSMatrix.Builder;
import com.nvidia.cuvs.CuVSMatrix.DataType;
import com.nvidia.cuvs.CuVSResources;
import com.nvidia.cuvs.HnswIndex;
import com.nvidia.cuvs.HnswIndexParams;
import com.nvidia.cuvs.spi.CuVSProvider;
import java.lang.invoke.MethodHandle;
import java.nio.file.Path;
import java.util.logging.Level;

/*package-private*/ class FilterCuVSProvider implements CuVSProvider {

Expand Down Expand Up @@ -114,4 +119,28 @@ public com.nvidia.cuvs.TieredIndex.Builder newTieredIndexBuilder(CuVSResources c
throws UnsupportedOperationException {
return delegate.newTieredIndexBuilder(cuVSResources);
}

@Override
public CagraIndexParams cagraIndexParamsFromHnswParams(
long arg0, long arg1, int arg2, int arg3, HnswHeuristicType arg4, CuvsDistanceType arg5) {
// TODO Auto-generated method stub
return null;
}

@Override
public Level getLogLevel() {
// TODO Auto-generated method stub
return null;
}

@Override
public void setLogLevel(Level arg0) {
// TODO Auto-generated method stub
}

@Override
public HnswIndex hnswIndexFromCagra(HnswIndexParams arg0, CagraIndex arg1) throws Throwable {
// TODO Auto-generated method stub
return null;
}
}