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

Replace mul! by broadcasting in exp! #54493

Merged
merged 1 commit into from
May 17, 2024
Merged

Conversation

jishnub
Copy link
Contributor

@jishnub jishnub commented May 16, 2024

This reduces TTFX by a bit, by avoiding the *ₛ broadcast and inlining the result instead. This also makes the operation easier to read.
TTFX improvement:

julia> using LinearAlgebra

julia> A = rand(2,2);

julia> @time LinearAlgebra.exp!(A);
  3.536534 seconds (5.32 M allocations: 278.674 MiB, 8.06% gc time, 100.00% compilation time) # master
  3.132689 seconds (4.88 M allocations: 255.420 MiB, 1.93% gc time, 99.99% compilation time) # This PR

@jishnub jishnub added domain:linear algebra Linear algebra compiler:latency Compiler latency labels May 16, 2024
@dkarrasch dkarrasch merged commit 0ef6a30 into master May 17, 2024
6 of 9 checks passed
@dkarrasch dkarrasch deleted the jishnub/expmulbroadcast branch May 17, 2024 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:latency Compiler latency domain:linear algebra Linear algebra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants