OP_LOGE_FOR_INVALID_SHAPESIZES_WITH_REASON【免费下载链接】opbase本项目是CANN算子库的基础框架库为算子提供公共依赖文件和基础调度能力。项目地址: https://gitcode.com/cann/opbase功能说明记录并上报多个参数形状大小校验错误附带原因说明。当算子的多个参数形状大小不正确时输出ERROR级别日志含具体原因并上报EZ0016错误码。函数原型OP_LOGE_FOR_INVALID_SHAPESIZES_WITH_REASON(entityName, paramNames, incorrectSizes, reason)参数说明参数名输入/输出说明entityName输入算子名称或aclnn接口名称支持const char*或std::string类型。paramNames输入参数名称列表支持const char*或std::string类型。incorrectSizes输入实际形状大小列表支持const char*或std::string类型。reason输入错误原因描述支持const char*或std::string类型。返回值说明无约束说明无调用示例关键代码示例如下仅供参考不支持直接拷贝运行。// 预期输出: Parameters query, key, cos and sin of ApplyRotaryPosEmb have incorrect shape sizes // 0, 0, 0 and 0. Reason: All inputs must be non-empty tensors. if (qSize 0 || kSize 0 || cSize 0 || sSize 0) { std::string sizeMsg std::to_string(qSize) , std::to_string(kSize) , std::to_string(cSize) and std::to_string(sSize); OP_LOGE_FOR_INVALID_SHAPESIZES_WITH_REASON(ApplyRotaryPosEmb, query, key, cos and sin, sizeMsg.c_str(), All inputs must be non-empty tensors.); return ge::GRAPH_FAILED; }【免费下载链接】opbase本项目是CANN算子库的基础框架库为算子提供公共依赖文件和基础调度能力。项目地址: https://gitcode.com/cann/opbase创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
CANN/opbase形状大小校验日志API
发布时间:2026/5/27 10:11:12
OP_LOGE_FOR_INVALID_SHAPESIZES_WITH_REASON【免费下载链接】opbase本项目是CANN算子库的基础框架库为算子提供公共依赖文件和基础调度能力。项目地址: https://gitcode.com/cann/opbase功能说明记录并上报多个参数形状大小校验错误附带原因说明。当算子的多个参数形状大小不正确时输出ERROR级别日志含具体原因并上报EZ0016错误码。函数原型OP_LOGE_FOR_INVALID_SHAPESIZES_WITH_REASON(entityName, paramNames, incorrectSizes, reason)参数说明参数名输入/输出说明entityName输入算子名称或aclnn接口名称支持const char*或std::string类型。paramNames输入参数名称列表支持const char*或std::string类型。incorrectSizes输入实际形状大小列表支持const char*或std::string类型。reason输入错误原因描述支持const char*或std::string类型。返回值说明无约束说明无调用示例关键代码示例如下仅供参考不支持直接拷贝运行。// 预期输出: Parameters query, key, cos and sin of ApplyRotaryPosEmb have incorrect shape sizes // 0, 0, 0 and 0. Reason: All inputs must be non-empty tensors. if (qSize 0 || kSize 0 || cSize 0 || sSize 0) { std::string sizeMsg std::to_string(qSize) , std::to_string(kSize) , std::to_string(cSize) and std::to_string(sSize); OP_LOGE_FOR_INVALID_SHAPESIZES_WITH_REASON(ApplyRotaryPosEmb, query, key, cos and sin, sizeMsg.c_str(), All inputs must be non-empty tensors.); return ge::GRAPH_FAILED; }【免费下载链接】opbase本项目是CANN算子库的基础框架库为算子提供公共依赖文件和基础调度能力。项目地址: https://gitcode.com/cann/opbase创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考