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

Inline generic_matmatmul! branch in strided triangular matmul #1262

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Apr 4, 2025

For combinations of strided matrices and strided triangular matrices, we would end up taking the methods defined in LinearAlgebra, so we may avoid the constant-propagation and hardcode the _generic_matmatmul! call. This improves TTFX, as the no-op but expensive-to-compile wrap call is elided.

julia> using LinearAlgebra

julia> A = zeros(4,4);

julia> @time A * UpperTriangular(A);
  0.458913 seconds (1.22 M allocations: 59.769 MiB, 51.63% gc time, 97.84% compilation time: 4% of which was recompilation) # master
  0.077198 seconds (174.52 k allocations: 8.683 MiB, 92.75% compilation time) # this PR

Copy link

codecov bot commented Apr 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.00%. Comparing base (0a253be) to head (331d7e2).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1262   +/-   ##
=======================================
  Coverage   92.00%   92.00%           
=======================================
  Files          34       34           
  Lines       15483    15485    +2     
=======================================
+ Hits        14245    14247    +2     
  Misses       1238     1238           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jishnub jishnub added the ttfx The change pertains to first-call latency label Apr 5, 2025
@jishnub jishnub force-pushed the jishnub/trimatmul_generic branch from 53586e2 to 331d7e2 Compare April 7, 2025 13:52
@jishnub jishnub requested a review from ViralBShah April 7, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ttfx The change pertains to first-call latency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant