Skip to main content

aadc

Run the same numerical code many times, much faster.

AADC records your calculation once — as you already wrote it, in ordinary Python arithmetic — and turns that recording into machine code. Replaying it skips the interpreter entirely, and replays several scenarios at once on the CPU's vector units.

import aadc

f = aadc.Functions()
f.start_recording()
x  = aadc.idouble(1.0);  xa = x.mark_as_input()
y  = my_pricer(x)                  # your existing code, unchanged
ya = y.mark_as_output()
f.stop_recording()

f.compile("scalar")                     # -> machine code, once
ws = f.create_workspace(kind="scalar")  # a workspace those kernels run on
ws.set_val(xa, 1.5)
ws.forward()                            # compiled replay: ws.val(ya)
ws.set_diff(ya, 1.0)
ws.reverse()                            # ws.diff(xa) = dy/dx at x = 1.5

compile() with no argument is the same as compile("scalar"): the same script runs compiled on x86-64, Apple Silicon and Linux AArch64 alike, and create_workspace() / aadc.evaluate() with no workspace argument use the workspace those kernels run on. compile("auto") compiles for the host's vector lanes instead (AVX2 on x86-64, NEON on Apple Silicon) — use it for batches: aadc.evaluate() after compile("auto") replays several scenarios per instruction, typically 3-4x faster than after plain compile(). Choose the backend at the FIRST compile() of a recording: a later call with another backend does not replace kernels already installed.

From then on every replay runs compiled. Typical speedups are several times the interpreted path — about 4x on one customer's FX pricer — and more when you replay a batch of scenarios, because the vector backends evaluate four (AVX2) or eight (AVX-512) at a time.

Where to look first

import aadc
help(aadc)                 # the three ideas, and a quickstart that runs
aadc.llms_txt()            # the same, written for a coding agent

dir(aadc) is the declared API (aadc.__all__), and every headline type carries a docstring — help(aadc.Functions), help(aadc.idouble), help(aadc.Workspace).

The one trap. if x > k: on an active value forces a plain bool, which freezes that comparison as it came out while recording — a later replay with different inputs still follows the recorded branch. Use aadc.iif(x > k, a, b) when the condition depends on an input. Every such conversion is counted, so this is detectable rather than silent:

kernel.num_passive_warnings()      # 0 is the goal
kernel.passive_warnings()          # kind and location of each

Derivatives are optional. If you want them, the same recording gives you exact first-order sensitivities of every output with respect to every input — no bumping, no re-running the pricer per input, and exact rather than finite-difference approximations. If you do not want them, AADC is simply a compiler for the hot loop you already have.

That is the whole idea: record once, replay compiled — and take the derivatives if they are useful to you.

Install

pip install aadc

Supports CPython 3.10 and later. One abi3 wheel serves every CPython >= 3.11 on a given platform (the extension is built against the CPython Limited API); 3.10 is served by its own version-specific wheel.

Supported platforms

Binary wheels only — there is no source distribution, so pip install aadc on anything not listed here fails with no matching distribution rather than attempting a build.

CPython 3.10 – 3.14
Linux x86-64 (manylinux_2_28) yes
Linux aarch64 (manylinux_2_28) yes
macOS arm64 (Apple Silicon, 11.0+) yes
Windows x64 yes
macOS x86-64 (Intel) no
Alpine / musl no
32-bit Windows no

The macOS wheels are Apple Silicon only. An Intel Mac gets no matching distribution — the Operating System :: MacOS classifier is as specific as PyPI allows, so this table is the authority, not the sidebar.

The Linux wheels need glibc 2.28 or newer; the shipped library's own floor is lower (it references no symbol above GLIBC 2.14 / GLIBCXX 3.4.22), so the tag is the binding constraint rather than the binary.

Upgrading from aadc 1.x

2.x is a different engine, not a compatible successor. The 1.x line ended at 1.8.2; 2.x is a ground-up rewrite with its own recording API, and code written against 1.x will not run unchanged. Notably aadc.license() no longer exists — entitlement is resolved from the environment instead (see Licence in one paragraph below).

If you depend on the 1.x behaviour, pin it explicitly:

pip install 'aadc<2'

Migrating is a port rather than an upgrade. Start from Where to look first above; the recording shape — start_recording(), mark_as_input(), mark_as_output(), a workspace per evaluation — is what changed most.

Version 2.2.0 renames the distribution from aadc-ng to aadc, continuing the PyPI aadc 1.x line. The import (import aadc) and every binary name (_aadc_ng, the aadc_ng runtime package, libaadc-ng) are unchanged.

Upgrading from an environment that has aadc-ng installed: uninstall it FIRST (pip uninstall -y aadc-ng), then pip install aadc. pip treats the two as unrelated distributions that own the same files, so installing aadc over aadc-ng works — but a later pip uninstall aadc-ng would then delete the files out from under aadc, leaving an install whose metadata says it is fine and whose import aadc fails.

Licence in one paragraph

Proprietary. The free Community Edition covers non-commercial and academic use only — personal study, hobby projects, publicly available open-source development, and research or teaching at a university or recognised research institute. Everything else is Production Use and needs a commercial licence, including evaluation by a company and any calculation whose output reaches a book, a client report or a regulator.

The Community Edition is fast. On x86-64 with AVX2, and on Apple Silicon, it runs the interpreter and every JIT backend at full speed, and compile() selects a JIT by default — so on those hosts the ordinary path needs no licence and no C compiler on the box. Two hosts are the exception: on non-Apple 64-bit ARM the vector backends compile() picks there need a licence with the arm64 feature, and on pre-AVX2 x86-64 there is no scalar JIT, so compile('scalar') falls back to the C emitter and needs codegen_c. Both report the feature they want, and neither changes your numbers.

What a licence adds is the ahead-of-time code generators (which write a translation unit you keep, inspect and ship), AVX-512 in any form, and double-precision GPU.

Ask for a licensed backend without the licence and those segments replay on the interpreter: identical results, more slowly, with the reason reported in compile()'s unavailable field. Nothing contacts a server, and a licence never stops working: if it carries an expiry date that has passed, AADC prints a one-line reminder and carries on. Every numerical answer is the same in every tier — the licence buys speed, never correctness.

Full terms ship inside the wheel at <site-packages>/aadc-<version>.dist-info/licenses/LICENSE.txt, with THIRD-PARTY-NOTICES.txt beside it. Commercial and free full-performance academic licences: info@matlogica.com.

Which version am I running?

Two version strings, because there are two things to version:

import aadc

aadc.__version__          # e.g. '2.9.2' -- the WHEEL you pip-installed
aadc.__engine_version__   # e.g. '2.9.0' -- the aadc-ng C++ engine inside it

__version__ is the distribution version, identical to importlib.metadata.version("aadc") and to what pip freeze reports. __engine_version__ is the version of the compiled aadc-ng engine the wheel carries, recorded at build time from the SDK.

They are allowed to differ, and comparing them is not a health check: a Python-only fix ships a new wheel against an unchanged engine. Record __version__ next to your risk numbers and __engine_version__ when you need to say which arithmetic produced them. Both are also available as aadc_ng.__version__ / aadc_ng.__engine_version__.

For what the loaded library says about itself — a third, independent source — use aadc.license_status()["build_version"]; disagreeing with __engine_version__ means the wheel is carrying a different image than its metadata claims.

Check your entitlement in your own CI

import aadc

s = aadc.license_status()
assert s["state"] == "licensed", s["detail"]

state is unlicensed, licensed or expired. expired means the token is genuine but this build is newer than its version ceiling — the entitlement is to older builds, which keep running at full speed. Compare version_max against build_version to see the gap.

Token location, in order: $AADC_NG_LICENSE, ./aadc-ng.lic, ~/.aadc-ng/license.

One shared library per process

libaadc-ng carries thread-local recording state, so a second copy in one process gives correct values and silently zero gradients. This wheel is the only one that ships it; anything else linking it must resolve it by RPATH. Assert it:

import aadc_ng
aadc_ng.check_single_image()   # raises if more than one is mapped

Metadata

Release files for aadc 2.26.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for aadc 2.26.2
File Actions
aadc-2.26.2-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for aadc-2.26.2-cp311-abi3-win_amd64.whl
aadc-2.26.2-cp311-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details for aadc-2.26.2-cp311-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
aadc-2.26.2-cp311-abi3-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.24+ ARM64, Linux glibc 2.28+ ARM64 Details for aadc-2.26.2-cp311-abi3-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
aadc-2.26.2-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for aadc-2.26.2-cp311-abi3-macosx_11_0_arm64.whl
aadc-2.26.2-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for aadc-2.26.2-cp310-cp310-win_amd64.whl
aadc-2.26.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details for aadc-2.26.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
aadc-2.26.2-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ ARM64, Linux glibc 2.24+ ARM64 Details for aadc-2.26.2-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
aadc-2.26.2-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details for aadc-2.26.2-cp310-cp310-macosx_11_0_arm64.whl

Total release size: 15.1 MB

Release files / aadc-2.26.2-cp311-abi3-win_amd64.whl

Download URL aadc-2.26.2-cp311-abi3-win_amd64.whl
Size 1.8 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
c06cf243cc959fcad0a985accfb42efcc556fc14dd8aba2b4adebe390cc33839
BLAKE2b-256 checksum
How to use checksums
ad84155bc0a352df5fd30435ea203eaa9fddaf55114e6d1edde562bd4d2e4a62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Release files / aadc-2.26.2-cp311-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL aadc-2.26.2-cp311-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 2.2 MB
Tags CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
401e1b03dd521374f3f3ff61b693482c33143b71bce9a2cec94b3464bf9dea4c
BLAKE2b-256 checksum
How to use checksums
49a6b008829fd724205b29ec1af999da76aa3c36ac49dee8e3ccfaa273c777dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Release files / aadc-2.26.2-cp311-abi3-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl

Download URL aadc-2.26.2-cp311-abi3-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Size 1.8 MB
Tags CPython 3.11 Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
162b6c666537ff7c3db5f01077e2faeafee3b41c39e7245b7f5277093b84c3aa
BLAKE2b-256 checksum
How to use checksums
1a8839e0e579842d146841d5a7c6af413880a0ab74bf2377405a870e9615ffa7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Release files / aadc-2.26.2-cp311-abi3-macosx_11_0_arm64.whl

Download URL aadc-2.26.2-cp311-abi3-macosx_11_0_arm64.whl
Size 1.7 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2f3273e7c7c0a39e738cd88f739b73f15b9519ce342b5e422b91b38619a981e9
BLAKE2b-256 checksum
How to use checksums
b8323dca0a581c2c0886e59e44362fc57ab451e1de5d4f396c75ecb1978e56f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Release files / aadc-2.26.2-cp310-cp310-win_amd64.whl

Download URL aadc-2.26.2-cp310-cp310-win_amd64.whl
Size 1.8 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
76d0964b28ded82e047938b3a966612602c18240617302cde675d1b8b6fe8bb9
BLAKE2b-256 checksum
How to use checksums
ded5bc0bce4fc5e9924d32a3cdcd1696604c9a26c20997f6051dc2f025408bfe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Release files / aadc-2.26.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL aadc-2.26.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 2.2 MB
Tags CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d739d7bfca79bf18fab98edadd65f48f78544ad89269af879c8182324e10a9c8
BLAKE2b-256 checksum
How to use checksums
c03ecc54cac16ce41f28999207dc4e53afe1775316364d878de96022cd9ca4a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Release files / aadc-2.26.2-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl

Download URL aadc-2.26.2-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Size 1.8 MB
Tags CPython 3.10 Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
08e2fbc75eccef5fe129cb8d23f187fc89830ef1cf0f444cd36ec77e996f4b4d
BLAKE2b-256 checksum
How to use checksums
80b215df3cab0eebec54044575b39e8d7ad2da3d5dfd430aad83a7c7e7d7d223
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Release files / aadc-2.26.2-cp310-cp310-macosx_11_0_arm64.whl

Download URL aadc-2.26.2-cp310-cp310-macosx_11_0_arm64.whl
Size 1.7 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
00e2f6814ca13619581862eefb376877e5675ec9b752dd4238fc3d2c4de1655a
BLAKE2b-256 checksum
How to use checksums
465d014a152d28b004e618ac8e672bd2661b93ffe9579c1aba76e3ca2a3a0715
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Security for aadc 2.26.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page