Skip to content

Should we remove fallback rule? #362

@mzgubic

Description

@mzgubic

ChainRulesCore provides fallback rrules and frules which return nothing. I believe the original use case for this was to make help Cassette with type inference, but Cassette is not being used anymore.

Removing the fallbacks would result in a MethodError being thrown, which is arguably more informative than the current convention of nothing being returned.

Removing the fallback method would require modifying how Zygote decides whether an rrule exists or it should be generated
https://github.com/FluxML/Zygote.jl/blob/7c66eff0a9200b1095f1c94ac6faec9f16b740fe/src/compiler/chainrules.jl#L12-L20

There is ongoing related work to take nothing seriously

Metadata

Metadata

Assignees

No one assigned

    Labels

    designRequires some desgin before changes are made

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions