-
Notifications
You must be signed in to change notification settings - Fork 209
fix(deps): add explicit cufile dependency #1552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
|
|
||
|
|
@@ -41,10 +41,16 @@ def load_library(): | |
| import libraft | ||
| import librmm | ||
| import rapids_logger | ||
| from cuda.pathfinder import load_nvidia_dynamic_lib | ||
|
|
||
| rapids_logger.load_library() | ||
| librmm.load_library() | ||
| libraft.load_library() | ||
| # We manually load librt.so.1 here to workaround a bad dynamic link | ||
| # in nvidia_cufile-1.15.1.6-py3-none-manylinux_2_27_aarch64.whl | ||
| # https://nvbugspro.nvidia.com/bug/6425783 | ||
| ctypes.CDLL("librt.so.1", mode=ctypes.RTLD_GLOBAL) | ||
| load_nvidia_dynamic_lib("cufile") | ||
| except ModuleNotFoundError: | ||
|
Comment on lines
41
to
54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Description: check if cuda-pathfinder is referenced anywhere outside dependencies.yaml (e.g. conda recipes)
rg -n "cuda-pathfinder|cuda_pathfinder" --type=yaml -g '!dependencies.yaml'
fd -a meta.yaml -x cat {}Repository: NVIDIA/cuopt Length of output: 150 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '\n== load.py ==\n'
sed -n '1,140p' python/libcuopt/libcuopt/load.py
printf '\n== dependencies.yaml matches ==\n'
rg -n -C 3 "cuda-pathfinder|cuda_pathfinder|requirements|pyproject|conda" dependencies.yaml
printf '\n== any packaging files mentioning cuda-pathfinder ==\n'
rg -n "cuda-pathfinder|cuda_pathfinder" -g '!dependencies.yaml' .Repository: NVIDIA/cuopt Length of output: 21481 Move the 🤖 Prompt for AI Agents |
||
| pass | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Unscoped, unguarded
librt.so.1preload.The comment explains this workaround is for
nvidia_cufile-1.15.1.6-py3-none-manylinux_2_27_aarch64.whl, butctypes.CDLL("librt.so.1", mode=ctypes.RTLD_GLOBAL)runs unconditionally on every architecture, and itsOSErroris not caught (onlyModuleNotFoundErroris handled by the surroundingexcept). Iflibrt.so.1is absent on some system, this raises out ofload_library()uncaught, whereas before this change library loading degraded gracefully via the various fallbacks (system installation / wheel installation) elsewhere in this function.Consider gating this preload to aarch64 (matching the referenced bug) and wrapping it in its own
try/except OSErrorso a missinglibrt.so.1doesn't hard-fail library loading.🛠️ Proposed fix to scope and guard the workaround
(requires
import platformat the top of the file)🤖 Prompt for AI Agents