mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4801] [Engine] CMakeLists: DeepSeek HIP builds from a path with a space #5189
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5189
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4801
Author: @Cayaf89
Created: 10/31/2026
Status: 🔄 Open
Base:
main← Head:f-engine-hip-include-spaced📝 Commits (1)
a07cb0a[Engine] CMakeLists: DeepSeek HIP builds from a path with a space📊 Changes
1 file changed (+9 additions, -4 deletions)
View changed files
📝
CMakeLists.txt(+9 -4)📄 Description
Problem and result
strata-dsv41could not be built from a checkout whose path contains a space. Fourtarget_compile_optionslines spelled the force-include ofinclude/strata/dsv41/hip_extra.has"$<COMPILE_LANGUAGE:HIP,CXX>:SHELL:-include <path>"(ds4_tq_test_portable,ds4_tq_test,ds4_iq_test, and the loop overstrata_dsv41_kernelsandstrata-dsv41). CMake writes that form intobuild.ninjaunquoted, so with a space in the path the compiler receives-include, one piece of the path, and the rest as plain input files, which a-c -ocompile cannot take. On this machine, a checkout under a folder named with a space, the HIP and CXX objects of those targets stopped withand the target never linked. Written as one joined option,
-include<path>, the same tree configures andcmake --build build-hip --target strata-dsv41 -j 6ends with exit 0. For a path without a space the two forms give the same option, so the packaged builds do not move.Related discussion
None opened. This is the build fix that let the machine in #4800 compile the engine at all; that report stays a separate results-only PR as
CONTRIBUTING.mdasks.Approach
One option is what CMake quotes and what the front ends here accept.
cmake/hip_backend.cmake:113-121already splits its own shim include into a flag option and a path option for the same reason, and uses/FIon MSVC-style front ends; the joined form reaches the same end in one option. The four lines sit insideif(STRATA_ENABLE_HIP)underif(STRATA_BUILD_DSV41 AND NOT STRATA_HIP_GFX906)and name only DeepSeek targets, so no CUDA, SYCL, Metal or non-DeepSeek target is touched, and nothing changes for a checkout without a space in its path.Validation
Passed:
build.ninja:SHELL:-include <path>comes out as-include /tmp/sp cmake test/proj/include/.../extra.h, where the space splits it into arguments, and-include<path>comes out quoted as"-include/tmp/sp cmake test/proj/include/.../extra.h", one argument.c++, the install'slib/llvm/bin/clang++, andhipcc, each plain and as-x hip --offload-arch=gfx1100, with-includejoined to a path whose folders contain spaces: exit 0 in every case. Handing the split argv to the sameclang++fails on the pieces (no such file or directoryfor each fragment), which is what the old form hands over.gfx1100, TheRock ROCm 10.2.0:cmake --build build-hip --target strata-dsv41 -j 6exited 0,engine/strata-dsv41 --versionprintsstrata-dsv41 0.1.54 build 870aedd9e,lddreports no missing library,grep -o gfx1100finds 21 code-object markers, andbuild.ninjacarries the option quoted in 36 rules with noSHELL:-includeleft inCMakeLists.txt.failures []): the engine this option made possible ran real requests.Failed:
strata-dsv41did not link. Nothing else failed.Not run:
if(STRATA_ENABLE_HIP)and names only DeepSeek targets, so those backends never compile these four lines. Nothing is claimed for them.gfx1201,gfx1030,gfx1151and the rest): onlygfx1100was built here.cmake/hip_backend.cmake:113-115uses/FIfor MSVC-style front ends, and this part ofCMakeLists.txtwas not exercised on Windows.mainwith this patch: it was compiled from870aedd9e, the commit the engine in #4800 came from; the four lines and their surrounding block are unchanged between that commit andmain, which is why the patch applies cleanly here.Limits
HIP only, five targets, four lines. For a checkout without a space the option is the same bytes as before, so the default path does not move. The binary this produced was run for
--version,lddand a real benchmark, not for correctness by this change, and the option form was checked on Ninja with three front ends rather than on every generator or platform the tree supports.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.