Skip to content

Remove FillArrays dependency by implementing custom OneElement#453

Merged
gdalle merged 3 commits intomainfrom
gd/oneelement
Sep 6, 2024
Merged

Remove FillArrays dependency by implementing custom OneElement#453
gdalle merged 3 commits intomainfrom
gd/oneelement

Conversation

@gdalle
Copy link
Copy Markdown
Member

@gdalle gdalle commented Sep 6, 2024

DI source

  • Implement custom OneElement
  • Use it in basis and multibasis instead of the FillArrays version
  • Replace some instances of CartesianIndices with eachindex, which may be faster. Note that CartesianIndices is kept for wrong-mode pushforwards and pullbacks.

DI tests

  • Add tests for OneElement and basis
  • Remove useless @testset for scenario intactness

DI extensions

  • ReverseDiff: Adapt custom basis

Load time before:

julia> @time_imports using DifferentiationInterface
      2.7 ms  ADTypes
      0.6 ms  Compat
      0.2 ms  Compat  CompatLinearAlgebraExt
     46.4 ms  FillArrays
      0.2 ms  PackageExtensionCompat
               ┌ 0.0 ms DifferentiationInterface.__init__() 
     31.1 ms  DifferentiationInterface 88.34% compilation time

Load time after:

julia> @time_imports using DifferentiationInterface
      2.3 ms  ADTypes
      0.5 ms  Compat
      0.1 ms  Compat  CompatLinearAlgebraExt
      0.1 ms  PackageExtensionCompat
               ┌ 0.0 ms DifferentiationInterface.__init__() 
     27.2 ms  DifferentiationInterface 87.79% compilation time

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.53%. Comparing base (e89793f) to head (990b637).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #453   +/-   ##
=======================================
  Coverage   98.52%   98.53%           
=======================================
  Files         107      107           
  Lines        4271     4287   +16     
=======================================
+ Hits         4208     4224   +16     
  Misses         63       63           
Flag Coverage Δ
DI 98.68% <100.00%> (+<0.01%) ⬆️
DIT 98.21% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gdalle gdalle changed the title Remove FillArrays dep by implementing custom OneElement Remove FillArrays dependency by implementing custom OneElement Sep 6, 2024
@gdalle gdalle marked this pull request as ready for review September 6, 2024 21:38
@gdalle gdalle merged commit b2dcdef into main Sep 6, 2024
@gdalle gdalle deleted the gd/oneelement branch September 6, 2024 22:10
@gdalle gdalle mentioned this pull request Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants