From 050b66d8a1140a26437a867bad3030011a393d75 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Mon, 10 Feb 2025 18:09:02 -0800 Subject: [PATCH] Use new rapids-logger library (#364) ucxx only needs minor changes here to adapt for the upstream rmm changes. Contributes to https://github.com/rapidsai/build-planning/issues/104. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Peter Andreas Entschev (https://github.com/pentschev) - Bradley Dice (https://github.com/bdice) - James Lamb (https://github.com/jameslamb) URL: https://github.com/rapidsai/ucxx/pull/364 --- ci/build_wheel_libucxx.sh | 1 + ci/build_wheel_ucxx.sh | 3 ++- conda/environments/all_cuda-118_arch-x86_64.yaml | 2 -- conda/environments/all_cuda-128_arch-x86_64.yaml | 3 +-- cpp/CMakeLists.txt | 4 ++-- cpp/python/CMakeLists.txt | 6 ++---- dependencies.yaml | 4 ++-- python/libucxx/libucxx/load.py | 4 +++- python/libucxx/pyproject.toml | 3 ++- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ci/build_wheel_libucxx.sh b/ci/build_wheel_libucxx.sh index 995435d0..0c109810 100755 --- a/ci/build_wheel_libucxx.sh +++ b/ci/build_wheel_libucxx.sh @@ -34,6 +34,7 @@ export SKBUILD_CMAKE_ARGS="-DUCXX_ENABLE_RMM=ON" mkdir -p "${package_dir}/final_dist" python -m auditwheel repair \ --exclude "libucp.so.0" \ + --exclude librapids_logger.so \ -w "${package_dir}/final_dist" \ ${package_dir}/dist/* diff --git a/ci/build_wheel_ucxx.sh b/ci/build_wheel_ucxx.sh index b8e60c4c..11383c7a 100755 --- a/ci/build_wheel_ucxx.sh +++ b/ci/build_wheel_ucxx.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2024, NVIDIA CORPORATION. +# Copyright (c) 2024-2025, NVIDIA CORPORATION. set -euo pipefail @@ -25,6 +25,7 @@ mkdir -p "${package_dir}/final_dist" python -m auditwheel repair \ --exclude "libucp.so.0" \ --exclude "libucxx.so" \ + --exclude librapids_logger.so \ -w "${package_dir}/final_dist" \ ${package_dir}/dist/* diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index fb4e696b..cf6528a1 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -21,7 +21,6 @@ dependencies: - dask-cuda==25.4.*,>=0.0.0a0 - dask-cudf==25.4.*,>=0.0.0a0 - doxygen=1.9.1 -- fmt>=11.0.2,<12 - librmm==25.4.*,>=0.0.0a0 - libtool - ninja @@ -40,6 +39,5 @@ dependencies: - rmm==25.4.*,>=0.0.0a0 - scikit-build-core>=0.10.0 - setuptools>=64.0.0 -- spdlog>=1.14.1,<1.15 - ucx>=1.15.0,<1.19 name: all_cuda-118_arch-x86_64 diff --git a/conda/environments/all_cuda-128_arch-x86_64.yaml b/conda/environments/all_cuda-128_arch-x86_64.yaml index 4f936daa..a9e834e8 100644 --- a/conda/environments/all_cuda-128_arch-x86_64.yaml +++ b/conda/environments/all_cuda-128_arch-x86_64.yaml @@ -13,6 +13,7 @@ dependencies: - cloudpickle - cmake>=3.26.4,!=3.30.0 - cuda-cudart-dev +- cuda-nvcc - cuda-version=12.8 - cudf==25.4.*,>=0.0.0a0 - cupy>=12.0.0 @@ -21,7 +22,6 @@ dependencies: - dask-cuda==25.4.*,>=0.0.0a0 - dask-cudf==25.4.*,>=0.0.0a0 - doxygen=1.9.1 -- fmt>=11.0.2,<12 - librmm==25.4.*,>=0.0.0a0 - libtool - ninja @@ -40,6 +40,5 @@ dependencies: - rmm==25.4.*,>=0.0.0a0 - scikit-build-core>=0.10.0 - setuptools>=64.0.0 -- spdlog>=1.14.1,<1.15 - ucx>=1.15.0,<1.19 name: all_cuda-128_arch-x86_64 diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 3c2d3f62..a88e108d 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -1,5 +1,5 @@ # ================================================================================= -# SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. +# SPDX-FileCopyrightText: Copyright (c) 2022-2025, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD 3-Clause License # ================================================================================= @@ -192,7 +192,7 @@ if(UCXX_ENABLE_RMM) ) # Define spdlog level - target_compile_definitions(ucxx PUBLIC UCXX_ENABLE_RMM "SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_${RMM_LOGGING_LEVEL}") + target_compile_definitions(ucxx PUBLIC UCXX_ENABLE_RMM "RMM_LOG_ACTIVE_LEVEL=RAPIDS_LOGGER_LEVEL_${RMM_LOGGING_LEVEL}") endif() # Specify the target module library dependencies diff --git a/cpp/python/CMakeLists.txt b/cpp/python/CMakeLists.txt index c501abcd..7c14fe21 100644 --- a/cpp/python/CMakeLists.txt +++ b/cpp/python/CMakeLists.txt @@ -1,5 +1,5 @@ # ====================================================================================================== -# SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2023-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD 3-Clause License # ====================================================================================================== @@ -118,9 +118,7 @@ target_compile_definitions( ucxx_python PUBLIC "$<$:${UCXX_CXX_DEFINITIONS}>" ) -target_compile_definitions(ucxx_python PUBLIC UCXX_ENABLE_PYTHON) -# Define spdlog level -target_compile_definitions(ucxx_python PUBLIC "SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_${RMM_LOGGING_LEVEL}") +target_compile_definitions(ucxx_python PUBLIC UCXX_ENABLE_PYTHON "RMM_LOG_ACTIVE_LEVEL=RAPIDS_LOGGER_LEVEL_${RMM_LOGGING_LEVEL}") # Specify the target module library dependencies target_link_libraries( diff --git a/dependencies.yaml b/dependencies.yaml index 0730c5c6..57aa39c0 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -79,6 +79,7 @@ files: extras: table: project includes: + - depends_on_librmm - depends_on_ucx_run py_build_ucxx: output: pyproject @@ -156,10 +157,8 @@ dependencies: - c-compiler - cxx-compiler - &cmake_ver cmake>=3.26.4,!=3.30.0 - - fmt>=11.0.2,<12 - librmm==25.4.*,>=0.0.0a0 - ninja - - spdlog>=1.14.1,<1.15 - output_types: [requirements, pyproject] packages: - *cmake_ver @@ -241,6 +240,7 @@ dependencies: cuda: "12.*" packages: - cuda-cudart-dev + - cuda-nvcc dev: common: - output_types: [conda] diff --git a/python/libucxx/libucxx/load.py b/python/libucxx/libucxx/load.py index be514139..20fedc41 100644 --- a/python/libucxx/libucxx/load.py +++ b/python/libucxx/libucxx/load.py @@ -1,4 +1,4 @@ -# Copyright (c) 2024, NVIDIA CORPORATION. +# Copyright (c) 2024-2025, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -48,10 +48,12 @@ def load_library(): # symbols. Otherwise, we assume that the library was installed in a system path # that ld can find. try: + import librmm import libucx except ModuleNotFoundError: pass else: + librmm.load_library() libucx.load_library() del libucx diff --git a/python/libucxx/pyproject.toml b/python/libucxx/pyproject.toml index 792c60ec..7ee46bb8 100644 --- a/python/libucxx/pyproject.toml +++ b/python/libucxx/pyproject.toml @@ -1,4 +1,4 @@ -# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. +# Copyright (c) 2024-2025, NVIDIA CORPORATION. All rights reserved. # See file LICENSE for terms. [build-system] @@ -29,6 +29,7 @@ classifiers = [ "Programming Language :: Python :: 3", ] dependencies = [ + "librmm==25.4.*,>=0.0.0a0", "libucx>=1.15.0,<1.19", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.