Skip to content

Test: prune old LA based on ENV variable #1335

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

Merged
merged 12 commits into from
May 11, 2025
Merged

Test: prune old LA based on ENV variable #1335

merged 12 commits into from
May 11, 2025

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented May 4, 2025

This PR prunes the old LinearAlgebra module based on an environment variable that is set in .ci/run_tests.jl. Hopefully, this would mean that tests that are being run without this environment variable would run as expected without precompilation issues.

The goal of this PR is to ensure that when julia is being built with the master branch of LinearAlgebra, the tests would work without the need for pruning (i.e., we want to fix the test failures in JuliaLang/julia#58242).

This would also mean that to run the tests locally, one would need to set the JULIA_PRUNE_OLD_LA environment variable to true.

Copy link

codecov bot commented May 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.73%. Comparing base (c9b6456) to head (34b8d7a).
Report is 15 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1335      +/-   ##
==========================================
- Coverage   93.74%   93.73%   -0.01%     
==========================================
  Files          34       34              
  Lines       15752    15752              
==========================================
- Hits        14766    14765       -1     
- Misses        986      987       +1     

☔ 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 marked this pull request as draft May 4, 2025 10:04
@jishnub jishnub changed the title Prune old LA based on ENV variable Test: prune old LA based on ENV variable May 4, 2025
@jishnub jishnub added the test This change adds or pertains to unit tests label May 4, 2025
@jishnub jishnub requested a review from KristofferC May 4, 2025 15:55
@jishnub jishnub marked this pull request as ready for review May 4, 2025 16:17
@KristofferC
Copy link
Member

I thought about disabling this only when we run on Julia buildkite so that includeing a test file would still work. But I am not sure if there is a good env variable to look at there?

@KristofferC
Copy link
Member

Anyway, at least for now, using an env variable here is better than not I think. But it would be good to perhaps have a blurb in the README of how to test linear algebra locally then?

@jishnub
Copy link
Member Author

jishnub commented May 8, 2025

I think the current state of the PR should resolve the issue. I am able to build julia with the latest commit and run the test files directly.

@jishnub jishnub merged commit 87d4c8b into master May 11, 2025
3 of 4 checks passed
@jishnub jishnub deleted the jishnub/testsprune branch May 11, 2025 16:07
@ViralBShah
Copy link
Member

Should this be backported?

@jishnub
Copy link
Member Author

jishnub commented May 11, 2025

If #1312 is, then this should also be backported

@ViralBShah ViralBShah added the backport 1.12 Change should be backported to release-1.12 label May 11, 2025
@jishnub jishnub mentioned this pull request May 12, 2025
27 tasks
jishnub added a commit that referenced this pull request May 13, 2025
This PR prunes the old `LinearAlgebra` module based on an environment
variable that is set in `.ci/run_tests.jl`. Hopefully, this would mean
that tests that are being run without this environment variable would
run as expected without precompilation issues.

The goal of this PR is to ensure that when julia is being built with the
master branch of `LinearAlgebra`, the tests would work without the need
for pruning (i.e., we want to fix the test failures in
JuliaLang/julia#58242).

This would also mean that to run the tests locally, one would need to
set the `JULIA_PRUNE_OLD_LA` environment variable to `true`.

(cherry picked from commit 87d4c8b)
jishnub added a commit that referenced this pull request May 26, 2025
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 <[email protected]>
Co-authored-by: Jeff Bezanson <[email protected]>
Co-authored-by: Steven G. Johnson <[email protected]>
Co-authored-by: WalterMadelim <[email protected]>
Co-authored-by: Kristoffer Carlsson <[email protected]>
Co-authored-by: Daniel Karrasch <[email protected]>
Co-authored-by: Michael Abbott <[email protected]>
@jishnub jishnub removed the backport 1.12 Change should be backported to release-1.12 label Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test This change adds or pertains to unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants