-
-
Notifications
You must be signed in to change notification settings - Fork 27
Prune LinearAlgebra
module in ambiguity test
#1349
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
Conversation
I don't understand the ambiguities here, but splitting the methods seems to resolve it. julia> Test.detect_ambiguities(LinearAlgebra)
2-element Vector{Tuple{Method, Method}}:
(/(u::Transpose{T, <:AbstractVector} where T, A::AbstractMatrix) @ LinearAlgebra ~/Dropbox/JuliaPackages/LinearAlgebra.jl/src/adjtrans.jl:543, /(B::AbstractMatrix, H::Union{Adjoint{<:Any, <:UpperHessenberg}, Transpose{<:Any, <:UpperHessenberg}, UpperHessenberg}) @ LinearAlgebra ~/Dropbox/JuliaPackages/LinearAlgebra.jl/src/hessenberg.jl:185)
(/(u::Adjoint{T, <:AbstractVector} where T, A::AbstractMatrix) @ LinearAlgebra ~/Dropbox/JuliaPackages/LinearAlgebra.jl/src/adjtrans.jl:542, /(B::AbstractMatrix, H::Union{Adjoint{<:Any, <:UpperHessenberg}, Transpose{<:Any, <:UpperHessenberg}, UpperHessenberg}) @ LinearAlgebra ~/Dropbox/JuliaPackages/LinearAlgebra.jl/src/hessenberg.jl:185) However, the following all work: julia> U = UpperHessenberg(rand(4,4));
julia> (1:4)' / U;
julia> (1:4)' / U';
julia> (1:4)' / transpose(U);
julia> transpose(1:4) / U';
julia> transpose(1:4) / transpose(U);
julia> transpose(1:4) / U; as there are specialized methods for these: LinearAlgebra.jl/src/hessenberg.jl Lines 195 to 201 in 3393398
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1349 +/- ##
=======================================
Coverage 93.74% 93.74%
=======================================
Files 34 34
Lines 15753 15755 +2
=======================================
+ Hits 14768 14770 +2
Misses 985 985 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
848f131
to
376d885
Compare
The ambiguity check was being run in a separate process, but it was not pruning the `LinearAlgebra` module. This was therefore not testing for ambiguities in the latest code, but the one in the sysimg. The PR would be able to replicate the test failure seen in https://buildkite.com/julialang/julia-master/builds/47424#0196c03a-2230-4d64-b404-e04dbfc76c3f (cherry picked from commit 0b46d5c)
…" (#1357) This reverts commit 611395d. Unfortunately, this PR introduced some method ambiguities that weren't caught by the CI, as the ambiguity test was broken. After the fix in #1349, this now causes test failures on master (https://buildkite.com/julialang/linearalgebra-dot-jl/builds/740#0196c86e-2d8c-42c2-b9ae-a2143427f43e). Please re-land the PR after fixing the ambiguities. CC: @araujoms
Backported PRs: - [x] #1209 <!-- Remove `LinearAlgebra` qualifications in `cholesky.jl` --> - [x] #1230 <!-- Avoid materializing `diag` in `Diagonal` `kron` --> - [x] #1240 <!-- Reduce `stable_muladdmul` branches in `generic matvecmul!` --> - [x] #1247 <!-- fix dispatch to herk --> - [x] #1255 <!-- use smaller matrix size in `peakflops` on 32-bit --> - [x] #1310 <!-- Only `@noinline` error path in `matmul_size_check` --> - [x] #1267 <!-- Refine column ranges in `_isbanded_impl` --> - [x] #1320 <!-- Copy matrices in `triu`/`tril` if no zero exists for the `eltype` --> - [x] #1324 <!-- Fix empty `Tridiagonal` broadcast --> - [x] #1327 <!-- `iszero` check in hessenberg setindex --> - [x] #1326 <!-- Fix multiplication with empty `HessenbergQ` --> - [x] #1332 <!-- Unwrap triangular matrices in broadcast --> - [x] #1337 <!-- Change `1:size` to `axes` in bidiag mul --> - [x] #1342 <!-- `Char` uplo in `Bidiagonal` constructor --> - [x] #1344 <!-- Update the docstring of ldiv! --> - [x] #1335 <!-- Test: prune old LA based on ENV variable --> - [x] #1346 <!-- Fix scaling unit triangular matrices --> - [x] #1355 <!-- Add compat notice for `diagview` --> - [x] #1349 <!-- Prune `LinearAlgebra` module in ambiguity test --> Contains multiple commits, manual intervention needed: - [x] #1238 <!-- Ensure positive-definite matrix in lapack posv test --> - [x] #1298 <!-- Add `diagm` example --> - [x] #1312 <!-- WIP: Try use method deletion instead of custom sysimage --> - [x] #1333 <!-- Make `fillstored!` public --> - [x] #1331 <!-- Document SingularException throw for inv(::AbstractMatrix) --> - [x] #1350 <!-- Fix copy for partly initialized unit triangular --> Non-merged PRs with backport label: - [x] #1352 <!-- log for dense diagonal matrix with negative elements --> - [ ] #1305 <!-- Bounds-checking in triangular indexing branches --> --------- Co-authored-by: Mateus Araújo <maltusan@gmail.com> Co-authored-by: Jeff Bezanson <jeff.bezanson@gmail.com> Co-authored-by: Steven G. Johnson <stevenj@alum.mit.edu> Co-authored-by: WalterMadelim <143272683+WalterMadelim@users.noreply.github.com> Co-authored-by: Kristoffer Carlsson <kcarlsson89@gmail.com> Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de> Co-authored-by: Michael Abbott <32575566+mcabbott@users.noreply.github.com>
The ambiguity check was being run in a separate process, but it was not pruning the
LinearAlgebra
module. This was therefore not testing for ambiguities in the latest code, but the one in the sysimg.The PR would be able to replicate the test failure seen in https://buildkite.com/julialang/julia-master/builds/47424#0196c03a-2230-4d64-b404-e04dbfc76c3f