Skip to content

build.py: --motion-outres-only forwards --define and --report to the extra-architecture builds - #88

Merged
phantoslayer21 merged 1 commit into
mainfrom
fix/55-motion-outres-define
Nov 13, 2026
Merged

phantoslayer21 merged 1 commit into
mainfrom
fix/55-motion-outres-define

Conversation

@phantoslayer21

Copy link
Copy Markdown
Owner

Fixes #55

What was wrong

In clean/runner/build.py, the child command that --motion-outres-only starts for each extra architecture forwarded --rocm, --clang, --no-device-libs, --soft-fp8 and --no-resource-gate, but not --define. The ordinary branch forwards each define. So --motion-outres-only --extra-archs gfx1200 --define X=1 built the extra-architecture objects without the define, and because the parent skips the resource gate for a --define build while the child (which had no define) ran it, the child could fail on exactly the kernels the experiment changes.

Release builds use neither option (BUILDING.md), so this only affected experiment builds.

The fix

The motion-only child command now also gets --report (when set) and every --define, in the same form as the ordinary branch (--define NAME=VALUE, once per define). Nothing else changed.

The test

clean/tests/test_build_motion_define.py (new, next to test_build_cuid.py). It calls build.main([... "--motion-outres-only", "--extra-archs", "gfx1200,gfx1201", ...]) with the subprocess call and the parent's own kernel builds stubbed (no clang, no GPU, nothing executed or written) and checks the command line of the child:

  • every --define reaches it, in order, together with --motion-outres-only and the architecture in its environment;
  • --report reaches it;
  • without them it has neither;
  • the options that were forwarded before still are (--no-device-libs, --soft-fp8, --no-resource-gate, --clang).

--rocm is passed explicitly so the test never depends on the ROCM_PATH of the machine it runs on.

Before / after (python -m unittest -v clean.tests.test_build_motion_define):

  • main plus the test only: Ran 4 tests, 2 failures (the define and the report are missing from the child's command), 2 pass (the two checks that only describe today's behaviour).
  • with the fix: Ran 4 tests ... OK.

Tested

  • The new test, before and after, as above.
  • clean.tests.test_build_cuid and clean.tests.test_build_targets (the neighbouring build.py tests): pass.
  • Repository gates (secrets, personal data, licence, view layout): pass.

Not tested

  • No kernel was compiled and no GPU used: the child process itself (a real --motion-outres-only build for a second architecture with a define) was not run, only the command line it is started with.

…extra-architecture builds

The child build that --motion-outres-only starts for each extra architecture
forwarded --rocm, --clang, --no-device-libs, --soft-fp8 and --no-resource-gate
but not --define, which the ordinary branch's child gets. An experiment build
(--extra-archs gfx1200 --define X=1) therefore built the extra-architecture
objects without the define, and the child ran the resource gate that the parent
skips for define builds. Every --define, and --report, now reaches the child.

Fixes #55

Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
@phantoslayer21
phantoslayer21 marked this pull request as ready for review November 13, 2026 21:23
@phantoslayer21
phantoslayer21 merged commit d9c697e into main Nov 13, 2026
2 checks passed
@phantoslayer21
phantoslayer21 deleted the fix/55-motion-outres-define branch November 13, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build.py: --motion-outres-only drops --define for the extra architectures

1 participant