Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly loosen a test so that linalg tests pass when using MKL #42315

Merged
merged 1 commit into from
Sep 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stdlib/LinearAlgebra/test/matmul.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ end
for vf in (copy(vvf), view(vvf, 1:3)), C in (copy(CC), view(CC, 1:3, 1:3))
@test mul!(C, vf, transpose(vf)) == vf*vf'
C .= C0 = rand(eltype(C), size(C))
@test mul!(C, vf, transpose(vf), 2, 3) == 2vf*vf' .+ 3C0
@test mul!(C, vf, transpose(vf), 2, 3) 2vf*vf' .+ 3C0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if this was exact equality for a reason, cc @tkf

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The difference is 1e-15 in one of the elements. 3 of these tests fail with MKL.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I simply copied the pattern from mul!(C, vf, transpose(vf)) == vf*vf' just above.

Copy link
Member

@andreasnoack andreasnoack Sep 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the test above, I think the idea is that it should be the exact same code path for the right and left hand side and therefore exact equality. It wasn't obvious to me that this test should take the same path for right and left hand side but wondered if that was your intention. If not then this PR should be fine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sorry, I was sloppy. This change LGTM too.

end
end

Expand Down