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

LAPACK: annotate size check in lacpy! with @noinline for reduced latency #55029

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

jishnub
Copy link
Contributor

@jishnub jishnub commented Jul 4, 2024

The @noinline annotation on the size check appears to reduce latency in a second call with different argument types:

julia> using LinearAlgebra

julia> A = rand(2,2); B = similar(A);

julia> @time LAPACK.lacpy!(B, A, 'U');
  0.032585 seconds (29.80 k allocations: 1.469 MiB, 99.84% compilation time)

julia> A = rand(Float32,2,2); B = similar(A);

julia> @time LAPACK.lacpy!(B, A, 'U');
  0.026698 seconds (22.80 k allocations: 1.113 MiB, 99.84% compilation time) # v"1.12.0-DEV.810"
  0.024715 seconds (19.88 k allocations: 987.000 KiB, 99.80% compilation time) # Without noinline
  0.017084 seconds (18.52 k allocations: 903.828 KiB, 99.72% compilation time) # This PR (with noinline)

@jishnub jishnub added linear algebra Linear algebra compiler:latency Compiler latency labels Jul 4, 2024
@jishnub jishnub changed the title LAPACK: split lacpy error path for reduced latency LAPACK: annotate size check in lacpy! with @noinline for reduced latency Jul 4, 2024
@jishnub jishnub merged commit 59f08df into master Jul 5, 2024
7 of 10 checks passed
@jishnub jishnub deleted the jishnub/lacpy branch July 5, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:latency Compiler latency linear algebra Linear algebra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants