cuptiversion

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: 0 Imported by: 0 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 cuptiversion holds the one table of CUPTI versions whose struct layouts the nvidia module admits, and maps a runtime CUPTI version to the admitted version whose layouts a package should use.

Every package that passes a version-sized struct to CUPTI asks this package, naming the Surface it uses. No package keeps a version list of its own: two lists for one header can disagree, and did.

CUPTI reports CUDA 12 releases as small integers (24 is 12.6, 28 is 12.9) and CUDA 13 and later as MMmmpp (130400 is 13.4.0). Within one major release CUPTI parameter structs only grow and carry their own size, so a runtime accepts the layout of any earlier release in the same major. Compatible relies on that: a version that was not qualified exactly uses the newest qualified layout at or below it in the same major. A new major, or a version older than every qualified one, has no layout.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Admitted

func Admitted(v uint32, s Surface) (uint32, bool)

Admitted returns the recorded layout version for runtime version v on surface s. It admits no gap and no future release. Runtime 130401 retains its historical source admission with layout 130400; that alias is not fresh physical qualification.

Example
layout, ok := Admitted(130401, PCSampling)
fmt.Println(layout, ok)
_, ok = Admitted(28, PCSampling)
fmt.Println(ok)
layout, ok = Compatible(130500, Callback)
fmt.Println(layout, ok)
Output:
130400 true
false
130400 true

func Compatible

func Compatible(v uint32, s Surface) (uint32, bool)

Compatible returns the version whose layouts runtime version v should use on surface s: v itself when admitted, otherwise the newest admitted version below it in the same CUDA major.

func Versions

func Versions(s Surface) []uint32

Versions returns the versions admitted for every surface in s, in increasing order.

Types

type Surface

type Surface uint8

A Surface is a set of CUPTI API surfaces. Each is one header, or one use of a header, whose struct layouts are admitted version by version.

const (
	// PCSamplingQuery is the cupti_pcsampling.h parameter structs that read
	// no sampling output: the stall-reason inventory and the cubin CRC.
	PCSamplingQuery Surface = 1 << iota
	// PCSampling is cupti_pcsampling.h collection: configuration, control
	// and the sampling output records.
	PCSampling
	// PMSampling is cupti_pmsampling.h with the cupti_profiler_host.h
	// structs it initializes.
	PMSampling
	// SASSMetrics is cupti_sass_metrics.h.
	SASSMetrics
	// RangeProfiler is cupti_range_profiler.h with cupti_profiler_host.h.
	RangeProfiler
	// Callback is the cupti_callbacks.h callback and resource records.
	Callback
	// Checkpoint is cupti_checkpoint.h.
	Checkpoint
)

Jump to

Keyboard shortcuts

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