From 9d0e1814279c9f57e36634f1498fbbe261eb6cac Mon Sep 17 00:00:00 2001 From: Miha Zgubic Date: Wed, 2 Jun 2021 10:15:48 +0100 Subject: [PATCH 1/2] remove references to SpecialFunctions and NaNMath in the docs --- docs/src/FAQ.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/src/FAQ.md b/docs/src/FAQ.md index 81f89661b..f10d73aaa 100644 --- a/docs/src/FAQ.md +++ b/docs/src/FAQ.md @@ -67,7 +67,6 @@ AD systems making use of `frule`s and `rrule`s should load ChainRules.jl. ## Where should I put my rules? We recommend adding custom rules to your own packages with [ChainRulesCore.jl](https://github.com/JuliaDiff/ChainRulesCore.jl), rather than adding them to ChainRules.jl. -A few packages - currently SpecialFunctions.jl and NaNMath.jl - have rules in ChainRules.jl as a short-term measure. ## How do I test my rules? From e353c97216e7af0dfe0e34b2de39008213770c00 Mon Sep 17 00:00:00 2001 From: Miha Zgubic Date: Wed, 2 Jun 2021 11:14:55 +0100 Subject: [PATCH 2/2] Update docs/src/FAQ.md Co-authored-by: Lyndon White --- docs/src/FAQ.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/src/FAQ.md b/docs/src/FAQ.md index f10d73aaa..9c7b096b0 100644 --- a/docs/src/FAQ.md +++ b/docs/src/FAQ.md @@ -66,7 +66,10 @@ AD systems making use of `frule`s and `rrule`s should load ChainRules.jl. ## Where should I put my rules? -We recommend adding custom rules to your own packages with [ChainRulesCore.jl](https://github.com/JuliaDiff/ChainRulesCore.jl), rather than adding them to ChainRules.jl. +We recommend adding custom rules to your own packages with [ChainRulesCore.jl](https://github.com/JuliaDiff/ChainRulesCore.jl). +It is good to have them in the same pacakge that defines the original function. +This avoids type-piracy, and makes it easy to keep in-sync. +ChainRulesCore is a very light weight dependency. ## How do I test my rules?