gpuconfig

package
v0.0.0-...-4aaa17f Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package gpuconfig implements routines for manipulating proto based GPU build configuration files.

It also implements the construction of these configs for the COS Image and the COS Kernel CI.

Package gpuconfig implements routines for manipulating proto based GPU build configuration files.

It also implements the construction of these configs for the COS Image and the COS Kernel CI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGPUDriverVersion

func GetGPUDriverVersion(gpuProtoContent []byte, gpuType string, input string, fallback bool) (string, error)

GetGPUDriverVersion fetch the GPU driver version from the input given the specific gpuType, fallback flag and proto bytes. The input here can be:

  1. Precise GPU driver versions, e.g. 535.125.67, In this case, we will check whether this version is compatible with gpuType.
  2. Major GPU version label, e.g. R535, or default or latest or empty label. In this case, we will find out the driver version which is associated to this label for gpuType.

func GetGPUDriverVersions

func GetGPUDriverVersions(gpuProtoContent []byte, gpuType string) ([]*pb.DriverVersion, error)

GetGPUDriverVersions will fetch a list of GPU driver versions that support the gpuType.

func UploadConfigs

func UploadConfigs(ctx context.Context, client *storage.Client, configs []GPUPrecompilationConfig, gcsBucket string) error

Types

type GPUArtifactsDownloader

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

func NewGPUArtifactsDownloader

func NewGPUArtifactsDownloader(client *storage.Client, config GPUPrecompilationConfig) *GPUArtifactsDownloader

NewGPUArtifactsDownloader creates a GPUArtifactsDownloader instance.

func (*GPUArtifactsDownloader) ArtifactExists

func (d *GPUArtifactsDownloader) ArtifactExists(ctx context.Context, artifactPath string) (bool, error)

func (*GPUArtifactsDownloader) DownloadArtifact

func (d *GPUArtifactsDownloader) DownloadArtifact(ctx context.Context, destDir, artifactPath string) error

DownloadArtifact downloads an artifact from the GCS prefix configured in GPUArtifactsDownloader.

func (*GPUArtifactsDownloader) DownloadKernelHeaders

func (d *GPUArtifactsDownloader) DownloadKernelHeaders(ctx context.Context, destDir string) error

DownloadKernelHeaders downloads COS kernel headers to destination directory.

func (*GPUArtifactsDownloader) DownloadKernelSrc

func (d *GPUArtifactsDownloader) DownloadKernelSrc(ctx context.Context, destDir string) error

DownloadKernelSrc downloads COS kernel sources to destination directory.

func (*GPUArtifactsDownloader) DownloadNVIDIARunfile

func (d *GPUArtifactsDownloader) DownloadNVIDIARunfile(ctx context.Context, destDir string) (string, error)

func (*GPUArtifactsDownloader) DownloadToolchain

func (d *GPUArtifactsDownloader) DownloadToolchain(ctx context.Context, destDir string) error

DownloadToolchain downloads toolchain package to destination directory.

func (*GPUArtifactsDownloader) DownloadToolchainEnv

func (d *GPUArtifactsDownloader) DownloadToolchainEnv(ctx context.Context, destDir string) error

DownloadToolchainEnv downloads toolchain compilation environment variables to destination directory.

func (*GPUArtifactsDownloader) GetArtifact

func (d *GPUArtifactsDownloader) GetArtifact(ctx context.Context, artifact string) ([]byte, error)

func (*GPUArtifactsDownloader) ListArtifacts

func (d *GPUArtifactsDownloader) ListArtifacts(ctx context.Context, prefix string) ([]string, error)

type GPUPrecompilationConfig

type GPUPrecompilationConfig struct {
	ProtoConfig   *pb.COSGPUBuildRequest `json:"-"`
	DriverVersion string                 `json:"driver_version"`
	Milestone     string                 `json:"milestone"`
	Version       string                 `json:"version"`
	VersionType   string                 `json:"version_type"`
}

func GenerateKernelCIConfigs

func GenerateKernelCIConfigs(ctx context.Context, client *storage.Client, kernelVersion string, driverVersions []string) ([]GPUPrecompilationConfig, error)

Generates and GPU precompilation build configs(and metadata) for a given tuple of kernelVersion and driver versions

func ReadConfig

func ReadConfig(ctx context.Context, client *storage.Client, dirName string) (GPUPrecompilationConfig, error)

Reads precompilation config from GCS bucket into GPUPrecompilationConfig struct.

func ReadConfigs

func ReadConfigs(ctx context.Context, client *storage.Client, bucketName string, lookBackDays int, versionType string) ([]GPUPrecompilationConfig, error)

Reads all config dirs published within <lookBackDays> of current date into a list of GPUPrecompilationConfig struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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