Skip to content

Commit

Permalink
Merge branch 'branch-25.04' into tom/retry-http
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAugspurger authored Feb 10, 2025
2 parents 774dc58 + c38038e commit ec31221
Show file tree
Hide file tree
Showing 12 changed files with 69 additions and 39 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:
jobs:
cpp-build:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-25.04
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -37,7 +37,7 @@ jobs:
python-build:
needs: [cpp-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-25.04
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -46,7 +46,7 @@ jobs:
upload-conda:
needs: [cpp-build, python-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-25.04
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -56,7 +56,7 @@ jobs:
if: github.ref_type == 'branch'
needs: python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.04
with:
arch: "amd64"
branch: ${{ inputs.branch }}
Expand All @@ -68,7 +68,7 @@ jobs:
sha: ${{ inputs.sha }}
wheel-build-cpp:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.04
with:
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber)))
build_type: ${{ inputs.build_type || 'branch' }}
Expand All @@ -79,7 +79,7 @@ jobs:
wheel-build-python:
needs: wheel-build-cpp
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.04
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -89,7 +89,7 @@ jobs:
wheel-publish-cpp:
needs: wheel-build-cpp
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-25.04
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -100,7 +100,7 @@ jobs:
wheel-publish-python:
needs: wheel-build-python
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-25.04
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand Down
52 changes: 39 additions & 13 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ jobs:
- wheel-cpp-build
- wheel-python-build
- wheel-python-tests
- telemetry-setup
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-25.04
if: always()
with:
needs: ${{ toJSON(needs) }}
Expand All @@ -35,6 +36,7 @@ jobs:
# provides at least Python 3.11 (see
# https://docs.python.org/3/library/datetime.html#datetime.date.fromisoformat)
runs-on: ubuntu-24.04
needs: telemetry-setup
env:
RAPIDS_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand All @@ -44,7 +46,7 @@ jobs:
repo: kvikio
changed-files:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@branch-25.04
with:
files_yaml: |
test_cpp:
Expand All @@ -70,26 +72,40 @@ jobs:
- '!README.md'
- '!docs/**'
- '!notebooks/**'
telemetry-setup:
runs-on: ubuntu-latest
continue-on-error: true
env:
OTEL_SERVICE_NAME: "pr-kvikio"
steps:
- name: Telemetry setup
# This gate is here and not at the job level because we need the job to not be skipped,
# since other jobs depend on it.
if: ${{ vars.TELEMETRY_ENABLED == 'true' }}
uses: rapidsai/shared-actions/telemetry-dispatch-stash-base-env-vars@main
checks:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@nvks-runners
needs: telemetry-setup
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-25.04
with:
ignored_pr_jobs: telemetry-summarize
conda-cpp-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-25.04
with:
build_type: pull-request
conda-cpp-tests:
needs: [conda-cpp-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-25.04
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
with:
build_type: pull-request
conda-java-tests:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.04
with:
build_type: pull-request
node_type: "gpu-l4-latest-1"
Expand All @@ -99,29 +115,30 @@ jobs:
conda-python-build:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-25.04
with:
build_type: pull-request
conda-python-tests:
needs: [conda-python-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-25.04
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
docs-build:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.04
with:
build_type: pull-request
node_type: "gpu-l4-latest-1"
arch: "amd64"
container_image: "rapidsai/ci-conda:latest"
run_script: "ci/build_docs.sh"
devcontainer:
needs: telemetry-setup
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@branch-25.04
with:
arch: '["amd64"]'
cuda: '["12.8"]'
Expand All @@ -132,23 +149,32 @@ jobs:
sccache -s;
wheel-cpp-build:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.04
with:
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber)))
build_type: pull-request
script: ci/build_wheel_cpp.sh
wheel-python-build:
needs: wheel-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.04
with:
build_type: pull-request
script: ci/build_wheel_python.sh
wheel-python-tests:
needs: [wheel-python-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-25.04
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
script: ci/test_wheel.sh
telemetry-summarize:
# This job must use a self-hosted runner to record telemetry traces.
runs-on: linux-amd64-cpu4
needs: pr-builder
if: ${{ vars.TELEMETRY_ENABLED == 'true' && !cancelled() }}
continue-on-error: true
steps:
- name: Telemetry summarize
uses: rapidsai/shared-actions/telemetry-dispatch-summarize@main
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@ on:
jobs:
cpp-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-25.04
with:
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
python-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-25.04
with:
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
conda-java-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.04
with:
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trigger-breaking-change-alert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
trigger-notifier:
if: contains(github.event.pull_request.labels.*.name, 'breaking')
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/breaking-change-alert.yaml@nvks-runners
uses: rapidsai/shared-workflows/.github/workflows/breaking-change-alert.yaml@branch-25.04
with:
sender_login: ${{ github.event.sender.login }}
sender_avatar: ${{ github.event.sender.avatar_url }}
Expand Down
4 changes: 2 additions & 2 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2024, NVIDIA CORPORATION.
# Copyright (c) 2024-2025, NVIDIA CORPORATION.

set -euo pipefail

Expand All @@ -16,7 +16,7 @@ cd "${package_dir}"
sccache --zero-stats

rapids-logger "Building '${package_name}' wheel"
python -m pip wheel \
rapids-pip-retry wheel \
-w dist \
-v \
--no-deps \
Expand Down
2 changes: 1 addition & 1 deletion ci/build_wheel_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rapids-dependency-file-generator \
| tee /tmp/requirements-build.txt

rapids-logger "Installing build requirements"
python -m pip install \
rapids-pip-retry install \
-v \
--prefer-binary \
-r /tmp/requirements-build.txt
Expand Down
2 changes: 1 addition & 1 deletion ci/test_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
RAPIDS_PY_WHEEL_NAME="libkvikio_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp ./dist
RAPIDS_PY_WHEEL_NAME="kvikio_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python ./dist

python -m pip install -v \
rapids-pip-retry install -v \
"$(echo ./dist/libkvikio_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)" \
"$(echo ./dist/kvikio_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)[test]"

Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/kvikio/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2023-2025, NVIDIA CORPORATION.

{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %}
{% set version = environ['RAPIDS_PACKAGE_VERSION'].lstrip('v') %}
{% set py_version = environ['CONDA_PY'] %}
{% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %}
{% set cuda_major = cuda_version.split('.')[0] %}
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/libkvikio/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2023-2025, NVIDIA CORPORATION.

{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %}
{% set version = environ['RAPIDS_PACKAGE_VERSION'].lstrip('v') %}
{% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %}
{% set cuda_major = cuda_version.split('.')[0] %}
{% set date_string = environ['RAPIDS_DATE_STRING'] %}
Expand Down
3 changes: 3 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ rapids_find_package(

if(KvikIO_REMOTE_SUPPORT)
include(cmake/thirdparty/get_libcurl.cmake)
if(TARGET libcurl_static)
set_target_properties(libcurl_static PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
endif()

set(cuFile_FOUND 0)
Expand Down
9 changes: 5 additions & 4 deletions cpp/include/kvikio/shim/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <dlfcn.h>
#include <sys/utsname.h>
#include <stdexcept>
#include <string>
#include <vector>

namespace kvikio {
Expand Down Expand Up @@ -45,15 +46,15 @@ namespace kvikio {
* @param name Name of the library to load.
* @return The library handle.
*/
void* load_library(char const* name, int mode = RTLD_LAZY | RTLD_LOCAL | RTLD_NODELETE);
void* load_library(std::string const& name, int mode = RTLD_LAZY | RTLD_LOCAL | RTLD_NODELETE);

/**
* @brief Load shared library
*
* @param names Vector of names to try when loading shared library.
* @return The library handle.
*/
void* load_library(std::vector<char const*> const& names,
void* load_library(std::vector<std::string> const& names,
int mode = RTLD_LAZY | RTLD_LOCAL | RTLD_NODELETE);

/**
Expand All @@ -65,11 +66,11 @@ void* load_library(std::vector<char const*> const& names,
* @param name Name of the symbol/function to load.
*/
template <typename T>
void get_symbol(T& handle, void* lib, char const* name)
void get_symbol(T& handle, void* lib, std::string const& name)
{
::dlerror(); // Clear old errors
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
handle = reinterpret_cast<T>(::dlsym(lib, name));
handle = reinterpret_cast<T>(::dlsym(lib, name.c_str()));
char const* err = ::dlerror();
if (err != nullptr) { throw std::runtime_error(err); }
}
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/shim/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@

namespace kvikio {

void* load_library(char const* name, int mode)
void* load_library(std::string const& name, int mode)
{
::dlerror(); // Clear old errors
void* ret = ::dlopen(name, mode);
void* ret = ::dlopen(name.c_str(), mode);
if (ret == nullptr) { throw std::runtime_error(::dlerror()); }
return ret;
}

void* load_library(std::vector<char const*> const& names, int mode)
void* load_library(std::vector<std::string> const& names, int mode)
{
std::stringstream ss;
for (char const* name : names) {
for (auto const& name : names) {
ss << name << " ";
try {
return load_library(name, mode);
Expand Down

0 comments on commit ec31221

Please sign in to comment.