mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[GH-ISSUE #575] Windows HIP Release build can retain empty optimization flags after a failed first configure #236
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#236
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?
Originally created by @sakugetu on GitHub (Oct 27, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/575
Summary
On native Windows with the HIP backend, a failed initial CMake configure left
CMAKE_HIP_FLAGS_RELEASEempty. After the SDK problem was repaired, the same build directory produced a working Release executable, but its HIP kernels were compiled without optimization. C++ still used-O3 -DNDEBUG, so checking only the build type or C++ flags missed it.This matches the failure described and fixed in upstream Strata PR #376. Maya's
cmake/hip_backend.cmakeat the tested commit callsenable_language(HIP)without the empty per-configuration flags repair.Environment
c4be54416a4f30a837c2fae91816dc9550d68b61gfx1151, 128 GB unified memory, 96 GB assigned to graphicsFailure sequence and evidence
clang_rt.builtins.libwas missing from the generated SDK layout.CMAKE_BUILD_TYPE=ReleaseCMAKE_CXX_FLAGS_RELEASE=-O3 -DNDEBUGCMAKE_HIP_FLAGS_RELEASE=(empty)ds4_model.cuobject rule inbuild.ninjahad the ROCm paths, architecture, language standard and compatibility includes, but no-O2/-O3flag.-O3.The SDK-link repair had already stopped the crashes, but generation remained extremely slow: two tiny requests took about 25 seconds to first output, and a 100-token prompt produced no output within a 300-second client limit.
Local repair and measured result
A separate source/build directory at the same fixed Maya commit was built with an explicit:
No fast-math flag was added.
DS4_LT=0was kept for the optimized comparison; that switch alone had not resolved the delay. There were no driver, page-file or OS changes.These are diagnostic/local measurements, not the official
--benchprotocol. The very small outputs are not a reliable throughput benchmark. The runtime SDK layout was repaired before the optimization test, so its crash fix should not be conflated with this build-flags fix.Suggested fix
Consider carrying over Strata #376's handling after
enable_language(HIP): restore empty per-configuration HIP flags from CMake's corresponding initialized defaults, preserving non-empty user overrides. A configure-time warning or build diagnostic showing the effective HIP Release flags would also help.The related source locations in this tested version are:
Strata #376 contains a minimal failed-configure/reconfigure reproducer on Windows and Linux. Here, the initial failure was missing SDK builtins, not VS 2026's headers. I have not tested NVIDIA or later Maya commits.
@mw00 commented on GitHub (Oct 28, 2026):
Fixed in v1.1.36: if a failed first configure left the HIP Release flags empty, the build now sets
-O3 -DNDEBUGitself, so the kernels are never built unoptimised. Thank you @sakugetu for finding it and for the clear steps.Released in v1.1.36: https://github.com/mw00/project-maya/releases/tag/v1.1.36