Skip to content

Fix 1.11 vcat analysis#2602

Merged
wsmoses merged 1 commit intomainfrom
11vcat
Sep 21, 2025
Merged

Fix 1.11 vcat analysis#2602
wsmoses merged 1 commit intomainfrom
11vcat

Conversation

@wsmoses
Copy link
Member

@wsmoses wsmoses commented Sep 21, 2025

No description provided.

@github-actions
Copy link
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/absint.jl b/src/absint.jl
index e51578b..d5f6d6d 100644
--- a/src/absint.jl
+++ b/src/absint.jl
@@ -255,7 +255,7 @@ function should_recurse(@nospecialize(typ2), @nospecialize(arg_t::LLVM.LLVMType)
     end
 end
 
-function get_base_and_offset(@nospecialize(larg::LLVM.Value); offsetAllowed::Bool = true, inttoptr::Bool = false, inst::Union{LLVM.Instruction, Nothing} = nothing, addrcast::Bool=true)::Tuple{LLVM.Value, Int}
+function get_base_and_offset(@nospecialize(larg::LLVM.Value); offsetAllowed::Bool = true, inttoptr::Bool = false, inst::Union{LLVM.Instruction, Nothing} = nothing, addrcast::Bool = true)::Tuple{LLVM.Value, Int}
     offset = 0
     pinst = isa(larg, LLVM.Instruction) ? larg::LLVM.Instruction : inst
     while true
@@ -340,7 +340,7 @@ function abs_typeof(
     )::Union{Tuple{Bool, Type, GPUCompiler.ArgumentCC}, Tuple{Bool, Nothing, Nothing}}
     if (value_type(arg) == LLVM.PointerType(LLVM.StructType(LLVMType[]), Tracked)) || (value_type(arg) == LLVM.PointerType(LLVM.StructType(LLVMType[]), Derived))
         ce, _ = get_base_and_offset(arg; offsetAllowed = false, inttoptr = true)
-	if isa(ce, GlobalVariable)
+        if isa(ce, GlobalVariable)
             gname = LLVM.name(ce)
             for (k, v) in JuliaGlobalNameMap
                 if gname == k
@@ -786,7 +786,7 @@ function abs_typeof(
             end
             push!(seen, cur)
             for (v, _) in LLVM.incoming(cur)
-                v2, off = get_base_and_offset(v, inttoptr=false, addrcast=false)
+                v2, off = get_base_and_offset(v, inttoptr = false, addrcast = false)
                 if off != 0
                     if isa(v, LLVM.Instruction) && arg in collect(operands(v))
                         legal = false
diff --git a/test/runtests.jl b/test/runtests.jl
index 37a42dd..703e188 100644
--- a/test/runtests.jl
+++ b/test/runtests.jl
@@ -819,13 +819,13 @@ end
 
 @testset "1.11 vcat" begin
 
-        function fcat(x)
-           r = vcat(Any[1])
-           return x
-       end
+    function fcat(x)
+        r = vcat(Any[1])
+        return x
+    end
 
-       res = Enzyme.autodiff(Reverse, fcat, Active(2.0))
-       @test res[1][1] ≈ 1.0
+    res = Enzyme.autodiff(Reverse, fcat, Active(2.0))
+    @test res[1][1] ≈ 1.0
 
 end
 

@codecov
Copy link

codecov bot commented Sep 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.23%. Comparing base (62fcfea) to head (13a166c).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2602   +/-   ##
=======================================
  Coverage   75.22%   75.23%           
=======================================
  Files          56       56           
  Lines       17742    17748    +6     
=======================================
+ Hits        13347    13352    +5     
- Misses       4395     4396    +1     

☔ 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

Benchmark Results

main 13a166c... main / 13a166c...
basics/overhead 5.57 ± 0.92 ns 4.34 ± 0.01 ns 1.28 ± 0.21
time_to_load 1.28 ± 0.014 s 1.3 ± 0.0064 s 0.978 ± 0.012

Benchmark Plots

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

@wsmoses wsmoses merged commit e273141 into main Sep 21, 2025
39 of 42 checks passed
@wsmoses wsmoses deleted the 11vcat branch September 21, 2025 20:04
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