nvproxy

package
v0.0.0-...-a70f559 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 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.

Lock ordering:

- nvproxy.fdsMu - rootClient.objsMu

  • nvproxy.clientsMu

Index

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

func HostDriverVersion() (string, error)

HostDriverVersion returns the version of the host Nvidia driver.

func Init

func Init()

Init initializes abis global map.

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.

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