Skip to content

Silence cudf ptxcompiler numba-codegen probe in RAPIDS runenv - #103

Merged
blackcat merged 1 commit into
mainfrom
chore/silence-ptxcompiler-warning
Jul 24, 2026
Merged

Silence cudf ptxcompiler numba-codegen probe in RAPIDS runenv#103
blackcat merged 1 commit into
mainfrom
chore/silence-ptxcompiler-warning

Conversation

@blackcat

@blackcat blackcat commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What

Adds PTXCOMPILER_CHECK_NUMBA_CODEGEN_PATCH_NEEDED=0 to the python-3.12.10-rapids runenv envVars.

Why

Every GPU block on this runenv logs a misleading error on startup:

cudf/utils/_ptxcompiler.py: UserWarning: Error getting driver and runtime versions:
OSError: libcudart.so: cannot open shared object file: No such file or directory
Not patching Numba

On import, cudf spawns a subprocess to probe the CUDA runtime version. numba_cuda 0.4.0 (pinned by cudf/cuml 25.04) only discovers CUDA libs via conda / CUDA_HOME / /usr/local/cuda — all conda-gated — so in this pip-based portable-python runenv it falls back to ctypes.CDLL("libcudart.so") (unversioned), which the pip wheel doesn't ship (only libcudart.so.12). The probe fails, and the traceback surfaces in block error reports where it masks the real failure.

The env var makes cudf skip the probe entirely (check_disabled_in_env() returns True for 0).

Safety

No loss of GPU functionality. Verified on a real GPU pod (block image, RTX 4000) that with the probe silenced, cuML PCA + UMAP on GPU still run. The probe only gates a numba codegen patch that was already being skipped, and no block uses in-process numba-CUDA (cuML/cuDF/cuPy use their own bundled native libs).

Note: fully restoring in-process numba-CUDA lib discovery would require baking a libcudart.so symlink into the downstream image build (where the wheels install) or a RAPIDS-version bump — out of scope and of no functional benefit to current GPU blocks.

Greptile Summary

This PR suppresses a misleading import-time CUDA compatibility probe in the Python 3.12.10 RAPIDS run environment.

  • PTXCOMPILER_CHECK_NUMBA_CODEGEN_PATCH_NEEDED: An environment variable controlling whether cuDF checks if Numba codegen needs patching; the PR sets it to 0, disabling the probe.
  • envVars: Runtime environment variables attached to a run-environment artifact; the PR adds the PTX compiler setting to the RAPIDS artifact.
  • ptxcompiler probe: A cuDF import-time compatibility check that queries CUDA driver and runtime versions; the PR prevents it from running.
  • RAPIDS runenv: The packaged Python environment containing GPU-oriented RAPIDS dependencies; its package receives a patch changeset for this configuration update.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The change uses the existing run-environment variable format to disable a probe that already falls back to not applying the Numba patch when CUDA runtime discovery fails.

Important Files Changed

Filename Overview
python-3.12.10-rapids/package.json Adds the fixed PTX compiler environment setting to suppress the failing compatibility probe; no actionable defect was identified.
.changeset/silence-ptxcompiler-probe.md Declares a patch release and documents the reason and expected effect of disabling the probe.

Reviews (1): Last reviewed commit: "Silence cudf ptxcompiler numba-codegen p..." | Re-trigger Greptile

Set PTXCOMPILER_CHECK_NUMBA_CODEGEN_PATCH_NEEDED=0 so cudf skips the
import-time subprocess that fails to load libcudart.so and prints a
misleading OSError traceback plus 'Not patching Numba' on every run.
cuML/CuPy are unaffected (the probe already defaulted to not patching).
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@blackcat
blackcat merged commit eabdc71 into main Jul 24, 2026
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants