Skip to content

Optional Clang/Enzyme autodiff build backend #587

@krystophny

Description

@krystophny

User story

As a VMEC++ developer, I can enable a Clang + Enzyme autodiff backend through an opt-in build flag. With the flag off, the default build is byte-for-byte unchanged.

Scope

  • VMECPP_ENABLE_ENZYME CMake option, off by default; requires Clang and a ClangEnzyme plugin path.
  • common/enzyme/enzyme.h: autodiff intrinsic declarations and the allocation constraint every differentiable kernel follows.
  • enzyme_smoke_test: differentiates a scalar objective over Eigen::Map buffers and checks forward and reverse modes against the closed form and central differences.

Delivered by

#564 (abseil pin for Clang >= 21), #565 (build option + smoke test).

Closes when #565 merges.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions