Description
cuML distributes both GPU-accelerated and CPU-only packages.
At build time, it controls whether GPU-related bits of the Cython code are built by passing GPUBUILD through to Cython.
|
list(APPEND CYTHON_FLAGS |
|
"--compile-time-env GPUBUILD=0") |
That guards imports like this:
|
IF GPUBUILD == 1: |
|
import pylibraft.common.handle |
|
import cuml.common.cuda |
That pattern is deprecated in the version of Cython used in builds for the 25.02 release, resulting in many of this type of warning in CI logs:
[347/584] Transpiling base.pyx to base.cxx
warning: /__w/cuml/cuml/python/cuml/cuml/internals/base.pyx:74:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See cython/cython#4310
cuML builds should be adapted to use a different pattern.
Benefits of this work
- allows cuML to be built with newer versions of Cython (assuming Cython eventually removes support for
IF)
Acceptance Criteria
- cuML build do not use the deprecated Cython
IF pattern for conditional compilation
Approach
See the discussion and links in cython/cython#4310 for ideas on how to approach this.
Notes
I'm opening this to track, but not planning to personally work on it.
Description
cuML distributes both GPU-accelerated and CPU-only packages.
At build time, it controls whether GPU-related bits of the Cython code are built by passing
GPUBUILDthrough to Cython.cuml/python/cuml/CMakeLists.txt
Lines 153 to 154 in f29293f
That guards imports like this:
cuml/python/cuml/cuml/internals/base.pyx
Lines 74 to 76 in f29293f
That pattern is deprecated in the version of Cython used in builds for the 25.02 release, resulting in many of this type of warning in CI logs:
cuML builds should be adapted to use a different pattern.
Benefits of this work
IF)Acceptance Criteria
IFpattern for conditional compilationApproach
See the discussion and links in cython/cython#4310 for ideas on how to approach this.
Notes
I'm opening this to track, but not planning to personally work on it.