Skip to content

Commit

Permalink
Merge branch 'oom_exception_bug' of https://github.com/pmattione-nvid…
Browse files Browse the repository at this point in the history
…ia/rmm into oom_exception_bug
  • Loading branch information
pmattione-nvidia committed Feb 19, 2025
2 parents 4502a25 + 10ab53e commit 5890440
Show file tree
Hide file tree
Showing 13 changed files with 250 additions and 226 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ rmm.egg-info/
python/build
python/*/build
python/rmm/docs/_build
python/rmm/**/librmm/**/*.cpp
!python/rmm/librmm/_torch_allocator.cpp
python/rmm/rmm/librmm/*.cpp
!python/rmm/rmm/librmm/_torch_allocator.cpp
python/rmm/**/librmm/**/*.h
python/rmm/**/librmm/.nfs*
python/rmm/**/pylibrmm/**/*.cpp
Expand Down
20 changes: 18 additions & 2 deletions ci/build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,25 @@ rapids-logger "Begin cpp build"

sccache --zero-stats

# This calls mambabuild when boa is installed (as is the case in the CI images)
RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry mambabuild conda/recipes/librmm
RAPIDS_PACKAGE_VERSION=$(rapids-generate-version)
export RAPIDS_PACKAGE_VERSION

# Creates and exports $RATTLER_CHANNELS
source rapids-rattler-channel-string

# --no-build-id allows for caching with `sccache`
# more info is available at
# https://rattler.build/latest/tips_and_tricks/#using-sccache-or-ccache-with-rattler-build
rattler-build build --recipe conda/recipes/librmm \
--experimental \
--no-build-id \
--channel-priority disabled \
--output-dir "$RAPIDS_CONDA_BLD_OUTPUT_DIR" \
"${RATTLER_CHANNELS[@]}"

sccache --show-adv-stats

# remove build_cache directory
rm -rf "$RAPIDS_CONDA_BLD_OUTPUT_DIR"/build_cache

rapids-upload-conda-to-s3 cpp
20 changes: 8 additions & 12 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,30 @@

set -euo pipefail

rapids-logger "Downloading artifacts from previous jobs"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)

rapids-logger "Create test conda environment"

. /opt/conda/etc/profile.d/conda.sh

RAPIDS_VERSION="$(rapids-version)"
RAPIDS_VERSION_MAJOR_MINOR="$(rapids-version-major-minor)"
export RAPIDS_VERSION_MAJOR_MINOR

rapids-dependency-file-generator \
--output conda \
--file-key docs \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" \
--prepend-channel "${CPP_CHANNEL}" \
--prepend-channel "${PYTHON_CHANNEL}" \
| tee env.yaml

rapids-mamba-retry env create --yes -f env.yaml -n docs
conda activate docs

rapids-print-env

rapids-logger "Downloading artifacts from previous jobs"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${PYTHON_CHANNEL}" \
"rmm=${RAPIDS_VERSION}" \
"librmm=${RAPIDS_VERSION}"

RAPIDS_DOCS_DIR="$(mktemp -d)"
export RAPIDS_DOCS_DIR

Expand Down
21 changes: 19 additions & 2 deletions ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,26 @@ CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)

sccache --zero-stats

# This calls mambabuild when boa is installed (as is the case in the CI images)
RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild -c "${CPP_CHANNEL}" conda/recipes/rmm
RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION)
export RAPIDS_PACKAGE_VERSION

# Creates and exports $RATTLER_CHANNELS
source rapids-rattler-channel-string

# --no-build-id allows for caching with `sccache`
# more info is available at
# https://rattler.build/latest/tips_and_tricks/#using-sccache-or-ccache-with-rattler-build
rattler-build build --recipe conda/recipes/rmm \
--experimental \
--no-build-id \
--channel-priority disabled \
--output-dir "$RAPIDS_CONDA_BLD_OUTPUT_DIR" \
-c "${CPP_CHANNEL}" \
"${RATTLER_CHANNELS[@]}"

sccache --show-adv-stats

# See https://github.com/prefix-dev/rattler-build/issues/1424
rm -rf "$RAPIDS_CONDA_BLD_OUTPUT_DIR"/build_cache

rapids-upload-conda-to-s3 python
3 changes: 0 additions & 3 deletions conda/recipes/librmm/install_librmm.sh

This file was deleted.

3 changes: 0 additions & 3 deletions conda/recipes/librmm/install_librmm_tests.sh

This file was deleted.

110 changes: 0 additions & 110 deletions conda/recipes/librmm/meta.yaml

This file was deleted.

107 changes: 107 additions & 0 deletions conda/recipes/librmm/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json
# Copyright (c) 2018-2025, NVIDIA CORPORATION.
schema_version: 1

context:
version: ${{ env.get("RAPIDS_PACKAGE_VERSION") }}
cuda_version: ${{ (env.get("RAPIDS_CUDA_VERSION") | split("."))[:2] | join(".") }}
cuda_major: ${{ (env.get("RAPIDS_CUDA_VERSION") | split("."))[0] }}
date_string: ${{ env.get("RAPIDS_DATE_STRING") }}
head_rev: ${{ git.head_rev(".")[:8] }}

recipe:
name: librmm-split

cache:
source:
path: ../../..

requirements:
build:
- cmake ${{ cmake_version }}
- ninja
- ${{ compiler("c") }}
- ${{ compiler("cxx") }}
- ${{ compiler("cuda") }}
- cuda-version =${{ cuda_version }}
- ${{ stdlib("c") }}

build:
script:
file: build.sh
secrets:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN

env:
CMAKE_C_COMPILER_LAUNCHER: ${{ env.get("CMAKE_C_COMPILER_LAUNCHER") }}
CMAKE_CUDA_COMPILER_LAUNCHER: ${{ env.get("CMAKE_CUDA_COMPILER_LAUNCHER") }}
CMAKE_CXX_COMPILER_LAUNCHER: ${{ env.get("CMAKE_CXX_COMPILER_LAUNCHER") }}
CMAKE_GENERATOR: ${{ env.get("CMAKE_GENERATOR") }}
PARALLEL_LEVEL: ${{ env.get("PARALLEL_LEVEL") }}
SCCACHE_BUCKET: ${{ env.get("SCCACHE_BUCKET") }}
SCCACHE_IDLE_TIMEOUT: ${{ env.get("SCCACHE_IDLE_TIMEOUT") }}
SCCACHE_REGION: ${{ env.get("SCCACHE_REGION") }}
SCCACHE_S3_USE_SSL: ${{ env.get("SCCACHE_S3_USE_SSL") }}
SCCACHE_S3_NO_CREDENTIALS: ${{ env.get("SCCACHE_S3_NO_CREDENTIALS") }}
SCCACHE_S3_KEY_PREFIX: librmm-${{ env.get("RAPIDS_CONDA_ARCH") }}

outputs:
- package:
name: librmm
version: ${{ version }}
build:
string: cuda${{ cuda_major }}_${{ date_string }}_${{ head_rev }}
script:
- cmake --install build
requirements:
host:
- cmake ${{ cmake_version }}
- cuda-version =${{ cuda_version }}
run:
- ${{ pin_compatible("cuda-version", upper_bound="x", lower_bound="x") }}
- if: cuda_major == "11"
then: cudatoolkit
- rapids-logger =0.1
run_exports:
- ${{ pin_subpackage("librmm", upper_bound="x.x") }}
ignore_run_exports:
from_package:
- ${{ compiler("cuda") }}
tests:
- script:
- "test -d \"${PREFIX}/include/rmm\""
about:
homepage: ${{ load_from_file("python/librmm/pyproject.toml").project.urls.Homepage }}
license: ${{ load_from_file("python/librmm/pyproject.toml").project.license.text }}
summary: ${{ load_from_file("python/librmm/pyproject.toml").project.description }}
- package:
name: librmm-tests
version: ${{ version }}
build:
string: cuda${{ cuda_major }}_${{ date_string }}_${{ head_rev }}
script:
- cmake --install build --component testing
requirements:
host:
- cmake ${{ cmake_version }}
- cuda-version =${{ cuda_version }}
- if: cuda_major == "11"
then: cudatoolkit
else: cuda-cudart-dev
run:
- if: cuda_major == "11"
then: cudatoolkit
else: cuda-cudart
- ${{ pin_compatible("cuda-version", upper_bound="x", lower_bound="x") }}
- ${{ pin_subpackage("librmm", exact=True) }}
ignore_run_exports:
from_package:
- ${{ compiler("cuda") }}
- if: cuda_major == "11"
then: cuda-cudart-dev
about:
homepage: ${{ load_from_file("python/librmm/pyproject.toml").project.urls.Homepage }}
license: ${{ load_from_file("python/librmm/pyproject.toml").project.license.text | replace(" ", "-") }}
summary: librmm test & benchmark executables
Loading

0 comments on commit 5890440

Please sign in to comment.