device: run cards with a small PCI BAR by keeping kernel arguments in host memory

A card whose PCI BAR spans less than its VRAM was refused at startup, because the kernel argument ring is written by the host and the runtime maps such VRAM PROT_NONE. Instead, place the ring, and a recorded pass's argument blocks, in a pinned host memory pool and grant them to the card, as HIP's own launches do; every dispatch then reads its arguments across the link. A card whose BAR spans its VRAM keeps its arguments in VRAM, unchanged.

RADIANCE_DEBUG_AQL_HOST_KARGS forces the host-memory path on a card that needs no fallback, to measure the cost.
This commit is contained in:
Deadcode authored and StillDeadcode committed 2026-10-21 09:26:02 +02:00
1 parent 1431838a9a
commit aa12f79579
4 files changed
+52 -28

No files matched your search

+3 -1
View File
@@ -203,7 +203,9 @@ void check_small_bar(const Facts& f, std::vector<Finding>* out) {
fmt("%s: the host and the other cards see %s of its %s of VRAM", card_name(*c).c_str(),
humanb(c->vram_visible).c_str(), humanb(c->vram_total).c_str()),
"without Resizable BAR a peer can address only a window of the card's memory, which "
"limits peer-to-peer collectives and copies into VRAM from the host",
"limits peer-to-peer collectives and copies into VRAM from the host; the engine also "
"keeps that card's kernel arguments in pinned host memory, and every dispatch reads "
"them across the link",
"enable Resizable BAR (\"Re-Size BAR Support\" and \"Above 4G Decoding\") in the "
"firmware setup");
}