Skip to content

Commit

Permalink
[CI] Only run Enzyme on v1.10+ (#535)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Oct 4, 2024
1 parent 27ded01 commit dd3044a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ steps:
julia -e 'println("--- :julia: Instantiating project")
using Pkg
try
Pkg.develop([PackageSpec(; path=pwd()), PackageSpec("Enzyme"), PackageSpec("CUDA")])
Pkg.develop([PackageSpec(; path=pwd()), PackageSpec("Enzyme"), PackageSpec("EnzymeCore"), PackageSpec("CUDA")])
catch err
Pkg.develop(; path=pwd())
Pkg.add(["CUDA", "Enzyme"])
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,26 @@ jobs:
arch: ${{ matrix.arch }}
show-versioninfo: true
- uses: julia-actions/cache@v2
- run: |
julia -e '@static if VERSION >= v"1.10"
using Pkg
withenv("JULIA_PKG_PRECOMPILE_AUTO" => 0) do
Pkg.activate("test")
Pkg.add(["Enzyme", "EnzymeCore"])
# to check compatibility, also add Enzyme to the main environment
# (or Pkg.test, which merges both environments, could fail)
Pkg.activate(".")
# Try to co-develop Enzyme and KA
try
Pkg.develop([PackageSpec("Enzyme"), PackageSpec("EnzymeCore")])
catch err
@error "Could not install Enzyme" exception=(err,catch_backtrace())
exit(3)
end
end
end
'
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
with:
Expand Down
4 changes: 0 additions & 4 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Enzyme = "0.13"
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ struct NewBackend <: KernelAbstractions.GPU end
@test_throws MethodError kernel()
end

include("extensions/enzyme.jl")
@static if VERSION >= v"1.7.0"
@static if VERSION >= v"1.10.0"
include("extensions/enzyme.jl")
@testset "Enzyme" begin
enzyme_testsuite(CPU, Array)
end
Expand Down

0 comments on commit dd3044a

Please sign in to comment.