dispatching

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package dispatching defines how work-groups and wavefronts are dispatched to compute units.

Package dispatching is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

A Builder can build dispatchers

func MakeBuilder

func MakeBuilder() Builder

MakeBuilder creates a builder with default dispatching configureations.

func (Builder) Build

func (b Builder) Build(name string) Dispatcher

Build creates a dispatcher.

func (Builder) WithAlg

func (b Builder) WithAlg(alg string) Builder

WithAlg sets the dispatching algorithm.

func (Builder) WithCP

func (b Builder) WithCP(cp tracing.NamedHookable) Builder

WithCP sets the Command Processor that the Dispatcher belongs to.

func (Builder) WithCUResourcePool

func (b Builder) WithCUResourcePool(pool resource.CUResourcePool) Builder

WithCUResourcePool sets the CU resource pool. It has to be given form outside, as all the dispatchers share the same CU resource pool.

func (Builder) WithDispatchingPort

func (b Builder) WithDispatchingPort(p sim.Port) Builder

WithDispatchingPort sets the port that connects to the Compute Units.

func (Builder) WithMonitor

func (b Builder) WithMonitor(monitor *monitoring.Monitor) Builder

WithMonitor sets the monitor that manages progress bars.

func (Builder) WithRespondingPort

func (b Builder) WithRespondingPort(p sim.Port) Builder

WithRespondingPort sets the port that the dispatcher can send WFCompleteMsg to.

type Dispatcher

type Dispatcher interface {
	tracing.NamedHookable
	RegisterCU(cu resource.DispatchableCU)
	IsDispatching() bool
	StartDispatching(req *protocol.LaunchKernelReq)
	Tick(now sim.VTimeInSec) (madeProgress bool)
}

A Dispatcher is a sub-component of a command processor that can dispatch work-groups to compute units.

type DispatcherImpl

type DispatcherImpl struct {
	sim.HookableBase
	// contains filtered or unexported fields
}

A DispatcherImpl is a ticking component that can dispatch work-groups.

func (*DispatcherImpl) IsDispatching

func (d *DispatcherImpl) IsDispatching() bool

IsDispatching checks if the dispatcher is dispatching another kernel.

func (*DispatcherImpl) Name

func (d *DispatcherImpl) Name() string

Name returns the name of the dispatcher

func (*DispatcherImpl) RegisterCU

func (d *DispatcherImpl) RegisterCU(cu resource.DispatchableCU)

RegisterCU allows the dispatcher to dispatch work-groups to the CU.

func (*DispatcherImpl) StartDispatching

func (d *DispatcherImpl) StartDispatching(req *protocol.LaunchKernelReq)

StartDispatching lets the dispatcher to start dispatch another kernel.

func (*DispatcherImpl) Tick

func (d *DispatcherImpl) Tick(now sim.VTimeInSec) (madeProgress bool)

Tick updates the state of the dispatcher.

type MockAlgorithm

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

MockAlgorithm is a mock of algorithm interface.

func NewMockAlgorithm

func NewMockAlgorithm(ctrl *gomock.Controller) *MockAlgorithm

NewMockAlgorithm creates a new mock instance.

func (*MockAlgorithm) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAlgorithm) FreeResources

func (m *MockAlgorithm) FreeResources(location dispatchLocation)

FreeResources mocks base method.

func (*MockAlgorithm) HasNext

func (m *MockAlgorithm) HasNext() bool

HasNext mocks base method.

func (*MockAlgorithm) Next

func (m *MockAlgorithm) Next() dispatchLocation

Next mocks base method.

func (*MockAlgorithm) NumWG

func (m *MockAlgorithm) NumWG() int

NumWG mocks base method.

func (*MockAlgorithm) RegisterCU

func (m *MockAlgorithm) RegisterCU(cu resource.DispatchableCU)

RegisterCU mocks base method.

func (*MockAlgorithm) StartNewKernel

func (m *MockAlgorithm) StartNewKernel(info kernels.KernelLaunchInfo)

StartNewKernel mocks base method.

type MockAlgorithmMockRecorder

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

MockAlgorithmMockRecorder is the mock recorder for MockAlgorithm.

func (*MockAlgorithmMockRecorder) FreeResources

func (mr *MockAlgorithmMockRecorder) FreeResources(location interface{}) *gomock.Call

FreeResources indicates an expected call of FreeResources.

func (*MockAlgorithmMockRecorder) HasNext

func (mr *MockAlgorithmMockRecorder) HasNext() *gomock.Call

HasNext indicates an expected call of HasNext.

func (*MockAlgorithmMockRecorder) Next

Next indicates an expected call of Next.

func (*MockAlgorithmMockRecorder) NumWG

func (mr *MockAlgorithmMockRecorder) NumWG() *gomock.Call

NumWG indicates an expected call of NumWG.

func (*MockAlgorithmMockRecorder) RegisterCU

func (mr *MockAlgorithmMockRecorder) RegisterCU(cu interface{}) *gomock.Call

RegisterCU indicates an expected call of RegisterCU.

func (*MockAlgorithmMockRecorder) StartNewKernel

func (mr *MockAlgorithmMockRecorder) StartNewKernel(info interface{}) *gomock.Call

StartNewKernel indicates an expected call of StartNewKernel.

Jump to

Keyboard shortcuts

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