Documentation ¶
Overview ¶
Package dispatching defines how work-groups and wavefronts are dispatched to compute units.
Package dispatching is a generated GoMock package.
Index ¶
- type Builder
- func (b Builder) Build(name string) Dispatcher
- func (b Builder) WithAlg(alg string) Builder
- func (b Builder) WithCP(cp tracing.NamedHookable) Builder
- func (b Builder) WithCUResourcePool(pool resource.CUResourcePool) Builder
- func (b Builder) WithDispatchingPort(p sim.Port) Builder
- func (b Builder) WithMonitor(monitor *monitoring.Monitor) Builder
- func (b Builder) WithRespondingPort(p sim.Port) Builder
- type Dispatcher
- type DispatcherImpl
- type MockAlgorithm
- func (m *MockAlgorithm) EXPECT() *MockAlgorithmMockRecorder
- func (m *MockAlgorithm) FreeResources(location dispatchLocation)
- func (m *MockAlgorithm) HasNext() bool
- func (m *MockAlgorithm) Next() dispatchLocation
- func (m *MockAlgorithm) NumWG() int
- func (m *MockAlgorithm) RegisterCU(cu resource.DispatchableCU)
- func (m *MockAlgorithm) StartNewKernel(info kernels.KernelLaunchInfo)
- type MockAlgorithmMockRecorder
- func (mr *MockAlgorithmMockRecorder) FreeResources(location interface{}) *gomock.Call
- func (mr *MockAlgorithmMockRecorder) HasNext() *gomock.Call
- func (mr *MockAlgorithmMockRecorder) Next() *gomock.Call
- func (mr *MockAlgorithmMockRecorder) NumWG() *gomock.Call
- func (mr *MockAlgorithmMockRecorder) RegisterCU(cu interface{}) *gomock.Call
- func (mr *MockAlgorithmMockRecorder) StartNewKernel(info interface{}) *gomock.Call
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) 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 ¶
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.
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 ¶
func (m *MockAlgorithm) EXPECT() *MockAlgorithmMockRecorder
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) Next ¶
func (m *MockAlgorithm) Next() dispatchLocation
Next 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 ¶
func (mr *MockAlgorithmMockRecorder) Next() *gomock.Call
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.