JuliaDiff / JuliaDiff/ChainRulesTestUtils.jl
Tests are slow: use vjvp ?
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 50
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
Compare Zygote's gradtest
julia> @btime gradtest(x -> sum(abs2, x), randn(4, 3, 2))
17.977 μs (236 allocations: 5.86 KiB)
and CRTUs test_rrule
@btime test_rrule(Zygote.ZygoteRuleConfig(), x -> sum(abs2, x), randn(4, 3, 2); rrule_f=rrule_via_ad)
1.490 ms (6884 allocations: 480.10 KiB)
it's nearly 100x slower. Do we understand why? I didn't have time to look into it so just making an issue.
ChainRules tests take a pretty long time to run so this might be worth improving.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file is named. Start by reproducing the @btime comparison between Zygote's gradtest and CRTU's test_rrule using rrule_via_ad, then trace the allocations and timing in the relevant test utilities. Done should include an explanation for the gap and, if practical, a measurable reduction in ChainRules test runtime.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- performance, testing-qa
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100