Skip to content

Commit

Permalink
Run downstream only if label
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Jun 17, 2024
1 parent ead9773 commit ca8089e
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .buildkite/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ steps:
cuda: "*"
env:
RETESTITEMS_NWORKERS: 2
if: build.message !~ /\[skip tests\]/ && build.message !~ /\[skip downstream\]/ && build.message !~ /\[skip ci\]/
if: build.message !~ /\[skip tests\]/ && build.message !~ /\[skip downstream\]/ && build.message !~ /\[skip ci\]/ && build.pull_request.labels includes "run downstream tests"
timeout_in_minutes: 240
matrix:
setup:
Expand Down Expand Up @@ -103,7 +103,7 @@ steps:
JULIA_AMDGPU_CORE_MUST_LOAD: "1"
JULIA_AMDGPU_HIP_MUST_LOAD: "1"
JULIA_AMDGPU_DISABLE_ARTIFACTS: "1"
if: build.message !~ /\[skip tests\]/ && build.message !~ /\[skip downstream\]/ && build.message !~ /\[skip ci\]/
if: build.message !~ /\[skip tests\]/ && build.message !~ /\[skip downstream\]/ && build.message !~ /\[skip ci\]/ && build.pull_request.labels includes "run downstream tests"
timeout_in_minutes: 60
matrix:
setup:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:

downstream:
name: Downstream ${{ matrix.package.repo }}/${{ matrix.package.group }}
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }} && github.base_ref == github.event.repository.default_branch
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }} && github.base_ref == github.event.repository.default_branch && contains(github.event.pull_request.labels.*.name, 'run downstream test')
runs-on: ${{ matrix.os }}
timeout-minutes: 60
env:
Expand Down
1 change: 0 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ GPUArraysCore = "0.1.6"
LinearAlgebra = "1.10"
Logging = "1.10"
LuxAMDGPU = "0.2.2"
LuxCUDA = "0.3.2"
LuxCore = "0.1.14"
LuxDeviceUtils = "0.1.19"
LuxLib = "0.3.23"
Expand Down
8 changes: 7 additions & 1 deletion test/distributed/common_distributedtest.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
using Lux, MPI, NCCL, Test
using LuxAMDGPU, LuxCUDA

const input_args = length(ARGS) == 2 ? ARGS : ("CPU", "mpi")
if input_args[1] == "CUDA"
using LuxCUDA
end
if input_args[1] == "AMDGPU"
using LuxAMDGPU
end

const backend_type = input_args[2] == "nccl" ? NCCLBackend : MPIBackend
const dev = input_args[1] == "CPU" ? LuxCPUDevice() :
(input_args[1] == "CUDA" ? LuxCUDADevice() : LuxAMDGPUDevice())
Expand Down
8 changes: 7 additions & 1 deletion test/distributed/data_distributedtest.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
using Lux, MLUtils, MPI, NCCL, Random, Test
using LuxAMDGPU, LuxCUDA

const input_args = length(ARGS) == 2 ? ARGS : ("CPU", "mpi")
if input_args[1] == "CUDA"
using LuxCUDA
end
if input_args[1] == "AMDGPU"
using LuxAMDGPU
end

const backend_type = input_args[2] == "nccl" ? NCCLBackend : MPIBackend
const dev = input_args[1] == "CPU" ? LuxCPUDevice() :
(input_args[1] == "CUDA" ? LuxCUDADevice() : LuxAMDGPUDevice())
Expand Down
8 changes: 7 additions & 1 deletion test/distributed/optimizer_distributedtest.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
using Lux, MPI, NCCL, Optimisers, Random, Test
using LuxAMDGPU, LuxCUDA

const input_args = length(ARGS) == 2 ? ARGS : ("CPU", "mpi")
if input_args[1] == "CUDA"
using LuxCUDA
end
if input_args[1] == "AMDGPU"
using LuxAMDGPU
end

const backend_type = input_args[2] == "nccl" ? NCCLBackend : MPIBackend
const dev = input_args[1] == "CPU" ? LuxCPUDevice() :
(input_args[1] == "CUDA" ? LuxCUDADevice() : LuxAMDGPUDevice())
Expand Down
8 changes: 7 additions & 1 deletion test/distributed/synchronize_distributedtest.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
using ComponentArrays, Lux, MPI, NCCL, Optimisers, Random, Test
using LuxAMDGPU, LuxCUDA

const input_args = length(ARGS) == 2 ? ARGS : ("CPU", "mpi")
if input_args[1] == "CUDA"
using LuxCUDA
end
if input_args[1] == "AMDGPU"
using LuxAMDGPU
end

const backend_type = input_args[2] == "nccl" ? NCCLBackend : MPIBackend
const dev = input_args[1] == "CPU" ? LuxCPUDevice() :
(input_args[1] == "CUDA" ? LuxCUDADevice() : LuxAMDGPUDevice())
Expand Down
3 changes: 3 additions & 0 deletions test/qa_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
end

@testitem "Explicit Imports: Quality Assurance" tags=[:others] begin
import Pkg
Pkg.add(["Flux", "LuxAMDGPU"])

# Load all trigger packages
import Lux, ComponentArrays, ReverseDiff, Flux, LuxAMDGPU, SimpleChains, Tracker,
Zygote, Enzyme
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ReTestItems, Pkg, Tests
using ReTestItems, Pkg, Test

const LUX_TEST_GROUP = lowercase(get(ENV, "LUX_TEST_GROUP", "all"))
@info "Running tests for group: $LUX_TEST_GROUP"
Expand Down

0 comments on commit ca8089e

Please sign in to comment.