Skip to content

Update version check for Enzyme support#135

Open
wsmoses wants to merge 5 commits into
JuliaMath:masterfrom
wsmoses:patch-2
Open

Update version check for Enzyme support#135
wsmoses wants to merge 5 commits into
JuliaMath:masterfrom
wsmoses:patch-2

Conversation

@wsmoses

@wsmoses wsmoses commented Feb 1, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot commented Feb 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.15%. Comparing base (f598246) to head (7291997).

Files with missing lines Patch % Lines
ext/QuadGKEnzymeExt.jl 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #135      +/-   ##
==========================================
- Coverage   92.36%   89.15%   -3.21%     
==========================================
  Files           8        8              
  Lines         786      747      -39     
==========================================
- Hits          726      666      -60     
- Misses         60       81      +21     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stevengj

stevengj commented Feb 1, 2026

Copy link
Copy Markdown
Member

CI failure seems Enzyme-related?

@stevengj

stevengj commented Apr 4, 2026

Copy link
Copy Markdown
Member

Any update on this?

Comment thread ext/QuadGKEnzymeExt.jl

@inline function guaranteed_nonactive(::Type{T}) where T
rt = Enzyme.Compiler.active_reg_inner(T, (), nothing)
rt = Enzyme.Compiler.active_reg_nothrow(T)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is giving a MethodError in CI:

Enzyme: Error During Test at /Users/runner/work/QuadGK.jl/QuadGK.jl/test/runtests.jl:475
  Test threw exception
  Expression: (0.3 * cos(0.3) - sin(0.3)) / (0.3 * 0.3)  ((Enzyme.autodiff(Reverse, f3_count, Active(0.3)))[1])[1]
  MethodError: no method matching active_reg_nothrow(::Type{QuadGKEnzymeExt.ClosureVector{QuadGK.Counter{var"#121#124"{Float64}}}})
  
  Closest candidates are:
    active_reg_nothrow(::Type{T}, ::Val{world}) where {T, world}
     @ Enzyme none:0
  
  Stacktrace:
    [1] guaranteed_nonactive(#unused#::Type{QuadGKEnzymeExt.ClosureVector{QuadGK.Counter{var"#121#124"{Float64}}}})
      @ QuadGKEnzymeExt ~/work/QuadGK.jl/QuadGK.jl/ext/QuadGKEnzymeExt.jl:66
    [2] recursive_add
      @ ~/.julia/packages/Enzyme/TiboG/src/compiler.jl:6704 [inlined]
    [3] *(a::Float64, b::QuadGKEnzymeExt.ClosureVector{QuadGK.Counter{var"#121#124"{Float64}}})
      @ QuadGKEnzymeExt ~/work/QuadGK.jl/QuadGK.jl/ext/QuadGKEnzymeExt.jl:80
    [4] *(a::QuadGKEnzymeExt.ClosureVector{QuadGK.Counter{var"#121#124"{Float64}}}, b::Float64)
      @ QuadGKEnzymeExt ~/work/QuadGK.jl/QuadGK.jl/ext/QuadGKEnzymeExt.jl:84
    [5] evalrule(f::QuadGKEnzymeExt.var"#11#15"{Active{Tuple{Float64, Float64}}, Active{QuadGK.Counter{var"#121#124"{Float64}}}, 

Do we need to require a newer version of Enzyme?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this is a funky one, GPUCompiler has dropped support for Julia < 1.10 [cc @maleadt @vchuravy], this makes downstream packages [e.g. Enzyme] have to drop 1.9 and below. It's fine to just not test on 1.9, but there's a problem where there is no way to resolve a compat for 1.9 at all here

@stevengj stevengj Jun 25, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we need to bump the minimum version to 1.10 that is fine. But can't we just test the extension on 1.10+?

Comment thread test/runtests.jl
# Extension package only supported in 1.9+, but Enzyme doesn't yet support Julia 1.12
@static if v"1.9" <= VERSION < v"1.12"
# Extension package only supported in 1.9+
@static if v"1.9" <= VERSION

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be bumped?

Suggested change
@static if v"1.9" <= VERSION
@static if v"1.10" <= VERSION

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