-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Labels
designRequires some design before changes are madeRequires some design before changes are madetype constraintsPotentially raises a question about how tightly to constrain argument types for a rule. See #232Potentially raises a question about how tightly to constrain argument types for a rule. See #232
Description
Can we safely detect if a primal function is going to hit a specific default and use that to change the logic in the frule or rrule?
For example, the rrule for det(A) calls inv(A). If we know that the primal function that would be hit is the det(A::AbstractMatrix) definition in generic.jl, then we know that the primal is using the lu decomposition to compute the determinant, and we can reuse that to compute the inverse faster. But if a specialized primal method was being hit, then we probably just want to call the primal and invert separately since that primal is probably more efficient for that type than lu.
Metadata
Metadata
Assignees
Labels
designRequires some design before changes are madeRequires some design before changes are madetype constraintsPotentially raises a question about how tightly to constrain argument types for a rule. See #232Potentially raises a question about how tightly to constrain argument types for a rule. See #232