Skip to content

Commit

Permalink
Faster testing
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Apr 22, 2024
1 parent 2207dd3 commit 192a886
Show file tree
Hide file tree
Showing 26 changed files with 175 additions and 146 deletions.
26 changes: 22 additions & 4 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
steps:
- group: ":julia: CUDA GPU"
steps:
- label: ":julia: Julia {{matrix.julia}} + CUDA GPU"
- label: ":julia: Julia {{matrix.julia}} + {{matrix.test_group}} + CUDA GPU"
plugins:
- JuliaCI/julia#v1:
version: "{{matrix.julia}}"
Expand All @@ -16,13 +16,22 @@ steps:
queue: "juliagpu"
cuda: "*"
env:
GROUP: "CUDA"
BACKEND_GROUP: "CUDA"
LUX_TEST_GROUP: "{{matrix.test_group}}"
if: build.message !~ /\[skip tests\]/
timeout_in_minutes: 240
matrix:
setup:
julia:
- "1"
test_group:
- "core_layers"
- "contrib"
- "helpers"
- "distributed"
- "normalize_layers"
- "others"
- "recurrent_layers"

- group: ":telescope: Downstream CUDA"
steps:
Expand Down Expand Up @@ -80,7 +89,7 @@ steps:

- group: ":julia: AMD GPU"
steps:
- label: ":julia: Julia: {{matrix.julia}} + AMD GPU"
- label: ":julia: Julia: {{matrix.julia}} + {{matrix.test_group}} + AMD GPU"
plugins:
- JuliaCI/julia#v1:
version: "{{matrix.julia}}"
Expand All @@ -96,7 +105,8 @@ steps:
JULIA_AMDGPU_CORE_MUST_LOAD: "1"
JULIA_AMDGPU_HIP_MUST_LOAD: "1"
JULIA_AMDGPU_DISABLE_ARTIFACTS: "1"
GROUP: "AMDGPU"
BACKEND_GROUP: "AMDGPU"
LUX_TEST_GROUP: "{{matrix.test_group}}"
agents:
queue: "juliagpu"
rocm: "*"
Expand All @@ -107,6 +117,14 @@ steps:
setup:
julia:
- "1"
test_group:
- "core_layers"
- "contrib"
- "helpers"
- "distributed"
- "normalize_layers"
- "others"
- "recurrent_layers"

- group: ":telescope: Downstream AMD GPU"
steps:
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ jobs:
matrix:
version:
- "1"
test_group:
- "core_layers"
- "contrib"
- "helpers"
- "distributed"
- "normalize_layers"
- "others"
- "recurrent_layers"
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
Expand All @@ -37,7 +45,8 @@ jobs:
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
GROUP: "CPU"
BACKEND_GROUP: "CPU"
LUX_TEST_GROUP: ${{ matrix.test_group }}
RETESTITEMS_NWORKERS: 4
RETESTITEMS_NWORKER_THREADS: 2
- uses: julia-actions/julia-processcoverage@v1
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/Downgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ jobs:
strategy:
matrix:
version: ['1']
test_group:
- "core_layers"
- "contrib"
- "helpers"
- "distributed"
- "normalize_layers"
- "others"
- "recurrent_layers"
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
Expand All @@ -27,7 +35,8 @@ jobs:
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
GROUP: "CPU"
BACKEND_GROUP: "CPU"
LUX_TEST_GROUP: ${{ matrix.test_group }}
RETESTITEMS_NWORKERS: 4
RETESTITEMS_NWORKER_THREADS: 2
- uses: julia-actions/julia-processcoverage@v1
Expand Down
33 changes: 31 additions & 2 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ version = "0.1.20"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[[deps.LuxLib]]
deps = ["ArrayInterface", "ChainRulesCore", "FastBroadcast", "FastClosures", "KernelAbstractions", "LinearAlgebra", "LuxCore", "Markdown", "NNlib", "PrecompileTools", "Random", "Reexport", "Statistics"]
git-tree-sha1 = "de9f3a2155d5fbf86bdf3391435876e1c203fc2b"
deps = ["ArrayInterface", "ChainRulesCore", "FastBroadcast", "FastClosures", "GPUArraysCore", "KernelAbstractions", "LinearAlgebra", "LuxCore", "Markdown", "NNlib", "PrecompileTools", "Random", "Reexport", "Statistics", "Strided"]
git-tree-sha1 = "67c205a9b325f10e5751fc8f0c3ec2df042c6b3f"
repo-rev = "ap/fused_dense"
repo-url = "https://github.com/LuxDL/LuxLib.jl.git"
uuid = "82251201-b29d-42c6-8e01-566dec8acb11"
Expand Down Expand Up @@ -413,6 +413,12 @@ git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1"
uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e"
version = "0.5.5+0"

[[deps.PackageExtensionCompat]]
git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518"
uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930"
version = "1.0.2"
weakdeps = ["Requires", "TOML"]

[[deps.PartialFunctions]]
deps = ["MacroTools"]
git-tree-sha1 = "47b49a4dbc23b76682205c646252c0f9e1eb75af"
Expand Down Expand Up @@ -554,6 +560,24 @@ git-tree-sha1 = "b518da45c50dfab8384125ba829f1739bda41034"
uuid = "7792a7ef-975c-4747-a70f-980b88e8d1da"
version = "0.5.5"

[[deps.Strided]]
deps = ["LinearAlgebra", "StridedViews", "TupleTools"]
git-tree-sha1 = "40c69be0e1b72ee2f42923b7d1ff13e0b04e675c"
uuid = "5e0ebb24-38b0-5f93-81fe-25c709ecae67"
version = "2.0.4"

[[deps.StridedViews]]
deps = ["LinearAlgebra", "PackageExtensionCompat"]
git-tree-sha1 = "5b765c4e401693ab08981989f74a36a010aa1d8e"
uuid = "4db3bf67-4bd7-4b4e-b153-31dc3fb37143"
version = "0.2.2"

[deps.StridedViews.extensions]
StridedViewsCUDAExt = "CUDA"

[deps.StridedViews.weakdeps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"

[[deps.SuiteSparse]]
deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"]
uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
Expand All @@ -579,6 +603,11 @@ git-tree-sha1 = "eda08f7e9818eb53661b3deb74e3159460dfbc27"
uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5"
version = "0.5.2"

[[deps.TupleTools]]
git-tree-sha1 = "41d61b1c545b06279871ef1a4b5fcb2cac2191cd"
uuid = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6"
version = "1.5.0"

[[deps.UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
Expand Down
4 changes: 2 additions & 2 deletions test/contrib/debug_tests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@testitem "Debugging Tools: DimensionMismatch" setup=[SharedTestSetup] begin
@testitem "Debugging Tools: DimensionMismatch" setup=[SharedTestSetup] tags=[:contrib] begin
using Logging

rng = get_stable_rng(12345)
Expand Down Expand Up @@ -43,7 +43,7 @@
end
end

@testitem "Debugging Tools: NaN" setup=[SharedTestSetup] begin
@testitem "Debugging Tools: NaN" setup=[SharedTestSetup] tags=[:contrib] begin
using Logging, ChainRulesCore
import ChainRulesCore as CRC

Expand Down
4 changes: 2 additions & 2 deletions test/contrib/freeze_tests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@testitem "All Parameter Freezing" setup=[SharedTestSetup] begin
@testitem "All Parameter Freezing" setup=[SharedTestSetup] tags=[:contrib] begin
rng = get_stable_rng(12345)

@testset "$mode" for (mode, aType, device, ongpu) in MODES
Expand Down Expand Up @@ -61,7 +61,7 @@
end
end

@testitem "Partial Freezing" setup=[SharedTestSetup] begin
@testitem "Partial Freezing" setup=[SharedTestSetup] tags=[:contrib] begin
rng = get_stable_rng(12345)

@testset "$mode" for (mode, aType, device, ongpu) in MODES
Expand Down
2 changes: 1 addition & 1 deletion test/contrib/map_tests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@testitem "Layer Map" setup=[SharedTestSetup] begin
@testitem "Layer Map" setup=[SharedTestSetup] tags=[:contrib] begin
using Setfield

function zero_dense_params_1(l, ps, st, name)
Expand Down
2 changes: 1 addition & 1 deletion test/contrib/share_parameters_tests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@testitem "Parameter Sharing" setup=[SharedTestSetup] begin
@testitem "Parameter Sharing" setup=[SharedTestSetup] tags=[:contrib] begin
rng = get_stable_rng(12345)

@testset "$mode" for (mode, aType, device, ongpu) in MODES
Expand Down
4 changes: 2 additions & 2 deletions test/contrib/training_tests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@testitem "TrainState" setup=[SharedTestSetup] begin
@testitem "TrainState" setup=[SharedTestSetup] tags=[:contrib] begin
using Optimisers

rng = get_stable_rng(12345)
Expand All @@ -22,7 +22,7 @@
end
end

@testitem "AbstractADTypes" setup=[SharedTestSetup] begin
@testitem "AbstractADTypes" setup=[SharedTestSetup] tags=[:contrib] begin
using ADTypes, Optimisers

function _loss_function(model, ps, st, data)
Expand Down
2 changes: 1 addition & 1 deletion test/core_tests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@testitem "Functors Compatibility" setup=[SharedTestSetup] begin
@testitem "Functors Compatibility" setup=[SharedTestSetup] tags=[:others] begin
using Functors

rng = get_stable_rng(12345)
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/compact_tests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@testitem "@compact" setup=[SharedTestSetup] begin
@testitem "@compact" setup=[SharedTestSetup] tags=[:helpers] begin
using ComponentArrays

rng = get_stable_rng(12345)
Expand Down
10 changes: 5 additions & 5 deletions test/layers/basic_tests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@testitem "Miscellaneous Layers" setup=[SharedTestSetup] begin
@testitem "Miscellaneous Layers" setup=[SharedTestSetup] tags=[:core_layers] begin
rng = get_stable_rng(12345)

@testset "$mode" for (mode, aType, device, ongpu) in MODES
Expand Down Expand Up @@ -72,7 +72,7 @@
end
end

@testitem "Dense" setup=[SharedTestSetup] begin
@testitem "Dense" setup=[SharedTestSetup] tags=[:core_layers] begin
rng = get_stable_rng(12345)

@testset "$mode" for (mode, aType, device, ongpu) in MODES
Expand Down Expand Up @@ -148,7 +148,7 @@ end
end
end

@testitem "Scale" setup=[SharedTestSetup] begin
@testitem "Scale" setup=[SharedTestSetup] tags=[:core_layers] begin
rng = get_stable_rng(12345)

@testset "$mode" for (mode, aType, device, ongpu) in MODES
Expand Down Expand Up @@ -218,7 +218,7 @@ end
end
end

@testitem "Bilinear" setup=[SharedTestSetup] begin
@testitem "Bilinear" setup=[SharedTestSetup] tags=[:core_layers] begin
rng = get_stable_rng(12345)

@testset "$mode" for (mode, aType, device, ongpu) in MODES
Expand Down Expand Up @@ -312,7 +312,7 @@ end
end
end

@testitem "Embedding" setup=[SharedTestSetup] begin
@testitem "Embedding" setup=[SharedTestSetup] tags=[:core_layers] begin
rng = get_stable_rng(12345)

@testset "$mode" for (mode, aType, device, ongpu) in MODES
Expand Down
14 changes: 7 additions & 7 deletions test/layers/containers_tests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

@testitem "SkipConnection" setup=[SharedTestSetup] begin
@testitem "SkipConnection" setup=[SharedTestSetup] tags=[:core_layers] begin
rng = get_stable_rng(12345)

@testset "$mode" for (mode, aType, device, ongpu) in MODES
Expand Down Expand Up @@ -31,7 +31,7 @@
end
end

@testitem "Parallel" setup=[SharedTestSetup] begin
@testitem "Parallel" setup=[SharedTestSetup] tags=[:core_layers] begin
rng = get_stable_rng(12345)

@testset "$mode" for (mode, aType, device, ongpu) in MODES
Expand Down Expand Up @@ -149,7 +149,7 @@ end
end
end

@testitem "PairwiseFusion" setup=[SharedTestSetup] begin
@testitem "PairwiseFusion" setup=[SharedTestSetup] tags=[:core_layers] begin
rng = get_stable_rng(12345)

@testset "$mode" for (mode, aType, device, ongpu) in MODES
Expand Down Expand Up @@ -198,7 +198,7 @@ end
end
end

@testitem "BranchLayer" setup=[SharedTestSetup] begin
@testitem "BranchLayer" setup=[SharedTestSetup] tags=[:core_layers] begin
rng = get_stable_rng(12345)

@testset "$mode" for (mode, aType, device, ongpu) in MODES
Expand Down Expand Up @@ -232,7 +232,7 @@ end
end
end

@testitem "Chain" setup=[SharedTestSetup] begin
@testitem "Chain" setup=[SharedTestSetup] tags=[:core_layers] begin
rng = get_stable_rng(12345)

@testset "$mode" for (mode, aType, device, ongpu) in MODES
Expand Down Expand Up @@ -308,7 +308,7 @@ end
end
end

@testitem "Maxout" setup=[SharedTestSetup] begin
@testitem "Maxout" setup=[SharedTestSetup] tags=[:core_layers] begin
rng = get_stable_rng(12345)

@testset "$mode" for (mode, aType, device, ongpu) in MODES
Expand Down Expand Up @@ -370,7 +370,7 @@ end
end
end

@testitem "Repeated" setup=[SharedTestSetup] begin
@testitem "Repeated" setup=[SharedTestSetup] tags=[:core_layers] begin
rng = get_stable_rng(12345)

@testset "$mode" for (mode, aType, device, ongpu) in MODES
Expand Down
Loading

0 comments on commit 192a886

Please sign in to comment.