Skip to content

Commit 1b74dc8

Browse files
committed
fixup! fixup! access enzyme_context through gutils
1 parent e29d19b commit 1b74dc8

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/compiler.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1666,7 +1666,7 @@ function shadow_alloc_rewrite(V::LLVM.API.LLVMValueRef, gutils::API.EnzymeGradie
16661666
mode == API.DEM_ReverseModeCombined
16671667
fn = LLVM.parent(LLVM.parent(V))
16681668
world = enzyme_extract_world(fn)
1669-
@assert world == enzyme_gutils_context(gutils).world
1669+
@assert world == enzyme_context(gutils).world
16701670
if !guaranteed_nonactive(Ty, world)
16711671
B = LLVM.IRBuilder()
16721672
position!(B, V)

src/errors.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,8 @@ function julia_error(
475475
) #=error=#
476476
world = enzyme_extract_world(f)
477477
end
478-
@assert world == enzyme_gutils_context(gutils).world
478+
# TODO: get world from TypeAnalyzer
479+
# @assert world == enzyme_gutils_context(gutils).world
479480
throw(IllegalTypeAnalysisException(msg, mi, world, sval, ir, bt))
480481
elseif errtype == API.ET_NoType
481482
@assert B != C_NULL
@@ -964,7 +965,9 @@ end
964965
) #=error=#
965966
world = enzyme_extract_world(f)
966967
end
967-
@assert world == enzyme_gutils_context(gutils).world
968+
# what is data?
969+
# Can we get world here?
970+
# @assert world == enzyme_context(gutils).world
968971
mode = Enzyme.API.DEM_ReverseModeCombined
969972

970973
if mi !== nothing

0 commit comments

Comments
 (0)