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
Summary
cuda_core/build_hooks.pyis missing several compiler and linker flags thatcuda_bindings/build_hooks.pysets. Symbol stripping was addressed in #1881; this issue tracks the remaining differences.Differences
1. No optimization flag
cuda_bindingspasses-O3on non-debug Linux builds.cuda_coredoesn't set any optimization level, relying on setuptools/compiler defaults.Note: We may want
-O2rather than-O3for cuda-core — to be decided.2. Missing C++ compiler flags (Linux)
cuda_bindingspasses:cuda_corehas none of these. Some may not be needed if cuda-core's Cython code doesn't trigger the same warnings, but-std=c++14and-fno-var-tracking-assignments(reduces memory usage during compilation) are likely beneficial.3. No
--debugmode supportcuda_bindingssupports--debugbuilds with-g -O0 -D _GLIBCXX_ASSERTIONSandgdb_debug=Truefor Cython.cuda_corehas no such support.4. Cython directive differences
cuda_bindingssets"binding": Truecuda_coresets"warn.deprecated.IF": Falseinstead, and doesn't setbindingThese may be intentional differences, but worth auditing.
Proposal
Audit each flag and either port it from
cuda_bindingswith justification, or document why it's not needed forcuda_core.-- Leo's bot