Skip to content

Reduce number of test combinations in test/triangular.jl #1123

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 1 commit into from
Nov 29, 2024

Conversation

andreasnoack
Copy link
Member

Currently, we are most likely testing more cases of mixed element types than needed. See #1117. This PR reduces the mixed cases to (Int, Float32) and (Float32, Int) to get an idea how much of a difference it makes for the CI time.

@andreasnoack
Copy link
Member Author

@KristofferC Btw. I wanted to run some timings locally on my mac but the system image build hadn't finished after two hours so I interrupted it. Any idea why it would take so long? I used current release of Julia and the latest version of PackageCompiler

@KristofferC
Copy link
Member

KristofferC commented Nov 27, 2024

Possibly related to JuliaLang/PackageCompiler.jl#990. So make sure that is not set.

@andreasnoack andreasnoack changed the base branch from master to andreasnoack-patch-1 November 28, 2024 07:51
@andreasnoack andreasnoack reopened this Nov 28, 2024
@andreasnoack
Copy link
Member Author

andreasnoack commented Nov 28, 2024

Thanks. Indeed that was the issue. Now I can build a new system image but I'm hitting

julia> S = SizedArrays.SizedArray{(3,3)}(reshape(1:9,3,3))
3×3 Main.SizedArrays.SizedArray{(3, 3), Int64, 2, Base.ReshapedArray{Int64, 2, UnitRange{Int64}, Tuple{}}} with indices SOneTo(3)×SOneTo(3):
 1  4  7
 2  5  8
 3  6  9

julia> convert(AbstractMatrix{Float64}, S)
ERROR: MethodError: no method matching similar(::Main.SizedArrays.SizedArray{…}, ::Type{…}, ::Tuple{…})
The function `similar` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  similar(::Base.Broadcast.Broadcasted{Base.Broadcast.ArrayConflict}, ::Type{ElType}, ::Any) where ElType
   @ Base broadcast.jl:229
  similar(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{N}}, ::Type{ElType}, ::Any) where {N, ElType}
   @ Base broadcast.jl:224
  similar(::AbstractArray, ::Type{T}, ::NTuple{N, Int64}) where {T, N}
   @ Base abstractarray.jl:833

when running with Julia 1.11. Is that known and the reason why you set up testing with 1.10 in this repo (was confused by this)?

Update: can see that this is not an issue on nightly.

@KristofferC
Copy link
Member

This PR is against the one with O0. Is that intended?

@KristofferC KristofferC changed the base branch from andreasnoack-patch-1 to master November 28, 2024 12:23
@KristofferC
Copy link
Member

I updated this to only have the eltype change so we can see the effect.

@andreasnoack
Copy link
Member Author

andreasnoack commented Nov 28, 2024

I started with the run. It's here https://buildkite.com/julialang/linearalgebra-dot-jl/builds/45#01936fb4-b7f2-44f7-bc1e-dd6696b8fcce and then moved the target to see the combined effect which is https://buildkite.com/julialang/linearalgebra-dot-jl/builds/46#019371c1-e511-480a-b72c-150fee510177. It looks like the -O0 benefits almost all, if not all, the test groups so I think we should move forward with both of these changes.

@KristofferC
Copy link
Member

So with only this change, it takes 24 minutes. The combined change seems to have taken 23 minutes, or?

@andreasnoack
Copy link
Member Author

andreasnoack commented Nov 28, 2024

The actual tests are about five minutes faster. With just this PR, it is

Test Summary:  Pass  Broken   Total      Time
--
Overall      130954      63  131017  16m58.6s

and when adding the -O0 PR, it is

Test Summary:                        Pass  Fail  Broken   Total      Time
--
Overall                            135342     4      63  135409  11m39.0s

(not sure why the test total is different). I guess the total times don't show the same difference because of more compile time. Could that be because the system image is generated with a different optimization setting? It's not clear to me where the extra time is spent.

@andreasnoack andreasnoack changed the base branch from master to andreasnoack-patch-1 November 28, 2024 20:27
@andreasnoack andreasnoack changed the base branch from andreasnoack-patch-1 to master November 28, 2024 21:25
@andreasnoack
Copy link
Member Author

Tried another run against #1118 to see if it was just a single slow run but the second run was pretty similar to the first. The actual tests run ~5 minutes faster but something else is taking some time so the total difference is only 1-2 minutes.

I've moved the target back to master and will rebase shortly. Then we can move forward with this one and consider #1118 separately.

@andreasnoack andreasnoack force-pushed the an/triangular branch 2 times, most recently from ed525b0 to 2ec774f Compare November 28, 2024 21:31
@KristofferC
Copy link
Member

Sounds good!

@andreasnoack andreasnoack marked this pull request as ready for review November 29, 2024 10:43
@KristofferC KristofferC merged commit aecb714 into master Nov 29, 2024
2 checks passed
@KristofferC KristofferC deleted the an/triangular branch November 29, 2024 13:15
KristofferC pushed a commit that referenced this pull request Dec 2, 2024
KristofferC pushed a commit that referenced this pull request Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants