Commit Graph

58 Commits

Author SHA1 Message Date
Jonas Hahnfeld
f517ee0b8b Never build Clad tests
Clad tests will try to use the just-built Clang compiler. First, this
dependency was not declared properly, and now results in a cycle after
commit fe6c671e85 made clang depend on clad. Since we never run the
Clad tests, never build them.
2024-08-23 09:14:07 +02:00
Bertrand Bellenot
6a4cc17e26 Add current directory . case 2024-08-15 15:14:05 +02:00
Bertrand Bellenot
2bbabd25fa Handle also the non-Windows cases
Thanks Jonas for the proposal
2024-08-15 15:14:05 +02:00
Bertrand Bellenot
9325054010 Fix potential Clad build error
Fixes the following potential error when building clad:
```
  Command failed: 2
  ‘/usr/local/bin/cmake’ ‘–build’ ‘.’ ‘–config’ ‘.’
```
2024-08-15 15:14:05 +02:00
Vassil Vassilev
9c3ae91ff5 Bump clad to version v1.7 2024-08-08 20:29:02 +02:00
Vassil Vassilev
7516f5d348 Bump clad to version v1.6
The 1.6 release has critical fixes for the RooFit AD backend.
2024-07-18 09:44:04 +02:00
Vassil Vassilev
9cd87082a9 Bump clad to version v1.5
This new release includes several fixes helping to scale the RooFit AD backend.

See more at: https://github.com/vgvassilev/clad/releases/tag/v1.5
2024-05-21 12:29:05 +02:00
Jonas Rembser
be35aaef26 Only build clad plugin if requested
Building clad should not depend on the result of the connectivity check,
but whether it is enabled.
2024-05-06 21:44:06 +02:00
Bertrand Bellenot
057bdb107a Fix Clad debug build on Windows 2024-03-06 14:14:05 +01:00
Vassil Vassilev
81c365f899 Bump clad version to v1.4.
This new release includes several fixes helping to simplify RooFit AD backend.

See more at: https://github.com/vgvassilev/clad/releases/tag/v1.4
2024-03-05 18:14:06 +01:00
Vassil Vassilev
45d9a081c4 Bump clad version to v1.3. (#14654)
This new release includes performance and stability improvements.

See more at: https://github.com/vgvassilev/clad/releases/tag/v1.3
2024-02-12 22:59:07 +01:00
Jonas Hahnfeld
2f99b68754 Fix clad build with LLVM_LIBDIR_SUFFIX
This fixes builtin_llvm=OFF builds on at least EL8 platforms that
currently have exactly LLVM 16.0.6.
2024-01-05 16:44:07 +01:00
Vassil Vassilev
5e3310ac04 Bump clad version to v1.2.
This new release includes some improvements:
  * Add experimental support for forward vector mode
  * Add pushforwards for std::floor and std::ceil
  * Improve AD function interfaces with bitmasked options. For example:
    clad::differentiate<<clad::order::first, clad::opts::vector_mode>(f) will
    be equivalent to clad::differentiate<<1, clad::opts::vector_mode>(f) and
    will request the first order derivative of f in forward vector mode.
  * LLVM16 Support

See more at: https://github.com/vgvassilev/clad/blob/v1.2/docs/internalDocs/ReleaseNotes.md
2023-07-20 16:59:07 +02:00
Jonas Hahnfeld
f23f0ed9ca Re-download all Clad patches from GitHub
This guarantees valid patch files.
2023-05-30 09:14:07 +02:00
Bertrand Bellenot
9735886a70 Fix failing patch on Windows (#12882)
* Fix failing patch on Windows

Fix `fatal: corrupt patch at line 28` on Windows

* More trailing white spaces
2023-05-25 15:14:06 +02:00
Jonas Hahnfeld
833c1c1b75 Simplify logic for build with old toolchain
Setting LLVM_FORCE_USE_OLD_TOOLCHAIN will skip all checks in
interpreter/llvm/src/cmake/modules/CheckCompilerVersion.cmake, which
is what we want.
2023-05-25 11:14:05 +02:00
Garima Singh
7c492a17c9 Add AD support for RooChebychev and RooAddPdf. 2023-04-27 00:14:06 +02:00
Garima Singh
32a72240d2 Add code-squash support for RooPolyVar and RooPolynomial. 2023-04-25 17:44:04 +02:00
Vassil Vassilev
2949bf96b7 Bump clad version to v1.1.
This new release includes some improvements:
  * Improvements in the array handling in the Error Estimation Framework
  * Fixed numerical stability of the pow pushforward
  * Fixed handling of for-loop conditions in reverse mode
  * LLVM15 Support

See more at: https://github.com/vgvassilev/clad/blob/v1.1/docs/internalDocs/ReleaseNotes.md
2023-01-23 19:59:07 +01:00
Axel Naumann
931552f385 Silence macOS linker warnings on -undefined dynamic_lookup:
See https://github.com/root-project/root/issues/11937
for why that is currently needed. `flat_namespace` is not a solution.
2023-01-19 12:59:06 +01:00
Axel Naumann
0c9821959f Revert "[cmake] Xcode 14 warns about -undefined dynamic_lookup; simply suppress:"
See https://github.com/root-project/root/issues/11937
for why `-flat_namespace` is bad.

This reverts commit a05d4beded1481a86a65e450826352eb528b03e7.
2023-01-19 12:59:06 +01:00
Vassil Vassilev
23e7fe2951 Add the override qualifier to suppress warnings 2022-12-09 08:44:17 +01:00
Axel Naumann
c88ce22326 Xcode 14 warns about -undefined dynamic_lookup; simply suppress:
"suppress" ignores any unresolved symbol. This requires flat_namespace,
see man ld.
2022-11-11 23:44:03 +01:00
Vassil Vassilev
a3805bb26d Bump clad version to v1.0.
This new release includes some improvements:
  * Add support for pushforward- and pullback-style functions
  * More supported constructs in forward and reverse mode
  * Forward mode support for CUDA programs
  * AD-based Floating Point Error Estimation Framework
  * Integration with Enzyme

See more at: https://github.com/vgvassilev/clad/blob/v1.0/docs/internalDocs/ReleaseNotes.md
2022-10-15 10:59:05 +02:00
Vassil Vassilev
d78d1a03fe Fix building ROOT with external llvm.
Fixes #8141.
2021-08-17 10:29:05 +02:00
Baidyanath Kundu
8e950be75d Bump clad version to v0.9.
This new release includes some improvements:
* Extended array support
* Add cmake variables to control the locations where find_package discovers LLVM and Clang: `LLVM_CONFIG_EXTRA_PATH_HINTS` and `Clang_CONFIG_EXTRA_PATH_HINTS` respectively.

See more at: https://github.com/vgvassilev/clad/blob/v0.9/docs/ReleaseNotes.md
2021-08-16 06:44:07 +02:00
Oksana Shadura
d1c279a075 Update minimal CMake version in favour of advances features it offers (#8336)
* Update minimal CMake version in favour of advances features it offers

* Remove workaround for FindDoxygen (cmake < 3.13)

* Remnove workaround for cmake < 3.14 to able to report issue directly to stdout

* Remove workaround for CMake < 3.14 when Ninja 1.9.0 builds static libraries twice

* Remove other CMake hack from multi-python ROOT builds

* We are using 3.16 as a min CMake version and REGEX is definitely available in this version

* Remove code used to search Python2/Python3 with <= CMake 3.14
2021-08-04 11:14:06 +02:00
Bertrand Bellenot
df3f66afef check for internet connection. Fixes #8292 (#8520)
* [cmake] check for internet connection. Fixes #8292

This should fix an issue with external packages requiring an internet connection when working offline.
If there is no internet connection, they are either automatically disabled or raise a `FATAL_ERROR` if the `fail-on-missing` flag is `ON`

* Add forgotten "is" (thanks @pamputt)

* Add internet check for the forgotten 'davix' and 'ssl' options

* Change the timeout value and add information messages (thanks Axel)

* Let's download an existing file to test internet access

* Disable also clad if there is no internet connection

* Do not add the clad directory in case of no internet access

* Change the logic for clad with no internet connection

* disable clad early enough if there is no internet connection

* Disable also xrootd when disabling builtin_xrootd
2021-07-15 15:59:07 +02:00
Vassil Vassilev
68b3b29a95 Bump clad version to v0.8.
The new release includes some improvements:
* Implement #pragma clad ON/OFF/DEFAULT to control regions where clad is active
* Add getCode() interface for interactive use

See more at: https://github.com/vgvassilev/clad/blob/v0.8/docs/ReleaseNotes.md
2021-05-31 13:14:07 +02:00
Vassil Vassilev
07ad3c1a72 Allow building clad as a cling plugin via -DCLING_BUILD_PLUGINS=On 2021-03-03 18:44:05 +01:00
Vassil Vassilev
c061a8ae01 Plugins on Windows are not supported, don't build the example plugin. 2021-02-25 20:44:18 +01:00
Vassil Vassilev
19543be988 LLVM-9 recommends gcc version at least 5.1
The reason is that llvm soon will use new features which are not available
on older versions.

That is a temporary fix to support gcc 4.8 and higher.
2021-02-25 20:44:18 +01:00
Vassil Vassilev
deafa47202 Remove unused parameters. Fixes -Wunused-parameter. 2021-02-25 20:44:18 +01:00
Vassil Vassilev
36ffd9a3d5 Include ExternalProject for the clad plugin.
That allows building clad for cling standalone.
2021-02-25 20:44:18 +01:00
Vassil Vassilev
355e9bcfe5 PragmaIntroducerKind was renamed to PragmaIntroducer.
See llvm-mirror/clang@6333880.
2021-02-25 20:44:16 +01:00
Henry Schreiner
3d789b131a cmake: clad config failures shown on CMake 3.14+ 2020-11-17 10:44:06 +01:00
Vassil Vassilev
4f26582330 Merge the build steps for msvc and unix. 2020-10-12 10:59:09 +02:00
Philippe Canal
758b053e64 cling:clad sync windows config with unix 2020-09-16 23:44:07 +02:00
Vassil Vassilev
6a98af7e48 Debug win 2020-09-16 23:44:07 +02:00
Vassil Vassilev
d35e45f431 Bump clad version to v0.7.
The new release includes some improvements:
  * Implement hessian matrices via the clad::jacobian interface.

See more at: https://github.com/vgvassilev/clad/blob/v0.7/docs/ReleaseNotes.md

This patch should be the last part of the fix for ROOT-10886.
2020-09-16 23:44:07 +02:00
Philippe Canal
8e0b7158b1 Tell clad where to find LLVM.
This is needed to fix ROOT-10886 in conjunction with
https://github.com/vgvassilev/clad/pull/170.
2020-09-11 21:14:07 +02:00
Chris Burr
3676d5c179 ROOT-10812: Fix building clad with external clang (#5945)
ROOT-10812: Fix building clad with external clang
2020-07-08 13:29:07 +02:00
Vassil Vassilev
a7d40e8237 Bump clad version to v0.6.
The new release includes some improvements in Reverse mode:
  * Reduce the quadratic cloning complexity to linear.
  * Support variable reassignments pontentially depending on control flow.
  * Support operators `+=`, `-=`, `*=`, `/=`, `,`, `++`, `--`.
  * Allow assignments to array subscripts.
  * Support nested assignments in expressions `a = b * ((c ? d : e) = f = g);`
  * Enable differentiation of for-loops

See more at: https://github.com/vgvassilev/clad/blob/v0.6/docs/ReleaseNotes.md

This patch enables us to upgrade to llvm9. Clad supports from clang5 to clang9.
2020-04-03 11:29:05 +02:00
Vassil Vassilev
6130148a58 Bump clad version to v0.5.
The new release includes some improvements in both Forward and
Reverse mode:
* Extend the way to specify a dependent variables. Consider function,
  `double f(double x, double y, double z) {...}`, `clad::differentiate(f, "z")`
  is equivalent to `clad::differentiate(f, 2)`. `clad::gradient(f, "x, y")`
  differentiates with respect to `x` and `y` but not `z`. The gradient results
  are stored in a `_result` parameter in the same order as `x` and `y` were
  specified. Namely, the result of `x` is stored in `_result[0]` and the result
  of `y` in `_result[1]`. If we invert the arguments specified in the string to
  `clad::gradient(f, "y, x")` the results will be stored inversely.
* Enable recursive differentiation.
* Support single- and multi-dimensional arrays -- works for arrays with constant
  size like `double A[] = {1, 2, 3};`, `double A[3];` or `double A[1][2][3][4];`

See more at: https://github.com/vgvassilev/clad/blob/v0.5/docs/ReleaseNotes.md
2019-04-08 20:59:15 +02:00
Vassil Vassilev
1cb36481ba Add missing dependency. 2019-03-17 08:15:02 +01:00
Oksana Shadura
59a46d513b Fixing compile time installation of clad in CMAKE_INSTALL_PATH
[ROOT-9924] Installing headers for clad
2019-02-05 11:44:03 +01:00
Vassil Vassilev
fc33c22f45 Bump clad version to v0.4.
The new release includes some improvements in both Forward and
Reverse mode:
  * Support `x += y`, `x -= y`, `x *= y`, `x /= y`, `x++`, `x--`, `++x`, `--x`
    in forward mode.
  * Reduce emission of unused expressions
  * Add a special `#pragma clad ON/OFF/DEFAULT` to annotate regions which
    contain derivatives
  * Various small optimizations

See more at: https://github.com/vgvassilev/clad/blob/v0.4/docs/ReleaseNotes.md
2018-11-06 11:59:41 +01:00
Vassil Vassilev
38eb2b89ba Allow plugins to handle custom pragmas.
This will help clad implement pattern such as:
#pragma clad on
// code which needs derivation
#pragma clad off
2018-10-08 21:44:55 +02:00
Vassil Vassilev
818126599b Also update the version on unix.
This is part of 4ff4d9aa2d.
2018-09-30 20:59:41 +02:00
Vassil Vassilev
628288faee Bump clad version to v0.3.
The new release includes some improvements in both Forward and
Reverse mode:
  * Better correctness of C++ constructs -- handle scopes properly; allow proper
  variable shadowing; and preserve namespaces.
  * Efficient evaluation in forward mode.
  * Reduced cloning complexity.
  * Handle more C++ constructs -- variable reassignments and for loops.

See more at: https://github.com/vgvassilev/clad/blob/v0.3/docs/ReleaseNotes.md
2018-09-28 21:29:14 +02:00