Skip to content

Commit 01444be

Browse files
committed
make some small progess towards 1.12
1 parent 2c7f206 commit 01444be

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

test/helpers/enzyme.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,11 @@ function deferred_codegen_id_generator(world::UInt, source, self, ft::Type, tt::
8181
# prepare a new code info
8282
new_ci = copy(ci)
8383
empty!(new_ci.code)
84+
if VERSION >= v"1.12.0-DEV.173"
85+
else
8486
empty!(new_ci.codelocs)
8587
empty!(new_ci.linetable)
88+
end
8689
empty!(new_ci.ssaflags)
8790
new_ci.ssavaluetypes = 0
8891

@@ -107,8 +110,12 @@ function deferred_codegen_id_generator(world::UInt, source, self, ft::Type, tt::
107110
# return the deferred_codegen_id
108111
push!(new_ci.code, CC.ReturnNode(id))
109112
push!(new_ci.ssaflags, 0x00)
110-
push!(new_ci.linetable, GPUCompiler.@LineInfoNode(methodinstance))
113+
if VERSION >= v"1.12.0-DEV.173"
114+
new_ci.debuginfo = Core.DebugInfo(:none)
115+
else
116+
push!(new_ci.linetable, GPUCompiler.@LineInfoNode(mi))
111117
push!(new_ci.codelocs, 1)
118+
end
112119
new_ci.ssavaluetypes += 1
113120

114121
return new_ci

test/utils.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,7 @@ end
9292
@test occursin(ansi_color, highlighted) skip = !can_highlight
9393
end
9494
end
95+
96+
@testset "Mock Enzyme" begin
97+
Enzyme.deferred_codegen_id(typeof(identity), Tuple{Vector{Float64}})
98+
end

0 commit comments

Comments
 (0)