tegra

package
v1.19.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Option) (discover.Discover, error)

New creates a new tegra discoverer using the supplied functional options.

Types

type MountSpecPathsByType

type MountSpecPathsByType map[csv.MountSpecType][]string

MountSpecPathsByType define the per-type paths that define the entities (e.g. device nodes, directories, libraries, symlinks) that are required for gpu use on Tegra-based systems. These are typically populated from CSV files defined by the platform owner.

func MountSpecsFromCSVFiles

func MountSpecsFromCSVFiles(logger logger.Interface, csvFilePaths ...string) MountSpecPathsByType

MountSpecsFromCSVFiles returns a MountSpecPathsByTyper for the specified list of CSV files.

func (MountSpecPathsByType) MountSpecPathsByType

func (m MountSpecPathsByType) MountSpecPathsByType() MountSpecPathsByType

MountSpecPathsByType for a variable of type MountSpecPathsByType returns the underlying data structure. This allows for using this type in functions such as Merge and Filter.

type MountSpecPathsByTyper

type MountSpecPathsByTyper interface {
	MountSpecPathsByType() MountSpecPathsByType
}

func DeviceNodes

func DeviceNodes(dn ...string) MountSpecPathsByTyper

DeviceNodes creates a set of MountSpecPaths for the specified device nodes. These have the MoutSpecDev type.

func Merge

Merge combines the MountSpecPathsByType for the specified sources.

func Symlinks(s ...string) MountSpecPathsByTyper

DeviceNodes creates a set of MountSpecPaths for the specified symlinks. These have the MountSpecSym type.

func Transform

Transform applies the specified transforms to a set of mount specs by type. The result is itself a set of mount specs by type.

type Option

type Option func(*options)

Option defines a functional option for configuring a Tegra discoverer.

func WithDevRoot added in v1.15.0

func WithDevRoot(devRoot string) Option

WithDevRoot sets the /dev root. If this is unset, the driver root is assumed.

func WithDriverRoot

func WithDriverRoot(driverRoot string) Option

WithDriverRoot sets the driver root for the discoverer.

func WithHookCreator added in v1.18.0

func WithHookCreator(hookCreator discover.HookCreator) Option

WithHookCreator sets the hook creator for the discoverer.

func WithLdconfigPath added in v1.15.0

func WithLdconfigPath(ldconfigPath string) Option

WithLdconfigPath sets the path to the ldconfig program

func WithLibrarySearchPaths

func WithLibrarySearchPaths(librarySearchPaths ...string) Option

WithLibrarySearchPaths sets the library search paths for the discoverer.

func WithLogger

func WithLogger(logger logger.Interface) Option

WithLogger sets the logger for the discoverer.

func WithMountSpecs

func WithMountSpecs(mountSpecs ...MountSpecPathsByTyper) Option

type Transformer

type Transformer interface {
	Apply(MountSpecPathsByTyper) MountSpecPathsByTyper
}

A Transformer modifies a specified set of mount specs by type. The output of a transformer is itself a set of mount specs by type.

func IgnoreSymlinkMountSpecsByPattern

func IgnoreSymlinkMountSpecsByPattern(ignorePatterns ...string) Transformer

func OnlyDeviceNodes

func OnlyDeviceNodes() Transformer

OnlyDeviceNodes creates a transformer that will remove any input mounts specs that are not of the `MountSpecDev` type.

func WithoutDeviceNodes

func WithoutDeviceNodes() Transformer

WithoutDeviceNodes creates a transformer that will remove entries with type MountSpecDevice from the input.

func WithoutRegularDeviceNodes

func WithoutRegularDeviceNodes() Transformer

WithoutRegularDeviceNodes creates a transfomer which removes regular `/dev/nvidia[0-9]+` device nodes from the source.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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