Skip to content

Commit e50b747

Browse files
authored
Relax alloc tests on AD (#564)
* make allocs tests easier * replace nightly by lts * move Zygote to broken with ReverseDiff
1 parent 78b9141 commit e50b747

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@ jobs:
1616
test:
1717
name: Julia ${{ matrix.version }} - ${{ matrix.group }}
1818
runs-on: ${{ matrix.os }}
19-
continue-on-error: ${{ matrix.version == 'nightly' }}
2019
strategy:
2120
fail-fast: false
2221
matrix:
2322
version:
2423
- '1'
2524
- '1.6'
26-
- 'nightly'
25+
- 'lts'
2726
os:
2827
- ubuntu-latest
2928
arch:

test/test_utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ function test_zygote_perf_heuristic(
379379
@test_broken primal[1] == primal[2]
380380
end
381381
if passes[2]
382-
@test fwd[1] == fwd[2]
382+
@test abs(fwd[1] - fwd[2]) <= 1
383383
else
384384
@test_broken fwd[1] == fwd[2]
385385
end

test/transform/selecttransform.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
@test kernelmatrix(tx_row, X, Y; obsdim=2) kernelmatrix(ta_row, A, B; obsdim=2)
7373
@test kernelmatrix(tx_col, X, Z; obsdim=1) kernelmatrix(ta_col, A, C; obsdim=1)
7474

75-
@testset "$(AD)" for AD in [:Zygote, :ForwardDiff]
75+
@testset "$(AD)" for AD in [:ForwardDiff]
7676
gx = gradient(AD, X) do x
7777
testfunction(tx_row, x, 2)
7878
end
@@ -103,7 +103,7 @@
103103
@test gx ga
104104
end
105105

106-
@testset "$(AD)" for AD in [:ReverseDiff]
106+
@testset "$(AD)" for AD in [:ReverseDiff, :Zygote]
107107
@test_broken let
108108
gx = gradient(AD, X) do x
109109
testfunction(tx_row, x, 2)

0 commit comments

Comments
 (0)