Miscellaneous

Typedefs

typedef uint64_t ACCL::addr_t

Device address type.

typedef uint32_t ACCL::val_t

Device value type.

typedef unsigned int ACCL::communicatorId

Communicator IDs used to refer to a certain communicator.

typedef std::map<std::pair<dataType, dataType>, ArithConfig> ACCL::arithConfigMap

Arithmetic configuration definition.

Enumerations

enum class ACCL::dataType

ACCL supported data types.

Values:

enumerator none

No datatype.

enumerator int8

8-bit integer; unsupported datatype, only used internally.

enumerator float16

16-bit floating-point number

enumerator float32

32-bit floating-point number

enumerator float64

64-bit floating-point number

enumerator int32

32-bit integer

enumerator int64

64-bit integer

enum class ACCL::reduceFunction

ACCL reduce functions.

Used by operation::combine, operation::reduce, operation::allreduce and operation::reduce_scatter.

Values:

enumerator SUM

Sum all values.

enum class ACCL::networkProtocol

ACCL supported network protocols.

Should match the protocol used in the ACCL kernel.

Values:

enumerator TCP

The TCP protocol.

enumerator UDP

The UDP protocol.

enumerator RDMA

Use RDMA for data transfers; currently unsupported.

enum class ACCL::streamFlags

ACCL stream flags to specify streamed buffers.

Values:

enumerator NO_STREAM

No buffers are streamed.

enumerator OP0_STREAM

The first operand is streamed.

enumerator RES_STREAM

The result is streamed.

enum class ACCL::compressionFlags

ACCL compression flags to specify compression configuration.

Values:

enumerator NO_COMPRESSION

No compression should be used.

enumerator OP0_COMPRESSED

Operand 0 is already compressed.

enumerator OP1_COMPRESSED

Operand 1 is already compressed.

enumerator RES_COMPRESSED

Result should be compressed.

enumerator ETH_COMPRESSED

Ethernet compression should be used.

enum class ACCL::errorCode

ACCL error codes used internally.

Values:

enumerator COLLECTIVE_OP_SUCCESS
enumerator DMA_MISMATCH_ERROR
enumerator DMA_INTERNAL_ERROR
enumerator DMA_DECODE_ERROR
enumerator DMA_SLAVE_ERROR
enumerator DMA_NOT_OKAY_ERROR
enumerator DMA_NOT_END_OF_PACKET_ERROR
enumerator DMA_NOT_EXPECTED_BTT_ERROR
enumerator DMA_TIMEOUT_ERROR
enumerator CONFIG_SWITCH_ERROR
enumerator DEQUEUE_BUFFER_TIMEOUT_ERROR
enumerator DEQUEUE_BUFFER_SPARE_BUFFER_STATUS_ERROR
enumerator RECEIVE_TIMEOUT_ERROR
enumerator DEQUEUE_BUFFER_SPARE_BUFFER_DMATAG_MISMATCH
enumerator DEQUEUE_BUFFER_SPARE_BUFFER_INDEX_ERROR
enumerator COLLECTIVE_NOT_IMPLEMENTED
enumerator RECEIVE_OFFCHIP_SPARE_BUFF_ID_NOT_VALID
enumerator OPEN_PORT_NOT_SUCCEEDED
enumerator OPEN_CON_NOT_SUCCEEDED
enumerator DMA_SIZE_ERROR
enumerator ARITH_ERROR
enumerator PACK_TIMEOUT_STS_ERROR
enumerator PACK_SEQ_NUMBER_ERROR
enumerator COMPRESSION_ERROR
enumerator KRNL_TIMEOUT_STS_ERROR
enumerator KRNL_STS_COUNT_ERROR
enumerator SEGMENTER_EXPECTED_BTT_ERROR
enumerator DMA_TAG_MISMATCH_ERROR

Constants

const unsigned int ACCL::TAG_ANY = 0xFFFFFFFF

Tag any.

const communicatorId ACCL::GLOBAL_COMM = 0x0

Global Communicator.

const arithConfigMap ACCL::DEFAULT_ARITH_CONFIG = {{{dataType::float16, dataType::float16}, ArithConfig(2, 2, 0, 0, 0, false, {4})}, {{dataType::float32, dataType::float16}, ArithConfig(4, 2, 0, 0, 1, true, {4})}, {{dataType::float32, dataType::float32}, ArithConfig(4, 4, 0, 0, 0, false, {0})}, {{dataType::float64, dataType::float64}, ArithConfig(8, 8, 0, 0, 0, false, {1})}, {{dataType::int32, dataType::int32}, ArithConfig(4, 4, 0, 0, 0, false, {2})}, {{dataType::int64, dataType::int64}, ArithConfig(8, 8, 0, 0, 0, false, {3})},}

Default arithmetic configuration definition.

const std::map<dataType, unsigned int> ACCL::dataTypeSize = {{dataType::none, 0}, {dataType::int8, 8}, {dataType::float16, 16}, {dataType::float32, 32}, {dataType::float64, 64}, {dataType::int32, 32}, {dataType::int64, 64}}

Size of the datatypes in bits.

ACCL::Timer

class Timer

Timer object for useful for benchmarking.

Public Functions

inline Timer()

Construct a new Timer object.

inline void start()

Starts the timer.

Resets the timer if it was already started.

inline void end()

End the timer.

Throws an exception if it was already ended or never started.

inline void reset()

Reset the timer.

inline unsigned long elapsed()

Get the elapsed in microseconds time.

Throws an exception if the timer wasn’t ended.

Returns

unsigned long The elapsed time in microseconds.