A class to hold Operation registration information.
More...
#include <mlsl.hpp>
A class to hold Operation registration information.
Holds the information about learnable parameters and activation shapes and is used for creation of an Operation object. All the input/output activation shapes and parameter shapes (if any) should be added before calling Session::AddOperation()
size_t MLSL::OperationRegInfo::AddInput |
( |
size_t |
featureMapCount, |
|
|
size_t |
featureMapSize, |
|
|
DataType |
dataType |
|
) |
| |
Adds an input activation shape to the operation.
- Parameters
-
featureMapCount | the number of feature maps |
featureMapSize | the size of feature maps in MLSL::DataType elements |
dataType | the data type of feature map elements |
- Returns
- The index of the input activation.
size_t MLSL::OperationRegInfo::AddOutput |
( |
size_t |
featureMapCount, |
|
|
size_t |
featureMapSize, |
|
|
DataType |
dataType |
|
) |
| |
Adds an output activation shape to the operation.
- Parameters
-
featureMapCount | the number of feature maps |
featureMapSize | the size of feature maps in MLSL::DataType elements |
dataType | the data type of feature map's elements |
- Returns
- The index of the output activation.
size_t MLSL::OperationRegInfo::AddParameterSet |
( |
size_t |
kernelCount, |
|
|
size_t |
kernelSize, |
|
|
DataType |
dataType, |
|
|
bool |
distributedUpdate = false , |
|
|
CompressionType |
compressType = CT_NONE |
|
) |
| |
Adds a parameter set shape to the operation.
- Parameters
-
kernelCount | the number of kernels |
kernelSize | the size of a single kernel in MLSL::DataType elements |
dataType | the data type of kernel's elements |
distributedUpdate | tells whether to use the distributed update of parameters (ReduceScatter() + AllGather() instead of AllReduce()) |
compressType | the type of compression (Environment::SetQuantizationParams() must be called before AddParameterSet() with quantization enabled) |
- Returns
- The index of the parameter set.
void MLSL::OperationRegInfo::SetName |
( |
const char * |
name | ) |
|
Sets the operation name (for debugging purposes)
- Parameters
-
void MLSL::OperationRegInfo::Validate |
( |
Distribution * |
dist = NULL | ) |
|
Validates the activations/parameter sets information.
- Parameters
-
dist | the distribution (currently not used) |
The documentation for this class was generated from the following file: