OP_LOGE_FOR_INVALID_STRIDE
Description
Records and reports a parameter stride error. If the specified parameter stride of an operator is not as expected, an error log is generated and the error code EZ0028 is reported.
Prototype
OP_LOGE_FOR_INVALID_STRIDE(entityName, paramName, incorrectStride, correctStride)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
entityName |
Input |
Operator name or aclnn API name. The type can be const char* or std::string. |
paramName |
Input |
Parameter name. The type can be const char* or std::string. |
incorrectStride |
Input |
Actual stride, in the format of [1,1,1,1]. The type can be const char* or std::string. |
correctStride |
Input |
Expected stride, in the format of [1,1,1,1]. The type can be const char* or std::string. |
Return Value
None.
Constraints
None.
Example
The following sample code is for reference only. Do not copy and run it.
1 2 3 4 | if (!CheckStrideValid(inputStride, expectedStride)) { OP_LOGE_FOR_INVALID_STRIDE("MyOp", "x", StrideToStr(inputStride).c_str(), "[1,1,1,1]"); return ge::GRAPH_FAILED; } |
Parent topic: log