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 Changelog: v1.4...v1.5