Documentation
¶
Overview ¶
Package interpose runs an engine under NVIDIA's cuInterpose, which lets cross-process CUDA memory (legacy IPC, VMM exports, multicast) survive a CUDA checkpoint. See docs/interpose.md.
Index ¶
- Constants
- Variables
- func Check(dir string) error
- func Command(coordinator, action, dir string, pids []int) []string
- func DefaultDir() string
- func Participants(pids []int, exists func(path string) bool) []int
- func Socket(pid int) string
- func Supported(devices []Device) error
- func Wrap(argv []string) []string
- type Device
Constants ¶
const ( Native = "native" Interpose = "interpose" Auto = "auto" )
Modes of a profile's ipc.
const ( Frontend = "libcuinterpose.so" Core = "libcuinterpose_core.so" Launcher = "cuinterpose-launch" Coordinator = "cuinterpose-coordinator" // State is the coordinator's record of a prepared checkpoint. State = "cuinterpose.state" )
Files of a cuInterpose build.
const ( GuestDir = "/opt/warmctl/ipc" SocketDir = "/tmp" )
Container paths: the build (and, in a receiver, the snapshot's state) is mounted at GuestDir in donor and receiver alike, because the restored processes have the libraries mapped from there. Every interposed process listens on a control socket in SocketDir, a tree the snapshot carries.
const ProbeTimeout = 30 * time.Second
ProbeTimeout bounds one probe: cuInit can block for minutes on a GPU that fell off the bus, and the caller should hear about it.
Variables ¶
var Files = []string{Frontend, Core, Launcher, Coordinator}
Files are what a bake takes from a cuInterpose build.
var Probe = probeDevices
Probe reads the visible GPUs from the CUDA driver; tests replace it.
Functions ¶
func Command ¶
Command is the coordinator's command line for action (prepare or restore) over the interposed processes pids, keeping its state in dir.
func DefaultDir ¶
func DefaultDir() string
DefaultDir is cuinterpose/ next to this executable, where a release puts the build.
func Participants ¶
Participants are the processes among pids that listen for the coordinator. A process opens its socket on its first intercepted CUDA call; one that never made such a call (an API server that only loaded the driver) holds no shared memory and takes the plain CUDA checkpoint.
Types ¶
type Device ¶
type Device struct {
Index int
Name string
ComputeCapability string
// VMM, PosixFD and Multicast are the driver attributes the interposer
// and fast collectives need: virtual memory management, its POSIX file
// descriptor handles, and multicast objects.
VMM bool
PosixFD bool
Multicast bool
}
Device is one visible GPU as the CUDA driver describes it.