Skip to content

set red power cap via power-limit instead of amd-smi - #9

Open
teddytennant wants to merge 1 commit into
tinygrad:mainfrom
teddytennant:fix-rocm72-power-cap
Open

set red power cap via power-limit instead of amd-smi#9
teddytennant wants to merge 1 commit into
tinygrad:mainfrom
teddytennant:fix-rocm72-power-cap

Conversation

@teddytennant

Copy link
Copy Markdown

amd-smi set --power-cap took one argument through ROCm 7.1 and takes two from 7.2. In amdsmi_cli/amdsmi_parser.py it went from action='store', metavar='WATTS' (7.1.0:1283) to nargs=2, metavar=('PWR_TYPE','WATTS') (7.2.0:1362), which is where expected 2 arguments comes from. 6.4.0 and 7.0.0 both carry the old shape, so the break lands exactly at 7.2, and 02install-drivers.sh now installs SDK 7.14, which has the new one.

Rather than track the amd-smi CLI, this points the unit at tools/power-limit, which already sets the red cap by writing power1_cap directly and validates against power1_cap_min/power1_cap_max. 11symlink.sh:10 symlinks it to /usr/local/bin/power-limit inside the same [[ -z "$TINYBOX_CORE" ]] branch that installs this unit, and 00release.sh writes /etc/tinybox-release in pre.d before post.d runs, so both exist by the time the unit fires.

One behaviour change worth flagging: power-limit rejects an out-of-range value and exits 1, where amd-smi set -o 304 did not validate. On a card whose power1_cap_max is under 304 that turns a silent no-op into a failed oneshot.

I don't have a red box, so this is verified by reading the build scripts, not by booting an image.

Closes #5.

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.

Red power-limit service fails with ROCm 7.2

1 participant