Releases: vgvassilev/clad
Clad version 2.1
Introduction
This document contains the release notes for the automatic differentiation plugin for clang Clad, release 2.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 2.1?
Clad 2.1 introduces major advancements in reverse mode differentiation, bringing smarter handling of loops, assignments, and method calls, alongside the new clad::restore_tracker for functions that modify their inputs. Forward mode gains static scheduling for Hessians and higher-order derivatives, while CUDA support expands with custom derivatives for key Thrust algorithms such as reduce, transform, and transform_reduce, plus optimizations that reduce unnecessary GPU atomics. The release also strengthens error estimation, simplifies adjoint initialization, improves tape efficiency, and enhances diagnostics. With a migration to C++17, support extended up to clang-21, and numerous bug fixes, Clad 2.1 delivers faster, safer, and more reliable automatic differentiation across CPU and GPU workflows.
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-11 to clang-21.
- Switch to C++17 standard.
Forward Mode & Reverse Mode
- Improve support for differentiation of function/method calls:
- Move call/argument differentiation into unified helpers.
- Improve handling of base initializers, delegating constructors, and method bases.
- Optimizations in Tape-Based Recording (TBR):
- Enable TBR for pointer arithmetic, nested calls, local variables, loops, and constructors.
- Improve analysis of pointers, nested derivatives, and division denominators.
- Remove redundant or unsafe
getZeroInitinitializations in aggregates and init lists.
- Statically schedule higher-order derivatives for Hessians.
Reverse Mode
- Better handling of pullbacks and reverse_forw:
- Avoid generating empty or redundant pullbacks.
- Improve type consistency in reverse_forw.
- Introduce
clad::restore_trackerto support functions modifying their arguments.
- Improve differentiation ordering (differentiate method bases before arguments).
- Simplify assignments when LHS and RHS are independent.
- Support for for-loops without increments.
- Add optimizations to avoid unnecessary storage of unused return values.
- Consider unions differentiable.
- Support for not differentiating w.r.t. const references.
- Numerous fixes in
reverse_forwhandling of types and aggregates.
CUDA
- Add custom derivatives for several Thrust algorithms:
thrust::reduce,thrust::transform,thrust::transform_reduce,
thrust::copy,thrust::inner_product.
- Improve handling of CUDA atomics:
- Avoid atomics for injective index computations.
- Added liveness analysis for removing unnecessary atomics.
Error Estimation
- Reverse mode error estimation now uses pullbacks consistently.
- Fix
_final_errorvalue propagation .
Misc
-
Improve diagnostics for propagator signature mismatches.
-
Full qualification logic for generated code.
-
Better handling of consteval functions, decl refs, and unused parameters.
-
Remove unused STL derivatives and redundant infrastructure.
-
CI improvements:
- Added valgrind test runs.
- Updated MacOS runners, godbolt build (clang 21), and codecov handling.
-
Documentation: Update README to clarify plugin usage, C++14 requirement, and
plugin args.
Fixed Bugs
428 691 752 768 1274 1301 1346 1349 1411 1419 1436 1445 1457 1466 1469 1472 1473 1490 1497 1498 1555 1557 1559 1560 1565 1573 1581 1582
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)
PetroZarytskyi (60; major ad/tbr work)
Vassil Vassilev (30; infrastructure, ci, compiler integration)
Abdelrhman Elrawy (7; cuda/thrust support)
Max Andriychuk (7; va/tbr infrastructure, cfg/loop analysis, cuda atomics)
aditimjoshi (4; tape improvements, benchmarks)
Vipul Cariappa (1; godbolt integration)
Timo Nicolai (1; docs, usage improvements)
Rohan Timmaraju (1; tensor-specific support)
mcbarton (1; ci, runners)
Jonas Rembser (1; build fixes)
Christina Koutsou (1; nondiff structs support)
What's Changed
- [ci] Do not use the latest and potentially unstable package channel by @vgvassilev in #1467
- [ci] Bump the codecov action to address random failures. by @vgvassilev in #1471
- Nondiff structs and Don't create adjoints for nondiff params and call args by @kchristin22 in #1447
- Support std::pair constructors natively by @PetroZarytskyi in #1440
- Check if m_AnalysisDC is valid by @ovdiiuv in #1459
- [clang-tidy] Bump the version of clang-tidy to 20. by @vgvassilev in #1475
- Don't create dynamic arrays for static arrays declarations inside loops by @PetroZarytskyi in #1468
- [clang-tidy] Do not exclude benchmarks and demos. by @vgvassilev in #1476
- Don't create CUDA atomics for basic indices by @ovdiiuv in #1441
- Don't store unused return values of reverse_forw by @PetroZarytskyi in #1477
- Don't unnecessarily move loop condition to the loop body by @PetroZarytskyi in #1478
- Add custom derivative for thrust::reduce by @a-elrawy in #1472
- Account for implicit exprs in hasUnusedReturnValue by @PetroZarytskyi in #1479
- Added support for thrust::inner_product by @a-elrawy in #1480
- Enable TBR in the tests of the produced code by @PetroZarytskyi in #1481
- Analyze local DeclStmt in TBR by @PetroZarytskyi in #1484
- Refactor updateCall and friends. NFC by @vgvassilev in #1487
- Move TBR infrastructure to AnalysisBase by @ovdiiuv in #1456
- Update plugin usage information by @Time0o in #1489
- Consider unions differentiable. by @PetroZarytskyi in #1493
- [clang-tidy] Disable any-all-of suggestions by @vgvassilev in #1495
- Add custom derivatives for reduce overloads by @a-elrawy in #1492
- Improve support for pointers in TBR by @PetroZarytskyi in #1494
- Add initial support for nested calls in TBR by @PetroZarytskyi in #1490
- Use clearer implementation, do not rely on finding the old DeclRefExpr. NFC by @vgvassilev in #1499
- [codecov] Bump up the allowed thresholds of coverage. by @vgvassilev in #1500
- Move the args variables next to its use. NFC by @vgvassilev in #1501
- Remove unused interfaces. NFCI by @vgvassilev in #1503
- Drop lookuping up custom reverse_forw derivatives in favor of static scheduling by @vgvassilev in #1502
- Only use the reverse mode in error estimation by @PetroZarytskyi in #1504
- Rework setting the final error. by @vgvassilev in #1505
- Improve consistency using high-level interfaces. by @vgvassilev in #1507
- Refact...
Clad version 2.0
Introduction
This document contains the release notes for the automatic differentiation plugin for clang Clad, release 2.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 2.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-10 to clang-20
Forward Mode & Reverse Mode
- Improved handling of non-differentiable annotated types
- Support
static_assert. - Improved to-be-recorded (TBR) analysis.
Forward Mode
- Added support for
Useful Analysisfor more efficient derivative computation. - Custom derivative resolution now leverages Clang's
CallExprinfrastructure for correctness and compatibility. - Improved diagnostics for mismatched custom derivative signatures.
- Enhanced handling of real-valued parameters only.
Reverse Mode
- Enabled static scheduling for constructor pullbacks.
- Reworked
reverse_forwnaming and logic consistency. - Improved support for
std::shared_ptr,std::weak_ptr, and complex value-type parameters. - Support added for custom derivatives for STL iterators.
- Static-only scheduling for pullbacks is now the default (excluding Hessians and special cases like error estimation).
- Improved support for rvalue references.
CUDA
- Tape now supports CUDA builds and works with nvcc.
- Recalculation support for CUDA built-in index functions (threadIdx, etc.)
Error Estimation
- The error estimation framework has been updated to maintain singleton objects per request, ensuring more consistent handling.
Misc
- More descriptive stack traces for diagnostics.
- Improved support for polymorphism and virtual functions in user demos.
- A benchmark comparison script has been added.
- The SmallPT ray tracer demo has been revised and fixed.
- Added -version and improved --help usability.
- Godbolt link included in documentation.
- Reworked time reporting -- detailed performance information is shown when the env variable
CLAD_ENABLE_TIMINGis set or passed-ftime-report. - Handle custom derivatives ahead of the differentiation process improving the overall system robustness.
Fixed Bugs
1454 1452 1451 1437 1429 1423 1392 1383 1371 1369 1366 1123 985 793 751 665
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 (57)
Vassil Vassilev (20)
ovdiiuv (4)
Vipul Cariappa (2)
dependabot[bot] (2)
aditimjoshi (2)
Rohan-T144 (1)
Rohan Timmaraju (1)
mcbarton (1)
Maki Arima (1)
Christina Koutsou (1)
Abhinav Kumar (1)
Abdelrhman Elrawy (1)
What's Changed
- Add Windows arm job to ci by @mcbarton in #1357
- Support references to object array subscript exprs in TBR by @PetroZarytskyi in #1368
- Don't account for output parameter in indepVarCount by @ovdiiuv in #1361
- Add Useful Analysis to the forward mode by @ovdiiuv in #1120
- Enable custom derivative lookups on the DiffPlanner stage by @PetroZarytskyi in #1362
- Remove duplicated code. NFC by @vgvassilev in #1372
- [clang-format] Order correctly the clad includes by @vgvassilev in #1374
- Make static-only scheduling default for pullbacks by @PetroZarytskyi in #1370
- Remove
experimental_part from the naming of pushforward/pullback modes by @PetroZarytskyi in #1378 - Rework the time reporting. by @vgvassilev in #1373
- Improve support for rvalue references in the reverse mode by @PetroZarytskyi in #1382
- Only generate pushforwards of functions of real params in the reverse mode by @PetroZarytskyi in #1384
- Do not ignore Imp casts when calling IsReferenceOrPointerArg in RMV::VisitCXXConstructExpr by @PetroZarytskyi in #1386
- Don't differentiate w.r.t. parameters of non-differentiable types in the reverse mode by @PetroZarytskyi in #1387
- Avoid generating the reverse pass in RMFPV (reverse_forw) by @PetroZarytskyi in #1389
- Fix edge case for std::pow(0., 0.) by @a-elrawy in #1385
- Implement version by @vgvassilev in #1390
- Schedule constructor pullbacks statically by @PetroZarytskyi in #1391
- Fix #1392: passing non differentiable arguments to member functions by @Rohan-T144 in #1393
- Move to using xeus-cpp instead of xeus-cling by @kr-2003 in #1396
- Remove outdated clad::array_ref usage from the README by @PetroZarytskyi in #1397
- Fix the numeration in STLCustomDerivatives.C by @PetroZarytskyi in #1399
- Update a test of a break-stmt to avoid regression in #1123 by @PetroZarytskyi in #1398
- [cmake] Fix building clad on rossetta-enabled osx machines. by @vgvassilev in #1401
- Bump requests from 2.32.0 to 2.32.4 by @dependabot[bot] in #1403
- Fix issue #665: Created a benchmark script by @aditimjoshi in #1394
- Enable static derivative scheduling in the forward mode by default by @PetroZarytskyi in #1400
- Call UpdateDiffParamsInfo in the Diffplanner unconditionally by @PetroZarytskyi in #1406
- Schedule simple partial derivatives statically by @PetroZarytskyi in #1408
- Teach clad tape to work with nvcc by @kchristin22 in #1405
- Move some tests from UserDefinedTypes.C to Constructor.C by @PetroZarytskyi in #1412
- Update the SmallPT ray tracer demo by @PetroZarytskyi in #1407
- Automatically generate pullbacks of non-linear constructors by @PetroZarytskyi in #1286
- Bump urllib3 from 2.2.2 to 2.5.0 by @dependabot[bot] in #1415
- Update call argument storing in the reverse mode by @PetroZarytskyi in #1416
- Simplify
getExprVarDatain TBR and add a test by @PetroZarytskyi in #1418 - Perform lookups of reference variables in TBR::overlay by @PetroZarytskyi in #1419
- Switch from Visit to Traverse functions in TBR by @PetroZarytskyi in #1421
- Move ProfileID generation to a single point in TBR by @PetroZarytskyi in #1422
- Rework SetIsReq and overlay and combine them into a single function by @PetroZarytskyi in #1424
- Move VarData element access to VarData::operator[] by @PetroZarytskyi in #1425
- [ci] Homebrew dropped llvm12. by @vgvassilev in #1431
- fix cmake to build clad within the LLVM project by @Vipul-Cariappa in #1429
- check build compatibility with godbolt builders by @Vipul-Cariappa in #1432
- Avoid repetetive CFG construction by @ovdiiuv in #1417
- Don't override VisitUnaryOperator in RMFPV by @PetroZarytskyi in #1433
- [chef-fp] Variables must be initialized. by @vgvassilev in #1434
- Print the differentiation plan early when -print-stats is passed. by @vgvassilev in #1435
- Implement more descriptive pretty stack printing for generated derivatives. by @vgvassilev in #1402
- Add basic re...
Clad version 1.10
Introduction
This document contains the release notes for the automatic differentiation plugin for clang Clad, release 1.10. 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.10?
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-10 to clang-20
Forward Mode & Reverse Mode
- Improved diagnostics for unsupported features.
- Add custom derivatives for standard math functions.
Forward Mode
- Add support of variadic functions.
Reverse Mode
- Refined function analysis to mark const methods as non-differentiable.
- Make to-be-recorded (TBR) analysis default.
- Automatically generate some constructor pullbacks.
- Implemented "store per change" for method bases to reduce tape usage.
- Enabled differentiation of global variables.
- Enabled differentiation for static member functions.
- Improved handling of object variables, differentiation more consistent across types
- Improved support for default arguments in reverse mode.
- Added primitive support for
std::unique_ptr<T>. - Refactored handling of custom STL pullbacks.
- Reduce tape usage for objects.
CUDA
- Added
CUDA_HOST_DEVICEattributes tozero_implandzero_init. - Created
ParmVarDeclfor local kernel variables in device pullbacks. - Reworked indexing of pullbacks to better handle CUDA differentiation
Misc
- Support for LLVM 20, dropped LLVM 9.
- Updated GoogleTest to latest version.
- General CI improvements: Ubuntu 22/24 support, dropped older configs.
- Improved varied analysis.
Fixed Bugs
685 760 772 800 871 879 1009 1044 1095 1125 1262 1269 1270 1276 1294 1295 1302 1304
1353
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 (44)
Vassil Vassilev (21)
Max Andriychuk (11)
Christina Koutsou (7)
petro (1)
Shubhanjan-GGOD (1)
Rohan-T144 (1)
Petro Mozil (1)
Parth Arora (1)
Jayant (1)
Greg Hazel (1)
Errant (1)
Abdelrhman Elrawy (1)
What's Changed
- Add primitive support for
std::unique_ptr<T>by @parth-07 in #1222 - Update README.md by @ghazel in #1238
- Improve support for InitListExpr in the reverse mode by @PetroZarytskyi in #1243
- [ci] clang 19 on ubuntu arm seems stable by @vgvassilev in #1244
- Update the documentation for clad::jacobian by @PetroZarytskyi in #1242
- Force differentiation w.r.t. all non-const pointer/array type parameters by @PetroZarytskyi in #1240
- Use move semantics to push objects on tapes by @PetroZarytskyi in #1249
- Correctly handle memory taken by objects in loops by @PetroZarytskyi in #1250
- Make TBR default by @ovdiiuv in #1245
- [ci] Remove redundant main.cpp and avoid specifying C++ standard. by @vgvassilev in #1253
- Support default arguments of object types in the reverse mode by @PetroZarytskyi in #1247
- [cmake] Fix warning that project() should be called prior to enable_language() by @vgvassilev in #1255
- Add new custom derivatives for math functions by @a-elrawy in #1237
- Fix security report by dependabot. by @vgvassilev in #1258
- Remove the special case for
_d_thisin RMV::DifferentiateVarDecl by @PetroZarytskyi in #1259 - Compute the differentiation plan before differentiation starts. by @vgvassilev in #1248
- No need to provide the constructed object to a constructor pullback by @PetroZarytskyi in #1257
- Don't generate pullbacks of non-differentiable constructors in the reverse mode by @PetroZarytskyi in #1254
- Add a check-not clause to the test by @vgvassilev in #1016
- Improve differentiation of object-type decls in the reverse mode by @PetroZarytskyi in #1268
- Specialize zero_init for std::pair. by @vgvassilev in #1284
- Update README For Developer Environment (Discussion-#1260) by @Shubhanjan-GGOD in #1287
- Generate pullbacks of linear constructors by @PetroZarytskyi in #1288
- Do not dereference _d_this by default by @PetroZarytskyi in #1296
- Fix crashing for differentiating static member functions by @Rohan-T144 in #1285
- Differentiate global variables in the reverse mode by @PetroZarytskyi in #1153
- Fix unexpected attempted differentiation of non-differentiation function error by @Errant404 in #1291
- Remove const qualifier from pullback parameters by @PetroZarytskyi in #1303
- Consider const methods non-differentiable by @PetroZarytskyi in #1305
- Consider calls with const reference params non-differentiable by @PetroZarytskyi in #1308
- Support pointer bases in member exprs in reverse mode by @PetroZarytskyi in #1309
- Add information about function template specialization to
DerivativeBuilder::cloneFunctionby @pmozil in #1277 - Generalize logic for xvalue method bases to all non-ref type bases by @PetroZarytskyi in #1311
- Support non-void functions with no dfdx by @PetroZarytskyi in #1312
- Handle return stmt in void functions by @kchristin22 in #1315
- Use memcpy instead of manually copying data, and add malloc check by @jayantpranjal0 in #1279
- Handle CXXConstCastExpr and Dereferenced pointers in shouldBeRecorded by @kchristin22 in #1317
- Fix clad array fixed size initialization inside loop by @kchristin22 in #1321
- Add CUDA_HOST_DEVICE attr in zero_impl and zero_init by @kchristin22 in #1322
- Remove short int suffix in constant creation by @kchristin22 in #1323
- Use static_cast when casting a call arg of a cuda device call to ParmVarDecl by @kchristin22 in #1319
- Clear m_Traversed after traversing differentiate/gradient calls by @ovdiiuv in #1330
- Don't call operators with method calls by @PetroZarytskyi in #1329
- Don't output DVI and Args same time by @ovdiiuv in #1331
- Take const base in custom pullbacks of const methods by @PetroZarytskyi in #1332
- Reduce tape usage for objects by @PetroZarytskyi in #1328
- Add support of variadic functions as call exprs in Forward mode by @kchristin22 in #1246
- [ci] Hopefully python2 is properly gone from osx now. by @vgvassilev in #1339
- [ci] Remove old branch we used to integrate. by @vgvassilev in #1338
- [ci] Balance better the load between Ubuntu 22 and 24. by @vgvassilev in #1341
- [ci] Ubuntu 20 is being phased out; switch to Ubuntu 22 by @vgvassilev in #1340
- Harmonize derivative type generation over all modes by @PetroZarytskyi in https://github.com/vgvassilev/clad...
Clad version 1.9
Introduction
This document contains the release notes for the automatic differentiation plugin for clang Clad, release 1.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 1.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-9 to clang-19
Forward Mode & Reverse Mode
- Improved differentiation support for complex mathematical expressions.
- Enhanced function overload handling in both forward and reverse modes.
- Enable differentiation when functions are defined in transparent contexts.
Forward Mode
- Optimized forward mode differentiation for performance improvements.
- Added support for additional intrinsic functions.
Reverse Mode
- Enhanced handling of control flow structures in reverse mode.
- Improved memory efficiency during differentiation.
- Support member calls with xvalue bases in the reverse mode.
- Initialize object adjoints using a copy of the original when copy constructor is available. Eg:
The new clad::zero_init function relies on the iterators to initialize the elements.
std::vector<...> v{x, y, z}; std::vector<...> _d_v{v}; // The length of the vector is preserved clad::zero_init(_d_v); // All elements are initialized to 0
CUDA
- Introduced experimental support for differentiating CUDA kernels.
- Optimized CUDA differentiation to reduce compilation overhead.
Misc
- General improvements in documentation and code clarity.
- Various performance optimizations across Clad.
- Improved
DiffRequestandDynamicGraphprinting.
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 (36)
petro.zarytskyi (12)
mcbarton (2)
PetroZarytskyi (2)
dependabot[bot] (1)
ToshitJain (1)
Rohith Suresh (1)
Abdelrhman Elrawy (1)
What's Changed
- Use ASTContext's printing policy, reuse the Sema variable. NFC by @vgvassilev in #1175
- Remove extra variable, rely on the one that already exists by @vgvassilev in #1176
- Simplify if-conditions. NFC. by @vgvassilev in #1177
- Enable differentiation when functions are defined in transparent contexts by @vgvassilev in #1178
- Remove unused declaration; improve custom_derivatives docs. by @vgvassilev in #1182
- Improve DiffRequest and DynamicGraph printing. by @vgvassilev in #1183
- [cmake] Do not issue a fatal error on version mismatch for Debug builds. by @vgvassilev in #1184
- Bump jinja2 from 3.1.4 to 3.1.5 by @dependabot in #1185
- Harmonize Derive and DerivePushforward by @vgvassilev in #1186
- Harmonize Derive and DerivePullback by @vgvassilev in #1187
- Use CloneParmVarDecl instead of manual cloning. NFC by @vgvassilev in #1188
- Rework computation of derivative function prototype. by @vgvassilev in #1189
- Move computing of the effective derivative name in DiffRequest. NFC. by @vgvassilev in #1190
- Move the computation of parameters in SetupDerivativeParameters. by @vgvassilev in #1191
- Move the seed initialization into a separate function. by @vgvassilev in #1192
- Reroute pushforwards to the generic ::Derive method. by @vgvassilev in #1193
- Reduce duplicated code. by @vgvassilev in #1194
- Move more cases computing the derivative name in ComputeDerivativeName. by @vgvassilev in #1195
- Remove unused data member. by @vgvassilev in #1196
- Remove unused member by @vgvassilev in #1197
- Invert if-stmt, remove a fixme of resolved bug and add a new fixme. by @vgvassilev in #1198
- Use CloneParmVarDecl and the parameters stored in the DiffRequest. NFC by @vgvassilev in #1203
- Remove dead code. NFC by @vgvassilev in #1204
- [ci] OSX homebrew dropped llvm13 by @vgvassilev in #1206
- Simplify error estimation by not storing m_ParamTypes by @vgvassilev in #1205
- Clean up the code computing the parameters and their types. by @vgvassilev in #1208
- Remove redundant for error estimation callback. by @vgvassilev in #1209
- Reroute pullback to the generic ::Derive method. by @vgvassilev in #1210
- Don't pass derived args to forw pass unless they are references by @PetroZarytskyi in #1207
- Update README with clang version note for macos by @RS2007 in #1200
- Improve derivative registration. by @vgvassilev in #1211
- Improve graph printing. by @vgvassilev in #1213
- Support std::initializer_list parameters in the reverse mode by @PetroZarytskyi in #1212
- Initialize object adjoints using a copy of the original by @PetroZarytskyi in #1179
- Improve formatting of DiffRequest::dump and make it available in gdb. by @vgvassilev in #1214
- Support member calls with xvalue bases in the reverse mode by @PetroZarytskyi in #1219
- Add a regression test for Assertion _size' failed. by @vgvassilev in #1220
- Add Ubuntu arm runners to ci by @mcbarton in #1221
- Support differentiating functions that return CXXConstructExpr by @PetroZarytskyi in #1223
- Don't accept functions of object return types in clad::gradient by @PetroZarytskyi in #1224
- Support VisitCXXFunctionalCastExpr in the reverse mode by @PetroZarytskyi in #1225
- Fix for Parenthesis issue in gradients by @toshit3q34 in #1180
- Remove VisitWithExplicitNoDfDx and replace it with plain Visit. by @PetroZarytskyi in #1226
- Simplify RMV::VisitExprWithCleanups by @PetroZarytskyi in #1227
- Don't return zero initialization as the derivative of InitListExpr by @PetroZarytskyi in #1228
- Don't use original stmts in the generated code by @PetroZarytskyi in #1229
- Remove m_DerivativeForForwSweep from StmtDiff by @PetroZarytskyi in #1230
- Enable llvm19, remove llvm8 support. by @vgvassilev in #1233
- Fix clang-format workflow by @mcbarton in #1234
- Update Developer Installation Instruction on README.md by @a-elrawy in #1236
- Don't set init and init style of a declaration manually by @PetroZarytskyi in #1232
New Contributors
- @RS2007 made their first contribution in #1200
- @toshit3q34 made their first contribution in #1180
- @a-elrawy made their first contribution in #1236
Full Changelog: v1.8...v1.9
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::atan2andstd::acos.
Reverse Mode
- Support
std::initializer_listandsizeof. - 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 (
constevalandconstexpr) with a new clad modeclad::immediate_mode. - Make
clad::CladFunctionandclad::array_refconstexpr. - Support operators defined outside of classes.
- Add Varied analysis to the reverse mode.
- Add support for
Kokkos::View,Kokkos::deep_copy, Kokkos::resizeandparallel_for` in reverse mode. - Add support for
Kokkos::parallel_for,Kokkos::fence,Kokkos::Viewand
Kokkos::parallel_reducein 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
_forwfunctions 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_forin 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::fencein 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::Viewindexing by @gojakuch in #1061 - Add support for
Kokkos::parallel_reducein the fwd mode by @gojakuch in #1056 - Make the signatures of
KokkosBuiltins.hmore 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_forws 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::arrayin 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::tieand tuples in the fwd mode by @gojakuch in #1094 - Enhance the support of
std::vectorandstd::arrayin 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_backin 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_copyin 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_powand__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::resizein 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
MemberCallExprfor older Clang versions by @gojakuch in #1015 - Add support for
std::arrayin 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::stringvariables
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-execonlytarget 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
conds (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::stringvariables 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/_rpairs with single_rvariables - 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-reportflag 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
ClassMethodCallandVirtualMethodsCallby @MihailMihov in #896 - Remove
LIBCLAD_TIMINGenvironment 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::maxandstd::clampfunctions - 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...