launchgo

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package launchgo resolves typed Go CUDA launch sites to their available kernel identities.

This package is outside the compatibility promise of github.com/tmc/lib/nvidia. Its API may change or be removed in patch releases.

Package launchgo resolves typed Go CUDA launch sites to their available kernel identities. A symbol alone never identifies an artifact.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Form

type Form string

Form identifies the CUDA launch API at a site.

const (
	DriverKernel   Form = "driver.Function.LaunchKernel"
	DriverKernelEx Form = "driver.Function.LaunchKernelEx"
	KernelEx       Form = "cuda.Kernel.LaunchEx"
	KernelRaw      Form = "cuda.Kernel.LaunchRaw"
	Kernel         Form = "cuda.Kernel.Launch"
	Launcher       Form = "cuda.Launcher.Launch"
	GraphLauncher  Form = "graph.Graph.AddLauncher"
	GraphLaunch    Form = "graph.Graph.AddLaunch"
)

type Resolver

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

Resolver indexes type-checked declarations from a Go package.

func NewResolver

func NewResolver(fset *token.FileSet, files []*ast.File, info *types.Info) *Resolver

NewResolver indexes declarations for resolving launches in one package.

func (*Resolver) Resolve

func (r *Resolver) Resolve(e ast.Expr, before token.Pos) (Target, string)

Resolve resolves the kernel or launcher expression used at before.

func (*Resolver) Scan

func (r *Resolver) Scan(files []*ast.File) []Site

Scan returns launch sites in the given files.

type Site

type Site struct {
	Call      *ast.CallExpr
	Pos       token.Pos
	Form      Form
	Target    Target
	Reason    string
	Caller    string
	InClosure bool
}

Site describes a launch and its directly visible argument packing.

func Scan

func Scan(fset *token.FileSet, files []*ast.File, info *types.Info) []Site

Scan returns typed launch calls in source order. Files and info must be from the same type-check. An unknown or mutable binding stays unresolved.

type Target

type Target struct {
	Symbol     string
	Kind       string
	Path       string
	Source     string
	Digest     string
	Provenance string
}

Target identifies a symbol and the evidence that associates it with a particular artifact. A nonempty Symbol alone is only a lookup hint.

Jump to

Keyboard shortcuts

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