interpose

package
v2.0.0-beta.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
const (
	Native    = "native"
	Interpose = "interpose"
	Auto      = "auto"
)

Modes of a profile's ipc.

View Source
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.

View Source
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.

Variables

Files are what a bake takes from a cuInterpose build.

Functions

func Check

func Check(dir string) error

Check reports the first file a build directory lacks.

func Command

func Command(coordinator, action, dir string, pids []int) []string

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

func Participants(pids []int, exists func(path string) bool) []int

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.

func Socket

func Socket(pid int) string

Socket is where the interposed process pid listens for the coordinator.

func Supported

func Supported(devices []Device) error

Supported is nil when every GPU can hold an interposed engine: the interposer backs every allocation with VMM memory it can export as a POSIX file descriptor.

func Wrap

func Wrap(argv []string) []string

Wrap runs argv under the launcher, which checks the libraries' digests and preloads the frontend.

Types

type Device

type Device struct {
	Index             int    `json:"index"`
	Name              string `json:"name"`
	ComputeCapability string `json:"compute_capability"`
	VMM               bool   `json:"vmm"`
	PosixFD           bool   `json:"posix_fd"`
	Multicast         bool   `json:"multicast"`
}

Device is one GPU as `python3 -m warmctl_vllm.devices` reports it.

func ParseDevices

func ParseDevices(raw []byte) ([]Device, error)

ParseDevices reads the probe's output.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL