Skip to content

build: link the shared libxad from xad - #14

Merged
auto-differentiation-dev merged 6 commits into
mainfrom
deps/shared-libxad
Oct 30, 2026
Merged

auto-differentiation-dev merged 6 commits into
mainfrom
deps/shared-libxad

Conversation

@auto-differentiation-dev

Copy link
Copy Markdown
Contributor

Link QuantLib and the extension against the shared libxad of the installed xad package (xad.get_cmake_dir()), so QuantLibAAD and xad share one tape per thread.

  • lib/xad submodule removed; thread-local tapes, dynamic MSVC runtime.
  • rpath to xad/lib; wheel repair excludes libxad (it ships once, in xad).
  • Tape activation monkey-patch removed.
  • Until xad 2.2 is released: xad>=2.1,<2.3 and CI installs xad-py from git; set >=2.2 at release.

Needs auto-differentiation/xad#247 and auto-differentiation/xad-py#42. #12 (rename) builds on this.

Build QuantLib and the extension against the installed xad package
(find_package(XAD CONFIG) via xad.get_cmake_dir()) instead of lib/xad,
with thread-local tapes and the dynamic MSVC runtime. The extension finds
libxad through an rpath to xad/lib; wheel repair excludes it.
QuantLib and xad share the active tape through libxad, so xad.Tape no
longer needs wrapping.
The wheels and their tests install xad from git until xad 2.2 is on PyPI.
The pin moves from bf05619, before the shared libxad was merged in
xad-py (#42), to current xad-py main 9ca1797: shared libxad, complex
numbers, checkpointing, external functions, NumPy arrays and the fix for
inputs reused on a new tape, i.e. the 2.2.0 content.
@auto-differentiation-dev
auto-differentiation-dev marked this pull request as ready for review October 29, 2026 21:12
auto-differentiation-dev added a commit that referenced this pull request Oct 29, 2026
Brings in the xad-py pin bump to xad-py main 9ca1797 (the 2.2.0
content) from #14.
Main widened the swig build requirement to <4.6 (#13), on the line where
this branch adds xad>=2.1,<2.3: both kept. The cibuildwheel before-build
install of swig, which this branch added for the no-isolation wheel
builds, follows main to <4.6 as well.
@auto-differentiation-dev
auto-differentiation-dev merged commit 8357eb4 into main Oct 30, 2026
39 checks passed
@auto-differentiation-dev
auto-differentiation-dev deleted the deps/shared-libxad branch October 30, 2026 08:26
auto-differentiation-dev added a commit that referenced this pull request Oct 30, 2026
Brings in #14's merge of main (swig <4.6 from #13, in the build
requirement and the cibuildwheel before-build install).
auto-differentiation-dev added a commit that referenced this pull request Oct 30, 2026
With the shared libxad from #14, QuantLib records on the same per-thread
tape as the xad package, so a xad Tape covers QuantLib's calculations
too: say so under Getting Started. The docs link points at the
quantlib-aad page directly instead of the old quantlib-risks redirect.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants