Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ __pycache__/
/plans/
/workspace/
/e2e-consolidated-report.md
# proptest writes failing-case seeds here. The classification corpora are swept
# exhaustively by deterministic tests alongside the properties, so a regression
# cannot hide behind seed luck and these files carry no coverage of their own.
**/proptest-regressions/

# Sphinx docs: _toc.yml is generated from _toc.yml.in at build time
docs/rocm-docs/sphinx/_toc.yml
Expand Down
81 changes: 79 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions MANIFEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ repository.
| base64 | 0.22.1 | MIT OR Apache-2.0 |
| base64ct | 1.8.3 | Apache-2.0 OR MIT |
| bit-set | 0.5.3 | MIT/Apache-2.0 |
| bit-set | 0.8.0 | Apache-2.0 OR MIT |
| bit-vec | 0.6.3 | MIT/Apache-2.0 |
| bit-vec | 0.8.0 | Apache-2.0 OR MIT |
| bitflags | 1.3.2 | MIT/Apache-2.0 |
| bitflags | 2.13.0 | MIT OR Apache-2.0 |
| block-buffer | 0.10.4 | MIT OR Apache-2.0 |
Expand Down Expand Up @@ -353,7 +355,9 @@ repository.
| proc-macro-crate | 3.5.0 | MIT OR Apache-2.0 |
| proc-macro2 | 1.0.106 | MIT OR Apache-2.0 |
| proc-macro2-diagnostics | 0.10.1 | MIT/Apache-2.0 |
| proptest | 1.11.0 | MIT OR Apache-2.0 |
| pulldown-cmark | 0.12.2 | MIT |
| quick-error | 1.2.3 | MIT/Apache-2.0 |
| quick-xml | 0.39.4 | MIT |
| quinn | 0.11.11 | MIT OR Apache-2.0 |
| quinn-proto | 0.11.15 | MIT OR Apache-2.0 |
Expand All @@ -367,6 +371,7 @@ repository.
| rand_chacha | 0.9.0 | MIT OR Apache-2.0 |
| rand_core | 0.6.4 | MIT OR Apache-2.0 |
| rand_core | 0.9.5 | MIT OR Apache-2.0 |
| rand_xorshift | 0.4.0 | MIT OR Apache-2.0 |
| ratatui | 0.30.2 | MIT |
| ratatui-core | 0.1.2 | MIT |
| ratatui-crossterm | 0.1.2 | MIT |
Expand Down Expand Up @@ -402,6 +407,7 @@ repository.
| rustls-platform-verifier-android | 0.1.1 | MIT OR Apache-2.0 |
| rustls-webpki | 0.103.13 | ISC |
| rustversion | 1.0.22 | MIT OR Apache-2.0 |
| rusty-fork | 0.3.1 | MIT/Apache-2.0 |
| ryu | 1.0.23 | Apache-2.0 OR BSL-1.0 |
| same-file | 1.0.6 | Unlicense/MIT |
| schannel | 0.1.29 | MIT |
Expand Down Expand Up @@ -513,6 +519,7 @@ repository.
| typenum | 1.20.1 | MIT OR Apache-2.0 |
| ucd-trie | 0.1.7 | MIT OR Apache-2.0 |
| uds_windows | 1.2.1 | MIT |
| unarray | 0.1.4 | MIT OR Apache-2.0 |
| unicase | 2.9.0 | MIT OR Apache-2.0 |
| unicode-ident | 1.0.24 | (MIT OR Apache-2.0) AND Unicode-3.0 |
| unicode-linebreak | 0.1.5 | Apache-2.0 |
Expand All @@ -532,6 +539,7 @@ repository.
| vt100 | 0.16.2 | MIT |
| vte | 0.15.0 | Apache-2.0 OR MIT |
| vtparse | 0.6.2 | MIT |
| wait-timeout | 0.2.1 | MIT/Apache-2.0 |
| walkdir | 2.5.0 | Unlicense/MIT |
| want | 0.3.1 | MIT |
| wasi | 0.11.1+wasi-snapshot-preview1 | Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT |
Expand Down
24 changes: 24 additions & 0 deletions apps/rocm/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31458,6 +31458,30 @@ install therock";
assert!(vram_capacity_is_meaningful(None, 1));
}

/// Every APU, not just the RDNA3+ ones.
///
/// `gfx_is_apu_family` used to recognise only gfx1103 and gfx115x, so the
/// pre-RDNA3 APUs below were read as discrete parts with real private VRAM.
/// They have none: the BIOS carve-out this compares against is a few hundred
/// MB on a Ryzen desktop iGPU, so `rocm serve` warned about "low VRAM" on a
/// 64 GB machine that is serving the model out of system RAM — the exact
/// false warning this gate exists to withhold. (Van Gogh is the Steam Deck.)
#[test]
fn vram_capacity_is_withheld_on_every_apu_not_just_rdna3() {
for (target, part) in [
("gfx90c", "Renoir / Cezanne / Lucienne / Barcelo"),
("gfx1033", "Van Gogh"),
("gfx1035", "Rembrandt, Radeon 680M"),
("gfx1036", "Raphael, Radeon 610M"),
] {
assert!(
!vram_capacity_is_meaningful(Some(target), 1),
"{part} ({target}) is an APU with no private VRAM, but its \
carve-out is being treated as a real capacity"
);
}
}

/// Every distro whose plan actually emits privileged commands, so the
/// escalation tests below sweep all of them rather than whichever one was
/// remembered. Adding a distro to the planner without adding it here would
Expand Down
29 changes: 29 additions & 0 deletions apps/rocm/src/therock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7632,6 +7632,35 @@ mod tests {
);
}

/// A Renoir-class iGPU can be installed for when its payload is published.
///
/// The family comes from `normalize_therock_family` rather than being
/// written out, because that is what `resolve_family` hands this check:
/// a family that never matches the detected target turns every `--family`
/// the user tries into "belongs to no recognized package family".
#[test]
fn a_published_renoir_class_target_resolves_to_its_own_payload() {
let family = normalize_therock_family("gfx90c")
.expect("gfx90c must belong to some family, or no --family can install for it");
let mut published = published_device_targets();
published.push("gfx90c".to_owned());

assert_eq!(
AggregateDeviceTarget::resolve(Some("gfx90c"), &family, &published),
AggregateDeviceTarget::Exact("gfx90c".to_owned())
);
// And where the channel publishes none, the refusal names the payload
// it looked for instead of blaming the family.
let unpublished =
AggregateDeviceTarget::resolve(Some("gfx90c"), &family, &published_device_targets());
assert!(
unpublished
.reason()
.is_some_and(|reason| reason.contains("no `device-gfx90c` payload")),
"{unpublished:?}"
);
}

#[test]
fn a_detected_target_from_another_family_is_undetermined() {
let target = AggregateDeviceTarget::resolve(
Expand Down
3 changes: 3 additions & 0 deletions crates/rocm-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@ sysinfo.workspace = true
toml = "1.1"
ureq = { version = "2.12", features = ["native-certs"] }

[dev-dependencies]
proptest = "1"

[target.'cfg(target_os = "windows")'.dependencies]
windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Security", "Win32_System_Registry", "Win32_System_SystemInformation", "Win32_System_Threading"] }
Loading
Loading