rapidsai/cudf

Audit pylibcudf for `noexcept`/`nogil` and remove "Exception check … requires the GIL" warnings

Geschlossen

#19.720 geöffnet am 18.08.2025

 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C++ (735 Forks)batch import
Pythonbuggood first issue

Repository-Metriken

Stars
 (6.000 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 17T 21h) (230 gemergte PRs in 30 T)

Beschreibung

Describe the bug When building pylibcudf, our CI logs show many performance warnings like:

performance hint: /__w/cudf/cudf/python/pylibcudf/pylibcudf/labeling.pyx:56:22:
Exception check after calling 'view' will always require the GIL to be acquired.
Declare 'view' as 'noexcept' if you control the definition and you're sure you
don't want the function to raise exceptions.

Example

https://github.com/rapidsai/cudf/actions/runs/17040978623/job/48305629162?pr=19446#step:12:330

Steps/Code to reproduce bug build pylibcudf with warnings

We should check pylibcudf for places where we’ve declared except * or except + but the C++ is non-throwing.

Expected behavior No perf warnings

Additional context Was recently fixed in RMM. See https://github.com/rapidsai/rmm/pull/2020

Contributor Guide