|
227 | 227 | modifiedBetween = (mode != API.DEM_ForwardMode, false) |
228 | 228 |
|
229 | 229 | world = enzyme_extract_world(LLVM.parent(position(B))) |
| 230 | + @assert world == enzyme_context(gutils).world |
230 | 231 |
|
231 | 232 | pfuncT = funcT |
232 | 233 |
|
|
550 | 551 | tt = Tuple{thunkTy,dfuncT,Bool} |
551 | 552 | mode = get_mode(gutils) |
552 | 553 | world = enzyme_extract_world(LLVM.parent(position(B))) |
| 554 | + @assert world == enzyme_context(gutils).world |
553 | 555 | entry = nested_codegen!(mode, mod, runtime_pfor_fwd, tt, world) |
554 | 556 | push!(function_attributes(entry), EnumAttribute("alwaysinline")) |
555 | 557 |
|
|
594 | 596 | } |
595 | 597 | mode = get_mode(gutils) |
596 | 598 | world = enzyme_extract_world(LLVM.parent(position(B))) |
| 599 | + @assert world == enzyme_context(gutils).world |
597 | 600 | entry = nested_codegen!(mode, mod, runtime_pfor_augfwd, tt, world) |
598 | 601 | push!(function_attributes(entry), EnumAttribute("alwaysinline")) |
599 | 602 |
|
|
627 | 630 | @register_rev function threadsfor_rev(B, orig, gutils, tape) |
628 | 631 | mod = LLVM.parent(LLVM.parent(LLVM.parent(orig))) |
629 | 632 | world = enzyme_extract_world(LLVM.parent(position(B))) |
| 633 | + @assert world == enzyme_context(gutils).world |
630 | 634 | if is_constant_value(gutils, orig) && is_constant_inst(gutils, orig) |
631 | 635 | return |
632 | 636 | end |
|
675 | 679 | mode = get_mode(gutils) |
676 | 680 |
|
677 | 681 | world = enzyme_extract_world(LLVM.parent(position(B))) |
| 682 | + @assert world == enzyme_context(gutils).world |
678 | 683 |
|
679 | 684 | ops = collect(operands(orig)) |
680 | 685 |
|
|
731 | 736 | ModifiedBetween = (uncacheable[1] != 0,) |
732 | 737 |
|
733 | 738 | world = enzyme_extract_world(LLVM.parent(position(B))) |
| 739 | + @assert world == enzyme_context(gutils).world |
734 | 740 |
|
735 | 741 | ops = collect(operands(orig)) |
736 | 742 |
|
|
0 commit comments