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

Use dot and views in QR code #38973

Merged
merged 4 commits into from
Apr 3, 2021
Merged

Conversation

haampie
Copy link
Contributor

@haampie haampie commented Dec 23, 2020

The QR-code is quite ancient, and was written without using other linalg routines because views were expensive then. I'd like LinearAlgebra to use dot and norm and such, because they are likely optimized for special number types.

stdlib/LinearAlgebra/src/generic.jl Outdated Show resolved Hide resolved
end
end
@inbounds for j = 1:n
Aj, xj = view(A, 2:m, j), view(x, 2:m)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would split this into two lines (but that's personal preference)

stdlib/LinearAlgebra/src/generic.jl Show resolved Hide resolved
@haampie
Copy link
Contributor Author

haampie commented Dec 23, 2020

What's also weird is that many function signatures for QR require StridedMatrices (e.g. reflectorApply!, qr!). I don't really see that being exploited anywhere. Should I drop it? For instance StructArray types are not QR'able.

@haampie
Copy link
Contributor Author

haampie commented Dec 24, 2020

Great, could have anticipated this would lead to even more * and mul! ambiguity issues

@haampie
Copy link
Contributor Author

haampie commented Jan 14, 2021

Should this be merged?

@oscardssmith
Copy link
Member

The pr like good to me. That said, we might want to run nanosoldier to check for regressions first.

@dkarrasch
Copy link
Member

@nanosoldier runbenchmarks(ALL, vs=":master")

I don't know how to run more specific benchmarks, like "linalg" & "array" & "sparse". Any hint would be appreciated.

@KristofferC
Copy link
Sponsor Member

See https://github.com/JuliaCI/Nanosoldier.jl#comment-examples

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @christopher-dG

@dkarrasch
Copy link
Member

Hm, after all I'm not sure we have benchmark tests for each and every factorization etc. To get a quick impression, targeted benchmarks may be more illuminating.

@dkarrasch
Copy link
Member

Is there a not too difficult way to test the new AbstractMatrix capabilities? Otherwise I suggest to merge this.

@vtjnash vtjnash merged commit 78d3ff4 into JuliaLang:master Apr 3, 2021
ElOceanografo pushed a commit to ElOceanografo/julia that referenced this pull request May 4, 2021
The QR-code is quite ancient, and was written without using other linalg routines because views were expensive then. This lets LinearAlgebra to use dot and norm and such, which are likely optimized for special number types.
antoine-levitt pushed a commit to antoine-levitt/julia that referenced this pull request May 9, 2021
The QR-code is quite ancient, and was written without using other linalg routines because views were expensive then. This lets LinearAlgebra to use dot and norm and such, which are likely optimized for special number types.
johanmon pushed a commit to johanmon/julia that referenced this pull request Jul 5, 2021
The QR-code is quite ancient, and was written without using other linalg routines because views were expensive then. This lets LinearAlgebra to use dot and norm and such, which are likely optimized for special number types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:linear algebra Linear algebra performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants