diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 617e97225..c2fb86e79 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -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}}" @@ -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: @@ -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}}" @@ -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: "*" @@ -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: diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2ad20dea1..3ffbb999b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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 @@ -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 diff --git a/.github/workflows/Downgrade.yml b/.github/workflows/Downgrade.yml index 269275ed5..625d38882 100644 --- a/.github/workflows/Downgrade.yml +++ b/.github/workflows/Downgrade.yml @@ -14,8 +14,17 @@ jobs: test: runs-on: ubuntu-latest strategy: + fail-fast: false 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 @@ -27,7 +36,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 diff --git a/Manifest.toml b/Manifest.toml deleted file mode 100644 index d404456db..000000000 --- a/Manifest.toml +++ /dev/null @@ -1,630 +0,0 @@ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.10.2" -manifest_format = "2.0" -project_hash = "1baceb0c137c49981f015b1d02cf5539271fa2dd" - -[[deps.ADTypes]] -git-tree-sha1 = "016833eb52ba2d6bea9fcb50ca295980e728ee24" -uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -version = "0.2.7" - -[[deps.Adapt]] -deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "6a55b747d1812e699320963ffde36f1ebdda4099" -uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.0.4" -weakdeps = ["StaticArrays"] - - [deps.Adapt.extensions] - AdaptStaticArraysExt = "StaticArrays" - -[[deps.ArgTools]] -uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.1" - -[[deps.ArrayInterface]] -deps = ["Adapt", "LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "133a240faec6e074e07c31ee75619c90544179cf" -uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.10.0" - - [deps.ArrayInterface.extensions] - ArrayInterfaceBandedMatricesExt = "BandedMatrices" - ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" - ArrayInterfaceCUDAExt = "CUDA" - ArrayInterfaceCUDSSExt = "CUDSS" - ArrayInterfaceChainRulesExt = "ChainRules" - ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" - ArrayInterfaceReverseDiffExt = "ReverseDiff" - ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" - ArrayInterfaceTrackerExt = "Tracker" - - [deps.ArrayInterface.weakdeps] - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" - ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" - GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" - -[[deps.Atomix]] -deps = ["UnsafeAtomics"] -git-tree-sha1 = "c06a868224ecba914baa6942988e2f2aade419be" -uuid = "a9b6321e-bd34-4604-b9c9-b65b8de01458" -version = "0.1.0" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" - -[[deps.BitTwiddlingConvenienceFunctions]] -deps = ["Static"] -git-tree-sha1 = "0c5f81f47bbbcf4aea7b2959135713459170798b" -uuid = "62783981-4cbd-42fc-bca8-16325de8dc4b" -version = "0.1.5" - -[[deps.CEnum]] -git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc" -uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" -version = "0.5.0" - -[[deps.CPUSummary]] -deps = ["CpuId", "IfElse", "PrecompileTools", "Static"] -git-tree-sha1 = "601f7e7b3d36f18790e2caf83a882d88e9b71ff1" -uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" -version = "0.2.4" - -[[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "575cd02e080939a33b6df6c5853d14924c08e35b" -uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.23.0" -weakdeps = ["SparseArrays"] - - [deps.ChainRulesCore.extensions] - ChainRulesCoreSparseArraysExt = "SparseArrays" - -[[deps.CloseOpenIntervals]] -deps = ["Static", "StaticArrayInterface"] -git-tree-sha1 = "70232f82ffaab9dc52585e0dd043b5e0c6b714f1" -uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" -version = "0.1.12" - -[[deps.Compat]] -deps = ["TOML", "UUIDs"] -git-tree-sha1 = "c955881e3c981181362ae4088b35995446298b80" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.14.0" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.1.0+0" - -[[deps.ConcreteStructs]] -git-tree-sha1 = "f749037478283d372048690eb3b5f92a79432b34" -uuid = "2569d6c7-a4a2-43d3-a901-331e8e4be471" -version = "0.2.3" - -[[deps.ConstructionBase]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "260fd2400ed2dab602a7c15cf10c1933c59930a2" -uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.5" - - [deps.ConstructionBase.extensions] - ConstructionBaseIntervalSetsExt = "IntervalSets" - ConstructionBaseStaticArraysExt = "StaticArrays" - - [deps.ConstructionBase.weakdeps] - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.CpuId]] -deps = ["Markdown"] -git-tree-sha1 = "fcbb72b032692610bfbdb15018ac16a36cf2e406" -uuid = "adafc99b-e345-5852-983c-f28acb93d879" -version = "0.3.1" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" - -[[deps.DocStringExtensions]] -deps = ["LibGit2"] -git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.3" - -[[deps.Downloads]] -deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] -uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -version = "1.6.0" - -[[deps.FastBroadcast]] -deps = ["ArrayInterface", "LinearAlgebra", "Polyester", "Static", "StaticArrayInterface", "StrideArraysCore"] -git-tree-sha1 = "a6e756a880fc419c8b41592010aebe6a5ce09136" -uuid = "7034ab61-46d4-4ed7-9d0f-46aef9175898" -version = "0.2.8" - -[[deps.FastClosures]] -git-tree-sha1 = "acebe244d53ee1b461970f8910c235b259e772ef" -uuid = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a" -version = "0.3.2" - -[[deps.FileWatching]] -uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" - -[[deps.Functors]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "d3e63d9fa13f8eaa2f06f64949e2afc593ff52c2" -uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196" -version = "0.4.10" - -[[deps.Future]] -deps = ["Random"] -uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" - -[[deps.GPUArraysCore]] -deps = ["Adapt"] -git-tree-sha1 = "ec632f177c0d990e64d955ccc1b8c04c485a0950" -uuid = "46192b85-c4d5-4398-a991-12ede77f4527" -version = "0.1.6" - -[[deps.IfElse]] -git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" -uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" -version = "0.1.1" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" - -[[deps.IrrationalConstants]] -git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" -uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.2" - -[[deps.JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.5.0" - -[[deps.KernelAbstractions]] -deps = ["Adapt", "Atomix", "InteractiveUtils", "LinearAlgebra", "MacroTools", "PrecompileTools", "Requires", "SparseArrays", "StaticArrays", "UUIDs", "UnsafeAtomics", "UnsafeAtomicsLLVM"] -git-tree-sha1 = "ed7167240f40e62d97c1f5f7735dea6de3cc5c49" -uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c" -version = "0.9.18" - - [deps.KernelAbstractions.extensions] - EnzymeExt = "EnzymeCore" - - [deps.KernelAbstractions.weakdeps] - EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" - -[[deps.LLVM]] -deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Preferences", "Printf", "Requires", "Unicode"] -git-tree-sha1 = "839c82932db86740ae729779e610f07a1640be9a" -uuid = "929cbde3-209d-540e-8aea-75f648917ca0" -version = "6.6.3" - - [deps.LLVM.extensions] - BFloat16sExt = "BFloat16s" - - [deps.LLVM.weakdeps] - BFloat16s = "ab4f0b2a-ad5b-11e8-123f-65d77653426b" - -[[deps.LLVMExtra_jll]] -deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "TOML"] -git-tree-sha1 = "88b916503aac4fb7f701bb625cd84ca5dd1677bc" -uuid = "dad2f222-ce93-54a1-a47d-0025e8a3acab" -version = "0.0.29+0" - -[[deps.LayoutPointers]] -deps = ["ArrayInterface", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface"] -git-tree-sha1 = "62edfee3211981241b57ff1cedf4d74d79519277" -uuid = "10f19ff3-798f-405d-979b-55457f8fc047" -version = "0.1.15" - -[[deps.LazyArtifacts]] -deps = ["Artifacts", "Pkg"] -uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" - -[[deps.LibCURL]] -deps = ["LibCURL_jll", "MozillaCACerts_jll"] -uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.4" - -[[deps.LibCURL_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] -uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.4.0+0" - -[[deps.LibGit2]] -deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" - -[[deps.LibGit2_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] -uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.6.4+0" - -[[deps.LibSSH2_jll]] -deps = ["Artifacts", "Libdl", "MbedTLS_jll"] -uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.11.0+1" - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - -[[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "18144f3e9cbe9b15b070288eef858f71b291ce37" -uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.27" - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" - - [deps.LogExpFunctions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" - -[[deps.LuxCore]] -deps = ["FastClosures", "Functors", "Random", "Setfield"] -git-tree-sha1 = "f799f3aa8599f79ed5e2c9fbaf74907c1ebe15ce" -uuid = "bb33d45b-7691-41d6-9220-0943567d0623" -version = "0.1.14" - -[[deps.LuxDeviceUtils]] -deps = ["Adapt", "ChainRulesCore", "FastClosures", "Functors", "LuxCore", "PrecompileTools", "Preferences", "Random"] -git-tree-sha1 = "bbcf12d598b8ef6d2b12e506b1d18125552c3b27" -uuid = "34f89e08-e1d5-43b4-8944-0b49ac560553" -version = "0.1.20" - - [deps.LuxDeviceUtils.extensions] - LuxDeviceUtilsAMDGPUExt = "AMDGPU" - LuxDeviceUtilsCUDAExt = "CUDA" - LuxDeviceUtilsFillArraysExt = "FillArrays" - LuxDeviceUtilsGPUArraysExt = "GPUArrays" - LuxDeviceUtilsLuxAMDGPUExt = "LuxAMDGPU" - LuxDeviceUtilsLuxCUDAExt = "LuxCUDA" - LuxDeviceUtilsMetalGPUArraysExt = ["GPUArrays", "Metal"] - LuxDeviceUtilsRecursiveArrayToolsExt = "RecursiveArrayTools" - LuxDeviceUtilsSparseArraysExt = "SparseArrays" - LuxDeviceUtilsZygoteExt = "Zygote" - - [deps.LuxDeviceUtils.weakdeps] - AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b" - GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" - LuxAMDGPU = "83120cb1-ca15-4f04-bf3b-6967d2e6b60b" - LuxCUDA = "d0bbae9a-e099-4d5b-a835-1c6931763bda" - Metal = "dde4c033-4e86-420c-a63e-0dd931031962" - RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - 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" -repo-rev = "ap/fused_dense" -repo-url = "https://github.com/LuxDL/LuxLib.jl.git" -uuid = "82251201-b29d-42c6-8e01-566dec8acb11" -version = "0.3.15" - - [deps.LuxLib.extensions] - LuxLibForwardDiffExt = "ForwardDiff" - LuxLibReverseDiffExt = "ReverseDiff" - LuxLibTrackerAMDGPUExt = ["AMDGPU", "Tracker"] - LuxLibTrackerExt = "Tracker" - LuxLibTrackercuDNNExt = ["CUDA", "Tracker", "cuDNN"] - LuxLibcuDNNExt = ["CUDA", "cuDNN"] - - [deps.LuxLib.weakdeps] - AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - cuDNN = "02a925ec-e4fe-4b08-9a7e-0d78e3d38ccd" - -[[deps.MacroTools]] -deps = ["Markdown", "Random"] -git-tree-sha1 = "2fa9ee3e63fd3a4f7a9a4f4744a52f4856de82df" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.13" - -[[deps.ManualMemory]] -git-tree-sha1 = "bcaef4fc7a0cfe2cba636d84cda54b5e4e4ca3cd" -uuid = "d125e4d3-2237-4719-b19c-fa641b8a4667" -version = "0.1.8" - -[[deps.Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" - -[[deps.MbedTLS_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+1" - -[[deps.MozillaCACerts_jll]] -uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.1.10" - -[[deps.NNlib]] -deps = ["Adapt", "Atomix", "ChainRulesCore", "GPUArraysCore", "KernelAbstractions", "LinearAlgebra", "Pkg", "Random", "Requires", "Statistics"] -git-tree-sha1 = "1fa1a14766c60e66ab22e242d45c1857c83a3805" -uuid = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" -version = "0.9.13" - - [deps.NNlib.extensions] - NNlibAMDGPUExt = "AMDGPU" - NNlibCUDACUDNNExt = ["CUDA", "cuDNN"] - NNlibCUDAExt = "CUDA" - NNlibEnzymeCoreExt = "EnzymeCore" - - [deps.NNlib.weakdeps] - AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" - cuDNN = "02a925ec-e4fe-4b08-9a7e-0d78e3d38ccd" - -[[deps.NetworkOptions]] -uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -version = "1.2.0" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.23+4" - -[[deps.OpenLibm_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+2" - -[[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" -uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.5+0" - -[[deps.PartialFunctions]] -deps = ["MacroTools"] -git-tree-sha1 = "47b49a4dbc23b76682205c646252c0f9e1eb75af" -uuid = "570af359-4316-4cb7-8c74-252c00c2016b" -version = "1.2.0" - -[[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.10.0" - -[[deps.Polyester]] -deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Requires", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] -git-tree-sha1 = "2ba5f33cbb51a85ef58a850749492b08f9bf2193" -uuid = "f517fe37-dbe3-4b94-8317-1923a5111588" -version = "0.7.13" - -[[deps.PolyesterWeave]] -deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"] -git-tree-sha1 = "240d7170f5ffdb285f9427b92333c3463bf65bf6" -uuid = "1d0040c9-8b98-4ee7-8388-3f51789ca0ad" -version = "0.2.1" - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.2.1" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.4.3" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" - -[[deps.Random]] -deps = ["SHA"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - -[[deps.Reexport]] -git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" -uuid = "189a3867-3050-52da-a836-e630ba90ab69" -version = "1.2.2" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.0" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.SIMDTypes]] -git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" -uuid = "94e857df-77ce-4151-89e5-788b33177be4" -version = "0.1.0" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" - -[[deps.Setfield]] -deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] -git-tree-sha1 = "e2cc6d8c88613c05e1defb55170bf5ff211fbeac" -uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" -version = "1.1.1" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" - -[[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.10.0" - -[[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" -uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.3.1" -weakdeps = ["ChainRulesCore"] - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" - -[[deps.Static]] -deps = ["IfElse"] -git-tree-sha1 = "d2fdac9ff3906e27f7a618d47b676941baa6c80c" -uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" -version = "0.8.10" - -[[deps.StaticArrayInterface]] -deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "Requires", "SparseArrays", "Static", "SuiteSparse"] -git-tree-sha1 = "5d66818a39bb04bf328e92bc933ec5b4ee88e436" -uuid = "0d7ed370-da01-4f52-bd93-41d350b8b718" -version = "1.5.0" - - [deps.StaticArrayInterface.extensions] - StaticArrayInterfaceOffsetArraysExt = "OffsetArrays" - StaticArrayInterfaceStaticArraysExt = "StaticArrays" - - [deps.StaticArrayInterface.weakdeps] - OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.StaticArrays]] -deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "bf074c045d3d5ffd956fa0a461da38a44685d6b2" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.3" -weakdeps = ["ChainRulesCore", "Statistics"] - - [deps.StaticArrays.extensions] - StaticArraysChainRulesCoreExt = "ChainRulesCore" - StaticArraysStatisticsExt = "Statistics" - -[[deps.StaticArraysCore]] -git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" -uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.2" - -[[deps.Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.10.0" - -[[deps.StrideArraysCore]] -deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface", "ThreadingUtilities"] -git-tree-sha1 = "b518da45c50dfab8384125ba829f1739bda41034" -uuid = "7792a7ef-975c-4747-a70f-980b88e8d1da" -version = "0.5.5" - -[[deps.SuiteSparse]] -deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] -uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" - -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.2.1+1" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[deps.Tar]] -deps = ["ArgTools", "SHA"] -uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.0" - -[[deps.ThreadingUtilities]] -deps = ["ManualMemory"] -git-tree-sha1 = "eda08f7e9818eb53661b3deb74e3159460dfbc27" -uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5" -version = "0.5.2" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" - -[[deps.UnsafeAtomics]] -git-tree-sha1 = "6331ac3440856ea1988316b46045303bef658278" -uuid = "013be700-e6cd-48c3-b4a1-df204f14c38f" -version = "0.2.1" - -[[deps.UnsafeAtomicsLLVM]] -deps = ["LLVM", "UnsafeAtomics"] -git-tree-sha1 = "323e3d0acf5e78a56dfae7bd8928c989b4f3083e" -uuid = "d80eeb9a-aca5-4d75-85e5-170c8b632249" -version = "0.1.3" - -[[deps.WeightInitializers]] -deps = ["ChainRulesCore", "LinearAlgebra", "PartialFunctions", "PrecompileTools", "Random", "SpecialFunctions", "Statistics"] -git-tree-sha1 = "f0e6760ef9d22f043710289ddf29e4a4048c4822" -uuid = "d49dbf32-c5c2-4618-8acc-27bb2598ef2d" -version = "0.1.7" - - [deps.WeightInitializers.extensions] - WeightInitializersCUDAExt = "CUDA" - - [deps.WeightInitializers.weakdeps] - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - -[[deps.Zlib_jll]] -deps = ["Libdl"] -uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+1" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+1" - -[[deps.nghttp2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.52.0+1" - -[[deps.p7zip_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+2" diff --git a/Project.toml b/Project.toml index ee6f4a81e..075d5a314 100644 --- a/Project.toml +++ b/Project.toml @@ -63,9 +63,9 @@ LuxZygoteExt = "Zygote" ADTypes = "0.2, 1" Adapt = "4" Aqua = "0.8.4" -ArrayInterface = "7.8" +ArrayInterface = "7.9" CUDA = "5.2" -ChainRulesCore = "1.21" +ChainRulesCore = "1.23" ComponentArrays = "0.15.11" ConcreteStructs = "0.2.3" ConstructionBase = "1.5" @@ -80,7 +80,7 @@ LinearAlgebra = "1.10" Logging = "1.10" LuxAMDGPU = "0.2.2" LuxCUDA = "0.3.2" -LuxCore = "0.1.12" +LuxCore = "0.1.14" LuxDeviceUtils = "0.1.19" LuxLib = "0.3.15" LuxTestUtils = "0.1.15" @@ -102,7 +102,7 @@ SimpleChains = "0.4.6" StableRNGs = "1" Statistics = "1.10" Test = "1.10" -Tracker = "0.2.31" +Tracker = "0.2.34" WeightInitializers = "0.1.5" Zygote = "0.6.69" julia = "1.10" diff --git a/bench/Project.toml b/bench/Project.toml index 6375a9da4..d930e322d 100644 --- a/bench/Project.toml +++ b/bench/Project.toml @@ -18,3 +18,6 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" Tapir = "07d77754-e150-4737-8c94-cd238a1fb45b" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[compat] +ADTypes = "0.2" diff --git a/test/contrib/debug_tests.jl b/test/contrib/debug_tests.jl index 803a09a3c..82bb215e0 100644 --- a/test/contrib/debug_tests.jl +++ b/test/contrib/debug_tests.jl @@ -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) @@ -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 diff --git a/test/contrib/freeze_tests.jl b/test/contrib/freeze_tests.jl index 828331d61..d5f3cc30d 100644 --- a/test/contrib/freeze_tests.jl +++ b/test/contrib/freeze_tests.jl @@ -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 @@ -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 diff --git a/test/contrib/map_tests.jl b/test/contrib/map_tests.jl index c152746bb..9264a00b6 100644 --- a/test/contrib/map_tests.jl +++ b/test/contrib/map_tests.jl @@ -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) diff --git a/test/contrib/share_parameters_tests.jl b/test/contrib/share_parameters_tests.jl index b8ab24dee..707489f79 100644 --- a/test/contrib/share_parameters_tests.jl +++ b/test/contrib/share_parameters_tests.jl @@ -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 diff --git a/test/contrib/training_tests.jl b/test/contrib/training_tests.jl index ded09da6c..bdb902852 100644 --- a/test/contrib/training_tests.jl +++ b/test/contrib/training_tests.jl @@ -1,4 +1,4 @@ -@testitem "TrainState" setup=[SharedTestSetup] begin +@testitem "TrainState" setup=[SharedTestSetup] tags=[:contrib] begin using Optimisers rng = get_stable_rng(12345) @@ -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) diff --git a/test/core_tests.jl b/test/core_tests.jl index d6c4c42f8..8276aae8d 100644 --- a/test/core_tests.jl +++ b/test/core_tests.jl @@ -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) diff --git a/test/helpers/compact_tests.jl b/test/helpers/compact_tests.jl index caa37fe3d..e057c7725 100644 --- a/test/helpers/compact_tests.jl +++ b/test/helpers/compact_tests.jl @@ -1,4 +1,4 @@ -@testitem "@compact" setup=[SharedTestSetup] begin +@testitem "@compact" setup=[SharedTestSetup] tags=[:helpers] begin using ComponentArrays rng = get_stable_rng(12345) diff --git a/test/layers/basic_tests.jl b/test/layers/basic_tests.jl index 3c5c126fc..d361a311c 100644 --- a/test/layers/basic_tests.jl +++ b/test/layers/basic_tests.jl @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/test/layers/containers_tests.jl b/test/layers/containers_tests.jl index 46177272d..e35ba0594 100644 --- a/test/layers/containers_tests.jl +++ b/test/layers/containers_tests.jl @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/test/layers/conv_tests.jl b/test/layers/conv_tests.jl index 5ee530a23..bf9242769 100644 --- a/test/layers/conv_tests.jl +++ b/test/layers/conv_tests.jl @@ -1,4 +1,4 @@ -@testitem "Pooling" setup=[SharedTestSetup] begin +@testitem "Pooling" setup=[SharedTestSetup] tags=[:core_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, dev, ongpu) in MODES @@ -94,7 +94,7 @@ end end -@testitem "CNN" setup=[SharedTestSetup] begin +@testitem "CNN" setup=[SharedTestSetup] tags=[:core_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, dev, ongpu) in MODES @@ -369,7 +369,7 @@ end end end -@testitem "Upsample" setup=[SharedTestSetup] begin +@testitem "Upsample" setup=[SharedTestSetup] tags=[:core_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, dev, ongpu) in MODES @@ -443,7 +443,7 @@ end end end -@testitem "PixelShuffle" setup=[SharedTestSetup] begin +@testitem "PixelShuffle" setup=[SharedTestSetup] tags=[:core_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, dev, ongpu) in MODES @@ -475,7 +475,7 @@ end end end -@testitem "CrossCor" setup=[SharedTestSetup] begin +@testitem "CrossCor" setup=[SharedTestSetup] tags=[:core_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, dev, ongpu) in MODES @@ -555,7 +555,7 @@ end end end -@testitem "ConvTranspose" setup=[SharedTestSetup] begin +@testitem "ConvTranspose" setup=[SharedTestSetup] tags=[:core_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, dev, ongpu) in MODES diff --git a/test/layers/dropout_tests.jl b/test/layers/dropout_tests.jl index b45cb1ad5..7c8abb618 100644 --- a/test/layers/dropout_tests.jl +++ b/test/layers/dropout_tests.jl @@ -1,4 +1,4 @@ -@testitem "Dropout" setup=[SharedTestSetup] begin +@testitem "Dropout" setup=[SharedTestSetup] tags=[:normalize_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, device, ongpu) in MODES @@ -28,7 +28,7 @@ end end -@testitem "AlphaDropout" setup=[SharedTestSetup] begin +@testitem "AlphaDropout" setup=[SharedTestSetup] tags=[:normalize_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, device, ongpu) in MODES @@ -59,7 +59,7 @@ end end end -@testitem "VariationalHiddenDropout" setup=[SharedTestSetup] begin +@testitem "VariationalHiddenDropout" setup=[SharedTestSetup] tags=[:normalize_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, device, ongpu) in MODES diff --git a/test/layers/dynamic_expressions_tests.jl b/test/layers/dynamic_expressions_tests.jl index 0a56ae7b5..4d4d3bf5c 100644 --- a/test/layers/dynamic_expressions_tests.jl +++ b/test/layers/dynamic_expressions_tests.jl @@ -1,4 +1,4 @@ -@testitem "Dynamic Expressions" setup=[SharedTestSetup] begin +@testitem "Dynamic Expressions" setup=[SharedTestSetup] tags=[:others] begin using DynamicExpressions operators = OperatorEnum(; binary_operators=[+, -, *], unary_operators=[cos]) diff --git a/test/layers/normalize_tests.jl b/test/layers/normalize_tests.jl index c5b6bc89c..1f6a926c0 100644 --- a/test/layers/normalize_tests.jl +++ b/test/layers/normalize_tests.jl @@ -1,4 +1,4 @@ -@testitem "BatchNorm" setup=[SharedTestSetup] begin +@testitem "BatchNorm" setup=[SharedTestSetup] tags=[:normalize_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, device, ongpu) in MODES @@ -104,7 +104,7 @@ end end -@testitem "GroupNorm" setup=[SharedTestSetup] begin +@testitem "GroupNorm" setup=[SharedTestSetup] tags=[:normalize_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, device, ongpu) in MODES @@ -189,7 +189,7 @@ end end end -@testitem "WeightNorm" setup=[SharedTestSetup] begin +@testitem "WeightNorm" setup=[SharedTestSetup] tags=[:normalize_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, device, ongpu) in MODES @@ -308,7 +308,7 @@ end end end -@testitem "LayerNorm" setup=[SharedTestSetup] begin +@testitem "LayerNorm" setup=[SharedTestSetup] tags=[:normalize_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, device, ongpu) in MODES @@ -364,7 +364,7 @@ end end end -@testitem "InstanceNorm" setup=[SharedTestSetup] begin +@testitem "InstanceNorm" setup=[SharedTestSetup] tags=[:normalize_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, device, ongpu) in MODES diff --git a/test/layers/recurrent_tests.jl b/test/layers/recurrent_tests.jl index 713454063..59ad5cfa8 100644 --- a/test/layers/recurrent_tests.jl +++ b/test/layers/recurrent_tests.jl @@ -1,5 +1,4 @@ - -@testitem "RNNCell" setup=[SharedTestSetup] begin +@testitem "RNNCell" setup=[SharedTestSetup] tags=[:recurrent_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, device, ongpu) in MODES @@ -58,7 +57,7 @@ end end -@testitem "LSTMCell" setup=[SharedTestSetup] begin +@testitem "LSTMCell" setup=[SharedTestSetup] tags=[:recurrent_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, device, ongpu) in MODES @@ -164,7 +163,7 @@ end end end -@testitem "GRUCell" setup=[SharedTestSetup] begin +@testitem "GRUCell" setup=[SharedTestSetup] tags=[:recurrent_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, device, ongpu) in MODES @@ -234,7 +233,7 @@ end end end -@testitem "StatefulRecurrentCell" setup=[SharedTestSetup] begin +@testitem "StatefulRecurrentCell" setup=[SharedTestSetup] tags=[:recurrent_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, device, ongpu) in MODES @@ -280,7 +279,7 @@ end end end -@testitem "Recurrence" timeout=3000 setup=[SharedTestSetup] begin +@testitem "Recurrence" timeout=3000 setup=[SharedTestSetup] tags=[:recurrent_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, device, ongpu) in MODES diff --git a/test/misc_tests.jl b/test/misc_tests.jl index d68516179..8eac52717 100644 --- a/test/misc_tests.jl +++ b/test/misc_tests.jl @@ -1,54 +1,7 @@ -@testitem "Simple Zygote Second Order Derivative" setup=[SharedTestSetup] begin - # Add tests for BatchedRoutines here - rng = get_stable_rng() - - @testset "$mode" for (mode, aType, dev, ongpu) in MODES - x = rand(rng, Float32, 1, 128) |> aType - nn = Dense(1 => 1) - ps, st = Lux.setup(rng, nn) |> dev - ps_ca = ComponentArray(ps) - - function test_f(x, ps) - mz, back = Zygote.pullback(x -> first(nn(x, ps, st)), x) - ep = only(back(one.(mz))) - return sum(mz) + sum(ep) - end - - @testset "Named Tuple Parameters" begin - @test_nowarn test_f(x, ps) - - @test begin - y, back = Zygote.pullback(test_f, x, ps) - ∂x, ∂ps = back(one(y)) - ∂x !== nothing && ∂ps !== nothing - end - - # Weird Zygote Quirks - @test_broken begin - ∂x, ∂ps = Zygote.jacobian(test_f, x, ps) - ∂x !== nothing && ∂ps !== nothing - end - end - - @testset "Component Array Parameters" begin - @test_nowarn test_f(x, ps_ca) - - @test begin - y, back = Zygote.pullback(test_f, x, ps_ca) - ∂x, ∂ps = back(one(y)) - ∂x !== nothing && ∂ps !== nothing - end - - # Weird Zygote Quirks - @test begin - ∂x, ∂ps = Zygote.jacobian(test_f, x, ps_ca) - ∂x !== nothing && ∂ps !== nothing - end - end - end -end +# Previously we had a few Zygote.gradient over Zygote.gradient tests but those are now +# removed in favor of BatchedRoutines.jl -@testitem "Tracing AD: AoS to SoA" setup=[SharedTestSetup] begin +@testitem "Tracing AD: AoS to SoA" setup=[SharedTestSetup] tags=[:others] begin using ReverseDiff, Tracker rng = get_stable_rng() diff --git a/test/qa_tests.jl b/test/qa_tests.jl index 763f16039..9e19bde1b 100644 --- a/test/qa_tests.jl +++ b/test/qa_tests.jl @@ -1,4 +1,4 @@ -@testitem "Aqua: Quality Assurance" begin +@testitem "Aqua: Quality Assurance" tags=[:others] begin using Aqua, ChainRulesCore Aqua.test_all(Lux; piracies=false) @@ -6,7 +6,7 @@ Lux; treat_as_own=[ChainRulesCore.frule, ChainRulesCore.rrule, Core.kwcall]) end -@testitem "Explicit Imports: Quality Assurance" begin +@testitem "Explicit Imports: Quality Assurance" tags=[:others] begin # Load all trigger packages import Lux, ComponentArrays, ReverseDiff, Flux, LuxAMDGPU, SimpleChains, Tracker, Zygote diff --git a/test/runtests.jl b/test/runtests.jl index 68d2fa348..88f9abd41 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,45 +1,55 @@ using ReTestItems -ReTestItems.runtests(@__DIR__) +const LUX_TEST_GROUP = lowercase(get(ENV, "LUX_TEST_GROUP", "all")) +@info "Running tests for group: $LUX_TEST_GROUP" + +if LUX_TEST_GROUP == "all" + ReTestItems.runtests(@__DIR__) +else + tag = Symbol(LUX_TEST_GROUP) + ReTestItems.runtests(@__DIR__; tags=[tag]) +end # Distributed Tests using MPI, Pkg, Test -nprocs_str = get(ENV, "JULIA_MPI_TEST_NPROCS", "") -nprocs = nprocs_str == "" ? clamp(Sys.CPU_THREADS, 2, 4) : parse(Int, nprocs_str) -testdir = @__DIR__ -isdistributedtest(f) = endswith(f, "_distributedtest.jl") -distributedtestfiles = String[] -for (root, dirs, files) in walkdir(testdir) - for file in files - if isdistributedtest(file) - push!(distributedtestfiles, joinpath(root, file)) +if LUX_TEST_GROUP == "all" || LUX_TEST_GROUP == "distributed" + nprocs_str = get(ENV, "JULIA_MPI_TEST_NPROCS", "") + nprocs = nprocs_str == "" ? clamp(Sys.CPU_THREADS, 2, 4) : parse(Int, nprocs_str) + testdir = @__DIR__ + isdistributedtest(f) = endswith(f, "_distributedtest.jl") + distributedtestfiles = String[] + for (root, dirs, files) in walkdir(testdir) + for file in files + if isdistributedtest(file) + push!(distributedtestfiles, joinpath(root, file)) + end end end -end -@info "Running Distributed Tests with $nprocs processes" + @info "Running Distributed Tests with $nprocs processes" -cur_proj = dirname(Pkg.project().path) + cur_proj = dirname(Pkg.project().path) -include("setup_modes.jl") + include("setup_modes.jl") -@testset "MODE: $(mode)" for (mode, aType, dev, ongpu) in MODES - if mode == "AMDGPU" - # AMDGPU needs to cause a deadlock, needs to be investigated - @test_broken 1 == 2 - continue - end - backends = mode == "CUDA" ? ("mpi", "nccl") : ("mpi",) - for backend_type in backends - np = backend_type == "nccl" ? min(nprocs, length(CUDA.devices())) : nprocs - @testset "Backend: $(backend_type)" begin - @testset "$(basename(file))" for file in distributedtestfiles - @info "Running $file with $backend_type backend on $mode device" - run(`$(MPI.mpiexec()) -n $(np) $(Base.julia_cmd()) --color=yes \ - --code-coverage=user --project=$(cur_proj) --startup-file=no $(file) \ - $(mode) $(backend_type)`) - Test.@test true + @testset "MODE: $(mode)" for (mode, aType, dev, ongpu) in MODES + if mode == "AMDGPU" + # AMDGPU needs to cause a deadlock, needs to be investigated + @test_broken 1 == 2 + continue + end + backends = mode == "CUDA" ? ("mpi", "nccl") : ("mpi",) + for backend_type in backends + np = backend_type == "nccl" ? min(nprocs, length(CUDA.devices())) : nprocs + @testset "Backend: $(backend_type)" begin + @testset "$(basename(file))" for file in distributedtestfiles + @info "Running $file with $backend_type backend on $mode device" + run(`$(MPI.mpiexec()) -n $(np) $(Base.julia_cmd()) --color=yes \ + --code-coverage=user --project=$(cur_proj) --startup-file=no $(file) \ + $(mode) $(backend_type)`) + Test.@test true + end end end end diff --git a/test/setup_modes.jl b/test/setup_modes.jl index 7a5562028..ee40ea1e8 100644 --- a/test/setup_modes.jl +++ b/test/setup_modes.jl @@ -2,11 +2,13 @@ using Lux, LuxCUDA, LuxAMDGPU CUDA.allowscalar(false) -const GROUP = get(ENV, "GROUP", "All") +const BACKEND_GROUP = get(ENV, "BACKEND_GROUP", "All") -cpu_testing() = GROUP == "All" || GROUP == "CPU" -cuda_testing() = (GROUP == "All" || GROUP == "CUDA") && LuxCUDA.functional() -amdgpu_testing() = (GROUP == "All" || GROUP == "AMDGPU") && LuxAMDGPU.functional() +cpu_testing() = BACKEND_GROUP == "All" || BACKEND_GROUP == "CPU" +cuda_testing() = (BACKEND_GROUP == "All" || BACKEND_GROUP == "CUDA") && LuxCUDA.functional() +function amdgpu_testing() + return (BACKEND_GROUP == "All" || BACKEND_GROUP == "AMDGPU") && LuxAMDGPU.functional() +end const MODES = begin # Mode, Array Type, Device Function, GPU? diff --git a/test/shared_testsetup.jl b/test/shared_testsetup.jl index f8cd80b1c..ce8338763 100644 --- a/test/shared_testsetup.jl +++ b/test/shared_testsetup.jl @@ -31,7 +31,7 @@ function _rocRAND_functional() end export @jet, @test_gradients, check_approx -export GROUP, MODES, cpu_testing, cuda_testing, amdgpu_testing, get_default_rng, +export BACKEND_GROUP, MODES, cpu_testing, cuda_testing, amdgpu_testing, get_default_rng, get_stable_rng, __display, _rocRAND_functional end diff --git a/test/transform/flux_tests.jl b/test/transform/flux_tests.jl index 3fa89f813..584c05c44 100644 --- a/test/transform/flux_tests.jl +++ b/test/transform/flux_tests.jl @@ -1,4 +1,4 @@ -@testitem "FromFluxAdaptor" setup=[SharedTestSetup] begin +@testitem "FromFluxAdaptor" setup=[SharedTestSetup] tags=[:others] begin import Flux from_flux = fdevice(::Lux.LuxCPUDevice) = Flux.cpu diff --git a/test/transform/simple_chains_tests.jl b/test/transform/simple_chains_tests.jl index 7f0f7366d..007275a8b 100644 --- a/test/transform/simple_chains_tests.jl +++ b/test/transform/simple_chains_tests.jl @@ -1,4 +1,4 @@ -@testitem "ToSimpleChainsAdaptor" setup=[SharedTestSetup] begin +@testitem "ToSimpleChainsAdaptor" setup=[SharedTestSetup] tags=[:others] begin import SimpleChains: static lux_model = Chain(Conv((5, 5), 1 => 6, relu), MaxPool((2, 2)), diff --git a/test/utils_tests.jl b/test/utils_tests.jl index 51569edc4..4796a7bac 100644 --- a/test/utils_tests.jl +++ b/test/utils_tests.jl @@ -1,4 +1,4 @@ -@testitem "replicate" setup=[SharedTestSetup] begin +@testitem "replicate" setup=[SharedTestSetup] tags=[:others] begin @testset "$mode" for (mode, aType, device, ongpu) in MODES _rng = get_default_rng(mode) @@ -13,7 +13,7 @@ end end -@testitem "istraining" begin +@testitem "istraining" tags=[:others] begin @test Lux.istraining(Val(true)) @test !Lux.istraining(Val(false)) @test !Lux.istraining((training=Val(false),)) @@ -22,7 +22,7 @@ end @test_throws MethodError Lux.istraining((training=true,)) end -@testitem "multigate" setup=[SharedTestSetup] begin +@testitem "multigate" setup=[SharedTestSetup] tags=[:others] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, device, ongpu) in MODES @@ -58,7 +58,7 @@ end end end -@testitem "ComponentArrays" setup=[SharedTestSetup] begin +@testitem "ComponentArrays" setup=[SharedTestSetup] tags=[:others] begin using Optimisers, Functors rng = get_stable_rng(12345) @@ -103,7 +103,7 @@ end @test_nowarn Zygote.gradient(l2reg, ps) end -@testitem "_init_hidden_state" setup=[SharedTestSetup] begin +@testitem "_init_hidden_state" setup=[SharedTestSetup] tags=[:recurrent_layers] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, device, ongpu) in MODES @@ -114,7 +114,7 @@ end end end -@testitem "FP Conversions" setup=[SharedTestSetup] begin +@testitem "FP Conversions" setup=[SharedTestSetup] tags=[:others] begin rng = get_stable_rng(12345) @testset "$mode" for (mode, aType, device, ongpu) in MODES