Skip to content

Avoid BLAS dot in Enzyme lagrangian helper#1265

Closed
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/fix-enzyme-lagrangian-dot
Closed

Avoid BLAS dot in Enzyme lagrangian helper#1265
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/fix-enzyme-lagrangian-dot

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

What

Avoid LinearAlgebra.dot in the Enzyme-only lagrangian helper used for constrained Hessian generation. The helper now accumulates the constraint contribution explicitly, which avoids the Julia 1.13-rc1/Enzyme ijl_lazy_load_and_lookup derivative failure while preserving the same scalar value.

Note: This PR should be ignored until reviewed by @ChrisRackauckas.

Why

lib/OptimizationBase / Julia pre / Tests - Core is failing on current master before the QA source-path cleanup PR can get a clean run. The failing stack is in OptimizationEnzymeExt.lagrangian through LinearAlgebra.dot.

Observed master failure on 794eef029d3183bfdb20b122bf6b26b969a0875c:

EnzymeNoDerivativeError: No augmented forward pass found for ijl_lazy_load_and_lookup
  dot @ LinearAlgebra/src/blas.jl
  lagrangian @ lib/OptimizationBase/ext/OptimizationEnzymeExt.jl:80

Validation

On a clean worktree at current master plus this commit:

OPTIMIZATION_TEST_GROUP=Core timeout 3600 julia +1.13 --project=lib/OptimizationBase -e 'using Pkg; Pkg.test()'

passed:

Test Summary: | Pass  Total     Time
Core          |  777    777  7m16.2s
Testing OptimizationBase tests passed

Also ran:

julia +1.12 --project=. -e 'import Runic; exit(Runic.main(["--check", "lib/OptimizationBase/ext/OptimizationEnzymeExt.jl"]))'
git diff --check

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
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