protocol

package
v3.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package protocol defines the common messages used in MGPUSim

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CUPipelineFlushReq

type CUPipelineFlushReq struct {
	sim.MsgMeta
}

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

Build creats a new CUPipelineFlushReq

func (CUPipelineFlushReqBuilder) WithDst

WithDst sets the destination of the request to build.

func (CUPipelineFlushReqBuilder) WithSendTime

WithSendTime sets the send time of the request to build.:w

func (CUPipelineFlushReqBuilder) WithSrc

WithSrc sets the source of the request to build.

type CUPipelineFlushRsp

type CUPipelineFlushRsp struct {
	sim.MsgMeta
}

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

Build creates a new CUPipelineFlushRsp

func (CUPipelineFlushRspBuilder) WithDst

WithDst sets the destination of the request to build.

func (CUPipelineFlushRspBuilder) WithSendTime

WithSendTime sets the send time of the request to build.:w

func (CUPipelineFlushRspBuilder) WithSrc

WithSrc sets the source of the request to build.

type CUPipelineRestartReq

type CUPipelineRestartReq struct {
	sim.MsgMeta
}

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

Build creats a new CUPipelineRestartReq

func (CUPipelineRestartReqBuilder) WithDst

WithDst sets the destination of the request to build.

func (CUPipelineRestartReqBuilder) WithSendTime

WithSendTime sets the send time of the request to build.:w

func (CUPipelineRestartReqBuilder) WithSrc

WithSrc sets the source of the request to build.

type CUPipelineRestartRsp

type CUPipelineRestartRsp struct {
	sim.MsgMeta
}

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

Build creats a new CUPipelineRestartRsp

func (CUPipelineRestartRspBuilder) WithDst

WithDst sets the destination of the request to build.

func (CUPipelineRestartRspBuilder) WithSendTime

WithSendTime sets the send time of the request to build.:w

func (CUPipelineRestartRspBuilder) WithSrc

WithSrc sets the source of the request to build.

type FlushReq

type FlushReq struct {
	sim.MsgMeta
}

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.

func (*FlushReq) Meta

func (m *FlushReq) Meta() *sim.MsgMeta

Meta returns the meta data associated with the message.

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

type LaunchKernelRsp struct {
	sim.MsgMeta

	RspTo string
}

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.

func (*MapWGReq) Meta

func (r *MapWGReq) Meta() *sim.MsgMeta

Meta returns the meta data associated with the MapWGReq.

type MapWGReqBuilder

type MapWGReqBuilder struct {
	// contains filtered or unexported fields
}

MapWGReqBuilder can build MapWGReqs.

func (MapWGReqBuilder) AddWf

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

WithWG sets the work-group to dispatch.

type MemCopyD2HReq

type MemCopyD2HReq struct {
	sim.MsgMeta
	SrcAddress uint64
	DstBuffer  []byte
}

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

type MemCopyH2DReq struct {
	sim.MsgMeta
	SrcBuffer  []byte
	DstAddress uint64
}

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

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

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

type WGCompletionMsg struct {
	sim.MsgMeta
	RspTo []string
}

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

Build builds WGCompletionMsg

func (WGCompletionMsgBuilder) WithDst

WithDst sets the destination of the message.

func (WGCompletionMsgBuilder) WithRspTo

func (b WGCompletionMsgBuilder) WithRspTo(
	rspTo []string,
) WGCompletionMsgBuilder

WithRspTo sets rspTo

func (WGCompletionMsgBuilder) WithSendTime

WithSendTime sets the send time.

func (WGCompletionMsgBuilder) WithSrc

WithSrc sets the source of the message.

type WfDispatchLocation

type WfDispatchLocation struct {
	Wavefront  *kernels.Wavefront
	SIMDID     int
	VGPROffset int
	SGPROffset int
	LDSOffset  int
}

WfDispatchLocation records the information about where to place the wavefront in a compute unit.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL