Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
addmm和baddbmm接口支持支持混合精度计算输入,当前16in32out场景拦截了bias和out tensor dtype不一致的场景
910b / 910_95
使用torch.baddbmm接口,输入参数左右矩阵dtype为fp16,bias为bf16,out为fp32,out_dtype 指定为torch.float32
接口正常执行返回结果
[W701 06:55:22.074435760 NPuCachingAllocator.cpp:200] Warning: The current CANN and Soc versions require processing for 32 padding size, with memory allocation. (function operator())Traceback (most recent call last): File "/home/h00918682/test_script/outDtypeTest_baddbmm.py", line 12, in npu_out = (torch.baddbmm(input_tensor, a, b, out_dtype=torch.float32)) RuntimeError: baddbmm:third_party/op-plugin/op_plugin/ops/opapi/BaddbmmKernelNpu0pApi.cpp:66 NPu function error: call aclnnBaddbmm failed, error code is 161002 [ERR0R] 2026-07-01-06:55:22 (PID:1039285, Device:0, RankID:-1) ERR00100 PTA call acl api failed.
Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
Describe the current behavior / 问题描述 (Mandatory / 必填)
addmm和baddbmm接口支持支持混合精度计算输入,当前16in32out场景拦截了bias和out tensor dtype不一致的场景
Environment / 环境信息 (Mandatory / 必填)
910b / 910_95
Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
使用torch.baddbmm接口,输入参数左右矩阵dtype为fp16,bias为bf16,out为fp32,out_dtype 指定为torch.float32
Describe the expected behavior / 预期结果 (Mandatory / 必填)
接口正常执行返回结果
Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
[W701 06:55:22.074435760 NPuCachingAllocator.cpp:200] Warning: The current CANN and Soc versions require processing for 32 padding size, with memory allocation. (function operator())Traceback (most recent call last):npu_out = (torch.baddbmm(input_tensor, a, b, out_dtype=torch.float32))
File "/home/h00918682/test_script/outDtypeTest_baddbmm.py", line 12, in
RuntimeError: baddbmm:third_party/op-plugin/op_plugin/ops/opapi/BaddbmmKernelNpu0pApi.cpp:66 NPu function error: call aclnnBaddbmm failed, error code is 161002
[ERR0R] 2026-07-01-06:55:22 (PID:1039285, Device:0, RankID:-1) ERR00100 PTA call acl api failed.
Special notes for this issue/备注 (Optional / 选填)