已关闭
[Requirement|需求建议]: 为 aclnnThnnFusedLstmCell 算子补充 ST 系统测试用例 #5381
Nice try创建于  8月31日关闭于  8月31日
Nice try
Nice try成员
8月31日 创建

Thanks for sending an requirement! Please fill in the following template to help quickly solve your problem.

Backgroud(背景信息)

thnn_fused_lstm_cell 算子(aclnnThnnFusedLstmCell)目前仅有 UT 用例(tests/ut/),缺少 ST 系统测试覆盖。需要为算子补充基于 ATK 框架的 ST 用例与 CPU golden 执行插件,覆盖常规 shape、大 shape、边界场景,验证算子在大规模数据下的正确性。

Origin(信息来源)

由 PR https://gitcode.com/cann/ops-nn/pull/9567 提出并实现。

Benefit / Necessity (价值/作用)

  • 补齐算子 ST 测试覆盖,建立“CPU golden vs NPU 结果”的自动比对能力;
  • 用例覆盖 fp16/fp32 两种输入数据类型,shape 覆盖 batch 0~16777216、hidden_size 4~67108864,含 8 条边界用例(含 0 元素/超大 shape),提升算子在不同数据规模与边界条件下的可靠性验证。

Design(设计方案)

  • 新增 rnn/thnn_fused_lstm_cell/tests/st/aclnnThnnFusedLstmCell/all_aclnnThnnFusedLstmCell.json:定义 208 条用例(id 0~207),每条用例声明输入名称(inputGates/hiddenGates/cx/inputBias/hiddenBias)、数据类型(fp16/fp32)、shape 与取值范围;
  • 新增 executor_aclnnThnnFusedLstmCell.py:注册 ATK API 类型 thnn_fused_lstm_cell_api,实现 CPU golden:gates 门控计算(sigmoid/tanh 激活、storage 拼接)、细胞状态 cy = f_outcx + i_outg_out、隐状态 hy = o_out*tanh(cy),低精度输入转 fp32 计算后回转输出 dtype;
  • NPU 路径使用 atk aclnn 命令,经 pyaclnn 后端按 aclnn_name=ThnnFusedLstmCell 调用两段式 aclnn API(aclnn_api_type=aclnn_function)。

关联 PR:https://gitcode.com/cann/ops-nn/pull/9567

likedislike
Nice tryNice try成员
8月31日 添加了label:requirement
Nice try
Nice try成员
8月31日 评论:

/assign @Nice_try

likedislike
CANN-robotCANN-robot成员
8月31日 将 Nice_try 设为负责人
CANN-robotCANN-robot成员
8月31日 关闭了 issue
CANN-robotCANN-robot成员
8月31日 添加了label:resolved