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 ¶
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 ¶
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.
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 )