Skip to content

Commit 3ea99e1

Browse files
committed
Fix GC crash in Enzyme integration test
1 parent 0d5e567 commit 3ea99e1

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/Enzyme.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ concurrency:
1818

1919
jobs:
2020
enzyme:
21-
runs-on: ubuntu-latest
21+
runs-on: macos-latest
2222
steps:
2323
- uses: actions/checkout@v5
2424

@@ -27,9 +27,19 @@ jobs:
2727
version: "1.11"
2828

2929
- uses: julia-actions/cache@v2
30+
id: julia-cache
3031

3132
- name: Run AD with Enzyme on demo models
3233
working-directory: test/integration/enzyme
3334
run: |
3435
julia --project=. --color=yes -e 'using Pkg; Pkg.instantiate()'
3536
julia --project=. --color=yes main.jl
37+
38+
- name: Save Julia depot cache on cancel or failure
39+
id: julia-cache-save
40+
if: cancelled() || failure()
41+
uses: actions/cache/save@v4
42+
with:
43+
path: |
44+
${{ steps.julia-cache.outputs.cache-paths }}
45+
key: ${{ steps.julia-cache.outputs.cache-key }}

test/integration/enzyme/main.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
using DynamicPPL.TestUtils: DEMO_MODELS
22
using DynamicPPL.TestUtils.AD: run_ad
3+
using DynamicPPL: OrderedDict
34
using ADTypes: AutoEnzyme
45
using Test: @test, @testset
56
import Enzyme: set_runtime_activity, Forward, Reverse, Const
67
using ForwardDiff: ForwardDiff # run_ad uses FD for correctness test
78

8-
ADTYPES = Dict(
9+
ADTYPES = OrderedDict(
910
"EnzymeForward" =>
1011
AutoEnzyme(; mode=set_runtime_activity(Forward), function_annotation=Const),
1112
"EnzymeReverse" =>

0 commit comments

Comments
 (0)