Repository navigation
Run tests with ParallelTestRunner instead of JuliaInterpreter - #848
Conversation
0d8ef1a to
706847f
Compare
There was a problem hiding this comment.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
JuliaFormatter
[JuliaFormatter] reported by reviewdog 🐶
ChainRules.jl/test/testutils.jl
Line 106 in 706847f
[JuliaFormatter] reported by reviewdog 🐶
ChainRules.jl/test/testutils.jl
Line 110 in 706847f
[JuliaFormatter] reported by reviewdog 🐶
ChainRules.jl/test/testutils.jl
Line 140 in 706847f
[JuliaFormatter] reported by reviewdog 🐶
ChainRules.jl/test/testutils.jl
Lines 144 to 148 in 706847f
[JuliaFormatter] reported by reviewdog 🐶
ChainRules.jl/test/testutils.jl
Line 170 in 706847f
[JuliaFormatter] reported by reviewdog 🐶
ChainRules.jl/test/testutils.jl
Line 191 in 706847f
[JuliaFormatter] reported by reviewdog 🐶
ChainRules.jl/test/testutils.jl
Line 205 in 706847f
706847f to
65c6cb8
Compare
Raise the minimum supported Julia version to 1.10 (the current LTS) and drop the version checks that are now always true or always false: - inline the LU/Cholesky pivot aliases now that `RowMaximum`/`NoPivot` always exist - unwrap the fused 3-arg `*` rules and the `\` array workarounds - remove the pre-1.7 `logabsdet(::UmfpackLU)` backport and with it the SuiteSparse dependency - drop the corresponding version gates and `isdefined` guards in tests CI now tests `lts` instead of 1.6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the JuliaInterpreter-based test setup, which interpreted every
top-level `@testset` via an `include` mapexpr hack and a hand-maintained
`compiled_modules` list, with plain compiled tests orchestrated by
ParallelTestRunner.jl. Each test file now runs in its own sandbox module
on a pool of worker processes.
- Every test file loads the packages it uses itself.
- The shared helpers (`Multiplier`, `@gpu`, ...) move into a
`ChainRulesTestHelpers` module in `test/testutils.jl`, which is loaded
once per worker together with the `Adapt` piracy for the mock GPU array.
- `test_method_tables()` moves into `test_helpers.jl`.
- `rulesets/Core/core.jl` is now discovered and run (it was never
included before); its scalar `ifelse` rrule test does not infer
because the pullback's return type depends on the condition's value.
Tests are now selected by path prefix, e.g.
`Pkg.test("ChainRules"; test_args=["rulesets/LinearAlgebra"])`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Format the new `test/testutils.jl` and the lines changed in this branch with JuliaFormatter (BlueStyle). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Process coverage and upload it to Codecov in the CI and nightly workflows, as in ChainRulesCore.jl. This replaces the commented-out Coveralls/Codecov steps in CI and the Coveralls upload in the nightly workflow. Update the README badges: show Codecov coverage, point the CI badge to `main`, and drop the obsolete Travis badge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The `Base.depwarn` frule/rrule tests call `depwarn`, which emitted a deprecation warning into the test output; check it with `@test_deprecated` instead. - The comparisons of 3-arg `*` gradients for γ of a wider type were not wrapped in `@test`, so they were never checked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Cancel superseded runs of the CI, nightly and integration test workflows on pull requests with `concurrency`, as in ChainRulesCore.jl, and remove the `Cancel` workflow that did this with `styfle/cancel-workflow-action`. - Grant `actions: write` (and only `contents: read` otherwise) in the workflows that use `julia-actions/cache`, so it can delete its old caches without relying on the repository's default token permissions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
04f8576 to
2e4cb28
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #848 +/- ##
=======================================
Coverage ? 96.57%
=======================================
Files ? 28
Lines ? 3619
Branches ? 0
=======================================
Hits ? 3495
Misses ? 124
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
FastMath functions assume no NaN or Inf, so these results are undefined. Since LLVM 23 (JuliaLang/julia#63626) they are folded to arbitrary values, which broke the compiled FastMath POWERGRADS tests on nightly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
devmotion
left a comment
There was a problem hiding this comment.
I checked all changes (with whitespace changes hidden). Seems fine to me.
An experiment to replace the JuliaInterpreter-based test setup (from #500) with plain compiled tests run in parallel by ParallelTestRunner.jl.
Commits
juliacompat to 1.10 (the current LTS) and bumps the version to 1.74.0. It removes version checks that are now always true or always false, along with the pre-1.7logabsdet(::UmfpackLU)backport and therefore theSuiteSparsedependency. CI testsltsinstead of 1.6.Multiplier,@gpu, …) move into aChainRulesTestHelpersmodule that is loaded once per worker, together with theAdaptpiracy for the mock GPU array.fastmath_able.jlno longer needs its own@interpretwrapper.test/testutils.jland to the lines changed in this PR.main, and no longer has the Travis badge.*gradients in tests. TheBase.depwarnrule tests now use@test_deprecated, so the deprecation warning no longer shows up in the test output. Three gradient comparisons inarraymath.jlthat were never wrapped in@testare now actually checked.concurrency, as in ChainRulesCore.jl, which replaces theCancelworkflow. CI and nightly grantactions: writeand otherwise onlycontents: read, sojulia-actions/cachecan delete its old caches without relying on the repository's default token permissions.^rules are undefined. Since LLVM 23 (Upgrade to LLVM 23 JuliaLang/julia#63626), they are folded to arbitrary values, which made the now compiled POWERGRADS tests fail on nightly. In the FastMath variant, the tests no longer check expected values that are NaN or Inf.Notes
test/rulesets/Core/core.jlwas never included before. It is discovered and run now. Its scalarifelserrule test neededcheck_inferred=false, because the pullback's return type depends on the value of the condition.Pkg.test("ChainRules"; test_args=["rulesets/LinearAlgebra"]). A leading!excludes tests, and--listlists them.@gpureversetests intest/rulesets/Base/array.jlfail because GPUArrays 12.1.1 was released before the JLArrays version it needs (reverse(::JLArray)errors with GPUArrays 12.1.1 and JLArrays 0.4.2 (JLArrays release missing) JuliaGPU/GPUArrays.jl#817).mainis affected in the same way; Mark JLArray reverse tests broken with JLArrays 0.4.2 and GPUArrays 12.1.1 #849 marks these tests broken until a fixed JLArrays is released.main. The default settings fit the runners: 4 workers on 4 vCPUs, and peak worker RSS of about 2 GB, well below the memory limits.🤖 Generated with Claude Code