Pull requests / #1677

#1677 setup: pass CC/CXX/CUDAHOSTCXX to the CUDA build's cmake (#1645)

open · @nekomario28 · 0 comentários · No GitHub

Setup & installNVIDIA / CUDAModels & quantsDocumentation

Descrição

Fixes #1645.

CUDA 12 refuses a GCC newer than 14, and TROUBLESHOOTING.md already tells the user to run `CXX=g++-14 ./setup.sh` — but the environment reaches CMake only on a build folder's **first** configure. On a retry, or in the encoder's separate build folder, the env vars never land; the reporter's run died at the last step and had to patch `setup.py`.

## Change

`host_compiler_defs()` maps `CC` / `CXX` / `CUDAHOSTCXX` onto `-DCMAKE_C_COMPILER` / `-DCMAKE_CXX_COMPILER` / `-DCMAKE_CUDA_HOST_COMPILER` for the engine build and the CUDA image encoder — as `-D`, so an already-configured folder picks them up. `CUDAHOSTCXX` defaults to `CXX`, as CMake's own host compiler does; the CPU encoder build doesn't get the CUDA-only definition. Docs updated to say `CXX=g++-14 ./setup.sh` suffices.

## Test plan

- `tools.test_setup_choices.HostCompilers`: env→defs mapping, CUDAHOSTCXX→CXX default, the C++-only project keeps no CUDA flag, unset adds nothing.
- `test_the_defs_reach_cmake` drives `build_engine` with a mocked `cmake_build` and asserts both the `strata` and `strata-vision` configures receive the flags.
- `tools.test_setup_choices`: 44 tests pass.

Not tested: a real nvcc compile under `gcc-14` (no CUDA toolkit here) — the change only forwards the flags the reporter verified by hand.

No site

Links install, modelos, releases.