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 {
// contains filtered or unexported fields
}
Fatbin holds all CUDA binaries found in one fatbin package
func ParseFatbinFromELFFile ¶
ParseFatbinFromELFFile parses the fatbin sections of the given ELF file and returns the information found in it
func ParseFatbinFromELFFilePath ¶
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) HasKernelWithName ¶
HasKernelWithName returns true if the fatbin has a kernel with the given name
type Symbols ¶
Symbols holds all necessary data from a CUDA executable for getting necessary CUDA kernel data. That is, the symbol table which maps addresses to symbol names and the fatbin data with all the CUDA kernels available in the binary and their metadata.
func GetSymbols ¶
GetSymbols reads an ELF file from the given path and return the parsed CUDA data