#198017·pytorch

☂️ 前向模式和更高阶 AD 返回错误的导数

作者: ezyang创建于 2026年9月21日更新于 2026年9月25日
标签module: autogradtriagedmodule: derivativesmodule: correctness (silent)module: forward ad

Umbrella tracking issue for a **class** of bugs: `torch.func.jvp` / `torch.autograd.forward_ad`, nested (second-order) forward AD, `jacfwd`, and `hessian` return **numerically wrong derivatives** for ops whose first-order backward is correct. No error is raised; the wrong number flows into an optimizer, an implicit-layer solve or a physics model and surfaces as a training problem rather than a stack trace. This is the forward-mode sibling of the eager-vs-compiled correctness umbrellas (#195547, #197554). If the repro only misbehaves under `torch.compile`, it belongs on `oncall: pt2`, not here.

内容来源: pytorch/pytorch