Repository navigation
build.py: --motion-outres-only forwards --define and --report to the extra-architecture builds - #88
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #55
What was wrong
In
clean/runner/build.py, the child command that--motion-outres-onlystarts for each extra architecture forwarded--rocm,--clang,--no-device-libs,--soft-fp8and--no-resource-gate, but not--define. The ordinary branch forwards each define. So--motion-outres-only --extra-archs gfx1200 --define X=1built the extra-architecture objects without the define, and because the parent skips the resource gate for a--definebuild 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 totest_build_cuid.py). It callsbuild.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:--definereaches it, in order, together with--motion-outres-onlyand the architecture in its environment;--reportreaches it;--no-device-libs,--soft-fp8,--no-resource-gate,--clang).--rocmis passed explicitly so the test never depends on theROCM_PATHof the machine it runs on.Before / after (
python -m unittest -v clean.tests.test_build_motion_define):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).Ran 4 tests ... OK.Tested
clean.tests.test_build_cuidandclean.tests.test_build_targets(the neighbouring build.py tests): pass.Not tested
--motion-outres-onlybuild for a second architecture with a define) was not run, only the command line it is started with.