Legacy launcher flags
This page is the single source of truth for the shell launcher scripts/host/cosim_launch.sh and the gem5 cosim configuration options. Values follow the current script and mi300_cosim.py and correct the stale defaults found in older documentation.
Scope
scripts/host/cosim_launch.sh is invoked through just run-launch and starts one guest and one gem5 container connected over vfio-user; just test-gpu and scripts/host/run_cosim_tests.sh use the same path. The current documented main path is the YAML launcher, and the two must not share options: the tables below describe the shell launcher and the gem5 configuration it calls.
Shell launcher options
The defaults below are the effective values in the script. The --socket-path help text shows /tmp/gem5-mi300x.sock, but the script always appends the run identifier, so the effective default carries a -<run-id> suffix.
Option |
Effective default |
Notes |
|---|---|---|
|
|
guest disk image |
|
|
guest vmlinux |
|
|
QEMU binary |
|
|
gem5 binary |
|
|
container image that runs gem5 |
|
|
vfio-user socket; multi-GPU derives |
|
|
guest RAM |
|
|
guest vCPU count |
|
|
GPU VRAM size |
|
|
GPU compute unit count |
|
none |
passed to gem5 as |
|
none |
QEMU trace events |
|
none |
directory shared with the guest over 9p under mount tag |
|
|
GPU instance count; multiple GPUs use in-process multi-GPU mode |
|
|
gem5 initialization timeout |
|
off |
list orphaned cosim resources (dry run) |
|
off |
delete orphaned resources together with |
|
— |
print help |
Derived paths and names
The run identifier combines a timestamp and four random bytes; every path below derives from it:
Path or name |
Meaning |
Notes |
|---|---|---|
|
run identifier ( |
source of every derived path |
|
gem5 container name |
used by |
|
session directory and |
cleanup and diagnostics |
|
screen log of the QEMU console |
copied into diagnostics on failure |
|
guest RAM shared memory file |
created and removed by the launcher |
|
single-GPU VRAM shared memory file |
created and removed by the launcher |
|
per-GPU VRAM shared memory file for multiple GPUs |
used when |
|
diagnostic artifact directory captured on failure |
contains gem5 logs, container inspect output, console log and related files |
gem5 config options
third_party/gem5/configs/example/gpufs/mi300_cosim.py also accepts its own option set; the YAML device adapter uses only a subset (see Device adapters). The table lists the complete defaults of the configuration script.
Option |
Default |
Notes |
|---|---|---|
|
|
single-GPU vfio-user socket; base path for multiple GPUs |
|
|
POSIX shared memory name for VRAM; base name for multiple GPUs |
|
|
POSIX shared memory name for guest RAM |
|
|
VRAM size |
|
|
guest RAM size |
|
|
compute unit count |
|
|
GPU instances inside one process |
|
"" |
existing pool file used by the YAML launcher; when set it overrides the shared-memory options |
|
|
VRAM byte offset in the pool file |
|
none |
guest RAM range JSON passed by the YAML launcher |
|
none |
|
|
|
xGMI per-link bandwidth |
|
|
xGMI per-hop latency |
The in-process multi-GPU mode is exposed only by this configuration script and the shell launcher; the YAML adapter hard-codes --num-gpus=1.
Differences from the YAML launcher
Capability |
Shell launcher |
YAML launcher |
|---|---|---|
Launch unit |
one guest and one gem5 container (1 to N GPUs) |
one topology document with any number of machines |
Launch command |
|
|
Input |
command-line options plus fixed disk and kernel paths |
one topology YAML containing each machine's vHost |
Multiple GPUs |
|
one device process per GPU |
gem5 debug flags |
|
device |
QEMU trace |
|
no matching field; append QEMU arguments through host |
Host directory sharing |
|
no built-in field; add it through host |
SSH access |
port forward to 2222, guest console auto-login |
determined by the image and host configuration |
Failure classification and diagnostics |
session directory, screen log and |
|
Sources and maintenance
Sources of the option definitions:
scripts/host/cosim_launch.sh: option parsing, defaults, derived paths and container startup.scripts/host/cosim_lib.sh: run identifier, container name, socket, shared memory, session directory and diagnostic artifact paths.third_party/gem5/configs/example/gpufs/mi300_cosim.py: gem5-side options and defaults.justfile:run-launchandtest-gpuentry points.
Verify the help text and effective defaults with:
scripts/host/cosim_launch.sh --help
just run-launch --force-clean