Skip to content

Conversation

@wsmoses
Copy link
Member

@wsmoses wsmoses commented Jan 31, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 31, 2026

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 0c3e82d0..88780d2b 100644
--- a/src/compiler.jl
+++ b/src/compiler.jl
@@ -1446,23 +1446,23 @@ function julia_sanitize(
                 bad = BasicBlock(fn, "bad")
                 position!(builder, entry)
                 inp, sval = collect(parameters(fn))
-		cmp = nothing
-		@show value_type(inp), isa(value_type(inp), LLVM.ArrayType)
-
-		if isa(value_type(inp), LLVM.ArrayType)
-		   nelem = length(value_type(inp))
-		   for i in 1:nelem
-			   e0 = extract_value!(builder, inp, i - 1)
-			cmp0 = fcmp!(builder, LLVM.API.LLVMRealUNO, e0, e0)
-			if cmp == nothing
-				cmp = cmp0
-			else
-				cmp = or!(builder, cmp, cmp0)
-			end
-		   end
-		else
-                  cmp = fcmp!(builder, LLVM.API.LLVMRealUNO, inp, inp)
-		end
+                cmp = nothing
+                @show value_type(inp), isa(value_type(inp), LLVM.ArrayType)
+
+                if isa(value_type(inp), LLVM.ArrayType)
+                    nelem = length(value_type(inp))
+                    for i in 1:nelem
+                        e0 = extract_value!(builder, inp, i - 1)
+                        cmp0 = fcmp!(builder, LLVM.API.LLVMRealUNO, e0, e0)
+                        if cmp == nothing
+                            cmp = cmp0
+                        else
+                            cmp = or!(builder, cmp, cmp0)
+                        end
+                    end
+                else
+                    cmp = fcmp!(builder, LLVM.API.LLVMRealUNO, inp, inp)
+                end
 
                 br!(builder, cmp, bad, good)
 
@@ -1475,17 +1475,17 @@ function julia_sanitize(
                 unreachable!(builder)
                 dispose(builder)
             end
-    if LLVM.API.LLVMVerifyFunction(fn, LLVM.API.LLVMReturnStatusAction) != 0
-        msg = sprint() do io
-            println(
-                io,
-                LLVM.API.LLVMVerifyFunction(fn, LLVM.API.LLVMPrintMessageAction),
-            )
-            println(io, string(fn))
-            println(io, "Broken julia.sanitize")
-        end
-        throw(LLVM.LLVMException(msg))
-    end
+            if LLVM.API.LLVMVerifyFunction(fn, LLVM.API.LLVMReturnStatusAction) != 0
+                msg = sprint() do io
+                    println(
+                        io,
+                        LLVM.API.LLVMVerifyFunction(fn, LLVM.API.LLVMPrintMessageAction),
+                    )
+                    println(io, string(fn))
+                    println(io, "Broken julia.sanitize")
+                end
+                throw(LLVM.LLVMException(msg))
+            end
         end
         # val = 
         call!(B, FT, fn, LLVM.Value[val, globalstring_ptr!(B, stringv)])

@codecov
Copy link

codecov bot commented Jan 31, 2026

Codecov Report

❌ Patch coverage is 0% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.70%. Comparing base (179b608) to head (5eb8c2b).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/compiler.jl 0.00% 18 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2952      +/-   ##
==========================================
- Coverage   66.76%   66.70%   -0.06%     
==========================================
  Files          65       65              
  Lines       21522    21539      +17     
==========================================
- Hits        14369    14368       -1     
- Misses       7153     7171      +18     

☔ 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 Jan 31, 2026

Benchmark Results

main 5eb8c2b... main / 5eb8c2b...
basics/make_zero/namedtuple 0.0517 ± 0.0029 μs 0.053 ± 0.0025 μs 0.977 ± 0.072
basics/make_zero/struct 0.274 ± 0.0057 μs 0.276 ± 0.0062 μs 0.991 ± 0.03
basics/overhead 4.34 ± 0.011 ns 4.94 ± 0.01 ns 0.878 ± 0.0029
basics/remake_zero!/namedtuple 0.239 ± 0.0079 μs 0.235 ± 0.0068 μs 1.02 ± 0.045
basics/remake_zero!/struct 0.241 ± 0.0076 μs 0.242 ± 0.008 μs 0.996 ± 0.045
fold_broadcast/multidim_sum_bcast/1D 10.5 ± 1.7 μs 10.4 ± 0.84 μs 1 ± 0.18
fold_broadcast/multidim_sum_bcast/2D 12.2 ± 0.28 μs 12.2 ± 0.29 μs 0.998 ± 0.033
time_to_load 1.03 ± 0.0027 s 1.02 ± 0.019 s 1.01 ± 0.019

Benchmark Plots

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

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