OP_LOGE_WITH_INVALID_ATTR_SIZE
Note: This API has been deprecated. Use OP_LOGE_FOR_INVALID_LISTSIZE instead.
Description
Records and reports an operator attribute size error. If the specified attribute size of an operator is not as expected, an error log is generated and the error code EZ0003 is reported.
Prototype
OP_LOGE_WITH_INVALID_ATTR_SIZE(entityName, attrName, incorrectSize, correctSize)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
entityName |
Input |
Operator name or aclnn API name. The type can be const char* or std::string. |
attrName |
Input |
Attribute name. The type can be const char* or std::string. |
incorrectSize |
Input |
Actual attribute size. The type can be const char* or std::string. |
correctSize |
Input |
Expected attribute size. 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 5 | // Expected output: Attribute strides of MyOp has incorrect size 3. It should be 4. if (strides.size() != 4) { OP_LOGE_WITH_INVALID_ATTR_SIZE("MyOp", "strides", std::to_string(strides.size()), "4"); return false; } |
Parent topic: log