已开启
【UBSE】支持查询产品类型 #1455
fangyuhao创建于 8 天前
【UBSE】支持查询产品类型 #1455
已开启
合并受阻
8 天前 将hlinbo,shw030915,Gao_Victor,qmyyxtl,caowaterman设为审查人
atomgit-bot
8 天前 评论:
8 天前 评论:
变更摘要
该 PR 主要支持在 NPU 设备列表中查询并返回产品类型。服务端在查询/分配设备的响应消息头中新增 1 字节的 product_type 字段:QueryDeviceExecute 通过 ResourceCollection::GetInstance().GetProductType 获取产品类型并传入响应封装流程,PackDevList 与 QueryDeviceRespPack 增加 productType 参数并负责写入该字段,GetProductType 由私有方法调整为公有方法;C 与 Python SDK 侧同步在设备列表结构体中新增 product_type 字段并在解包时读取。
主要改动
- 服务端查询与打包产品类型:
QueryDeviceExecute调用ResourceCollection::GetInstance().GetProductType(productType)获取产品类型;QueryDeviceRespPack、PackDevList增加uint8_t productType参数,由PackDevList通过UbsePackUint8写入响应消息;ubse_npu_resource_collection.h中将GetProductType从私有方法移到公有区域。 - 扩展响应消息头:
HEAD_SIZE由6 * sizeof(uint8_t)调整为sizeof(uint8_t) + 6 * sizeof(uint8_t),即响应消息头新增 1 字节的product_type字段;PackAllocResp调用PackDevList(devList, 0, packUtil),分配响应中该字段填 0。 - C SDK 结构体与解包逻辑:
ubs_engine_npu.h中设备列表结构体新增uint8_t product_type字段(注释标明 0=SERVER、1=POD_16_1825、2=POD_32_1825);libubse_npu_helper.cpp的InnerUbDevListUnpack在解包时先读取deviceList.product_type,失败则返回UBS_ERR_BUFFER_TOO_SMALL。 - Python SDK 模型同步:
ubs_engine_model_npu.py中UbsUbDevicesListT的_fields_新增("product_type", ctypes.c_uint8),与 C 侧结构体保持一致。


atomgit-bot
8 天前 评论:
8 天前 评论:
8 天前 添加了label:sig/sig-UB-ServiceCore
此处折叠了82条消息 查看更多
2 天前 删除了label:ci_processing
openeuler-ci-bot
2 天前 评论:
2 天前 评论:
| Check Name | Build Result | 详情 | Build Details | |
|---|---|---|---|---|
| check_sca | ⚠WARNING | • SCA检查发现未确认的开源组件问题,请查看报告: https://www.openlibing.com/apps/personalScandTaskInfor/person/59ab1081-2a30-49ab-ab34-998f8d92fbce?projectId=300024&codeHostingPlatformFlag=gitcode | #6974 | |
| check_code | ✅SUCCESS | |||
| check_package_license | ⚠WARNING | • 仓库copyright检查未通过: 缺少项目级Copyright声明文件 | ||
| x86_64 | check_build | ✅SUCCESS | #6964 | |
| aarch64 | check_build | ✅SUCCESS | #6972 | |
| pre-commit | check_build | ✅SUCCESS | #6312 | |
| DT | check_build | ✅SUCCESS | #6262 | |
| check_issue_associate | check_build | ✅SUCCESS | #9772 | |


2 天前 添加了label:ci_successful
openeuler-ci-bot
2 天前 评论:
2 天前 评论:
当前PR是否有AI参与:
[x] 否
[ ] 是
__1. AI Agent 平台:
__2. AI 模型:
__3. Prompt上下文 :
参考:openEuler社区《生成式AI工具使用与开源贡献政策》
PR功能描述 / 为什么需要这个合入**:
该PR关联的issue
(格式为fixes #<issue号>, 或者resolves #<issue号>): fixes #
希望检视人员了解: