Skip to content

Clad version 1.6

Compare
Choose a tag to compare
@vgvassilev vgvassilev released this 18 Jul 05:35
· 127 commits to master since this release

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 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::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

Full Changelog: v1.5...v1.6