session

package
Version: v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Mi = 1 << 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Session contains the immutable peer list for a given period of logical duration

func New

func New(strategy kb.Strategy, self plan.PeerID, pl plan.PeerList, client *client.Client, collectiveHandler *handler.CollectiveEndpoint) (*Session, bool)

func (*Session) AllGather added in v0.2.3

func (sess *Session) AllGather(w kb.Workspace) error

func (*Session) AllReduce

func (sess *Session) AllReduce(w base.Workspace) error

func (*Session) AllReduceWith added in v0.2.3

func (sess *Session) AllReduceWith(tree []int32, w kb.Workspace) error

AllReduceWith persoms an AllReduce collective communication operation given a tree topology for the strategy to be executted. ATTENTION: not stable feauture. Only for internal use.

func (*Session) Barrier

func (sess *Session) Barrier() error

func (*Session) Broadcast

func (sess *Session) Broadcast(w kb.Workspace) error

func (*Session) BytesConsensus

func (sess *Session) BytesConsensus(bs []byte, name string) (bool, error)

func (*Session) CalcStats added in v0.2.3

func (sess *Session) CalcStats()

CalcStats reports a Stat object for the current active strategyt

func (*Session) CheckInterference added in v0.2.3

func (sess *Session) CheckInterference() bool

CheckInterference is checking current state of the strategy stat metrics against the reference window and communicates with the cluster whether to change to an alternate communication strategy or not. Returns true if the cluster reached consensus on changing, flase otherwise.

func (*Session) Consensus

func (sess *Session) Consensus(w kb.Workspace) error

func (*Session) CrossAllReduce added in v0.2.3

func (sess *Session) CrossAllReduce(w base.Workspace) error

CrossAllReduce performs allreduce across all local roots.

func (*Session) Gather

func (sess *Session) Gather(w kb.Workspace) error

func (*Session) GetEgressRates added in v0.2.3

func (sess *Session) GetEgressRates() []float64

func (*Session) GetNumStrategies added in v0.2.3

func (sess *Session) GetNumStrategies() int

GetNumStrategies returns the number of different strategies for a given session

func (*Session) GetPeerLatencies

func (sess *Session) GetPeerLatencies() []time.Duration

GetPeerLatencies is deprecated

func (*Session) HostCount added in v0.2.3

func (sess *Session) HostCount() int

func (*Session) LocalBroadcast added in v0.2.3

func (sess *Session) LocalBroadcast(w kb.Workspace) error

func (*Session) LocalRank

func (sess *Session) LocalRank() int

func (*Session) LocalReduce added in v0.2.3

func (sess *Session) LocalReduce(w kb.Workspace) error

func (*Session) LocalSize added in v0.2.3

func (sess *Session) LocalSize() int

func (*Session) LogStats added in v0.2.3

func (sess *Session) LogStats()

LogStats stores a snapshot of the `StrategyStat` object for the current active communication strategy

func (*Session) Peer added in v0.2.3

func (sess *Session) Peer(rank int) plan.PeerID

func (*Session) PrintStategyStats added in v0.2.3

func (sess *Session) PrintStategyStats()

PrintStategyStats prints the Strategy Stats Snapshots that have been logged in the `sess.strategyStats` slice

func (*Session) Rank

func (sess *Session) Rank() int

func (*Session) Reduce

func (sess *Session) Reduce(w kb.Workspace) error

func (*Session) SetGlobalStrategy added in v0.2.3

func (sess *Session) SetGlobalStrategy(sl strategyList) error

func (*Session) SimpleSetGlobalStrategy added in v0.2.3

func (sess *Session) SimpleSetGlobalStrategy(forest []int32) error

func (*Session) Size added in v0.2.3

func (sess *Session) Size() int

type StrategyStat added in v0.2.3

type StrategyStat struct {
	Throughput float64
	// contains filtered or unexported fields
}

StrategyStat holds statistical data for a specific strategy

func (*StrategyStat) GetSnapshot added in v0.2.3

func (ss *StrategyStat) GetSnapshot() StrategyStatSnapshot

GetSnapshot return a StrategyStatSnapshot object containing a snapshot of the strategy's statistics

func (*StrategyStat) Reset added in v0.2.3

func (ss *StrategyStat) Reset()

Reset resets the counters associated with a specfiic `StrategyStat` object

func (*StrategyStat) Update added in v0.2.3

func (ss *StrategyStat) Update(begin, end time.Time, size int)

Update set the appropriate counters associated with a specific `StrategyStat` object

type StrategyStatSnapshot added in v0.2.3

type StrategyStatSnapshot struct {
	Throughput float64
}

StrategyStatSnapshot holds a snapshot of major metrics from the `StrategyStat` object

Jump to

Keyboard shortcuts

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