Releases: vgvassilev/clad
Clad version 1.8
Introduction
This document contains the release notes for the automatic differentiation plugin for clang Clad, release 1.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 1.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 works with clang-8 to clang-18.
Forward Mode & Reverse Mode
- Support
std::array
,std::vector
.
Forward Mode
- Support
std::tie
,std::atan2
andstd::acos
.
Reverse Mode
- Support
std::initializer_list
andsizeof
. - Support pointer-valued functions.
- Support range-based for loops.
CUDA
- Add support of CUDA device pullbacks.
- Enable computation of CUDA global kernels derivative.
Misc
- Enable immediate evaluation mode (
consteval
andconstexpr
) with a new clad modeclad::immediate_mode
. - Make
clad::CladFunction
andclad::array_ref
constexpr. - Support operators defined outside of classes.
- Add Varied analysis to the reverse mode.
- Add support for
Kokkos::View
,Kokkos::deep_copy
, Kokkos::resizeand
parallel_for` in reverse mode. - Add support for
Kokkos::parallel_for
,Kokkos::fence
,Kokkos::View
and
Kokkos::parallel_reduce
in forward mode.
Fixed Bugs
472 480 527 682 684 830 855 1000 1019 1033 1049 1057 1070 1071 1081 1087 1151 1162
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)
petro.zarytskyi (30)
Vassil Vassilev (22)
Atell Krasnopolski (22)
Christina Koutsou (17)
Mihail Mihov (12)
ovdiiuv (7)
kchristin (6)
Vipul Cariappa (3)
Alexander Penev (3)
mcbarton (1)
infinite-void-16 (1)
fsfod (1)
Vaibhav Thakkar (1)
Max Andriychuk (1)
Infinite Void (1)
Austeja (1)
What's Changed
- Product of references in different scope fix by @ovdiiuv in #1030
- Redesign of the rangebased for loops body by @ovdiiuv in #1034
- Desugar the type before analyzing it in TBR by @PetroZarytskyi in #1046
- Add support of custom
_forw
functions by @infinite-void-16 in #1037 - Update FileCheck test lines for number literals and types generated on windows by @fsfod in #1042
- Support pointer-valued functions in the reverse mode by @PetroZarytskyi in #1047
- Add support for
Kokkos::parallel_for
in the fwd mode by @gojakuch in #1022 - Add support for std::initializer_list in the reverse mode by @PetroZarytskyi in #1018
- Add support for
Kokkos::fence
in the fwd mode by @gojakuch in #1048 - Fix collectDataFromPredecessors to collect data from the passed branch by @ovdiiuv in #1051
- Add a test for a call expr with a bool literal by @PetroZarytskyi in #1055
- Introduce placeholders in the reverse mode to correctly handle multiplication by @PetroZarytskyi in #1039
- Fix braceless if differentiation in reverse mode by @ovdiiuv in #1058
- Provide pushforward methods for
Kokkos::View
indexing by @gojakuch in #1061 - Add support for
Kokkos::parallel_reduce
in the fwd mode by @gojakuch in #1056 - Make the signatures of
KokkosBuiltins.h
more general by @gojakuch in #1063 - Add primitive support of reverse-mode constructor custom derivatives by @infinite-void-16 in #1045
- Fix CallDeclOnly unit test by @kchristin22 in #1075
- Try to improve literal types by @vaithak in #998
- Fix custom
reverse_forw
s for operators by @gojakuch in #1076 - Fix zero types in the new STL custom derivatives test by @gojakuch in #1077
- Enable computation of CUDA global kernels derivative in reverse mode by @kchristin22 in #1059
- [cuda][ci] Run the cuda tests on a self-hosted runner with a gpu. by @vgvassilev in #1069
- Add support for
std::array
in the rvs mode by @gojakuch in #1080 - Cover the specifics of debugging the architecture check runner in the docs by @gojakuch in #1085
- [cuda] Enable filecheck on tests by @vgvassilev in #1083
- Store and restore outputaArray elements for jacobians by @ovdiiuv in #1093
- Add basic support for
std::tie
and tuples in the fwd mode by @gojakuch in #1094 - Enhance the support of
std::vector
andstd::array
in the fwd mode by @gojakuch in #1099 - Add support for 'std::atan2' and 'std::acos' by @ZeptoStarling in #1097
- Enhance the support of std::vector and std::array in the rvs mode by @gojakuch in #1101
- Fix appendage of nullptrs to args of a CUDA kernel by @kchristin22 in #1102
- Add support of CUDA builtins by @kchristin22 in #1092
- Fix some cases of
std::vector::push_back
in the rvs mode by @gojakuch in #1103 - Move checks in CladFunction to compile-time by @MihailMihov in #1090
- Coverage CUDA self-hosted by @alexander-penev in #1107
- Handle write-race conditions in CUDA kernels: Add atomic operation by @kchristin22 in #1104
- Remove excessive parameters from Derive functions by @PetroZarytskyi in #1110
- Fix the generation of invalid code in some common cases by @gojakuch in #1088
- Add support for basic Kokkos operations in the rvs mode by @gojakuch in #1068
- Add support for
Kokkos::deep_copy
in the rvs mode by @gojakuch in #1115 - Fix synth literal function for enums by @kchristin22 in #1113
- Add support of CUDA device pullbacks by @kchristin22 in #1111
- Store/restore reference args only if they are lvalue and non-const by @PetroZarytskyi in #1117
- Add Varied analysis to the reverse mode by @ovdiiuv in #1084
- Support operators defined outside of classes by @PetroZarytskyi in #1119
- Kokkos reverse mode improvements by @gojakuch in #1116
- Initialize derivative pointers that are allocated through malloc or realloc by @kchristin22 in #1124
- Add support for parameter specification in Varied Analysis by @ovdiiuv in #1122
- Add support of cuda kernels as pullback functions by @kchristin22 in #1114
- Fix Incorrect derivative when loops contains continue by @kchristin22 in #833
- Add support for differentiation of immediate functions by @MihailMihov in #1109
- Add cudaMemset call after cudaMalloc for derivative pointers by @kchristin22 in #1129
- Avoid creation of local derivative of const parameter by @kchristin22 in #1131
- Revert skipping creation of local adjoints for const params and declare those as non-const by @kchristin22 in #1134
- Don't create pullbacks for function with not varied parameters by @ovdiiuv in https://github.com/v...
Clad version 1.7
Introduction
This document contains the release notes for the automatic differentiation plugin for clang Clad, release 1.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 1.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-8 to clang-18
Forward Mode & Reverse Mode
- Add propagators for
__builtin_pow
and__builtin_log
- Support range-based for loops
- Improve diagnostics clarity
Forward Mode
- Advance support of frameworks such as Kokkos
- Support
std::array
Reverse Mode
- Support non_differentiable attribute
Fixed Bugs
46 381 479 525 717 723 829 979 983 986 988 1005
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)
petro.zarytskyi (11)
Vassil Vassilev (11)
Atell Krasnopolski (5)
Vaibhav Thakkar (2)
Mihail Mihov (2)
ovdiiuv (1)
Rohan Julka (1)
Max Andriychuk (1)
What's Changed
- Differentiate for loop condition expression by @rohanjulka19 in #818
- Fix type casting of ValueAndPushForward types by @vaithak in #986
- Move the TBR analysis in DiffRequest and provide an interface to query it. by @vgvassilev in #971
- Remove redundant function from VisitorBase by @vaithak in #991
- [ci] llvm18.1.8 is broken, turn off the ci for it. by @vgvassilev in #990
- Revert "[ci] llvm18.1.8 is broken, turn off the ci for it." by @MihailMihov in #994
- Directly set the adjoint of the LHS to 0 in assignments by @PetroZarytskyi in #997
- Prevent Clad from trying to create a void zero literal by @gojakuch in #989
- Add support for
[[clad::non_differentiable]]
in reverse mode by @MihailMihov in #916 - Use a reference to store the LHS of assignments by @PetroZarytskyi in #981
- Add basic Kokkos support for the original tests of #783 by @gojakuch in #977
- Add support for
Kokkos::resize
in the forward mode by @gojakuch in #999 - Don't assume output elements are used in the right order in jacobians by @PetroZarytskyi in #1003
- Demote m_ArgIndex to a local variable. by @vgvassilev in #1011
- Remove unused data member. by @vgvassilev in #1010
- Limit the scope of m_DerivativeOrder and m_IndependentVarIndex. by @vgvassilev in #1012
- Adding support for range-based for loop in forward mode by @ovdiiuv in #959
- Add propagators for __builtin_pow. by @vgvassilev in #1006
- Fix cloning
MemberCallExpr
for older Clang versions by @gojakuch in #1015 - Add support for
std::array
in the fwd mode by @gojakuch in #992 - Use initialization instead of assignment when possible in the reverse mode by @PetroZarytskyi in #1013
- Adding support for range-based for loops in the reverse mode by @ovdiiuv in #980
- Return const ref instead of a copy. by @vgvassilev in #1027
- Support multiple indices in clad::gradient calls by @PetroZarytskyi in #1029
- Support bitwise, shift, comparison, and remainder operators in fwd mode by @PetroZarytskyi in #1020
- Add location information and improve clarity of diagnostics. by @vgvassilev in #1031
Full Changelog: v1.6...v1.7
Clad version 1.6
Introduction
This document contains the release notes for the automatic differentiation plugin for clang Clad, release 1.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 1.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-8 to clang-18
Forward Mode & Reverse Mode
- Add support for simple lambda functions
Forward Mode
- Support condition declarations and assignments
- Enable logical operators in for loops
- Support top level custom derivatives in vector mode
- Add support for assignments in while-loops
- Support for initializer_list
- Support for const_cast
- Add support for
std::string
variables
Reverse Mode
- Improve consistency in the tape usage
- Support pointer reference parameters
- Remove redundant goto/label statements from the generated code
Misc
- Improved CMake infrastructure via
AddClad.cmake
- Remove unnecessary clad::array_ref usages
- Add support for computing only the diagonal hessian entries
- Basic support for custom constructor pushforward functions
Fixed Bugs
273 352 509 789 874 899 908 911 913 922 927 951 965 972 974 978
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 (16)
petro.zarytskyi (13)
Vassil Vassilev (13)
Atell Krasnopolski (11)
parth-07 (3)
dependabot[bot] (3)
Rohan Julka (2)
Jonas Rembser (2)
PetroZarytskyi (1)
Maxxxx (1)
Max Andriychuk (1)
Alexander Penev (1)
What's Changed
- Bump requests from 2.31.0 to 2.32.0 by @dependabot in #901
- Add support for null (empty) statements by @gojakuch in #900
- Add a new cmake fn for using Clad with a library by @vaithak in #902
- Add bugprone-argument-comment in clang-tidy by @vaithak in #910
- Add
check-clad-execonly
target by @parth-07 in #875 - Patch - Add cmake install of AddClad.cmake by @alexander-penev in #915
- Make GlobalStoreAndRef consistent in usage inside and outside of loops by @PetroZarytskyi in #904
- Fix clang tidy run failure in PR checks by @vaithak in #918
- Fix condition declarations and assignments in for loops by @gojakuch in #905
- Add support for the logical not operator in for-loop
cond
s (forward mode) by @gojakuch in #920 - Return type adjusted to depend on called function's return type by @ovdiiuv in #907
- Improve derived variable init for const pointers by @vaithak in #919
- Remove unnecessary usages of clad::array_ref and update the documentation by @PetroZarytskyi in #925
- Print graph of diff requests in stats by @vaithak in #926
- Revert removing clad::array_ref from InterfaceCompatibility.C by @PetroZarytskyi in #929
- A reverse block is never ended in RMV::VisitConditionalStatement by @PetroZarytskyi in #928
- Correctly handle pointer reference parameters in the reverse mode by @PetroZarytskyi in #906
- Improve finding of higher order custom derivatives by @vaithak in #931
- Fix an assertion when building the clad benchmarks with clang18 on osx. by @vgvassilev in #930
- Simplify the Jacobian visitors. NFC by @vgvassilev in #924
- Pass the DiffRequest down to the visitors. NFC. by @vgvassilev in #933
- Emit clad::pop after clad::back when in RMV::VisitBinaryOperator by @PetroZarytskyi in #936
- Remove useless goto/label statements by @PetroZarytskyi in #938
- Add support for custom derivatives for top level derivatives by @vaithak in #934
- Fix test failure on master due to rebasing by @vaithak in #942
- Add links to the "Introduction to Clang for Clad contributors" doc by @gojakuch in #939
- Add support for simple lambda expressions in forward mode by @gojakuch in #937
- Remove the isVectorValued state from reverse mode visitor. NFC by @vgvassilev in #945
- Add a link to the "Changing Everything With Clang Plugins" talk to the docs by @gojakuch in #949
- Bump urllib3 from 2.0.7 to 2.2.2 by @dependabot in #948
- Remove the use_enzyme state from reverse mode visitor. NFC by @vgvassilev in #946
- Remove redundant data member in favor of centralizing in DiffRequest. NFC by @vgvassilev in #944
- Remove the enableTBR state from reverse mode visitor. NFC by @vgvassilev in #947
- Add support for assignments in while-loops by @ovdiiuv in #943
- Take StorageClass from the canonical decl when cloning functions by @PetroZarytskyi in #953
- Add validation to prevent error on empty if block by @rohanjulka19 in #952
- [ci] Explicitly set CXX and CC as there is no default clang symlink on alpine. by @vgvassilev in #956
- Add support for computing only the diagonal hessian entries by @vaithak in #950
- Add support for && operator by @rohanjulka19 in #923
- Don't synthesize 0 of the ArraySubscriptExpr type in forward mode by @PetroZarytskyi in #960
- Add support for initializer_list in forward mode AD by @parth-07 in #935
- Add support for const cast in fwd mode by @vaithak in #962
- Add support for simple lambda expressions in reverse mode by @gojakuch in #955
- Add primitive support for constructor custom pushforward functions by @parth-07 in #909
- Fix the derivative of string literals in forward mode by @gojakuch in #967
- Bump certifi from 2023.7.22 to 2024.7.4 by @dependabot in #969
- Add shell.nix with an environment for building and using Clad on NixOS by @guitargeek in #973
- Add support for
std::string
variables and functions with implicit constructor calls in their arguments by @gojakuch in #976 - Fix pointer dereference in fwd mode by @vaithak in #975
- Fix pointer arithmetic in fwd mode by @vaithak in #982
New Contributors
- @ovdiiuv made their first contribution in #907
- @rohanjulka19 made their first contribution in #952
- @guitargeek made their first contribution in #973
Full Changelog: v1.5...v1.6
Clad version 1.5
Introduction
This document contains the release notes for the automatic differentiation plugin for clang Clad, release 1.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 1.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
- Clad now works with clang-8 to clang-18
Forward Mode & Reverse Mode
- Add support for C-style memory alloc and free
Reverse Mode
- Replace array_ref with pointers in gradient signature
- Initial support for new and delete operations in reverse mode
Error Estimation
- Only track sizes of independent arrays
- Remove .size() from error estimation
- Simplify error estimation by removing
_EERepl_
and_delta_
Misc
- Teach binder to use the newest available version of clad
- Simplify pullback calls by replacing
_grad
/_r
pairs with single_r
variables - Delay the differentiation process until the end of TU -- Clad now can operate just like clang and visit the entire translation unit to construct a precise differentiation plan
- Remove extra lines generated when using clad::array or array_ref
- Added timings report if
-ftime-report
flag is enabled
Fixed Bugs
248 350 704 715 765 769 790 792 798 805 854 865 867 886 887 890 897
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)
petro.zarytskyi (30)
Vaibhav Thakkar (24)
Vassil Vassilev (21)
mcbarton (6)
Mihail Mihov (4)
dependabot[bot] (2)
Atell Krasnopolski (2)
Alexander Penev (2)
sauravUppoor (1)
kchristin22 (1)
Warren Jacinto (1)
Jonas Hahnfeld (1)
Deeptendu Santra (1)
Christina Koutsou (1)
What's Changed
- Initial support for memory operations in reverse mode by @vaithak in #777
- Add timings report if -ftime-report is enabled by @DeadSpheroid in #779
- [cmake] Work around a bug in the llvm config. by @vgvassilev in #794
- Fix the bug with empty target triples by @PetroZarytskyi in #796
- Add test for empty fn with reference args by @vaithak in #799
- Fix extra lines generated when using clad::array or array_ref by @vaithak in #797
- Fix CUDA gradient script by @kchristin22 in #806
- [cmake] Set the language and that we do not need C++ extensions. by @vgvassilev in #814
- [cmake] Generate CMakeArgs.txt file to store CMake src, build dir and invocation arguments by @sauravUppoor in #815
- Add vector forward mode in docs by @vaithak in #809
- Update osx builds in ci to cover both x86 and arm by @mcbarton in #807
- Simplify error estimation by removing EERepl and delta by @PetroZarytskyi in #773
- Add bitmasked-option for tbr analysis by @vaithak in #808
- Delay the differentiation process until the end of TU. by @vgvassilev in #766
- Fix erroneous TBR option setting by @vaithak in #827
- Simplify pullback calls in the reverse mode by @PetroZarytskyi in #802
- Add a test to prevent a regression in #464 by @PetroZarytskyi in #831
- Add inst folder to gitignore by @kchristin22 in #834
- Remove clad::array_ref from the reverse, hessian, jacobian and error estimation modes by @PetroZarytskyi in #758
- Fix tests on i586 by @MihailMihov in #838
- Add x86 local debugging example to documentation by @MihailMihov in #840
- Support call expressions with non-differentiable arguments in the reverse mode by @PetroZarytskyi in #844
- [clang] Add clang 18 support by @mcbarton in #824
- [ci] Explain how to apply clang-format on multiple commits by @vgvassilev in #847
- [cmake] Do not link libLLVM.so on platforms that enable it by default. by @vgvassilev in #852
- [cmake] Do not build the error estimation codes with differentiable clang by @vgvassilev in #846
- Fix Binder demo start by @alexander-penev in #839
- Fix constructor definitions in demos and docs by @vaithak in #856
- Bump idna from 3.4 to 3.7 by @dependabot in #860
- Restructure differentiation schedule into a breadth first traversal by @vaithak in #848
- Set cxx version to 17 if Kokkos is found by @Dsantra92 in #817
- [ci] Enable clang-format on unittests by @vgvassilev in #862
- [ci] Bump codecov upload script. by @vgvassilev in #863
- Remove static asserts from generated code by @vaithak in #861
- Use c++ arrays for array adjoints instead of clad::array in the reverse mode by @PetroZarytskyi in #843
- Add Kokkos unittests by @gojakuch in #826
- Moving DerivedFnCollector out of ClangPlugin by @vaithak in #868
- Add clang-repl tests to make sure we do not break repls. by @vgvassilev in #872
- Compute and process Differentiation Request graph by @vaithak in #873
- Restore the TUScope only when we are not in incremental processing mode. by @vgvassilev in #876
- Update actions to latest version (part of migration from node 16 to node 20) by @mcbarton in #882
- Fix install-llvm-action version number so 18.1.3 available by @mcbarton in #884
- Change clang tidy ci to version 16 by @mcbarton in #885
- Fix clang tidy ci by @mcbarton in #886
- Bump jinja2 from 3.1.3 to 3.1.4 by @dependabot in #881
- Provide a backup plan if we fail to delay the handling of declarations. by @vgvassilev in #877
- Fix paranthesis for derivative of division operator by @vaithak in #887
- [docs] Add a word on a "Fixes:" message in pull requests. by @vgvassilev in #892
- Only register ClangPlugin if clad is found by @hahnjo in #893
- Re-enable tests
ClassMethodCall
andVirtualMethodsCall
by @MihailMihov in #896 - Remove
LIBCLAD_TIMING
environment variable by @MihailMihov in #895 - Handle variable declarations in conditions of if-statements (#865) by @gojakuch in #891
- Write numerical diff results to c-style arrays in the generated code. by @PetroZarytskyi in #883
- Fix errors due to recursive calling of HandleTopLevelDecl by @vaithak in #897
New Contributors
- @DeadSpheroid made their first contribution in #779
- @kchristin22 made their first contribution in #806
- @sauravUppoor made their first contribution in #815
- @mcbarton made their first contribution in #807
- @MihailMihov made their first contribution in #838
- @Dsantra92 made their first contribution in #817
**Full Changelo...
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)