Skip to content

Fix loosen requirements for absint of newstruct#3286

Merged
wsmoses merged 1 commit into
mainfrom
flr
Jul 6, 2026
Merged

Fix loosen requirements for absint of newstruct#3286
wsmoses merged 1 commit into
mainfrom
flr

Conversation

@wsmoses

@wsmoses wsmoses commented Jul 6, 2026

Copy link
Copy Markdown
Member

No description provided.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

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/rules/typeunstablerules.jl b/src/rules/typeunstablerules.jl
index bd5a17d3..7c65b9ab 100644
--- a/src/rules/typeunstablerules.jl
+++ b/src/rules/typeunstablerules.jl
@@ -464,7 +464,7 @@ function newstruct_common(fwd, run, offset, B, orig, gutils, normalR, shadowR)
                 if !found_partial
                     return false
                 end
-                if !get_runtime_activity(gutils)                
+                if !get_runtime_activity(gutils)
                     if !guaranteed_const_nongen(typ_partial, world)
                         return false
                     end
@@ -475,7 +475,7 @@ function newstruct_common(fwd, run, offset, B, orig, gutils, normalR, shadowR)
                     # active data [aka is pure duplicated, or const], since we will then
                     # still preserve the primal === shadow pointer relationships for anything
                     # stored.
-                    if !guaranteed_nonactive(typ_partial, world; AbstractIsMixed=true)
+                    if !guaranteed_nonactive(typ_partial, world; AbstractIsMixed = true)
                         bypass = false
                         if legalRT
                             desc = Base.DataTypeFieldDesc(structRT)

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results

main b72528c... main / b72528c...
basics/make_zero/namedtuple 0.0541 ± 0.002 μs 0.0548 ± 0.0021 μs 0.987 ± 0.053
basics/make_zero/struct 0.261 ± 0.0063 μs 0.258 ± 0.0072 μs 1.01 ± 0.038
basics/overhead 4.95 ± 0.01 ns 4.95 ± 0.001 ns 1 ± 0.002
basics/remake_zero!/namedtuple 0.228 ± 0.0095 μs 0.228 ± 0.02 μs 1 ± 0.099
basics/remake_zero!/struct 0.224 ± 0.0096 μs 0.225 ± 0.014 μs 0.996 ± 0.077
fold_broadcast/multidim_sum_bcast/1D 10.2 ± 0.22 μs 10.2 ± 0.25 μs 1 ± 0.033
fold_broadcast/multidim_sum_bcast/2D 12 ± 0.24 μs 12 ± 0.28 μs 0.998 ± 0.031
time_to_load 1.47 ± 0.013 s 1.49 ± 0.019 s 0.982 ± 0.015

Benchmark Plots

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

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.

1 participant