Documentation
¶
Overview ¶
Package nccl provides parsing for NCCL bandwidth test output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BandwidthDataPoint ¶
type BandwidthDataPoint struct {
SizeBytes int64 // message size in bytes
AlgBW float64 // algorithmic bandwidth in GB/s
BusBW float64 // bus bandwidth in GB/s
}
BandwidthDataPoint represents a single bandwidth measurement from NCCL all_reduce_perf output.
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser parses NCCL bandwidth test output using a compiled regex from a LogProfile.
func NewParser ¶
func NewParser(profile *v1alpha1.LogProfile) (*Parser, error)
NewParser creates a Parser from a LogProfile's bandwidthResult pattern. Returns an error if the pattern is nil or the regex is invalid.
func (*Parser) ParseBandwidthLine ¶ added in v0.6.0
func (p *Parser) ParseBandwidthLine(line string) (BandwidthDataPoint, bool)
ParseBandwidthLine parses one log line, reporting false if it is not a bandwidth result row.
func (*Parser) ParseBandwidthLogs ¶
func (p *Parser) ParseBandwidthLogs(lines []string) []BandwidthDataPoint
ParseBandwidthLogs parses log lines and returns all matched bandwidth data points. Lines that don't match the pattern are silently skipped.
func (*Parser) ParseTransportLine ¶ added in v0.7.0
ParseTransportLine returns the NCCL network name from one "Using network ..." log line. It reports false when the LogProfile has no networkTransport pattern, the line does not match, or the captured name is blank.
func (*Parser) ParseTransports ¶ added in v0.7.0
ParseTransports returns the distinct, sorted NCCL network names captured from "Using network ..." log lines. Returns nil when the LogProfile has no networkTransport pattern or no line matched.