JuliaDiff / TaylorDiff.jl

Taylor-mode automatic differentiation for higher-order derivatives
https://juliadiff.org/TaylorDiff.jl/
MIT License
73 stars 8 forks source link

Reinterpret `Vector` of `TaylorScalar`s as `Matrix` #39

Closed YichengDWu closed 1 year ago

YichengDWu commented 1 year ago

By reinterpreting Vector of TaylorScalars as Matrix we can take advantage of matrix multiplication.

Also relax the type annotation so that we can use TaylorDiff on gpu.

YichengDWu commented 1 year ago

The test failure does not look related to this PR.

tansongchen commented 1 year ago

Hi Yicheng, sorry for the late reply. Yes, it is definitely reasonable to relax the restrictions on types of x and l. The test failure is due to a mismatch of Julia version (1.8 on buildkite, 1.9 on my local develop env). I just fixed this. Could you rebase to the latest commit of main branch, update this PR and let the CIs run again?

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.48% :warning:

Comparison is base (45d95b6) 86.30% compared to head (bd895e6) 85.83%.

:exclamation: Current head bd895e6 differs from pull request most recent head 1193331. Consider uploading reports for the commit 1193331 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #39 +/- ## ========================================== - Coverage 86.30% 85.83% -0.48% ========================================== Files 6 6 Lines 241 240 -1 ========================================== - Hits 208 206 -2 - Misses 33 34 +1 ``` | [Files Changed](https://app.codecov.io/gh/JuliaDiff/TaylorDiff.jl/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff) | Coverage Δ | | |---|---|---| | [src/chainrules.jl](https://app.codecov.io/gh/JuliaDiff/TaylorDiff.jl/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff#diff-c3JjL2NoYWlucnVsZXMuamw=) | `70.14% <100.00%> (-2.16%)` | :arrow_down: | | [src/derivative.jl](https://app.codecov.io/gh/JuliaDiff/TaylorDiff.jl/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff#diff-c3JjL2Rlcml2YXRpdmUuamw=) | `100.00% <100.00%> (ø)` | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/JuliaDiff/TaylorDiff.jl/pull/39/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tansongchen commented 1 year ago

There were some conflicts, just fixed by squashing and merged.