Repository navigation
libkfdreplay v0.1.0
Initial public release of libkfdreplay, ported from the kfdreplay2 research prototype.
Library (libkfdreplay.so)
- Split the prototype into modules (
hooks,checkpoint,restore,xlate,
topology,log,state,api) with hidden symbol visibility; only the
publickfdr_*API and the interposed libc functions are exported. - Added
kfdr_version(),kfdr_state()andkfdr_last_error(). - Fixed thread unfreezing on early checkpoint refusals (
WAIT_EVENTStimeout
and busy AQL queue) so a refused checkpoint leaves the process usable. - Unified diagnostic switches (
KFDR_DEBUG=1,KFDR_TRACE=1,KFDR_CRASH=1,
/tmp/kfdr_trace,/tmp/kfdr_pause).
Cold-cycle harness, examples and tests
- Added
scripts/cold_cycle.sh,scripts/env.sh,scripts/install_dmtcp.sh,
scripts/evict_page_cache.pyandscripts/fingerprint.py. - Hardened
scripts/cold_cycle.shagainst real DMTCP runs (verified on x86-64
Linux withTensorRails/dmtcpv5.0.0-warmctl.2):- protected the caller's ancestor chain and subshells from
kill_tree()and
orphan checks socold_cycle.shand outer wrappers (examples/*/run.sh)
never match or kill themselves; - tracked per-cycle processes via coordinator
--list, isolated
DMTCP_TMPDIRandKFDR_CYCLE_IDacross all chain ports (PORT,
PORT + 1 + 2*i), including unprivileged containers wherePR_SET_MM
cannot restore/proc/<pid>/cmdline; - closed stdin (
</dev/null) on DMTCP/gdb invocations and reaped the
watchdog'ssleepchild onunwatchso piped scripts and$()command
substitutions neither lose stdin nor hang waiting on open descriptors; - replaced
bcarithmetic withawk.
- protected the caller's ancestor chain and subshells from
- Fixed
examples/vllm_offline/run.sh,examples/vllm_serve/run.shand
examples/vllm_serve/serve_cr.pyso referencebaseline.jsonruns are not
forced intoHF_HUB_OFFLINE=1before model weights are cached, addedNEG=1
pass-through toexamples/vllm_offline/run.sh, and reaped theEngineCore
child inexamples/vllm_offline/vllm_mp.pybefore source exit. - Cleaned up DMTCP
ckpt_*_files/directories and restart scripts alongside
ckpt_*.dmtcpwhen-Kis not set. - Added GPU-free unit tests (
make test) and a real-DMTCP harness integration
test (make test-dmtcp/tests/test_cold_cycle.sh) wired into CI. - Re-verified the modular library and
scripts/cold_cycle.shon MI350X
(ROCm 10.1 TheRock, PyTorch 2.13, vLLM 0.29,TensorRails/dmtcp
v5.0.0-warmctl.2): HIP toy (5 ring boundary positions + negative test),
PyTorch + HIP graph (3 cycles, 4-generation chain + negative test), vLLM VMM
pool, vLLMsleep(2)in-process (3/3 + negative test) and mp executor (3/3
including cold page-cache eviction), andvllm serveover HTTP.