-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ForwardDiff support #17
Conversation
I updated ForwardDiffOverMeasurements to cover more rules. I had problems with ternary rules (muladd, that is used by evalpoly), so I mimicked some internal ForwardDiff macros to allow for more rule coverage |
Good to know! Is the function you use in the tests the one who hit the most undefined rules? Just to know which one to steal |
Not really, but there are just a handful of ternary functions. I really need more tests haha On this specific package, I would recommend taking special care for functions on LogExpFunctions.jl, maybe it need additional rules |
Codecov Report
@@ Coverage Diff @@
## main #17 +/- ##
==========================================
- Coverage 98.68% 97.51% -1.17%
==========================================
Files 1 2 +1
Lines 304 322 +18
==========================================
+ Hits 300 314 +14
- Misses 4 8 +4
|
Cool! We need a compat entry for the weakdep, or it won't register. Could also use PackageExtensionCompat to have this work on earlier Julia versions? |
The tests fail on Julia 1.6 because it doesn't load the extension. So either don't run the test on older Julia or use PackageExtensionCompat? |
I was wondering about that: do you want a Requires-based extension loading or nothing at all on earlier Julia versions? |
Even though I wrote that package, I'm inclined to suggest only using it as an upgrade route for packages already using Requires. We could just document that the ForwardDiff stuff only works on Julia 1.9+. |
Skipped tests on <1.9 and added a mention in the README. The question of how much stuff to overload remains, but maybe this is good to merge for now and if people have issues they will know where to put more methods? |
Yep agreed. Looks good. The Aqua tests are failing on 1.6 because it wants the Project.toml keys to be sorted 🙄, can you fix that please? Still needs a compat entry for ForwardDiff too please. |
We should be good to go |
The Aqua inconsistency is an open issue: |
crap, I had tested it locally though |
Cheers. I'll make a release tomorrow when I'm not on my phone. |
You may also be interested in this package I've been experimenting with: https://github.com/cjdoris/HugeNumbers.jl |
I was already one of your three stars ;) I like basically everything you code in Julia |
Fix #13 by ensuring compatibility with
Dual
numbers in a package extension.For now, method overloads only include:
exp
constructorsThis supersedes the WIP package https://github.com/gdalle/ForwardDiffOverLogarithmicNumbers.jl
Ping @cjdoris for review, and @longemen3000 who suggested making this an extension in https://github.com/gdalle/ForwardDiffOverLogarithmicNumbers.jl/pull/1