mccl

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: 5 Imported by: 4

Documentation

Overview

Package mccl provides a collective communication library implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllReduceRing

func AllReduceRing(
	d *driver.Driver,
	comms []*Communicator,
	data []driver.Ptr,
	dataSize int,
	bufs []driver.Ptr,
	sizePerBuf int,
)

AllReduceRing performs AllReduce average operation.

func BroadcastRing

func BroadcastRing(
	d *driver.Driver,
	comms []*Communicator,
	root int,
	data []driver.Ptr,
	dataSize int,
)

BroadcastRing broadcast data from the root to other GPUs.

Types

type Communicator

type Communicator struct {
	Driver    *driver.Driver
	Ctx       *driver.Context
	GPUID     int
	Rank      uint32
	GroupID   int
	GroupSize uint32
}

Communicator is a struct that helps gpu to communicate.

func CommInitAll

func CommInitAll(
	nDev int,
	driver *driver.Driver,
	ctx *driver.Context,
	gpuIDs []int,
) []*Communicator

CommInitAll initiates a list of communicators.

func CommInitAllMultipleContexts

func CommInitAllMultipleContexts(
	nDev int,
	driver *driver.Driver,
	ctxs []*driver.Context,
	gpuIDs []int,
) []*Communicator

CommInitAllMultipleContexts creates a list of communicators with one context per communicator.

func NewCommunicator

func NewCommunicator(
	driver *driver.Driver,
	ctx *driver.Context,
	gpuID int,
	rank uint32,
	groupID int,
	groupSize uint32,
) *Communicator

NewCommunicator creates a new communicator rank is the id of this gpu

Jump to

Keyboard shortcuts

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