Pull Request已成功合入, 合并人@CANN-robot
(感谢 LSYlsy0214 的贡献)Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| rnn | ✅ crystalhu, zhangyuxiang0119 (2/2) | ✅ crystalhu (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)


🔵 source code change are detected, tasks labels is removed in this pull request!


问题/功能描述
本次PR新增了两个独立的C++示例程序,分别用于测试华为CANN算子库中的aclnnBidirectionLSTM和aclnnBidirectionLSTMV2算子。这两个程序旨在为开发者提供标准、完整的API调用参考,展示从设备初始化、张量创建、工作空间计算、算子执行到资源释放的全流程,以验证算子的正确使用方式。
修改方案描述
方案新增了两个完整的C++测试文件。每个文件均实现了对特定双向LSTM算子的调用,核心内容包括:1)封装了ACL设备、流和内存的初始化与释放函数;2)提供了通用的张量创建工具函数,支持从主机数据创建设备侧ACL张量;3)严格按照“两段式”接口规范(先获取工作空间大小,再执行算子)调用目标算子;4)定义了测试所需的网络参数(如时间步、批次大小、隐藏层大小),并创建了所有必需的输入、输出及状态张量;5)实现了结果打印和所有申请资源(设备内存、张量对象)的清理逻辑,确保无内存泄漏。


compile


流水线任务触发成功 [流水线指导]
任务链接 [018ca21e74b345f5abe63fc126e28930]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| anti_virus | ✅ SUCCESS | >>>>> | |
| Check_Pr | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_950 | ✅ SUCCESS | >>>>> | >>>>> |
| API_Check | ✅ SUCCESS | >>>>> | |
| Pre_Compile | ✅ SUCCESS | ||
| pre_comment | ✅ SUCCESS | >>>>> | |
| UT_Test_ophost | ✅ SUCCESS | ||
| UT_Test_opapi | ✅ SUCCESS | ||
| UT_Test_kernel | ✅ SUCCESS | ||
| UT_Test_opgraph | ✅ SUCCESS | ||
| Smoke_A900_npupool | ✅ SUCCESS | >>>>> |
[2026-02-13 10:51:41] CI执行结束


/lgtm


Review Guide
This pull-request passes review.
Committers who wrote a comment of /approve are: crystalhu.
Reviewers who wrote a comment of /lgtm are: crystalhu, zhangyuxiang0119.


描述
bidirection_lstm,bidirection_lstmv2缺少example示例
关联的Issue
https://gitcode.com/cann/ops-nn/issues/1060
测试
文档更新
类型标签