Skip to content

cuda-core build_hooks.py missing compiler/linker flags present in cuda-bindings #1882

@leofang

Description

@leofang

Summary

cuda_core/build_hooks.py is missing several compiler and linker flags that cuda_bindings/build_hooks.py sets. Symbol stripping was addressed in #1881; this issue tracks the remaining differences.

Differences

1. No optimization flag

cuda_bindings passes -O3 on non-debug Linux builds. cuda_core doesn't set any optimization level, relying on setuptools/compiler defaults.

Note: We may want -O2 rather than -O3 for cuda-core — to be decided.

2. Missing C++ compiler flags (Linux)

cuda_bindings passes:

-std=c++14 -fpermissive -Wno-deprecated-declarations -fno-var-tracking-assignments

cuda_core has none of these. Some may not be needed if cuda-core's Cython code doesn't trigger the same warnings, but -std=c++14 and -fno-var-tracking-assignments (reduces memory usage during compilation) are likely beneficial.

3. No --debug mode support

cuda_bindings supports --debug builds with -g -O0 -D _GLIBCXX_ASSERTIONS and gdb_debug=True for Cython. cuda_core has no such support.

4. Cython directive differences

  • cuda_bindings sets "binding": True
  • cuda_core sets "warn.deprecated.IF": False instead, and doesn't set binding

These may be intentional differences, but worth auditing.

Proposal

Audit each flag and either port it from cuda_bindings with justification, or document why it's not needed for cuda_core.

-- Leo's bot

Metadata

Metadata

Assignees

Labels

P1Medium priority - Should docuda.coreEverything related to the cuda.core modulepackagingAnything related to wheels or Conda packages

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions