Documentation ¶
Overview ¶
Package protocol defines the common messages used in MGPUSim
Index ¶
- type CUPipelineFlushReq
- type CUPipelineFlushReqBuilder
- func (b CUPipelineFlushReqBuilder) Build() *CUPipelineFlushReq
- func (b CUPipelineFlushReqBuilder) WithDst(dst sim.Port) CUPipelineFlushReqBuilder
- func (b CUPipelineFlushReqBuilder) WithSendTime(t sim.VTimeInSec) CUPipelineFlushReqBuilder
- func (b CUPipelineFlushReqBuilder) WithSrc(src sim.Port) CUPipelineFlushReqBuilder
- type CUPipelineFlushRsp
- type CUPipelineFlushRspBuilder
- func (b CUPipelineFlushRspBuilder) Build() *CUPipelineFlushRsp
- func (b CUPipelineFlushRspBuilder) WithDst(dst sim.Port) CUPipelineFlushRspBuilder
- func (b CUPipelineFlushRspBuilder) WithSendTime(t sim.VTimeInSec) CUPipelineFlushRspBuilder
- func (b CUPipelineFlushRspBuilder) WithSrc(src sim.Port) CUPipelineFlushRspBuilder
- type CUPipelineRestartReq
- type CUPipelineRestartReqBuilder
- func (b CUPipelineRestartReqBuilder) Build() *CUPipelineRestartReq
- func (b CUPipelineRestartReqBuilder) WithDst(dst sim.Port) CUPipelineRestartReqBuilder
- func (b CUPipelineRestartReqBuilder) WithSendTime(t sim.VTimeInSec) CUPipelineRestartReqBuilder
- func (b CUPipelineRestartReqBuilder) WithSrc(src sim.Port) CUPipelineRestartReqBuilder
- type CUPipelineRestartRsp
- type CUPipelineRestartRspBuilder
- func (b CUPipelineRestartRspBuilder) Build() *CUPipelineRestartRsp
- func (b CUPipelineRestartRspBuilder) WithDst(dst sim.Port) CUPipelineRestartRspBuilder
- func (b CUPipelineRestartRspBuilder) WithSendTime(t sim.VTimeInSec) CUPipelineRestartRspBuilder
- func (b CUPipelineRestartRspBuilder) WithSrc(src sim.Port) CUPipelineRestartRspBuilder
- type FlushReq
- type GPURestartReq
- type GPURestartRsp
- type LaunchKernelReq
- type LaunchKernelRsp
- type MapWGReq
- type MapWGReqBuilder
- func (b MapWGReqBuilder) AddWf(wf WfDispatchLocation) MapWGReqBuilder
- func (b MapWGReqBuilder) Build() *MapWGReq
- func (b MapWGReqBuilder) WithDst(dst sim.Port) MapWGReqBuilder
- func (b MapWGReqBuilder) WithPID(pid vm.PID) MapWGReqBuilder
- func (b MapWGReqBuilder) WithSendTime(t sim.VTimeInSec) MapWGReqBuilder
- func (b MapWGReqBuilder) WithSrc(src sim.Port) MapWGReqBuilder
- func (b MapWGReqBuilder) WithWG(wg *kernels.WorkGroup) MapWGReqBuilder
- type MemCopyD2HReq
- type MemCopyH2DReq
- type PageMigrationReqToCP
- type PageMigrationRspToDriver
- type RDMADrainCmdFromDriver
- type RDMADrainRspToDriver
- type RDMARestartCmdFromDriver
- type RDMARestartRspToDriver
- type ShootDownCommand
- type ShootDownCompleteRsp
- type WGCompletionMsg
- type WGCompletionMsgBuilder
- func (b WGCompletionMsgBuilder) Build() *WGCompletionMsg
- func (b WGCompletionMsgBuilder) WithDst(dst sim.Port) WGCompletionMsgBuilder
- func (b WGCompletionMsgBuilder) WithRspTo(rspTo []string) WGCompletionMsgBuilder
- func (b WGCompletionMsgBuilder) WithSendTime(t sim.VTimeInSec) WGCompletionMsgBuilder
- func (b WGCompletionMsgBuilder) WithSrc(src sim.Port) WGCompletionMsgBuilder
- type WfDispatchLocation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CUPipelineFlushReq ¶
A CUPipelineFlushReq is a message from CP to ask the CU pipeline to flush
func (*CUPipelineFlushReq) Meta ¶
func (m *CUPipelineFlushReq) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type CUPipelineFlushReqBuilder ¶
type CUPipelineFlushReqBuilder struct {
// contains filtered or unexported fields
}
CUPipelineFlushReqBuilder can build new CU flush reqs
func (CUPipelineFlushReqBuilder) Build ¶
func (b CUPipelineFlushReqBuilder) Build() *CUPipelineFlushReq
Build creats a new CUPipelineFlushReq
func (CUPipelineFlushReqBuilder) WithDst ¶
func (b CUPipelineFlushReqBuilder) WithDst(dst sim.Port) CUPipelineFlushReqBuilder
WithDst sets the destination of the request to build.
func (CUPipelineFlushReqBuilder) WithSendTime ¶
func (b CUPipelineFlushReqBuilder) WithSendTime( t sim.VTimeInSec, ) CUPipelineFlushReqBuilder
WithSendTime sets the send time of the request to build.:w
func (CUPipelineFlushReqBuilder) WithSrc ¶
func (b CUPipelineFlushReqBuilder) WithSrc(src sim.Port) CUPipelineFlushReqBuilder
WithSrc sets the source of the request to build.
type CUPipelineFlushRsp ¶
A CUPipelineFlushRsp is a message from CU to CP indicating flush is complete
func (*CUPipelineFlushRsp) Meta ¶
func (m *CUPipelineFlushRsp) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type CUPipelineFlushRspBuilder ¶
type CUPipelineFlushRspBuilder struct {
// contains filtered or unexported fields
}
CUPipelineFlushRspBuilder can build new CU flush rsps
func (CUPipelineFlushRspBuilder) Build ¶
func (b CUPipelineFlushRspBuilder) Build() *CUPipelineFlushRsp
Build creates a new CUPipelineFlushRsp
func (CUPipelineFlushRspBuilder) WithDst ¶
func (b CUPipelineFlushRspBuilder) WithDst(dst sim.Port) CUPipelineFlushRspBuilder
WithDst sets the destination of the request to build.
func (CUPipelineFlushRspBuilder) WithSendTime ¶
func (b CUPipelineFlushRspBuilder) WithSendTime( t sim.VTimeInSec, ) CUPipelineFlushRspBuilder
WithSendTime sets the send time of the request to build.:w
func (CUPipelineFlushRspBuilder) WithSrc ¶
func (b CUPipelineFlushRspBuilder) WithSrc(src sim.Port) CUPipelineFlushRspBuilder
WithSrc sets the source of the request to build.
type CUPipelineRestartReq ¶
A CUPipelineRestartReq is a message from CP to ask the CU pipeline to resume after a flush/drain
func (*CUPipelineRestartReq) Meta ¶
func (m *CUPipelineRestartReq) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type CUPipelineRestartReqBuilder ¶
type CUPipelineRestartReqBuilder struct {
// contains filtered or unexported fields
}
CUPipelineRestartReqBuilder can build new CU restart reqs
func (CUPipelineRestartReqBuilder) Build ¶
func (b CUPipelineRestartReqBuilder) Build() *CUPipelineRestartReq
Build creats a new CUPipelineRestartReq
func (CUPipelineRestartReqBuilder) WithDst ¶
func (b CUPipelineRestartReqBuilder) WithDst(dst sim.Port) CUPipelineRestartReqBuilder
WithDst sets the destination of the request to build.
func (CUPipelineRestartReqBuilder) WithSendTime ¶
func (b CUPipelineRestartReqBuilder) WithSendTime( t sim.VTimeInSec, ) CUPipelineRestartReqBuilder
WithSendTime sets the send time of the request to build.:w
func (CUPipelineRestartReqBuilder) WithSrc ¶
func (b CUPipelineRestartReqBuilder) WithSrc(src sim.Port) CUPipelineRestartReqBuilder
WithSrc sets the source of the request to build.
type CUPipelineRestartRsp ¶
A CUPipelineRestartRsp is a message from CU indicating the restart is complete
func (*CUPipelineRestartRsp) Meta ¶
func (m *CUPipelineRestartRsp) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type CUPipelineRestartRspBuilder ¶
type CUPipelineRestartRspBuilder struct {
// contains filtered or unexported fields
}
CUPipelineRestartRspBuilder can build new CU restart reqs
func (CUPipelineRestartRspBuilder) Build ¶
func (b CUPipelineRestartRspBuilder) Build() *CUPipelineRestartRsp
Build creats a new CUPipelineRestartRsp
func (CUPipelineRestartRspBuilder) WithDst ¶
func (b CUPipelineRestartRspBuilder) WithDst(dst sim.Port) CUPipelineRestartRspBuilder
WithDst sets the destination of the request to build.
func (CUPipelineRestartRspBuilder) WithSendTime ¶
func (b CUPipelineRestartRspBuilder) WithSendTime( t sim.VTimeInSec, ) CUPipelineRestartRspBuilder
WithSendTime sets the send time of the request to build.:w
func (CUPipelineRestartRspBuilder) WithSrc ¶
func (b CUPipelineRestartRspBuilder) WithSrc(src sim.Port) CUPipelineRestartRspBuilder
WithSrc sets the source of the request to build.
type FlushReq ¶
FlushReq requests the GPU to flush all the cache to the main memory
func NewFlushReq ¶
func NewFlushReq(time sim.VTimeInSec, src, dst sim.Port) *FlushReq
NewFlushReq Creates a new flush command, setting the request send time with time and the source and destination.
type GPURestartReq ¶
type GPURestartReq struct { sim.MsgMeta StartTime sim.VTimeInSec EndTime sim.VTimeInSec }
GPURestartReq is a req to GPU to start the pipeline and unpause all paused components
func NewGPURestartReq ¶
func NewGPURestartReq( time sim.VTimeInSec, src, dst sim.Port, ) *GPURestartReq
NewGPURestartReq creates a GPURestart request
func (*GPURestartReq) Meta ¶
func (m *GPURestartReq) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type GPURestartRsp ¶
type GPURestartRsp struct { sim.MsgMeta StartTime sim.VTimeInSec EndTime sim.VTimeInSec }
GPURestartRsp is a rsp indicating the restart is complete
func NewGPURestartRsp ¶
func NewGPURestartRsp( time sim.VTimeInSec, src, dst sim.Port, ) *GPURestartRsp
NewGPURestartRsp creates a GPURestart respond
func (*GPURestartRsp) Meta ¶
func (m *GPURestartRsp) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type LaunchKernelReq ¶
type LaunchKernelReq struct { sim.MsgMeta PID vm.PID Packet *kernels.HsaKernelDispatchPacket PacketAddress uint64 HsaCo *insts.HsaCo WGFilter kernels.WGFilterFunc }
A LaunchKernelReq is a request that asks a GPU to launch a kernel
func NewLaunchKernelReq ¶
func NewLaunchKernelReq( time sim.VTimeInSec, src, dst sim.Port, ) *LaunchKernelReq
NewLaunchKernelReq returns a new LaunchKernelReq
func (*LaunchKernelReq) Meta ¶
func (m *LaunchKernelReq) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type LaunchKernelRsp ¶
LaunchKernelRsp is the response that is send by the GPU to the driver when the kernel completes execution.
func NewLaunchKernelRsp ¶
func NewLaunchKernelRsp( time sim.VTimeInSec, src, dst sim.Port, rspTo string, ) *LaunchKernelRsp
NewLaunchKernelRsp returns a new LaunchKernelRsp.
func (*LaunchKernelRsp) Meta ¶
func (m *LaunchKernelRsp) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type MapWGReq ¶
type MapWGReq struct { sim.MsgMeta WorkGroup *kernels.WorkGroup PID vm.PID Wavefronts []WfDispatchLocation }
MapWGReq is a request that dispatches a work-group to a compute unit.
type MapWGReqBuilder ¶
type MapWGReqBuilder struct {
// contains filtered or unexported fields
}
MapWGReqBuilder can build MapWGReqs.
func (MapWGReqBuilder) AddWf ¶
func (b MapWGReqBuilder) AddWf(wf WfDispatchLocation) MapWGReqBuilder
AddWf adds the information to execute a wavefront.
func (MapWGReqBuilder) Build ¶
func (b MapWGReqBuilder) Build() *MapWGReq
Build creates the MapWGReq.
func (MapWGReqBuilder) WithDst ¶
func (b MapWGReqBuilder) WithDst(dst sim.Port) MapWGReqBuilder
WithDst sets the destination of the message.
func (MapWGReqBuilder) WithPID ¶
func (b MapWGReqBuilder) WithPID(pid vm.PID) MapWGReqBuilder
WithPID sets the PID of the work-group.
func (MapWGReqBuilder) WithSendTime ¶
func (b MapWGReqBuilder) WithSendTime(t sim.VTimeInSec) MapWGReqBuilder
WithSendTime sets the send time.
func (MapWGReqBuilder) WithSrc ¶
func (b MapWGReqBuilder) WithSrc(src sim.Port) MapWGReqBuilder
WithSrc sets the source of the message.
func (MapWGReqBuilder) WithWG ¶
func (b MapWGReqBuilder) WithWG(wg *kernels.WorkGroup) MapWGReqBuilder
WithWG sets the work-group to dispatch.
type MemCopyD2HReq ¶
A MemCopyD2HReq is a request that asks the DMAEngine to copy memory from the host to the device
func NewMemCopyD2HReq ¶
func NewMemCopyD2HReq( time sim.VTimeInSec, src, dst sim.Port, srcAddress uint64, dstBuffer []byte, ) *MemCopyD2HReq
NewMemCopyD2HReq created a new MemCopyD2HReq
func (*MemCopyD2HReq) Meta ¶
func (m *MemCopyD2HReq) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type MemCopyH2DReq ¶
A MemCopyH2DReq is a request that asks the DMAEngine to copy memory from the host to the device
func NewMemCopyH2DReq ¶
func NewMemCopyH2DReq( time sim.VTimeInSec, src, dst sim.Port, srcBuffer []byte, dstAddress uint64, ) *MemCopyH2DReq
NewMemCopyH2DReq created a new MemCopyH2DReq
func (*MemCopyH2DReq) Meta ¶
func (m *MemCopyH2DReq) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type PageMigrationReqToCP ¶
type PageMigrationReqToCP struct { sim.MsgMeta StartTime sim.VTimeInSec EndTime sim.VTimeInSec ToReadFromPhysicalAddress uint64 ToWriteToPhysicalAddress uint64 DestinationPMCPort sim.Port PageSize uint64 }
PageMigrationReqToCP is a request to CP to start the page migration process
func NewPageMigrationReqToCP ¶
func NewPageMigrationReqToCP( time sim.VTimeInSec, src, dst sim.Port, ) *PageMigrationReqToCP
NewPageMigrationReqToCP creates a PageMigrationReqToCP
func (*PageMigrationReqToCP) Meta ¶
func (m *PageMigrationReqToCP) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type PageMigrationRspToDriver ¶
type PageMigrationRspToDriver struct { sim.MsgMeta StartTime sim.VTimeInSec EndTime sim.VTimeInSec }
PageMigrationRspToDriver is a rsp to driver indicating completion of Page Migration requests
func NewPageMigrationRspToDriver ¶
func NewPageMigrationRspToDriver( time sim.VTimeInSec, src, dst sim.Port, ) *PageMigrationRspToDriver
NewPageMigrationRspToDriver creates a PageMigrationRspToCP
func (*PageMigrationRspToDriver) Meta ¶
func (m *PageMigrationRspToDriver) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type RDMADrainCmdFromDriver ¶
type RDMADrainCmdFromDriver struct { sim.MsgMeta StartTime sim.VTimeInSec EndTime sim.VTimeInSec }
RDMADrainCmdFromDriver is driver asking CP to drain local RDMA
func NewRDMADrainCmdFromDriver ¶
func NewRDMADrainCmdFromDriver( time sim.VTimeInSec, src, dst sim.Port, ) *RDMADrainCmdFromDriver
NewRDMADrainCmdFromDriver creates a new RDMADrainCmdFromDriver
func (*RDMADrainCmdFromDriver) Meta ¶
func (m *RDMADrainCmdFromDriver) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type RDMADrainRspToDriver ¶
type RDMADrainRspToDriver struct { sim.MsgMeta StartTime sim.VTimeInSec EndTime sim.VTimeInSec }
RDMADrainRspToDriver is a rsp to driver indicating completion of RDMA drain
func NewRDMADrainRspToDriver ¶
func NewRDMADrainRspToDriver( time sim.VTimeInSec, src, dst sim.Port, ) *RDMADrainRspToDriver
NewRDMADrainRspToDriver creates a new RDMADrainRspToDriver
func (*RDMADrainRspToDriver) Meta ¶
func (m *RDMADrainRspToDriver) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type RDMARestartCmdFromDriver ¶
type RDMARestartCmdFromDriver struct { sim.MsgMeta StartTime sim.VTimeInSec EndTime sim.VTimeInSec }
RDMARestartCmdFromDriver is a cmd to unpause the RDMA
func NewRDMARestartCmdFromDriver ¶
func NewRDMARestartCmdFromDriver( time sim.VTimeInSec, src, dst sim.Port, ) *RDMARestartCmdFromDriver
NewRDMARestartCmdFromDriver creates a new RDMARestartCmdFromDriver
func (*RDMARestartCmdFromDriver) Meta ¶
func (m *RDMARestartCmdFromDriver) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type RDMARestartRspToDriver ¶
type RDMARestartRspToDriver struct { sim.MsgMeta StartTime sim.VTimeInSec EndTime sim.VTimeInSec }
RDMARestartRspToDriver defines a respond
func NewRDMARestartRspToDriver ¶
func NewRDMARestartRspToDriver( time sim.VTimeInSec, src, dst sim.Port, ) *RDMARestartRspToDriver
NewRDMARestartRspToDriver creates a RDMARestartRspToDriver
func (*RDMARestartRspToDriver) Meta ¶
func (m *RDMARestartRspToDriver) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type ShootDownCommand ¶
type ShootDownCommand struct { sim.MsgMeta StartTime sim.VTimeInSec EndTime sim.VTimeInSec VAddr []uint64 PID vm.PID }
ShootDownCommand requests the GPU to perform a TLB shootdown and invalidate the corresponding PTE's
func NewShootdownCommand ¶
func NewShootdownCommand( time sim.VTimeInSec, src, dst sim.Port, vAddr []uint64, pID vm.PID, ) *ShootDownCommand
NewShootdownCommand tells the CP to drain all CU and invalidate PTE's in TLB and Page Tables
func (*ShootDownCommand) Meta ¶
func (m *ShootDownCommand) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type ShootDownCompleteRsp ¶
type ShootDownCompleteRsp struct { sim.MsgMeta StartTime sim.VTimeInSec EndTime sim.VTimeInSec }
ShootDownCompleteRsp defines a respond
func NewShootdownCompleteRsp ¶
func NewShootdownCompleteRsp( time sim.VTimeInSec, src, dst sim.Port, ) *ShootDownCompleteRsp
NewShootdownCompleteRsp creates a new respond
func (*ShootDownCompleteRsp) Meta ¶
func (m *ShootDownCompleteRsp) Meta() *sim.MsgMeta
Meta returns the meta data associated with the message.
type WGCompletionMsg ¶
WGCompletionMsg notifies the dispatcher that a work-group is completed execution
func (*WGCompletionMsg) Meta ¶
func (r *WGCompletionMsg) Meta() *sim.MsgMeta
Meta returns the meta data associated with the MapWGReq.
type WGCompletionMsgBuilder ¶
type WGCompletionMsgBuilder struct {
// contains filtered or unexported fields
}
WGCompletionMsgBuilder can build MapWGReqs.
func (WGCompletionMsgBuilder) Build ¶
func (b WGCompletionMsgBuilder) Build() *WGCompletionMsg
Build builds WGCompletionMsg
func (WGCompletionMsgBuilder) WithDst ¶
func (b WGCompletionMsgBuilder) WithDst( dst sim.Port, ) WGCompletionMsgBuilder
WithDst sets the destination of the message.
func (WGCompletionMsgBuilder) WithRspTo ¶
func (b WGCompletionMsgBuilder) WithRspTo( rspTo []string, ) WGCompletionMsgBuilder
WithRspTo sets rspTo
func (WGCompletionMsgBuilder) WithSendTime ¶
func (b WGCompletionMsgBuilder) WithSendTime( t sim.VTimeInSec, ) WGCompletionMsgBuilder
WithSendTime sets the send time.
func (WGCompletionMsgBuilder) WithSrc ¶
func (b WGCompletionMsgBuilder) WithSrc( src sim.Port, ) WGCompletionMsgBuilder
WithSrc sets the source of the message.