问题 / #2578

#2578 setup: a build folder configured without the engine target fails twice with "unknown target 'strata'" and is not reconfigured (follow-up to #2054)

open · @qiuzan2001 · 0 评论 · 去 GitHub 看

Setup & installNVIDIA / CUDA

说明

Follow-up to #2054 (the maintainer asked for it as its own issue).

**What happens (from the post-mortem in #2054).** A `build-cuda12/` folder that had been configured without the
engine's definitions (an interrupted earlier attempt, plus a manual `cmake -S . -B build-cuda12`) made the engine
build configure "successfully" and then stop at `ninja: error: unknown target 'strata'`. The build is tried a
second time, which fails the same way, and the last message does not point at the build folder. Deleting the folder
and running setup again fixed it.

**Where.** `setup.py:3827` (`cmake_build`, `296b59d2`) configures the existing folder, then runs the build twice.
Since 0.1.43.1, `build_engine` (`setup.py:3962`) says "the build folder ... may be configured for something else:
delete it and run this again" when the build finishes without a new engine. It does not reach that line when the
target does not exist, because `cmake_build` stops first.

**Possible change.** After configuring, check that the target exists (`cmake --build <dir> --target help`, or
`ninja -t targets`). If it does not, configure a fresh copy of the folder once before giving up, the way
`isa_floor_defs` (`setup.py:3868`) already deletes `CMakeCache.txt` when the ISA floor changes. Or name the folder
in the error.

Not reproduced here: I did not find which cached setting removes the `strata` target, since setup passes
`-DSTRATA_ENABLE_CUDA=ON` on every configure.

本站相关内容

相关页面的快捷入口。