Documentation
¶
Overview ¶
Cuptilayout measures the struct layouts of one CUPTI header with the C compiler and writes them as a text record.
Usage:
cuptilayout [-cc cc] [-header cupti_pcsampling.h] -cuda /usr/local/cuda-13.5 [-o dir]
It reads the header from the toolkit's include directory, finds every typedef'd struct and enum in it, and generates a C program that prints sizeof and alignment for each struct, offsetof and sizeof for each field (nested members included), and the value of each enumerator and of CUPTI_API_VERSION. The field list comes from the header being measured, not from the Go bindings, so a field a new release adds appears in the record. The program is compiled against that toolkit and run; with -o the record is written to dir/<CUPTI_API_VERSION>.txt, otherwise to standard output.
The record is evidence for a row of the table in github.com/tmc/lib/nvidia/internal/cuptiversion. Tests in nvidia/cupti compare the committed records with the Go types.