Skip to content

Conversation

@vchuravy
Copy link
Member

Reverts #2594

The current design is prone to "spurious results from the future" and I think it is better to implement this either as a local cache or with proper invalidation integration

@github-actions
Copy link
Contributor

github-actions bot commented Sep 19, 2025

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic main) to apply these changes.

Click here to view the suggested changes.
diff --git a/src/analyses/activity.jl b/src/analyses/activity.jl
index 871e7cd..87484af 100644
--- a/src/analyses/activity.jl
+++ b/src/analyses/activity.jl
@@ -393,7 +393,7 @@ Base.@nospecializeinfer @inline function active_reg_inner(
     return ty
 end
 
-Base.@nospecializeinfer @inline function active_reg(@nospecialize(ST::Type), world::UInt; justActive=false, UnionSret = false, AbstractIsMixed = false)
+Base.@nospecializeinfer @inline function active_reg(@nospecialize(ST::Type), world::UInt; justActive = false, UnionSret = false, AbstractIsMixed = false)
     set = Base.IdSet{Type}()
     return active_reg_inner(ST, set, world, justActive, UnionSret, AbstractIsMixed)
 end
diff --git a/src/compiler.jl b/src/compiler.jl
index b209b87..794a526 100644
--- a/src/compiler.jl
+++ b/src/compiler.jl
@@ -6242,7 +6242,7 @@ function thunk_generator(world::UInt, source::Union{Method, LineNumberNode}, @no
     mi = my_methodinstance(Mode == API.DEM_ForwardMode ? Forward : Reverse, ft, primal_tt, world, min_world, max_world)
     
     mi === nothing && return stub(world, source, method_error)
- 
+
     min_world2 = Ref{UInt}(typemin(UInt))
     max_world2 = Ref{UInt}(typemax(UInt))
    

@codecov
Copy link

codecov bot commented Sep 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.21%. Comparing base (aaa5a36) to head (162179a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2595      +/-   ##
==========================================
- Coverage   75.24%   75.21%   -0.03%     
==========================================
  Files          57       57              
  Lines       17928    17897      -31     
==========================================
- Hits        13490    13462      -28     
+ Misses       4438     4435       -3     

☔ View full report in Codecov by Sentry.
📢 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.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 19, 2025

Benchmark Results

main 162179a... main / 162179a...
basics/make_zero/namedtuple 0.0521 ± 0.0022 μs 0.0537 ± 0.0025 μs 0.97 ± 0.061
basics/make_zero/struct 0.254 ± 0.0068 μs 0.256 ± 0.006 μs 0.991 ± 0.035
basics/overhead 4.65 ± 0.01 ns 4.34 ± 0.01 ns 1.07 ± 0.0034
basics/remake_zero!/namedtuple 0.234 ± 0.0056 μs 0.238 ± 0.0055 μs 0.98 ± 0.033
basics/remake_zero!/struct 0.234 ± 0.0043 μs 0.232 ± 0.0062 μs 1.01 ± 0.032
fold_broadcast/multidim_sum_bcast/1D 10.3 ± 0.23 μs 10.3 ± 0.27 μs 0.997 ± 0.034
fold_broadcast/multidim_sum_bcast/2D 10.3 ± 0.2 μs 10.3 ± 0.18 μs 1 ± 0.026
time_to_load 1.26 ± 0.0038 s 1.27 ± 0.013 s 0.992 ± 0.01

Benchmark Plots

A plot of the benchmark results has been uploaded as an artifact at https://github.com/EnzymeAD/Enzyme.jl/actions/runs/18142076439/artifacts/4147923454.

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