Skip to content

Commit

Permalink
ci: install specific AMDGPU version (#1096)
Browse files Browse the repository at this point in the history
* ci: install specific AMDGPU version

* chore: apply formatting suggestion

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* ci: dont pkg update

* ci: fix install syntax

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
avik-pal and github-actions[bot] authored Nov 20, 2024
1 parent cb0900f commit f31dc3a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
3 changes: 1 addition & 2 deletions lib/LuxLib/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if (BACKEND_GROUP == "all" || BACKEND_GROUP == "cuda")
end
end
(BACKEND_GROUP == "all" || BACKEND_GROUP == "amdgpu") &&
push!(EXTRA_PKGS, PackageSpec(; name="AMDGPU"))
push!(EXTRA_PKGS, PackageSpec(; name="AMDGPU", version=v"1.0.4"))
(BACKEND_GROUP == "all" || BACKEND_GROUP == "oneapi") &&
push!(EXTRA_PKGS, PackageSpec(; name="oneAPI"))
(BACKEND_GROUP == "all" || BACKEND_GROUP == "metal") &&
Expand All @@ -30,7 +30,6 @@ if !isempty(EXTRA_PKGS) || !isempty(EXTRA_DEV_PKGS)
@info "Installing Extra Packages for testing" EXTRA_PKGS EXTRA_DEV_PKGS
isempty(EXTRA_PKGS) || Pkg.add(EXTRA_PKGS)
isempty(EXTRA_DEV_PKGS) || Pkg.develop(EXTRA_DEV_PKGS)
Pkg.update()
Base.retry_load_extensions()
Pkg.instantiate()
end
Expand Down
3 changes: 1 addition & 2 deletions lib/MLDataDevices/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if (BACKEND_GROUP == "all" || BACKEND_GROUP == "cuda")
end
end
(BACKEND_GROUP == "all" || BACKEND_GROUP == "amdgpu") &&
push!(EXTRA_PKGS, PackageSpec(; name="AMDGPU"))
push!(EXTRA_PKGS, PackageSpec(; name="AMDGPU", version=v"1.0.4"))
(BACKEND_GROUP == "all" || BACKEND_GROUP == "oneapi") &&
push!(EXTRA_PKGS, PackageSpec(; name="oneAPI"))
(BACKEND_GROUP == "all" || BACKEND_GROUP == "metal") &&
Expand All @@ -27,7 +27,6 @@ if !isempty(EXTRA_PKGS) || !isempty(EXTRA_DEV_PKGS)
@info "Installing Extra Packages for testing" EXTRA_PKGS EXTRA_DEV_PKGS
isempty(EXTRA_PKGS) || Pkg.add(EXTRA_PKGS)
isempty(EXTRA_DEV_PKGS) || Pkg.develop(EXTRA_DEV_PKGS)
Pkg.update()
Base.retry_load_extensions()
Pkg.instantiate()
end
Expand Down
15 changes: 9 additions & 6 deletions lib/WeightInitializers/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@ using InteractiveUtils, Hwloc

const BACKEND_GROUP = lowercase(get(ENV, "BACKEND_GROUP", "All"))

const EXTRA_PKGS = String[]
const EXTRA_PKGS = PackageSpec[]

(BACKEND_GROUP == "all" || BACKEND_GROUP == "cuda") && push!(EXTRA_PKGS, "CUDA")
(BACKEND_GROUP == "all" || BACKEND_GROUP == "amdgpu") && push!(EXTRA_PKGS, "AMDGPU")
(BACKEND_GROUP == "all" || BACKEND_GROUP == "metal") && push!(EXTRA_PKGS, "Metal")
(BACKEND_GROUP == "all" || BACKEND_GROUP == "oneapi") && push!(EXTRA_PKGS, "oneAPI")
(BACKEND_GROUP == "all" || BACKEND_GROUP == "cuda") &&
push!(EXTRA_PKGS, PackageSpec("CUDA"))
(BACKEND_GROUP == "all" || BACKEND_GROUP == "amdgpu") &&
push!(EXTRA_PKGS, PackageSpec(; name="AMDGPU", version=v"1.0.4"))
(BACKEND_GROUP == "all" || BACKEND_GROUP == "metal") &&
push!(EXTRA_PKGS, PackageSpec("Metal"))
(BACKEND_GROUP == "all" || BACKEND_GROUP == "oneapi") &&
push!(EXTRA_PKGS, PackageSpec("oneAPI"))

if !isempty(EXTRA_PKGS)
@info "Installing Extra Packages for testing" EXTRA_PKGS=EXTRA_PKGS
Pkg.add(EXTRA_PKGS)
Pkg.update()
Base.retry_load_extensions()
Pkg.instantiate()
end
Expand Down
3 changes: 1 addition & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@ if (BACKEND_GROUP == "all" || BACKEND_GROUP == "cuda")
end
end
(BACKEND_GROUP == "all" || BACKEND_GROUP == "amdgpu") &&
push!(EXTRA_PKGS, Pkg.PackageSpec("AMDGPU"))
push!(EXTRA_PKGS, Pkg.PackageSpec(; name="AMDGPU", version=v"1.0.4"))

if !isempty(EXTRA_PKGS) || !isempty(EXTRA_DEV_PKGS)
@info "Installing Extra Packages for testing" EXTRA_PKGS EXTRA_DEV_PKGS
isempty(EXTRA_PKGS) || Pkg.add(EXTRA_PKGS)
isempty(EXTRA_DEV_PKGS) || Pkg.develop(EXTRA_DEV_PKGS)
Pkg.update()
Base.retry_load_extensions()
Pkg.instantiate()
Pkg.precompile()
Expand Down

0 comments on commit f31dc3a

Please sign in to comment.