CloneOperationParam
Description
Copies the Param parameter of Operation to the second input parameter.
Definition
1 | Status CloneOperationParam(const Operation *operation, OpParam &opParam); |
Parameters
Parameter |
Description |
|---|---|
operation |
Operation pointer. |
opParam |
Reference to opParam, which is a shallow copy of the returned opParam. |
Returns
Type |
Input/Output |
Description |
|---|---|---|
Status |
Output |
Status value. NO_ERROR is returned on success. |
Restrictions
EventOperation and the parameters in atb/train_op_params.h are supported.
Example
- Create an Operation.
1 2 3 4 5
train::FastSoftMaxParam param; param.headNum = 3; param.qSeqLen = { 10, 20, 30 }; atb::Operation *op = nullptr; atb::Status st = atb::CreateOperation(param, &op);
- Obtain the parameters of the current Operation.
1 2
train::FastSoftMaxParam cloneParam; st = atb::CloneOperationParam(op, cloneParam);
Parent topic: atb/operation.h