-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
LinearAlgebra: improve type-inference in Symmetric/Hermitian matmul #54303
Merged
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
fda8c87
LinearAlgebra: improve type-inference in Symmetric/Hermitian matmul
jishnub 3073352
Add inference tests
jishnub 54a4038
LinearAlgbebra: constant propagate character in generic_matmatmul checks
jishnub 108db04
Remove unused variable
jishnub a2dd315
Use wrapperchar in checks
jishnub 5db39fb
Aggressive constprop annotation in gemm_wrapper
jishnub 7a8bb75
uppercase(::WrapperChar) instead of accessor function
jishnub 1e06a1e
Consistent variable name
jishnub cefa1b1
Constprop in syrk_wrapper/herk_wrapper
jishnub 28d4fd8
Fix typo
jishnub b24cc1e
Update comment
jishnub 9e66d1a
Remove some unnecessary type conversions
jishnub 541a76d
Use all(map(...)) instead of all_in
jishnub 31692d5
WrapperChar Constructor from Char
jishnub 311382b
Preserve case in WrapperChar constructor
jishnub File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use all(map(...)) instead of all_in
- Loading branch information
commit 541a76d6f24e943c98869a73559eedaf11bac9d6
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is true, this should be a giant contribution to the reduction of compile times, right? If we land in this branch, then we don't need to compile symm and hemm, or in the other case syrk/herk/gemm_wrapper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some compile-time improvement indeed, although it's not dramatic.
Each execution is in a separate session in the following:
Descending into
generic_matmatmul!
using Cthulhu does seem to indicate that unused branches are eliminated, and e.g. in the first case, onlygemm_wrapper!
is being compiled, and in the second, onlyBLAS.symm!
is compiled.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
code_typed
for the first case (gemm
) is identical between this PR and nightly:I'm not certain why there's a compile-time improvement here. (perhaps noise?) In this case, the
all
is already being folded (despite the loop over the characters). I suspect the loop is being unrolled entirely, as the characters are allChar
s that are fully known at compile time.The second case (
symm
) is where the major improvement comes in:The
BLAS.symm!
branch that is being followed is "inlined" now. This is the case where the loop is not unrolled ordinarily, but using theall(map(..))
combination permits constant propagation.