Multiplying with identity matrix doesnt give same input matrix. Can anyone explain why?

Hi Junaid!

This is probably the “TF32 bug.” This post has some details:

Do you get the right answer when running on your cpu? What gpu are
you using? Does torch.backends.cuda.matmul.allow_tf32 = False
fix your issue?

As an aside, please don’t post screenshots of textual information. Doing
so breaks accessibility, searchability, and copy-paste.

Best.

K. Frank

1 Like