-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Silent incorrect result for addmm for noncontiguous input #104439
Copy link
Copy link
Closed
Labels
high prioritymodule: correctness (silent)issue that returns an incorrect result silentlyissue that returns an incorrect result silentlymodule: intelSpecific to x86 architectureSpecific to x86 architecturemodule: mkldnnRelated to Intel IDEEP or oneDNN (a.k.a. mkldnn) integrationRelated to Intel IDEEP or oneDNN (a.k.a. mkldnn) integrationtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🐛 Describe the bug
import torch
def f_non_contiguous(x, y, z):
z_t = torch.ops.aten.t.default(z)
return torch.ops.aten.addmm.default(x, y, z_t)
def f_contiguous(x, y, z):
z_t = torch.ops.aten.t_copy.default(z)
return torch.ops.aten.addmm.default(x, y, z_t)
x = torch.randn(256)
y = torch.randn(6, 960)
z = torch.randn(256, 960)
contiguous_result = f_contiguous(x, y, z)
non_contiguous_result = f_non_contiguous(x, y, z)
print(contiguous_result.is_contiguous()) # prints True
print(non_contiguous_result.is_contiguous()) # print True
print(torch.allclose(contiguous_result, non_contiguous_result)) # prints False
print(torch.allclose(contiguous_result.contiguous(), non_contiguous_result.contiguous())) # prints FalseVersions
latest main
cc @ezyang @gchanan @zou3519 @gujinghui @PenghuiCheng @XiaobingSuper @jianyuh @jgong5 @mingfeima @sanchitintel @ashokei @jingxu10 @min-jean-cho @yanbing-j @Guobing-Chen @Xia-Weiwen @frank-wei
Reactions are currently unavailable
Metadata
Metadata
Labels
high prioritymodule: correctness (silent)issue that returns an incorrect result silentlyissue that returns an incorrect result silentlymodule: intelSpecific to x86 architectureSpecific to x86 architecturemodule: mkldnnRelated to Intel IDEEP or oneDNN (a.k.a. mkldnn) integrationRelated to Intel IDEEP or oneDNN (a.k.a. mkldnn) integrationtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Type
Projects
Status
Done