Skip to content

Commit

Permalink
ci: reduce test groups
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Nov 4, 2024
1 parent 76d3fb5 commit 758e109
Show file tree
Hide file tree
Showing 12 changed files with 65 additions and 67 deletions.
33 changes: 9 additions & 24 deletions .github/workflows/CI_LuxLib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,8 @@ jobs:
test_group:
- "conv"
- "dense"
- "batch_norm"
- "group_norm"
- "instance_norm"
- "layer_norm"
- "other_ops"
- "batched_ops"
- "others"
- "normalization"
- "misc"
blas_backend:
- "default"
loopvec:
Expand All @@ -55,26 +50,21 @@ jobs:
blas_backend: "mkl"
version: "1.10"
loopvec: "true"
- os: ubuntu-latest
- os: macos-latest
test_group: "dense"
blas_backend: "default"
blas_backend: "appleaccelerate"
version: "1.10"
loopvec: "false"
loopvec: "true"
- os: ubuntu-latest
test_group: "batched_ops"
test_group: "dense"
blas_backend: "default"
version: "1.10"
loopvec: "false"
- os: ubuntu-latest
test_group: "other_ops"
test_group: "misc"
blas_backend: "default"
version: "1.10"
loopvec: "false"
- os: macos-latest
test_group: "dense"
blas_backend: "appleaccelerate"
version: "1.10"
loopvec: "true"
- os: macos-latest
test_group: "all"
blas_backend: "default"
Expand Down Expand Up @@ -146,13 +136,8 @@ jobs:
test_group:
- "conv"
- "dense"
- "batch_norm"
- "group_norm"
- "instance_norm"
- "layer_norm"
- "other_ops"
- "batched_ops"
- "others"
- "normalization"
- "misc"
blas_backend:
- "default"
loopvec:
Expand Down
2 changes: 1 addition & 1 deletion lib/LuxLib/test/common_ops/activation_tests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@testitem "Activation Functions" tags=[:other_ops] setup=[SharedTestSetup] begin
@testitem "Activation Functions" tags=[:misc] setup=[SharedTestSetup] begin
rng = StableRNG(1234)

apply_act(f::F, x) where {F} = sum(abs2, f.(x))
Expand Down
6 changes: 3 additions & 3 deletions lib/LuxLib/test/common_ops/bias_act_tests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@testitem "Bias Activation" tags=[:other_ops] setup=[SharedTestSetup] begin
@testitem "Bias Activation" tags=[:misc] setup=[SharedTestSetup] begin
rng = StableRNG(1234)

bias_act_loss1(act, x, b) = sum(abs2, act.(x .+ LuxLib.Impl.reshape_bias(x, b)))
Expand Down Expand Up @@ -68,7 +68,7 @@
end
end

@testitem "Bias Activation (ReverseDiff)" tags=[:other_ops] setup=[SharedTestSetup] begin
@testitem "Bias Activation (ReverseDiff)" tags=[:misc] setup=[SharedTestSetup] begin
using ReverseDiff, Tracker

x = rand(Float32, 3, 4)
Expand All @@ -88,7 +88,7 @@ end
@test z isa Tracker.TrackedArray
end

@testitem "Bias Activation: Zero-sized Arrays" tags=[:other_ops] setup=[SharedTestSetup] begin
@testitem "Bias Activation: Zero-sized Arrays" tags=[:misc] setup=[SharedTestSetup] begin
@testset "$mode" for (mode, aType, ongpu) in MODES
x = rand(Float32, 4, 3, 2, 0) |> aType
b = rand(Float32, 2) |> aType
Expand Down
6 changes: 3 additions & 3 deletions lib/LuxLib/test/common_ops/dropout_tests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@testitem "Dropout" tags=[:other_ops] setup=[SharedTestSetup] begin
@testitem "Dropout" tags=[:misc] setup=[SharedTestSetup] begin
rng = StableRNG(12345)

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

@testitem "Dropout with Preset Mask" tags=[:other_ops] setup=[SharedTestSetup] begin
@testitem "Dropout with Preset Mask" tags=[:misc] setup=[SharedTestSetup] begin
using Statistics

rng = StableRNG(12345)
Expand Down Expand Up @@ -132,7 +132,7 @@ end
end
end

@testitem "Alpha Dropout" tags=[:other_ops] setup=[SharedTestSetup] begin
@testitem "Alpha Dropout" tags=[:misc] setup=[SharedTestSetup] begin
using Statistics

rng = StableRNG(12345)
Expand Down
17 changes: 11 additions & 6 deletions lib/LuxLib/test/normalization/batchnorm_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ export setup_batchnorm, ALL_TEST_CONFIGS, TEST_BLOCKS, run_batchnorm_testing

end

@testitem "Batch Norm: Group 1" tags=[:batch_norm] setup=[SharedTestSetup, BatchNormSetup] begin
@testitem "Batch Norm: Group 1" tags=[:normalization] setup=[
SharedTestSetup, BatchNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $sz, $act $affine $track_stats" for (T, sz, training, affine, track_stats, act) in TEST_BLOCKS[1]
!fp64 && T == Float64 && continue
Expand All @@ -132,7 +133,8 @@ end
end
end

@testitem "Batch Norm: Group 2" tags=[:batch_norm] setup=[SharedTestSetup, BatchNormSetup] begin
@testitem "Batch Norm: Group 2" tags=[:normalization] setup=[
SharedTestSetup, BatchNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $sz, $act $affine $track_stats" for (T, sz, training, affine, track_stats, act) in TEST_BLOCKS[2]
!fp64 && T == Float64 && continue
Expand All @@ -142,7 +144,8 @@ end
end
end

@testitem "Batch Norm: Group 3" tags=[:batch_norm] setup=[SharedTestSetup, BatchNormSetup] begin
@testitem "Batch Norm: Group 3" tags=[:normalization] setup=[
SharedTestSetup, BatchNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $sz, $act $affine $track_stats" for (T, sz, training, affine, track_stats, act) in TEST_BLOCKS[3]
!fp64 && T == Float64 && continue
Expand All @@ -152,7 +155,8 @@ end
end
end

@testitem "Batch Norm: Group 4" tags=[:batch_norm] setup=[SharedTestSetup, BatchNormSetup] begin
@testitem "Batch Norm: Group 4" tags=[:normalization] setup=[
SharedTestSetup, BatchNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $sz, $act $affine $track_stats" for (T, sz, training, affine, track_stats, act) in TEST_BLOCKS[4]
!fp64 && T == Float64 && continue
Expand All @@ -162,7 +166,8 @@ end
end
end

@testitem "Batch Norm: Group 5" tags=[:batch_norm] setup=[SharedTestSetup, BatchNormSetup] begin
@testitem "Batch Norm: Group 5" tags=[:normalization] setup=[
SharedTestSetup, BatchNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $sz, $act $affine $track_stats" for (T, sz, training, affine, track_stats, act) in TEST_BLOCKS[5]
!fp64 && T == Float64 && continue
Expand All @@ -172,7 +177,7 @@ end
end
end

@testitem "Batch Norm: Mixed Precision" tags=[:batch_norm] setup=[SharedTestSetup] begin
@testitem "Batch Norm: Mixed Precision" tags=[:normalization] setup=[SharedTestSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
!fp64 && aType == Float64 && continue

Expand Down
15 changes: 10 additions & 5 deletions lib/LuxLib/test/normalization/groupnorm_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ export setup_groupnorm, ALL_TEST_CONFIGS, TEST_BLOCKS, run_groupnorm_testing

end

@testitem "Group Norm: Group 1" tags=[:group_norm] setup=[SharedTestSetup, GroupNormSetup] begin
@testitem "Group Norm: Group 1" tags=[:normalization] setup=[
SharedTestSetup, GroupNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $sz, $groups, $affine, $act" for (T, sz, groups, affine, act) in TEST_BLOCKS[1]
!fp64 && T == Float64 && continue
Expand All @@ -101,7 +102,8 @@ end
end
end

@testitem "Group Norm: Group 2" tags=[:group_norm] setup=[SharedTestSetup, GroupNormSetup] begin
@testitem "Group Norm: Group 2" tags=[:normalization] setup=[
SharedTestSetup, GroupNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $sz, $groups, $affine, $act" for (T, sz, groups, affine, act) in TEST_BLOCKS[2]
!fp64 && T == Float64 && continue
Expand All @@ -110,7 +112,8 @@ end
end
end

@testitem "Group Norm: Group 3" tags=[:group_norm] setup=[SharedTestSetup, GroupNormSetup] begin
@testitem "Group Norm: Group 3" tags=[:normalization] setup=[
SharedTestSetup, GroupNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $sz, $groups, $affine, $act" for (T, sz, groups, affine, act) in TEST_BLOCKS[3]
!fp64 && T == Float64 && continue
Expand All @@ -119,7 +122,8 @@ end
end
end

@testitem "Group Norm: Group 4" tags=[:group_norm] setup=[SharedTestSetup, GroupNormSetup] begin
@testitem "Group Norm: Group 4" tags=[:normalization] setup=[
SharedTestSetup, GroupNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $sz, $groups, $affine, $act" for (T, sz, groups, affine, act) in TEST_BLOCKS[4]
!fp64 && T == Float64 && continue
Expand All @@ -128,7 +132,8 @@ end
end
end

@testitem "Group Norm: Group 5" tags=[:group_norm] setup=[SharedTestSetup, GroupNormSetup] begin
@testitem "Group Norm: Group 5" tags=[:normalization] setup=[
SharedTestSetup, GroupNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $sz, $groups, $affine, $act" for (T, sz, groups, affine, act) in TEST_BLOCKS[5]
!fp64 && T == Float64 && continue
Expand Down
10 changes: 5 additions & 5 deletions lib/LuxLib/test/normalization/instancenorm_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export setup_instancenorm, ALL_TEST_CONFIGS, TEST_BLOCKS, run_instancenorm_testi

end

@testitem "Instance Norm: Group 1" tags=[:instance_norm] setup=[
@testitem "Instance Norm: Group 1" tags=[:normalization] setup=[
SharedTestSetup, InstanceNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $sz, $training $act" for (T, sz, training, act) in TEST_BLOCKS[1]
Expand All @@ -93,7 +93,7 @@ end
end
end

@testitem "Instance Norm: Group 2" tags=[:instance_norm] setup=[
@testitem "Instance Norm: Group 2" tags=[:normalization] setup=[
SharedTestSetup, InstanceNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $sz, $training $act" for (T, sz, training, act) in TEST_BLOCKS[2]
Expand All @@ -104,7 +104,7 @@ end
end
end

@testitem "Instance Norm: Group 3" tags=[:instance_norm] setup=[
@testitem "Instance Norm: Group 3" tags=[:normalization] setup=[
SharedTestSetup, InstanceNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $sz, $training $act" for (T, sz, training, act) in TEST_BLOCKS[3]
Expand All @@ -115,7 +115,7 @@ end
end
end

@testitem "Instance Norm: Group 4" tags=[:instance_norm] setup=[
@testitem "Instance Norm: Group 4" tags=[:normalization] setup=[
SharedTestSetup, InstanceNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $sz, $training $act" for (T, sz, training, act) in TEST_BLOCKS[4]
Expand All @@ -126,7 +126,7 @@ end
end
end

@testitem "Instance Norm: Group 5" tags=[:instance_norm] setup=[
@testitem "Instance Norm: Group 5" tags=[:normalization] setup=[
SharedTestSetup, InstanceNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $sz, $training $act" for (T, sz, training, act) in TEST_BLOCKS[5]
Expand Down
17 changes: 11 additions & 6 deletions lib/LuxLib/test/normalization/layernorm_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ export ALL_TEST_CONFIGS, TEST_BLOCKS, run_layernorm_testing

end

@testitem "Layer Norm: Group 1" tags=[:layer_norm] setup=[SharedTestSetup, LayerNormSetup] begin
@testitem "Layer Norm: Group 1" tags=[:normalization] setup=[
SharedTestSetup, LayerNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $x_shape, $act" for (T, x_shape, affine_shape, act) in TEST_BLOCKS[1]
!fp64 && T == Float64 && continue
Expand All @@ -99,7 +100,8 @@ end
end
end

@testitem "Layer Norm: Group 2" tags=[:layer_norm] setup=[SharedTestSetup, LayerNormSetup] begin
@testitem "Layer Norm: Group 2" tags=[:normalization] setup=[
SharedTestSetup, LayerNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $x_shape, $act" for (T, x_shape, affine_shape, act) in TEST_BLOCKS[2]
!fp64 && T == Float64 && continue
Expand All @@ -109,7 +111,8 @@ end
end
end

@testitem "Layer Norm: Group 3" tags=[:layer_norm] setup=[SharedTestSetup, LayerNormSetup] begin
@testitem "Layer Norm: Group 3" tags=[:normalization] setup=[
SharedTestSetup, LayerNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $x_shape, $act" for (T, x_shape, affine_shape, act) in TEST_BLOCKS[3]
!fp64 && T == Float64 && continue
Expand All @@ -119,7 +122,8 @@ end
end
end

@testitem "Layer Norm: Group 4" tags=[:layer_norm] setup=[SharedTestSetup, LayerNormSetup] begin
@testitem "Layer Norm: Group 4" tags=[:normalization] setup=[
SharedTestSetup, LayerNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $x_shape, $act" for (T, x_shape, affine_shape, act) in TEST_BLOCKS[4]
!fp64 && T == Float64 && continue
Expand All @@ -129,7 +133,8 @@ end
end
end

@testitem "Layer Norm: Group 5" tags=[:layer_norm] setup=[SharedTestSetup, LayerNormSetup] begin
@testitem "Layer Norm: Group 5" tags=[:normalization] setup=[
SharedTestSetup, LayerNormSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
@testset "eltype $T, size $x_shape, $act" for (T, x_shape, affine_shape, act) in TEST_BLOCKS[5]
!fp64 && T == Float64 && continue
Expand All @@ -139,7 +144,7 @@ end
end
end

@testitem "Layer Norm: Error Checks" tags=[:layer_norm] setup=[SharedTestSetup] begin
@testitem "Layer Norm: Error Checks" tags=[:normalization] setup=[SharedTestSetup] begin
@testset "$mode" for (mode, aType, ongpu, fp64) in MODES
!fp64 && continue

Expand Down
Loading

0 comments on commit 758e109

Please sign in to comment.