Documentation
¶
Overview ¶
Package nvproxy implements proxying for the Nvidia GPU Linux kernel driver: https://github.com/NVIDIA/open-gpu-kernel-modules.
Supported Nvidia GPUs: T4, L4, A100, A10G and H100.
Lock ordering:
- nvproxy.fdsMu - rootClient.objsMu
- nvproxy.clientsMu
Index ¶
- func ExpectedDriverChecksum(version nvconf.DriverVersion) (string, bool)
- func Filters(enabledCaps nvconf.DriverCaps) seccomp.SyscallRules
- func ForEachSupportDriver(f func(version nvconf.DriverVersion, checksum string))
- func HostDriverVersion() (string, error)
- func Init()
- func LatestDriver() nvconf.DriverVersion
- func Register(vfsObj *vfs.VirtualFilesystem, version nvconf.DriverVersion, ...) error
- func SupportedDrivers() []nvconf.DriverVersion
- func SupportedIoctls(version nvconf.DriverVersion) (frontendIoctls map[uint32]struct{}, uvmIoctls map[uint32]struct{}, ...)
- type DriverStruct
- type DriverStructName
- type NvidiaDeviceFD
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpectedDriverChecksum ¶
func ExpectedDriverChecksum(version nvconf.DriverVersion) (string, bool)
ExpectedDriverChecksum returns the expected checksum for a given version. Precondition: Init() must have been called.
func Filters ¶
func Filters(enabledCaps nvconf.DriverCaps) seccomp.SyscallRules
Filters returns seccomp-bpf filters for this package when using the given set of capabilities.
func ForEachSupportDriver ¶
func ForEachSupportDriver(f func(version nvconf.DriverVersion, checksum string))
ForEachSupportDriver calls f on all supported drivers. Precondition: Init() must have been called.
func HostDriverVersion ¶
HostDriverVersion returns the version of the host Nvidia driver.
func LatestDriver ¶
func LatestDriver() nvconf.DriverVersion
LatestDriver returns the latest supported driver. Precondition: Init() must have been called.
func Register ¶
func Register(vfsObj *vfs.VirtualFilesystem, version nvconf.DriverVersion, driverCaps nvconf.DriverCaps, uvmDevMajor uint32, useDevGofer bool) error
Register registers all devices implemented by this package in vfsObj.
func SupportedDrivers ¶
func SupportedDrivers() []nvconf.DriverVersion
SupportedDrivers returns a list of all supported drivers. Precondition: Init() must have been called.
func SupportedIoctls ¶
func SupportedIoctls(version nvconf.DriverVersion) (frontendIoctls map[uint32]struct{}, uvmIoctls map[uint32]struct{}, controlCmds map[uint32]struct{}, allocClasses map[uint32]struct{}, ok bool)
SupportedIoctls returns the ioctl numbers that are supported by nvproxy at a given version.
Types ¶
type DriverStruct ¶
type DriverStruct struct { Name DriverStructName Type reflect.Type }
DriverStruct ties an nvproxy struct type to its corresponding driver struct name.
func SupportedStructTypes ¶
func SupportedStructTypes(version nvconf.DriverVersion) ([]DriverStruct, bool)
SupportedStructTypes returns the list of struct types supported by the given driver version. It merges the frontend, uvm, control, and allocation names into one slice.
type DriverStructName ¶
type DriverStructName = string
DriverStructName is the name of a struct used by the Nvidia driver.
func SupportedStructNames ¶
func SupportedStructNames(version nvconf.DriverVersion) ([]DriverStructName, bool)
SupportedStructNames returns the list of struct names supported by the given driver version. It merges the frontend, uvm, control, and allocation names into one slice.
type NvidiaDeviceFD ¶
type NvidiaDeviceFD interface {
IsNvidiaDeviceFD()
}
NvidiaDeviceFD is an interface that should be implemented by all vfs.FileDescriptionImpl of Nvidia devices.