Skip to content

Commit

Permalink
test: don't run any in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Aug 24, 2024
1 parent 39088c3 commit 8fa8fb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions test/layer_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
norm in ((i, args...; kwargs...) -> BatchNorm(args...; kwargs...),
(i, ch, act; kwargs...) -> GroupNorm(ch, 2, act; kwargs...), nothing)

model = Layers.MLP(2, (4, 4, 2), act; dropout_rate=0.1f0, norm_layer=norm)
model = Layers.MLP(2, (4, 4, 2), act; norm_layer=norm)
ps, st = Lux.setup(Xoshiro(0), model) |> dev

x = randn(Float32, 2, 2) |> aType

@jet model(x, ps, st)

__f = (x, ps) -> sum(abs2, first(model(x, ps, st)))
test_gradients(__f, x, ps; atol=1e-3, rtol=1e-3, soft_fail=[AutoFiniteDiff()])
test_gradients(__f, x, ps; atol=1e-3, rtol=1e-3)
end
end
end
Expand Down
10 changes: 3 additions & 7 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,11 @@ end
using Boltz

const BOLTZ_TEST_GROUP = get(ENV, "BOLTZ_TEST_GROUP", "all")
const RETESTITEMS_NWORKERS = parse(
Int, get(ENV, "RETESTITEMS_NWORKERS", string(min(Hwloc.num_physical_cores(), 16))))
const RETESTITEMS_NWORKER_THREADS = parse(Int,
get(ENV, "RETESTITEMS_NWORKER_THREADS",
string(max(Hwloc.num_virtual_cores() ÷ RETESTITEMS_NWORKERS, 1))))
get(ENV, "RETESTITEMS_NWORKER_THREADS", string(max(Hwloc.num_virtual_cores(), 1))))

@info "Running tests for group: $BOLTZ_TEST_GROUP with $RETESTITEMS_NWORKERS workers"
@info "Running tests for group: $BOLTZ_TEST_GROUP"

ReTestItems.runtests(
Boltz; tags=(BOLTZ_TEST_GROUP == "all" ? nothing : [Symbol(BOLTZ_TEST_GROUP)]),
nworkers=ifelse(BACKEND_GROUP ("cuda", "amdgpu"), 0, RETESTITEMS_NWORKERS),
nworker_threads=RETESTITEMS_NWORKER_THREADS, testitem_timeout=3600)
nworkers=0, nworker_threads=RETESTITEMS_NWORKER_THREADS, testitem_timeout=3600)

0 comments on commit 8fa8fb1

Please sign in to comment.