-
-
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
Use lispy tuples in cat (fixes #21673) #39314
Merged
Merged
Conversation
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
The `cat` pipeline has long had poor inferrability. Together with #39292 and #39294, this should basically put an end to that problem. Together, at least in simple cases these make the performance of `cat` essentially equivalent to the manual version. In other words, the `test1` and `test2` of #21673 benchmark very similarly.
timholy
force-pushed
the
teh/more_cat_inferrability
branch
from
January 19, 2021 08:57
6eb51e3
to
4be707f
Compare
Thanks for working on this! It appears that 1.6 has regressed substantially compared to 1.5, so hopefully these PRs can be backported. |
Sacha0
reviewed
Jan 19, 2021
__cat(A, shape, catdims, X...) = __cat_offset!(A, shape, catdims, ntuple(zero, length(shape)), X...) | ||
|
||
function __cat_offset!(A, shape, catdims, offsets, x, X...) | ||
# splitting the "work" on x from X... may reduce latency (fewer costly specializations) |
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.
Clever!
JeffBezanson
approved these changes
Jan 19, 2021
JeffBezanson
added
performance
Must go faster
backport 1.6
Change should be backported to release-1.6
labels
Jan 19, 2021
KristofferC
pushed a commit
that referenced
this pull request
Jan 20, 2021
The `cat` pipeline has long had poor inferrability. Together with #39292 and #39294, this should basically put an end to that problem. Together, at least in simple cases these make the performance of `cat` essentially equivalent to the manual version. In other words, the `test1` and `test2` of #21673 benchmark very similarly. (cherry picked from commit 78d55e2)
KristofferC
pushed a commit
that referenced
this pull request
Feb 1, 2021
The `cat` pipeline has long had poor inferrability. Together with #39292 and #39294, this should basically put an end to that problem. Together, at least in simple cases these make the performance of `cat` essentially equivalent to the manual version. In other words, the `test1` and `test2` of #21673 benchmark very similarly. (cherry picked from commit 78d55e2)
ElOceanografo
pushed a commit
to ElOceanografo/julia
that referenced
this pull request
May 4, 2021
The `cat` pipeline has long had poor inferrability. Together with JuliaLang#39292 and JuliaLang#39294, this should basically put an end to that problem. Together, at least in simple cases these make the performance of `cat` essentially equivalent to the manual version. In other words, the `test1` and `test2` of JuliaLang#21673 benchmark very similarly.
antoine-levitt
pushed a commit
to antoine-levitt/julia
that referenced
this pull request
May 9, 2021
The `cat` pipeline has long had poor inferrability. Together with JuliaLang#39292 and JuliaLang#39294, this should basically put an end to that problem. Together, at least in simple cases these make the performance of `cat` essentially equivalent to the manual version. In other words, the `test1` and `test2` of JuliaLang#21673 benchmark very similarly.
staticfloat
pushed a commit
that referenced
this pull request
Dec 23, 2022
The `cat` pipeline has long had poor inferrability. Together with #39292 and #39294, this should basically put an end to that problem. Together, at least in simple cases these make the performance of `cat` essentially equivalent to the manual version. In other words, the `test1` and `test2` of #21673 benchmark very similarly. (cherry picked from commit 78d55e2)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The
cat
pipeline has long had poor inferrability.Together with #39292 and #39294, this should basically put an
end to that problem.
This (which is on top of #39292) gives me the following for the benchmarks in #21673:
which is already a considerable improvement for
test1
(I got 2.448 μs before any of these changes, and 1.746 μs with just #39292).But with this and #39294, I get
That's close to a 100x improvement over where we started, and within 20% of
test2
. I think that's good enough to declare #21673 fixed.