JuliaDiff / JuliaDiff/ChainRules.jl
Remove closures for callable types
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 475
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
Because closures are not consistent types, they inhibit precompilation. If the closures used for the adjoints were instead callable types, which would make sure that every session has the same types and thus they should in theory be amenable to precompilation. This would be a huge but non-breaking code churn. I wonder if everyone would be okay with that programming style. It would also help in many cases with inference, because closures are known to cause inference issues. So in general this could improve compile and run time performance quite a bit, but it's a bit nasty.
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
Start by locating the closures used for adjoints and reviewing how their types vary between sessions. Check Julia's precompilation and inference behavior for the current implementation, then assess the scope of replacing those closures with callable types. Done would require agreement on the programming style and evidence of improved compilation or runtime performance without breaking behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- machine-learning
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100