Every wheel SDK install pulled in the devel extra — headers, static
libraries, and the full LLVM toolchain — whether or not the user would
ever build GPU code. It is roughly half the download (1.2-1.5 GiB
compressed, depending on target) and nothing in this repository needs it
at run time: the SDK probe already tolerates its absence and has a test
covering that path.
Default to rocm[libraries] and add --devel for people who do build
against ROCm.
Record the choice in the runtime manifest so an update reinstalls what
the user picked rather than silently adding or dropping the toolchain.
Manifests written before this change have no such field and were all
toolchain installs, so a missing field reads back as present.
Group the install arguments into SdkInstallRequest, which keeps the
argument count within the clippy threshold and makes the call sites
readable.
Closes #164
Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
Summary
Make the ROCm compiler toolchain opt-in.
rocm install sdknow installsrocm[libraries]by default, and--develadds the toolchain for people who build GPU code.Root cause
Every wheel SDK install pulled in the
develextra — headers, static libraries,hipcc, and the full LLVM toolchain — whether or not the user would ever compile anything. It is roughly half the download:[libraries][libraries,devel]Compressed wheel sizes at ROCm 7.10.0; unpacked is larger. The two extras are disjoint, so dropping
develcannot remove anything needed to run a model.Nothing in this repository needs it at run time. The SDK probe already tolerates its absence and backfills paths from the runtime packages, and
runtime_only_rocm_sdk_probe_validates_without_devel_rootalready covered that path before this change. No codepath compiles against ROCm headers: the vLLM install is a plain wheel install, Lemonade downloads prebuilt backends, and ComfyUI has no custom-node build path.hipccis only ever an existence marker for detecting a system ROCm install.Technical decisions
A positive flag, not a negative one.
--develmatches the dominant convention for this command (--reinstall,--replace,--dkms); the codebase has exactly one negative flag, so--no-develwould match the outlier.The choice is recorded in the runtime manifest so
rocm updatereinstalls what the user picked rather than silently adding or dropping the toolchain. Manifests written before this change have no such field and were all toolchain installs, so a missing field deserializes astrue— defaulting tofalsethere would silently strip the toolchain on the next update.For an adopted environment, the probe's CMake path tells us whether the toolchain is present, so adoption records what the environment actually has. This also gives
cmake_pathits first reader.SdkInstallRequestgroups the install arguments; the eighth positional parameter crossed the clippy threshold and the call sites were getting hard to read.Tests
pip_runtime_omits_devel_extra_by_default— the default spec isrocm[libraries]and the torch stack is unaffected.legacy_manifest_without_devel_field_is_treated_as_having_it.--develpath.Verified against the live index: the default dry run resolves
rocm[libraries]==7.13.0, and--develresolvesrocm[libraries,devel]==7.13.0.Not yet verified
I could not run a real install here, so two things want checking on a GPU lane before this is trusted in anger:
rocm-sdk-develback in transitively via the torch wheels. A--dry-runresolve on a runner would settle it.develtree — but a runtime-only vLLM serve run should confirm that.If maintainers would rather land this behaviour-neutral first, it could ship as an opt-out and flip the default later; given the evidence I think that mostly costs a second flag rename, but I'm happy either way.
Fixes #164