ChainRulesTestUtils.jl
ChainRulesTestUtils.jl copied to clipboard
Make replace boolean `check_inferred` with something that allows configuable small unions
occured to me during https://github.com/JuliaDiff/ChainRules.jl/pull/717 that there are like 3 states we really care about:
- Doesn't infer at all, so infers to
Anyor someUnionAllor abstract type - Infers down to a small union of <4 types, so the small union optimization kicks in
- Infers down to a single concrete type
The current check_inferred boolean doesn't allow us to distinguish case 1 from case 2.