Documentation
¶
Overview ¶
Package cuda provides helpers for CUDA binary parsing
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CubinKernel ¶
type CubinKernel struct { Name string // Name of the kernel SymtabIndex int // Index of this kernel in the ELF symbol table KernelSize uint64 // Size of the kernel in bytes ConstantMem uint64 // Size of the constant memory used by the kernel // contains filtered or unexported fields }
CubinKernel holds the information of a CUDA kernel
type CubinKernelKey ¶
CubinKernelKey is the key to identify a kernel in a fatbin
type Fatbin ¶
type Fatbin struct { // CompressedPayloads is the number of compressed payloads found in the fatbin CompressedPayloads int // UncompressedPayloads is the number of uncompressed payloads found in the fatbin UncompressedPayloads int // contains filtered or unexported fields }
Fatbin holds all CUDA binaries found in one fatbin package
func ParseFatbinFromELFFile ¶
func ParseFatbinFromELFFile(elfFile *safeelf.File, acceptedSmVersions map[uint32]struct{}) (*Fatbin, error)
ParseFatbinFromELFFile parses the fatbin sections of the given ELF file and returns the information found in it
func ParseFatbinFromELFFilePath ¶
func ParseFatbinFromELFFilePath(path string, acceptedSmVersions map[uint32]struct{}) (*Fatbin, error)
ParseFatbinFromELFFilePath opens the given path and parses the resulting ELF for CUDA kernels
func (*Fatbin) AddKernel ¶
func (fb *Fatbin) AddKernel(key CubinKernelKey, kernel *CubinKernel)
AddKernel adds a kernel to the fatbin and updates internal indexes
func (*Fatbin) GetKernel ¶
func (fb *Fatbin) GetKernel(name string, smVersion uint32) *CubinKernel
GetKernel returns the kernel with the given name and SM version from the fatbin
func (*Fatbin) GetKernels ¶
func (fb *Fatbin) GetKernels() iter.Seq[*CubinKernel]
GetKernels returns an iterator over the kernels in the fatbin
func (*Fatbin) HasKernelWithName ¶
HasKernelWithName returns true if the fatbin has a kernel with the given name
func (*Fatbin) NumKernels ¶
NumKernels returns the number of kernels in the fatbin