Skip to content

fix windows#2581

Merged
wsmoses merged 2 commits intomainfrom
winf
Sep 16, 2025
Merged

fix windows#2581
wsmoses merged 2 commits intomainfrom
winf

Conversation

@wsmoses
Copy link
Member

@wsmoses wsmoses commented Sep 16, 2025

No description provided.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 16, 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/compiler.jl b/src/compiler.jl
index 0cf75eb..216e590 100644
--- a/src/compiler.jl
+++ b/src/compiler.jl
@@ -2000,7 +2000,7 @@ include("rules/llvmrules.jl")
 function add_one_in_place(x)
     if x isa Base.RefValue
         x[] = recursive_add(x[], default_adjoint(eltype(Core.Typeof(x))))
-    elseif x isa (Array{T,0} where T)
+    elseif x isa (Array{T, 0} where {T})
         x[] = recursive_add(x[], default_adjoint(eltype(Core.Typeof(x))))
     else
         throw(EnzymeNonScalarReturnException(x, ""))
@@ -2029,7 +2029,7 @@ for (k, v) in (
     ("enz_runtime_jl_setfield_rev", Enzyme.Compiler.rt_jl_setfield_rev),
     ("enz_runtime_error_if_differentiable", Enzyme.Compiler.error_if_differentiable),
     ("enz_runtime_error_if_active", Enzyme.Compiler.error_if_active),
-    ("enz_add_one_in_place", Enzyme.Compiler.add_one_in_place),
+        ("enz_add_one_in_place", Enzyme.Compiler.add_one_in_place),
 )
     JuliaEnzymeNameMap[k] = v
 end
diff --git a/src/compiler/optimize.jl b/src/compiler/optimize.jl
index bf73b9f..3fa28aa 100644
--- a/src/compiler/optimize.jl
+++ b/src/compiler/optimize.jl
@@ -765,12 +765,12 @@ function post_optimize!(mod::LLVM.Module, tm::LLVM.TargetMachine, machine::Bool
         end
     end
     for f in functions(mod)
-	if isempty(blocks(f))
-		continue
-	end
-	if !has_fn_attr(f, StringAttribute("frame-pointer"))
-		push!(function_attributes(f), StringAttribute("frame-pointer", "all"))
-	end
+        if isempty(blocks(f))
+            continue
+        end
+        if !has_fn_attr(f, StringAttribute("frame-pointer"))
+            push!(function_attributes(f), StringAttribute("frame-pointer", "all"))
+        end
     end
     # @safe_show "post_mod", mod
     # flush(stdout)

@github-actions
Copy link
Contributor

Benchmark Results

main 2598569... main / 2598569...
basics/overhead 4.33 ± 0.01 ns 4.34 ± 0.01 ns 0.998 ± 0.0033
time_to_load 1.28 ± 0.012 s 1.28 ± 0.024 s 1 ± 0.021

Benchmark Plots

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

@codecov
Copy link

codecov bot commented Sep 16, 2025

Codecov Report

❌ Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.10%. Comparing base (25836d0) to head (2598569).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/compiler.jl 77.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2581      +/-   ##
==========================================
+ Coverage   74.98%   75.10%   +0.12%     
==========================================
  Files          56       56              
  Lines       17718    17724       +6     
==========================================
+ Hits        13286    13312      +26     
+ Misses       4432     4412      -20     

☔ 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.

@wsmoses wsmoses changed the title fix fix windows Sep 16, 2025
@wsmoses wsmoses merged commit 1c0668e into main Sep 16, 2025
39 of 42 checks passed
@wsmoses wsmoses deleted the winf branch September 16, 2025 18:45
@vchuravy
Copy link
Member

Nice!

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.

3 participants