Releases: vgvassilev/clad
Clad version 1.4
Introduction
This document contains the release notes for the automatic differentiation plugin for clang Clad, release 1.4. Clad is built on top of Clang and LLVM compiler infrastructure. Here we describe the status of Clad in some detail, including major improvements from the previous release and new feature work.
Note that if you are reading this file from a git checkout, this document applies to the next release, not the current one.
What's New in Clad 1.4?
Some of the major new features and improvements to Clad are listed here. Generic improvements to Clad as a whole or to its underlying infrastructure are described first.
External Dependencies
- Clad now works with clang-7 to clang-17
Forward Mode & Reverse Mode
- Improve handling of char and string literals
Reverse Mode
- Add support for differentiating switch statements
- Supportpassing pointers as call arguments
- Fix pointer arithmetic for array types
Misc
- Support BUILD_SHARED_LIBS=On
Fixed Bugs
Special Kudos
This release wouldn't have happened without the efforts of our contributors,
listed in the form of Firstname Lastname (#contributions):
FirstName LastName (#commits)
A B (N)
Vassil Vassilev (9)
Vaibhav Thakkar (6)
maximusron (1)
bedupako12mas (1)
Parth (1)
Krishna Narayanan (1)
Aaron Jomy (1)
What's Changed
- Fix for char and string literals as function args by @vaithak in #749
- [cmake] Properly compute the path to gtest. by @vgvassilev in #754
- [cmake] Move away from flat namespaces. by @vgvassilev in #755
- Add support for differentiating switch stmt in the reverse mode AD. by @parth-07 in #339
- [cmake] Clean up flags and treat warnings as errors in the ci. by @vgvassilev in #756
- Fix passing pointers as call arguments by @vaithak in #763
- Fix pointer arithmetic for array types by @vaithak in #764
- [cmake] Make the compilation of gtest parallel by @vgvassilev in #770
- [ci] Schedule the builds with debug clang earlier. by @vgvassilev in #771
- [cmake] Support BUILD_SHARED_LIBS=On flags by @vgvassilev in #775
- [cmake] Kokkos always requires rtti. by @vgvassilev in #776
- Update InstallationAndUsage.rst by @bedupako12mas in #778
- Remove implicit bool conversion check from clang-tidy by @vaithak in #784
- [cmake] Only require git when running benchmarks. by @vgvassilev in #788
- Update docs with dev build and higher order custom derivatives example by @maximusron in #787
- Add support for 32bit CI build by @Krishna-13-cyber in #782
- Add tests supporting higher order custom derivatives by @maximusron in #786
New Contributors
- @bedupako12mas made their first contribution in #778
Full Changelog: v1.3...v1.4
Clad version 1.3
Introduction
This document contains the release notes for the automatic differentiation plugin for clang Clad, release 1.3. Clad is built on top of Clang and LLVM compiler infrastructure. Here we describe the status of Clad in some detail, including major improvements from the previous release and new feature work.
Note that if you are reading this file from a git checkout, this document applies to the next release, not the current one.
What's New in Clad 1.3?
Some of the major new features and improvements to Clad are listed here. Generic improvements to Clad as a whole or to its underlying infrastructure are described first.
External Dependencies
- Clad now works with clang-7 to clang-17
Forward Mode
- Make forward vector mode more robust:
- Implement dedicated clad::matrix class
- Add support for array arguments
- Add support for call expressions
- Add support for the 'non_differentiable' attribute
Reverse Mode
- Fix computation of higher order functions
- Introduce experimental To-Be-Recorded Analysis in Clad
- Improve storing of LHS/RHS in multiplication/division operators
- Add initial support for pointers
- Improve the overall performance by reducing the tape storage
Misc
- Add support for
std::min
,std::max
andstd::clamp
functions - Fix strong symbol definitions in Differentiator.h
Fixed Bugs
49 86 197 275 314 429 439 441 465 606 620 650 655 660 664 667 669 672 676 681 687 689
Special Kudos
This release wouldn't have happened without the efforts of our contributors,
listed in the form of Firstname Lastname (#contributions):
FirstName LastName (#commits)
A B (N)
Vaibhav Thakkar (43)
Vassil Vassilev (26)
Alexander Penev (8)
petro.zarytskyi (6)
dependabot[bot] (4)
Parth (2)
Rishabh Bali (1)
QuillPusher (1)
Krishna-13-cyber (1)
daemondzh (1)
Aaron Jomy (1)
What's Changed
- Check results of CladArray tests by @vaithak in #600
- Fix git-clang-format run when PR not on top of master by @vaithak in #599
- Bump certifi from 2023.5.7 to 2023.7.22 by @dependabot in #603
- Fix LLVM assertion errors for vector mode by @vaithak in #607
- Fixes in github actions for clang-tidy and clang-format by @vaithak in #611
- Add matrix class in clad by @vaithak in #609
- Update readthedocs configuration by @Krishna-13-cyber in #610
- [clang-tidy] Add the tape-push branch in ci build requests by @vgvassilev in #612
- Add support for array arguments in vector mode by @vaithak in #614
- operator overload forward mode by @PhrygianGates in #605
- Fix llvm versions on macos by @alexander-penev in #620
- Fix benchmark comparison in ci by @vaithak in #621
- Fix for benchmark on master by @vaithak in #622
- Rev ref returns by @PhrygianGates in #601
- Add benchmark for comparing vector mode with existing methods by @vaithak in #623
- Fix call expr to functor inside a function by @vaithak in #626
- Add LLVM/Clang 17 support by @alexander-penev in #629
- Fix DifferentiateVarDecl for constructors in reverse mode by @vaithak in #630
- Initial support for expression templates in array and array_ref class by @vaithak in #628
- Add fix for const parameters by @vaithak in #632
- Bump urllib3 from 2.0.3 to 2.0.6 by @dependabot in #633
- Add benchmark for expression templates by @vaithak in #634
- Fix tape push expr for clad array in reverse mode by @vaithak in #640
- Operator overload in reverse mode by @PhrygianGates in #619
- Bump urllib3 from 2.0.6 to 2.0.7 by @dependabot in #643
- Set derivative to 0 for fxn calls with literal arguments by @vaithak in #644
- Fix gradient computation of higher order functions by @vaithak in #645
- Add support for std::min, std::max and std::clamp functions by @vaithak in #647
- Silence magic number warnings in clang-tidy by @vaithak in #649
- Introduce type cloning. by @PetroZarytskyi in #651
- Floating Point Error Estimation RST added by @QuillPusher in #648
- Add check for 'm_' prefix in member vars by @vaithak in #656
- Relax prefix constraint for public members by @vaithak in #661
- Try to fix llvm@14 and llvm@15 install from brew on macOS by @alexander-penev in #660
- Add Build LLVM/Clang from source and cache result when matrix.debug_build == true by @alexander-penev in #662
- Add TBR analysis to the reverse mode in Clad. by @PetroZarytskyi in #655
- Add support for call expressions in vector forward mode AD by @vaithak in #638
- Add more benchmarks for vector mode and unify all the enzyme executions by @vaithak in #670
- Enable enzyme benchmarks only if enzyme is enabled by @vgvassilev in #666
- Add test build of documentation in CI by @alexander-penev in #663
- Fix assertions seen in clang13 due to type mismatches. by @vgvassilev in #664
- Move if-stmt invariant code outside, fix a compiler warning. NFC by @vgvassilev in #672
- [cmake] Propagate the LLVM_VERSION cmake option to the way we find clang by @vgvassilev in #673
- Update our version of enzyme from 0.0.36 to 0.0.95. by @vgvassilev in #674
- [cmake] Rename Clad cmake variables to start with the CLAD prefix by @vgvassilev in #676
- Properly discover the target triple. by @vgvassilev in #677
- Make const loop variables global and drop const. by @PetroZarytskyi in #680
- Add LLVM17 support. by @vgvassilev in #675
- Simplify derivative statements in VisitBinaryOperator by @PetroZarytskyi in #690
- Add initial support for pointers in reverse mode by @vaithak in #686
- Add old, still supported versions in CI matrix by @alexander-penev in #692
- [Docs] Clad Tutorial by @Ris-Bali in #657
- Fix strong symbol definitions in Differentiator.h. Add unittests. by @vgvassilev in #694
- [cmake] Rename AddCladBenchmark as it has generic functions now. by @vgvassilev in #698
- [cmake] Add the CLAD prefix to the CODE_COVERAGE option. by @vgvassilev in #697
- [cmake] Use the compiler clad is built for if compiling benchmarks and tests by @vgvassilev in #702
- Remove the unused last know good release files. by @vgvassilev in #699
- Add test for increment operator in return statement by @vaithak in #707
- Bump jinja2 from 3.1.2 to 3.1.3 by @dependabot in #708
- Fix support for non-type template params by @vaithak in #709
- Add basic test infrastructure for Kokkos. by @vgvassilev in #705
- Moving DerivaitiveBuilder methods from ForwardModeVisitor file b...
Clad version 1.2
Introduction
This document contains the release notes for the automatic differentiation plugin for clang Clad, release 1.2. Clad is built on top of Clang and LLVM compiler infrastructure. Here we describe the status of Clad in some detail, including major improvements from the previous release and new feature work.
Note that if you are reading this file from a git checkout, this document applies to the next release, not the current one.
What's New in Clad 1.2?
Some of the major new features and improvements to Clad are listed here. Generic improvements to Clad as a whole or to its underlying infrastructure are described first.
External Dependencies
- Clad now works with clang-5.0 to clang-16
Forward Mode
- Add experimental support for forward vector mode.
- Improve support of comma expressions.
Reverse Mode
- Add pushforwards for
std::floor
andstd::ceil
.
Misc
- Fill
clad::array
with 0s when assigned an empty brace-init list. - Improve documentation
- Improve AD function interfaces with bitmasked options. For example:
clad::differentiate<<clad::order::first, clad::opts::vector_mode>(f)
will
be equivalent toclad::differentiate<<1, clad::opts::vector_mode>(f)
and
will request the first order derivative off
in forward vector mode.
Fixed Bugs
218 395 521 523 541 566 573 582
Special Kudos
This release wouldn't have happened without the efforts of our contributors,
listed in the form of Firstname Lastname (#contributions):
FirstName LastName (#commits)
Jonas Hahnfeld (27)
Vaibhav Thakkar (18)
Ris-Bali (5)
Garima Singh (3)
Vassil Vassilev (2)
Rishabh Bali (2)
vidushi (1)
petro.zarytskyi (1)
daemondzh (1)
ShounakDas101 (1)
Prajwal S N (1)
PetroZarytskyi (1)
Daemond (1)
Clad version 1.1
Introduction
This document contains the release notes for the automatic differentiation plugin for clang Clad, release 1.1. Clad is built on top of Clang and LLVM compiler infrastructure. Here we describe the status of Clad in some detail, including major improvements from the previous release and new feature work.
Note that if you are reading this file from a git checkout, this document applies to the next release, not the current one.
What's New in Clad 1.1?
Some of the major new features and improvements to Clad are listed here. Generic improvements to Clad as a whole or to its underlying infrastructure are described first.
External Dependencies
- Clad now works with clang-5.0 to clang-15
Forward Mode
- Fix a bug in pow pushforward
Reverse Mode
- Improve for-loop conditions
Error Estimation
- Improvements in error estimation of arrays
- Add error estimation example
Fixed Bugs
Special Kudos
This release wouldn't have happened without the efforts of our contributors,
listed in the form of Firstname Lastname (#contributions):
FirstName LastName (#commits)
Alexander Penev (5)
Vassil Vassilev (3)
vidushi (2)
ioanaif (2)
Vaibhav Thakkar (1)
Parth Arora (1)
Garima Singh (1)
Baidyanath Kundu (1)
Clad version 1.0
Introduction
This document contains the release notes for the automatic differentiation plugin for clang Clad, release 1.0. Clad is built on top of Clang and LLVM compiler infrastructure. Here we describe the status of Clad in some detail, including major improvements from the previous release and new feature work.
Note that if you are reading this file from a git checkout, this document applies to the next release, not the current one.
What's New in Clad 1.0?
Some of the major new features and improvements to Clad are listed here. Generic improvements to Clad as a whole or to its underlying infrastructure are described first.
External Dependencies
- Clad now works with clang-5.0 to clang-14
Forward Mode & Reverse Mode
- Add support for pushforward- and pullback-style functions which allow to accumulate the results from the AD when required to correctly compute derivatives when arguments are passed by reference or pointers
Forward Mode
- Add support for member variables in functors
- Add basic support for virtual functions
- Add support for reference arguments
- Add basic support for AD of class types wrt scalars
- Add support for member functions, pointers, overloaded operators, pointer arithmetic, nullptr, sizeof and pseudo objects,
Reverse Mode
- Add support for
while
anddo-while
statements - Add initial support for AD of user-defined types allowing to differentiate scalar types wrt user-defined types
CUDA
- Add forward mode support for basic CUDA programs. More can be seen here
Error Estimation
- Developed an error estimation framework to perform AD-based error estimation. The new facility is available via the
clad::estimate_error
interface. See more in this demo
Misc
- Developed user documentation available at clad.readthedocs.io
- Developed developers documentation available at doxygen
- Implement a fallback to numerical differentiation if Clad cannot differentiate a given function. To disable this behavior, please compile your programs with the
-DCLAD_NO_NUM_DIFF
. - Add benchmarking infrastructure based on google benchmark
- Add integration with Enzyme via
clad::gradient<clad::opts::use_enzyme>(...)
Fixed Bugs
28 281 353 368 386 387 393 440
Special Kudos
This release wouldn't have happened without the efforts of our contributors, listed in the form of Firstname Lastname (#contributions):
FirstName LastName (#commits)
Parth Arora (65)
Vassil Vassilev (49)
Garima Singh (17)
Baidyanath Kundu (13)
Nirhar (12)
Ioana Ifrim (9)
Alexander Penev (4)
RohitRathore1 (1)
David (1)
Clad version 0.9
Introduction
This document contains the release notes for the automatic differentiation plugin for clang Clad, release 0.9. Clad is built on top of Clang and LLVM compiler infrastructure. Here we describe the status of Clad in some detail, including major improvements from the previous release and new feature work.
Note that if you are reading this file from a git checkout, this document applies to the next release, not the current one.
What's New in Clad 0.9?
Some of the major new features and improvements to Clad are listed here. Generic improvements to Clad as a whole or to its underlying infrastructure are described first.
External Dependencies
- Clad now works with clang-5.0 to clang-13-rc1
Forward Mode & Reverse Mode
- Add support for differentiating functor-like objects.
- Preserve the type qualifiers in the derived function.
- Develop initial support for differentiation of CUDA code.
- Improve the doxygen-style documentation.
Forward Mode
- Add support for differentiating while and do-while statements
- Add switch statement differentiation support.
- Add array differentiation support.
- Allow the user to specify an array index as a independent variable. For instance,
clad::differentiate(f, "p[1]");
.
Reverse Mode
- Extend the array differentiation support. See more in the demo.
Build System
- Add cmake variables to control the locations where find_package discovers LLVM and Clang:
LLVM_CONFIG_EXTRA_PATH_HINTS
andClang_CONFIG_EXTRA_PATH_HINTS
respectively.
Fixed Bugs
- Fix memory leaks in
clad::Tape
. - Fix bug in the
clad::Tape::size()
. - Fix codegen Error for class function differentiation
(139)
Special Kudos
This release wouldn't have happened without the efforts of our contributors,
listed in the form of Firstname Lastname (#contributions):
FirstName LastName (#commits)
- Baidyanath Kundu (21)
- Parth Arora (21)
- Vassil Vassilev (3)
- Garima Singh (3)
- axmat (1)
- Ioana Ifrim (1)
- Alexander Penev (1)
Clad version 0.8
Introduction
This document contains the release notes for the automatic differentiation plugin for clang Clad, release 0.8. Clad is built on top of Clang and LLVM compiler infrastructure. Here we describe the status of Clad in some detail, including major improvements from the previous release and new feature work.
Note that if you are reading this file from a git checkout, this document applies to the next release, not the current one.
What's New in Clad 0.8?
Some of the major new features and improvements to Clad are listed here. Generic improvements to Clad as a whole or to its underlying infrastructure are described first.
External Dependencies
- Clad now works with clang-5.0 to clang-12
Forward Mode & Reverse Mode
- Implement #pragma clad ON/OFF/DEFAULT to control regions where clad is active
- Support member functions with qualifiers in differentiation calls
- Add getCode() interface for interactive use
- Add support for using casts,
*
and&
operators. For example:
clad::differentiate(*&ptr_to_ptr, "...");
Misc
- Add support for clang-11.1.0
- Add support for clang-12
Fixed Bugs
- Fixed several crashes in reverse mode.
Special Kudos
This release wouldn't have happened without the efforts of our contributors,
listed in the form of Firstname Lastname (#contributions):
FirstName LastName (#commits)
- Vassil Vassilev (14)
- Baidyanath Kundu (10)
- Garima Singh (7)
- Alexander Penev (5)
- Pratyush Das (3)
- Parth Arora (2)
- Ioana Ifrim (2)
- Oksana Shadura (1)
- Alex Efremov (1)
Clad version 0.7
Introduction
This document contains the release notes for the automatic differentiation plugin for clang Clad, release 0.7. Clad is built on top of Clang and LLVM compiler infrastructure. Here we describe the status of Clad in some detail, including major improvements from the previous release and new feature work.
Note that if you are reading this file from a git checkout, this document applies to the next release, not the current one.
What's New in Clad 0.7?
Some of the major new features and improvements to Clad are listed here. Generic improvements to Clad as a whole or to its underlying infrastructure are described first.
External Dependencies
- Clad now works with clang-5.0 to clang-10
Forward Mode & Reverse Mode
- Implement hessian matrices via the
clad::jacobian
interface.
Fixed Bugs
- Fixed the discovery of llvm in special builds with clang and libcxx.
Special Kudos
This release wouldn't have happened without the efforts of our contributors, listed in the form of Firstname Lastname (#contributions):
FirstName LastName (#commits)
- Roman Shakhov (3)
- Philippe Canal (2)
- Alexander Penev (2)
- Vassil Vassilev (1)
Clad version 0.6
Introduction
This document contains the release notes for the automatic differentiation plugin for clang Clad, release 0.6. Clad is built on top of Clang and LLVM compiler infrastructure. Here we describe the status of Clad in some detail, including major improvements from the previous release and new feature work.
Note that if you are reading this file from a git checkout, this document applies to the next release, not the current one.
What's New in Clad 0.6?
Some of the major new features and improvements to Clad are listed here. Generic improvements to Clad as a whole or to its underlying infrastructure are described first.
External Dependencies
- Clad now works with clang-5.0, clang-6.0, clang-7.0, clang-8.0 and clang-9.0
Forward Mode & Reverse Mode
- Implement hessian matrices via the
clad::hessian
interface.
Reverse Mode
- Reduce the quadratic cloning complexity to linear.
- Support variable reassignments pontentially depending on control flow.
- Support operators
+=
,-=
,*=
,/=
,,
,++
,--
. - Allow assignments to array subscripts.
- Support nested assignments in expressions
a = b * ((c ? d : e) = f = g);
- Enable differentiation of for-loops
Fixed Bugs
Special Kudos
This release wouldn't have happened without the efforts of our contributors, listed in the form of Firstname Lastname (#contributions):
FirstName LastName (#commits)
- Alexander Penev (19)
- Vassil Vassilev (15)
- Aleksandr Efremov (11)
- Shakhov Roman (2)
- Marco Foco (2)
- Jack Qiu (1)
Clad version 0.5
Introduction
This document contains the release notes for the automatic differentiation plugin for clang Clad, release 0.5. Clad is built on top of Clang and LLVM compiler infrastructure. Here we describe the status of Clad in some detail, including major improvements from the previous release and new feature work.
Note that if you are reading this file from a git checkout, this document applies to the next release, not the current one.
What's New in Clad 0.5?
Some of the major new features and improvements to Clad are listed here. Generic improvements to Clad as a whole or to its underlying infrastructure are described first.
External Dependencies
- clang-5.0
Forward & Reverse Mode
- Extend the way to specify a dependent variables. Consider function,
double f(double x, double y, double z) {...}
,clad::differentiate(f, "z")
is equivalent toclad::differentiate(f, 2)
.clad::gradient(f, "x, y")
differentiates with respect tox
andy
but notz
. The gradient results are stored in a_result
parameter in the same order asx
andy
were specified. Namely, the result ofx
is stored in_result[0]
and the result ofy
in_result[1]
. If we invert the arguments specified in the string toclad::gradient(f, "y, x")
the results will be stored inversely. - Enable recursive differentiation.
- Support single- and multi-dimensional arrays -- works for arrays with constant size like
double A[] = {1, 2, 3};
,double A[3];
ordouble A[1][2][3][4];
Reverse Mode
- Support variable reassignments. For example,
double f(double x, double y) {
double a = x * x;
double b = y * y;
double c = a + b;
return c;
}
Misc
- Add coverity static analyzer to the pull request builds.
- Fix found by coverity issues.
- Improved README.
Fixed Bugs
Special Kudos
This release wouldn't have happened without the efforts of our contributors,
listed in the form of Firstname Lastname (#contributions):
FirstName LastName (#commits):
- Aleksandr Efremov(7)
- Vassil Vassilev (6)
- Oksana Shadura (2)