nvproxy

package
v0.0.0-...-ab9d845 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0, MIT Imports: 33 Imported by: 6

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpectedDriverChecksum

func ExpectedDriverChecksum(version 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 DriverVersion, checksum string))

ForEachSupportDriver calls f on all supported drivers. Precondition: Init() must have been called.

func HostDriverVersion

func HostDriverVersion() (string, error)

HostDriverVersion returns the version of the host Nvidia driver.

func Init

func Init()

Init initializes abis global map.

func Register

func Register(vfsObj *vfs.VirtualFilesystem, versionStr string, driverCaps nvconf.DriverCaps, uvmDevMajor uint32) error

Register registers all devices implemented by this package in vfsObj.

func SupportedIoctls

func SupportedIoctls(version 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 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 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 DriverVersion

type DriverVersion struct {
	// contains filtered or unexported fields
}

DriverVersion represents a NVIDIA driver version patch release.

+stateify savable

func DriverVersionFrom

func DriverVersionFrom(version string) (DriverVersion, error)

DriverVersionFrom returns a DriverVersion from a string.

func LatestDriver

func LatestDriver() DriverVersion

LatestDriver returns the latest supported driver. Precondition: Init() must have been called.

func NewDriverVersion

func NewDriverVersion(major, minor, patch int) DriverVersion

NewDriverVersion returns a new driver version.

func SupportedDrivers

func SupportedDrivers() []DriverVersion

SupportedDrivers returns a list of all supported drivers. Precondition: Init() must have been called.

func (DriverVersion) Equals

func (v DriverVersion) Equals(other DriverVersion) bool

Equals returns true if the two driver versions are equal.

func (DriverVersion) String

func (v DriverVersion) String() string

type NvidiaDeviceFD

type NvidiaDeviceFD interface {
	IsNvidiaDeviceFD()
}

NvidiaDeviceFD is an interface that should be implemented by all vfs.FileDescriptionImpl of Nvidia devices.

Directories

Path Synopsis
Package nvconf provides configuration structures and utilities for nvproxy.
Package nvconf provides configuration structures and utilities for nvproxy.

Jump to

Keyboard shortcuts

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