Versions in this module Expand all Collapse all v3 v3.0.3 Jul 5, 2024 v3.0.2 Mar 27, 2024 Changes in this version type Builder + func (b Builder) WithD2HCycles(d2hCycles int) Builder + func (b Builder) WithH2DCycles(h2dCycles int) Builder v3.0.1 Mar 13, 2024 v3.0.0 Jan 30, 2024 Changes in this version + type Builder struct + func MakeBuilder() Builder + func (b Builder) Build(name string) *Driver + func (b Builder) WithEngine(e sim.Engine) Builder + func (b Builder) WithFreq(freq sim.Freq) Builder + func (b Builder) WithGlobalStorage(storage *mem.Storage) Builder + func (b Builder) WithLog2PageSize(log2PageSize uint64) Builder + func (b Builder) WithMagicMemoryCopyMiddleware() Builder + func (b Builder) WithPageTable(pt vm.PageTable) Builder + type Command interface + AddReq func(req sim.Msg) + GetID func() string + GetReqs func() []sim.Msg + RemoveReq func(req sim.Msg) + type CommandHookInfo struct + IsStart bool + Now sim.VTimeInSec + Queue *CommandQueue + type CommandQueue struct + Context *Context + GPUID int + IsRunning bool + PID vm.PID + func (q *CommandQueue) Dequeue() Command + func (q *CommandQueue) Enqueue(c Command) + func (q *CommandQueue) NotifyAllSubscribers() + func (q *CommandQueue) NumCommand() int + func (q *CommandQueue) Peek() Command + func (q *CommandQueue) Subscribe() *CommandQueueStatusListener + func (q *CommandQueue) Unsubscribe(listener *CommandQueueStatusListener) + type CommandQueueStatusListener struct + func (l *CommandQueueStatusListener) Close() + func (l *CommandQueueStatusListener) Notify() + func (l *CommandQueueStatusListener) Wait() + type Context struct + type DeviceProperties struct + CUCount int + DRAMSize uint64 + type Driver struct + GPUs []sim.Port + Log2PageSize uint64 + RemotePMCPorts []sim.Port + func (d *Driver) AllocateMemory(ctx *Context, byteSize uint64) Ptr + func (d *Driver) AllocateUnifiedMemory(ctx *Context, byteSize uint64) Ptr + func (d *Driver) CreateCommandQueue(c *Context) *CommandQueue + func (d *Driver) CreateUnifiedGPU(c *Context, gpuIDs []int) int + func (d *Driver) Distribute(ctx *Context, addr Ptr, byteSize uint64, gpuIDs []int) []uint64 + func (d *Driver) DrainCommandQueue(q *CommandQueue) + func (d *Driver) Enqueue(q *CommandQueue, c Command) + func (d *Driver) EnqueueLaunchKernel(queue *CommandQueue, co *insts.HsaCo, gridSize [3]uint32, wgSize [3]uint16, ...) + func (d *Driver) EnqueueMemCopyD2D(queue *CommandQueue, dst Ptr, src Ptr, num int) + func (d *Driver) EnqueueMemCopyD2H(queue *CommandQueue, dst interface{}, src Ptr) + func (d *Driver) EnqueueMemCopyH2D(queue *CommandQueue, dst Ptr, src interface{}) + func (d *Driver) FreeMemory(ctx *Context, ptr Ptr) error + func (d *Driver) GetNumGPUs() int + func (d *Driver) Init() *Context + func (d *Driver) InitWithExistingPID(ctx *Context) *Context + func (d *Driver) LaunchKernel(ctx *Context, co *insts.HsaCo, gridSize [3]uint32, wgSize [3]uint16, ...) + func (d *Driver) MemCopyD2D(ctx *Context, dst Ptr, src Ptr, num int) + func (d *Driver) MemCopyD2H(ctx *Context, dst interface{}, src Ptr) + func (d *Driver) MemCopyH2D(ctx *Context, dst Ptr, src interface{}) + func (d *Driver) RegisterGPU(commandProcessorPort sim.Port, properties DeviceProperties) + func (d *Driver) Remap(ctx *Context, addr, size uint64, deviceID int) + func (d *Driver) Run() + func (d *Driver) SelectGPU(c *Context, gpuID int) + func (d *Driver) Terminate() + func (d *Driver) Tick(now sim.VTimeInSec) bool + type FlushCommand struct + ID string + Reqs []sim.Msg + func (c *FlushCommand) AddReq(req sim.Msg) + func (c *FlushCommand) GetID() string + func (c *FlushCommand) GetReqs() []sim.Msg + func (c *FlushCommand) RemoveReq(req sim.Msg) + type KernelMemCopyArgs struct + Dst Ptr + N int64 + Src Ptr + type LaunchKernelCommand struct + CodeObject *insts.HsaCo + DPacket Ptr + GridSize [3]uint32 + ID string + KernelArgs interface{} + Packet *kernels.HsaKernelDispatchPacket + Reqs []sim.Msg + WGSize [3]uint16 + func (c *LaunchKernelCommand) AddReq(req sim.Msg) + func (c *LaunchKernelCommand) GetID() string + func (c *LaunchKernelCommand) GetReqs() []sim.Msg + func (c *LaunchKernelCommand) RemoveReq(req sim.Msg) + type LaunchUnifiedMultiGPUKernelCommand struct + CodeObject *insts.HsaCo + DPacketArray []Ptr + GridSize [3]uint32 + ID string + KernelArgs interface{} + PacketArray []*kernels.HsaKernelDispatchPacket + Reqs []sim.Msg + WGSize [3]uint16 + func (c *LaunchUnifiedMultiGPUKernelCommand) AddReq(req sim.Msg) + func (c *LaunchUnifiedMultiGPUKernelCommand) GetID() string + func (c *LaunchUnifiedMultiGPUKernelCommand) GetReqs() []sim.Msg + func (c *LaunchUnifiedMultiGPUKernelCommand) RemoveReq(req sim.Msg) + type LocalPtr uint32 + type MemCopyD2HCommand struct + Dst interface{} + ID string + RawData []byte + Reqs []sim.Msg + Src Ptr + func (c *MemCopyD2HCommand) AddReq(req sim.Msg) + func (c *MemCopyD2HCommand) GetID() string + func (c *MemCopyD2HCommand) GetReqs() []sim.Msg + func (c *MemCopyD2HCommand) RemoveReq(req sim.Msg) + type MemCopyH2DCommand struct + Dst Ptr + ID string + Reqs []sim.Msg + Src interface{} + func (c *MemCopyH2DCommand) AddReq(req sim.Msg) + func (c *MemCopyH2DCommand) GetID() string + func (c *MemCopyH2DCommand) GetReqs() []sim.Msg + func (c *MemCopyH2DCommand) RemoveReq(req sim.Msg) + type Middleware interface + ProcessCommand func(now sim.VTimeInSec, cmd Command, queue *CommandQueue) (processed bool) + Tick func(now sim.VTimeInSec) (madeProgress bool) + type NoopCommand struct + ID string + func (c *NoopCommand) AddReq(req sim.Msg) + func (c *NoopCommand) GetID() string + func (c *NoopCommand) GetReqs() []sim.Msg + func (c *NoopCommand) RemoveReq(req sim.Msg) + type Ptr uint64 + type ReqHookInfo struct + CommandID string + EventType string + Now sim.VTimeInSec