Documentation ¶
Overview ¶
Package kernels provides basic data definitions related to GPU kernels.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadProgram ¶
LoadProgram loads program
Types ¶
type Grid ¶
type Grid struct { CodeObject *insts.HsaCo Packet *HsaKernelDispatchPacket PacketAddress uint64 WorkGroups []*WorkGroup WorkItems []*WorkItem }
A Grid is a running instance of a kernel.
type GridBuilder ¶
type GridBuilder interface { SetKernel(info KernelLaunchInfo) NumWG() int NextWG() *WorkGroup Skip(n int) }
A GridBuilder is the unit that can build a grid and its internal structure from a kernel and its launch parameters.
func NewGridBuilder ¶
func NewGridBuilder() GridBuilder
NewGridBuilder creates a default grid builder
type HsaKernelDispatchPacket ¶
type HsaKernelDispatchPacket struct { Header uint16 Setup uint16 WorkgroupSizeX uint16 WorkgroupSizeY uint16 WorkgroupSizeZ uint16 GridSizeX uint32 GridSizeY uint32 GridSizeZ uint32 PrivateSegmentSize uint32 GroupSegmentSize uint32 KernelObject uint64 KernargAddress uint64 CompletionSignal uint64 // contains filtered or unexported fields }
An HsaKernelDispatchPacket is an AQL packet for launching a kernel on a GPU.
type KernelLaunchInfo ¶
type KernelLaunchInfo struct { CodeObject *insts.HsaCo Packet *HsaKernelDispatchPacket PacketAddr uint64 WGFilter WGFilterFunc }
KernelLaunchInfo includes the necessary information to launch a kernel.
type WGFilterFunc ¶
type WGFilterFunc func( *HsaKernelDispatchPacket, *WorkGroup, ) bool
WGFilterFunc is a filter
type Wavefront ¶
type Wavefront struct { UID string CodeObject *insts.HsaCo Packet *HsaKernelDispatchPacket PacketAddress uint64 FirstWiFlatID int WG *WorkGroup InitExecMask uint64 WorkItems []*WorkItem }
A Wavefront is a collection of work-items.
type WorkGroup ¶
type WorkGroup struct { UID string CodeObject *insts.HsaCo Packet *HsaKernelDispatchPacket PacketAddress uint64 SizeX, SizeY, SizeZ int IDX, IDY, IDZ int CurrSizeX, CurrSizeY, CurrSizeZ int Wavefronts []*Wavefront WorkItems []*WorkItem }
A WorkGroup is part of the kernel that runs on one ComputeUnit.
Click to show internal directories.
Click to hide internal directories.