assert

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertMigConfig

func AssertMigConfig(c *Context) error

func AssertMigMode

func AssertMigMode(c *Context) error

func BuildCommand

func BuildCommand() *cli.Command

func CheckFlags

func CheckFlags(f *Flags) error

func GetLogger

func GetLogger() *logrus.Logger

func GetSelectedMigConfig

func GetSelectedMigConfig(f *Flags, spec *v1.Spec) (v1.MigConfigSpecSlice, error)

func ParseConfigFile

func ParseConfigFile(f *Flags) (*v1.Spec, error)

func WalkSelectedMigConfigForEachGPU

func WalkSelectedMigConfigForEachGPU(migConfig v1.MigConfigSpecSlice, f func(*v1.MigConfigSpec, int, types.DeviceID) error) error

Types

type Context

type Context struct {
	*cli.Context
	Flags     *Flags
	MigConfig v1.MigConfigSpecSlice
	Nvml      nvml.Interface
}

type Flags

type Flags struct {
	ConfigFile     string
	SelectedConfig string
	SkipReset      bool
	ModeOnly       bool
	ValidConfig    bool
}

Jump to

Keyboard shortcuts

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