已关闭
[Bug-Report|缺陷反馈]: RadixTopK未预留Ascend C API所需workspace导致精度问题 #3007
huang-wei-chen创建于  20 天前关闭于  19 天前
huang-wei-chen成员
20 天前 创建

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

一、问题描述 (必填)

image.png

二、环境信息 (可选)

910B,910_93

三、重现步骤 (可选)

import torch, torch_npu
x = torch.randn(2, 1210809681, dtype=torch.float16, device="npu:0")
K = 537222
Dim = -1
value_golden, index_golden = torch.topk(x.cpu(), dim=Dim, k=K, sorted=True, largest=True)
value, index = torch.topk(x, dim=Dim, k=K, sorted=True, largest=True)
print(f"isequal npu-cpu={torch.equal(value.cpu(), velue_golden.cpu())}")

四、预期结果 (可选)

预期精度正确

💡 备注(选填)

likedislike
Hhuang-wei-chen成员
20 天前 添加了label:bug-report
Hhuang-wei-chen成员
20 天前 将 huang-wei-chen 设为负责人
CANN-robotCANN-robot成员
19 天前 关闭了 issue
CANN-robotCANN-robot成员
19 天前 添加了label:resolved