Skip to content

Commit

Permalink
Merge pull request #31 from LuxDL/ap/metal_ga
Browse files Browse the repository at this point in the history
Use Github Actions Mac M1 runners
  • Loading branch information
avik-pal authored Feb 6, 2024
2 parents 8cd4d16 + eada626 commit 418da6a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 45 deletions.
25 changes: 5 additions & 20 deletions lib/MLDataDevices/.buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ steps:
setup:
julia:
- "1"
- "nightly"
adjustments:
- with:
julia: "nightly"
soft_fail: true

- group: ":telescope: Downstream CUDA"
steps:
Expand Down Expand Up @@ -106,11 +101,6 @@ steps:
setup:
julia:
- "1"
- "nightly"
adjustments:
- with:
julia: "nightly"
soft_fail: true

- group: ":telescope: Downstream AMD GPU"
steps:
Expand Down Expand Up @@ -173,11 +163,11 @@ steps:
version: "{{matrix.julia}}"
- JuliaCI/julia-test#v1:
test_args: "--quickfail"
- JuliaCI/julia-coverage#v1:
codecov: true
dirs:
- src
- ext
# - JuliaCI/julia-coverage#v1:
# codecov: true
# dirs:
# - src
# - ext
agents:
queue: "juliaecosystem"
os: "macos"
Expand All @@ -190,11 +180,6 @@ steps:
setup:
julia:
- "1"
- "nightly"
adjustments:
- with:
julia: "nightly"
soft_fail: true

env:
SECRET_CODECOV_TOKEN: "PxSr3Y7vdbiwaoX51uGykPsogxmP1IOBt5Z8TwP9GqDxIrvFocEVV2DR4Bebee12G/HYvXtQTyYXH49DpzlsfJ7ri1GQZxd9WRr+aM1DDYmzfDCfpadp4hMoJ5NQvmc/PzeGrNWOOaewaLTUP1eEaG4suygZN0lc5q9BCchIJeqoklGms5DVt/HtfTmwoD/s4wGoIJINi4RoFgnCAkzSh11hTAkyjVerfBGWEi/8E6+WBq3UKwaW4HnT02wG9qFnD4XkHpIpjMxJTpdBn5ufKI+QoJ7qJHlwqgDCtsOCblApccLTjH/BnTahNoSb/b0wdS/cblOTrtdPGzZ5UvmQ4Q==;U2FsdGVkX1/Ji2Nqeq3tqTYCBik6iXILP+rriPRqj/qxhFu4vBWWT3UnlfqDzj6oVdXyuKt0+5e+x33x2S0mBw=="
5 changes: 4 additions & 1 deletion lib/MLDataDevices/.github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ concurrency:
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
runs-on: ubuntu-latest
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- "1"
os:
- ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
Expand Down
6 changes: 3 additions & 3 deletions lib/MLDataDevices/src/LuxDeviceUtils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ function _get_gpu_device(; force_gpu_usage::Bool)
1. If no GPU is available, nothing needs to be done.
2. If GPU is available, load the corresponding trigger package.
a. LuxCUDA.jl for NVIDIA CUDA Support!
b. LuxAMDGPU.jl for AMD GPU ROCM Support!
c. Metal.jl for Apple Metal GPU Support!""" maxlog=1
a. LuxCUDA.jl for NVIDIA CUDA Support.
b. LuxAMDGPU.jl for AMD GPU ROCM Support.
c. Metal.jl for Apple Metal GPU Support.""" maxlog=1
return cpu_device()
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/MLDataDevices/test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestSetExtensions = "98d24dd4-01ad-11ea-1b02-c9a08f80db04"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
33 changes: 12 additions & 21 deletions lib/MLDataDevices/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,33 +1,24 @@
using Aqua, SafeTestsets, Test, Pkg
using Aqua, SafeTestsets, Test, TestSetExtensions, Pkg
using LuxCore, LuxDeviceUtils

const GROUP = get(ENV, "GROUP", "CUDA")
const GROUP = get(ENV, "GROUP", "NONE")

@testset "LuxDeviceUtils Tests" begin
if GROUP == "CUDA"
@safetestset "CUDA" begin
include("cuda.jl")
end
@testset ExtendedTestSet "LuxDeviceUtils Tests" begin
if GROUP == "CUDA" || GROUP == "ALL"
@safetestset "CUDA" include("cuda.jl")
end

if GROUP == "AMDGPU"
@safetestset "CUDA" begin
include("amdgpu.jl")
end
if GROUP == "AMDGPU" || GROUP == "ALL"
@safetestset "AMDGPU" include("amdgpu.jl")
end

if GROUP == "Metal"
@safetestset "Metal" begin
include("metal.jl")
end
if GROUP == "Metal" || GROUP == "ALL"
@safetestset "Metal" include("metal.jl")
end

@testset "Others" begin
@testset "Aqua Tests" begin
Aqua.test_all(LuxDeviceUtils)
end
@safetestset "Component Arrays" begin
include("component_arrays.jl")
end
@testset "Aqua Tests" Aqua.test_all(LuxDeviceUtils)

@safetestset "Component Arrays" include("component_arrays.jl")
end
end

0 comments on commit 418da6a

Please sign in to comment.