Skip to content

Commit

Permalink
check if Enzyme is available in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Jul 7, 2023
1 parent 05ff37e commit 0a5f753
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions test/testsuite.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,15 @@ macro conditional_testset(name, skip_tests, expr)
end)
end

const Enzyme_AVAILABLE = haskey(
Pkg.dependencies(),
Base.UUID("7da242da-08ed-463a-9acd-ee780be4f1d9")) # Enzyme

include("test.jl")
include("localmem.jl")
include("enzyme.jl")
if Enzyme_AVAILABLE
include("enzyme.jl")
end
include("private.jl")
include("unroll.jl")
include("nditeration.jl")
Expand All @@ -45,11 +51,10 @@ function testsuite(backend, backend_str, backend_mod, AT, DAT; skip_tests = Set{
@conditional_testset "Localmem" skip_tests begin
localmem_testsuite(backend, AT)
end

@conditional_testset "Enzyme" skip_tests begin
if VERSION >= v"1.7.0" &&
haskey(Pkg.dependencies(), Base.UUID("7da242da-08ed-463a-9acd-ee780be4f1d9")) # Enzyme
enzyme_testsuite(backend, AT)

@static if VERSION >= v"1.7.0" && Enzyme_AVAILABLE
@conditional_testset "Enzyme" skip_tests begin
enzyme_testsuite(backend, AT)
end
end

Expand Down

0 comments on commit 0a5f753

Please sign in to comment.