13 #define MLSL_MAJOR_VERSION 1
16 #define MLSL_MINOR_VERSION 0
23 #define MLSL_VERSION(major, minor) ((major << 16) | (minor))
29 #define MLSL_MAJOR(version) (version >> 16)
35 #define MLSL_MINOR(version) (version & 0xFFFF)
42 #define MLSL_VERSION_GE(v1, v2) ((MLSL_MAJOR(v1) > MLSL_MAJOR(v2)) || \
43 (MLSL_MAJOR(v1) == MLSL_MAJOR(v2) && MLSL_MINOR(v1) == MLSL_MINOR(v2)) || \
44 (MLSL_MAJOR(v1) == MLSL_MAJOR(v2) && MLSL_MINOR(v1) > MLSL_MINOR(v2)))
51 #define MLSL_VERSION_LT(v1, v2) ((MLSL_MAJOR(v1) < MLSL_MAJOR(v2)) || \
52 (MLSL_MAJOR(v1) == MLSL_MAJOR(v2) && MLSL_MINOR(v1) < MLSL_MINOR(v2)))
55 #define NO_EXPLICIT_CREATION(ClassName) \
60 ClassName(const ClassName&); \
61 ClassName& operator=(const ClassName&); \
417 CommReq*
AlltoAllv(
void* sendBuffer,
size_t* sendCounts,
size_t* sendOffsets,
void* recvBuffer,
size_t* recvCounts,
size_t* recvOffsets,
DataType dataType,
GroupType groupType);
492 void SetName(
const char* name);
501 size_t AddInput(
size_t featureMapCount,
size_t featureMapSize,
DataType dataType);
510 size_t AddOutput(
size_t featureMapCount,
size_t featureMapSize,
DataType dataType);
788 void Configure(
const char* config = NULL);
795 void Init(
int* argc,
char** argv[]);
865 void*
Alloc(
size_t size,
size_t alignment);
871 void Free(
void* ptr);
bool IsDistributedUpdate()
#define NO_EXPLICIT_CREATION(ClassName)
Definition: mlsl.hpp:55
void DeleteDistribution(Distribution *distribution)
Distribution * GetDistribution()
A class to hold information about the parallelism scheme being used.
Definition: mlsl.hpp:335
ParameterSet * GetParameterSet(size_t idx)
size_t AddParameterSet(size_t kernelCount, size_t kernelSize, DataType dataType, bool distributedUpdate=false, CompressionType compressType=CT_NONE)
size_t elem_in_block
Definition: mlsl.hpp:154
A class to measure and store performance statistics of communication among processes that perform com...
Definition: mlsl.hpp:623
CommBlockInfo * GetPackBlock(size_t idx)
unsigned long long GetTotalIsolationCommCycles()
void * WaitGradientComm()
size_t GetLocalKernelCount()
size_t GetOwnedKernelOffset()
void StartComm(void *buf)
unsigned long long GetTotalCommCycles()
void SetPrev(Operation *prev, size_t actIdx, size_t prevOpActIdx)
A struct to hold quantization parameters.
Definition: mlsl.hpp:147
A class to hold block information for activations packing/unpacking.
Definition: mlsl.hpp:162
char * quant_buffer_func_name
Definition: mlsl.hpp:150
Operation * GetOperation(size_t idx)
size_t GetGlobalFmCount()
CommReq * AlltoAll(void *sendBuffer, size_t sendCount, void *recvBuffer, DataType dataType, GroupType groupType)
void Test(CommReq *req, bool *isCompleted)
CommBlockInfo * GetUnpackBlock(size_t idx)
void Barrier(GroupType groupType)
PhaseType
Definition: mlsl.hpp:81
void * TestGradientComm(bool *isCompleted)
char * dequant_buffer_func_name
Definition: mlsl.hpp:151
void DeleteSession(Session *session)
A class to hold Operation registration information.
Definition: mlsl.hpp:482
OpType
Compute operation types.
Definition: mlsl.hpp:121
DataType
Definition: mlsl.hpp:73
char * lib_path
Definition: mlsl.hpp:149
CommReq * Bcast(void *buffer, size_t count, DataType dataType, size_t rootIdx, GroupType groupType)
size_t block_size
Definition: mlsl.hpp:153
size_t GetGlobalMinibatchSize()
Session * CreateSession(PhaseType phaseType=PT_TRAIN)
void StartGradientComm(void *buf)
size_t GetProcessIdx(GroupType groupType)
size_t GetProcessCount(GroupType groupType)
size_t GetUnpackBlockCount()
void * WaitIncrementComm()
A class to represent a collection of Operation objects with the same global mini-batch size...
Definition: mlsl.hpp:703
unsigned long long GetCommCycles(size_t opIdx)
Distribution * CreateDistributionWithColors(int dataColor, int modelColor)
unsigned long long GetIsolationCommCycles(size_t opIdx)
CommReq * AllReduce(void *sendBuffer, void *recvBuffer, size_t count, DataType dataType, ReductionType redType, GroupType groupType)
CommReq * ReduceScatter(void *sendBuffer, void *recvBuffer, size_t recvCount, DataType dataType, ReductionType redType, GroupType groupType)
void SetDistribution(Distribution *dist)
A class to hold information about learnable parameters (parameter sets) and activations corresponding...
Definition: mlsl.hpp:536
size_t GetPackBlockCount()
static Environment & GetEnv()
size_t GetGlobalMinibatchSize()
size_t GetGlobalKernelOffset()
A wrapper class for operation input and output activations.
Definition: mlsl.hpp:195
size_t GetOwnedKernelCount()
size_t GetTotalCommSize()
size_t GetParameterSetCount()
CommReq * AllGather(void *sendBuffer, size_t sendCount, void *recvBuffer, DataType dataType, GroupType groupType)
void SetQuantizationParams(QuantParams *params)
OperationRegInfo * CreateOperationRegInfo(OpType opType)
CommReq * AlltoAllv(void *sendBuffer, size_t *sendCounts, size_t *sendOffsets, void *recvBuffer, size_t *recvCounts, size_t *recvOffsets, DataType dataType, GroupType groupType)
size_t GetGlobalMinibatchOffset()
void Configure(const char *config=NULL)
CommReq * Scatter(void *sendBuffer, void *recvBuffer, size_t recvCount, DataType dataType, size_t rootIdx, GroupType groupType)
CommReq * Gather(void *sendBuffer, size_t sendCount, void *recvBuffer, DataType dataType, size_t rootIdx, GroupType groupType)
CompressionType
Definition: mlsl.hpp:136
Activation * GetOutput(size_t idx)
void * Alloc(size_t size, size_t alignment)
Distribution * CreateDistribution(size_t dataPartitions, size_t modelPartitions)
void SetNext(Operation *next, size_t actIdx, size_t nextOpActIdx)
size_t AddOperation(OperationRegInfo *info, Distribution *dist=NULL)
CommReq * Reduce(void *sendBuffer, void *recvBuffer, size_t count, DataType dataType, ReductionType redType, size_t rootIdx, GroupType groupType)
GroupType
Groups of processes supported by Intel MLSL.
Definition: mlsl.hpp:99
size_t GetGlobalKernelCount()
char * reduce_sum_func_name
Definition: mlsl.hpp:152
size_t GetOperationCount()
A wrapper class for operation parameters.
Definition: mlsl.hpp:261
size_t AddOutput(size_t featureMapCount, size_t featureMapSize, DataType dataType)
unsigned long long GetComputeCycles(size_t opIdx)
void Validate(Distribution *dist=NULL)
Activation * GetInput(size_t idx)
void DeleteOperationRegInfo(OperationRegInfo *info)
A singleton object that holds global Intel MLSL functions.
Definition: mlsl.hpp:771
size_t GetGlobalFmOffset()
ReductionType
Definition: mlsl.hpp:107
size_t GetLocalMinibatchSize()
void Init(int *argc, char **argv[])
void SetName(const char *name)
size_t GetCommSize(size_t opIdx)
size_t AddInput(size_t featureMapCount, size_t featureMapSize, DataType dataType)
void StartIncrementComm(void *buf)
int CommReq
Definition: mlsl.hpp:70
QuantParams * GetQuantizationParams()
unsigned long long GetTotalComputeCycles()
void SetGlobalMinibatchSize(size_t globalMinibatchSize)