rapidsai/cudf

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

已关闭

#19,720 创建于 2025年8月18日

 (3 条评论) (0 个反应) (0 位负责人)C++ (735 个派生)batch import
Pythonbuggood first issue

仓库指标

星标
 (6,000 个星标)
PR 合并指标
 (平均合并 17天 21小时) (30 天内合并 230 个 PR)

描述

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

贡献者指南