Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
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())}")
预期精度正确
💡 备注(选填)
Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
一、问题描述 (必填)
二、环境信息 (可选)
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())}")四、预期结果 (可选)
预期精度正确
💡 备注(选填)