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

Review annotations and test for allocations in generic matmatmul #52298

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

dkarrasch
Copy link
Member

This adds a few comments as to why compiler annotations are helpful, removes seemingly unhelpful annotations and adds tests to make sure we don't allocate. This is open to further suggestions for tests and/or the return of removed annotations for good reasons.

@dkarrasch dkarrasch added the domain:linear algebra Linear algebra label Nov 25, 2023
@dkarrasch
Copy link
Member Author

@jishnub You may wish to review the annotations in the matvecmul case accordingly.

@@ -567,7 +566,7 @@ function gemm_wrapper(tA::AbstractChar, tB::AbstractChar,
end
end

Base.@constprop :aggressive function gemm_wrapper!(C::StridedVecOrMat{T}, tA::AbstractChar, tB::AbstractChar,
function gemm_wrapper!(C::StridedVecOrMat{T}, tA::AbstractChar, tB::AbstractChar,
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 other function calls are behind dynamic branches, so it doesn't seem like constants are propagated through to matmul2x2!, matmul3x3! and _generic_matmatmul!, unless I'm mistaken. At least, it seems that calling gemm_wrapper! with 2x2 arguments, the whole matmul2x2! gets compiled, not only one branch.

@dkarrasch dkarrasch changed the title Revise annotations and test for allocations in generic matmatmul Review annotations and test for allocations in generic matmatmul Nov 27, 2023
@dkarrasch
Copy link
Member Author

@nanosoldier runbenchmarks("linalg", vs=":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - no performance regressions were detected. A full report can be found here.

@dkarrasch dkarrasch merged commit 6a1df3d into master Dec 6, 2023
10 checks passed
@dkarrasch dkarrasch deleted the dk/mulannotations branch December 6, 2023 11:20
dkarrasch added a commit that referenced this pull request Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants