From 6330dcd401f773dc26af634857a067ca6b7ecc4d Mon Sep 17 00:00:00 2001 From: William Moses Date: Mon, 10 Nov 2025 17:07:36 -0600 Subject: [PATCH 1/2] AMDGPU ci --- .buildkite/pipeline.yml | 76 ++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 064ef33235..44d099c8db 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -48,47 +48,47 @@ steps: if: build.message !~ /\[skip tests\]/ timeout_in_minutes: 120 - # - label: ":julia: :linux: AMDGPU Julia v{{matrix.version}} -- {{matrix.group}} -- {{matrix.runtime}}" - # matrix: - # setup: - # version: - # - "1.10" - # group: - # - core - # - neural_networks - # - integration - # runtime: - # - "IFRT" - # plugins: - # - JuliaCI/julia#v1: - # version: "{{matrix.version}}" - # - JuliaCI/julia-coverage#v1: - # codecov: true - # dirs: - # - src - # - ext - # - lib/ReactantCore/src - # agents: - # queue: "juliagpu" - # rocm: "*" - # commands: | - # touch LocalPreferences.toml + - label: ":julia: :linux: AMDGPU Julia v{{matrix.version}} -- {{matrix.group}} -- {{matrix.runtime}}" + matrix: + setup: + version: + - "1.10" + group: + - core + - neural_networks + - integration + runtime: + - "IFRT" + plugins: + - JuliaCI/julia#v1: + version: "{{matrix.version}}" + - JuliaCI/julia-coverage#v1: + codecov: true + dirs: + - src + - ext + - lib/ReactantCore/src + agents: + queue: "juliagpu" + rocm: "*" + commands: | + touch LocalPreferences.toml - # echo "[Reactant]" >> LocalPreferences.toml - # echo "xla_runtime = \"{{matrix.runtime}}\"" >> LocalPreferences.toml + echo "[Reactant]" >> LocalPreferences.toml + echo "xla_runtime = \"{{matrix.runtime}}\"" >> LocalPreferences.toml - # cat LocalPreferences.toml + cat LocalPreferences.toml - # julia --project=. -e 'println("--- :julia: Instantiating project") - # using Pkg - # Pkg.develop([PackageSpec(path="lib/ReactantCore")])' + julia --project=. -e 'println("--- :julia: Instantiating project") + using Pkg + Pkg.develop([PackageSpec(path="lib/ReactantCore")])' - # julia --project=. -e 'println("--- :julia: Run Tests") - # using Pkg - # Pkg.test(; coverage="user")' - # env: - # REACTANT_TEST_GROUP: "{{matrix.group}}" - # JULIA_DEBUG: "Reactant,Reactant_jll" - # CUDA_VISIBLE_DEVICES: 0 + julia --project=. -e 'println("--- :julia: Run Tests") + using Pkg + Pkg.test(; coverage="user")' + env: + REACTANT_TEST_GROUP: "{{matrix.group}}" + JULIA_DEBUG: "Reactant,Reactant_jll" + CUDA_VISIBLE_DEVICES: 0 # if: build.message !~ /\[skip tests\]/ # timeout_in_minutes: 120 From db87c12d2c37128a1013b97a8e0bd91677e845fe Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Tue, 9 Dec 2025 11:20:13 -0500 Subject: [PATCH 2/2] test: disable dilation!=1 tests on MIOpen --- test/nn/luxlib.jl | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/test/nn/luxlib.jl b/test/nn/luxlib.jl index c862b6497e..6d095d153e 100644 --- a/test/nn/luxlib.jl +++ b/test/nn/luxlib.jl @@ -1,5 +1,7 @@ using LuxLib, Reactant, Enzyme, NNlib, Test +const MightUseMIOpen = contains(lowercase(string(Reactant.devices()[1])), "rocm") + @testset "Fused Dense" begin sumabs2fuseddense(act, weight, x, bias) = sum(abs2, fused_dense_bias_activation(act, weight, x, bias)) @@ -182,15 +184,21 @@ end padding in ((0, 0), (2, 2), (2, 0)), dilation in ((1, 1), (1, 2)) - conv_dims = DenseConvDims(x, weight; stride, padding, dilation, groups) + if any(!=(1), dilation) && MightUseMIOpen + continue # MIOpen doesn't support dilation != 1 yet + end - reactant_res = @jit fused_conv_bias_activation( - act, weight_reactant, x_reactant, bias_reactant, conv_dims - ) + might_fail = MightUseMIOpen && any(!=(1), dilation) - luxlib_res = fused_conv_bias_activation(act, weight, x, bias, conv_dims) + conv_dims = DenseConvDims(x, weight; stride, padding, dilation, groups) - @test reactant_res ≈ luxlib_res atol = 1e-5 rtol = 1e-2 + @test begin + reactant_res = @jit fused_conv_bias_activation( + act, weight_reactant, x_reactant, bias_reactant, conv_dims + ) + luxlib_res = fused_conv_bias_activation(act, weight, x, bias, conv_dims) + isapprox(reactant_res, luxlib_res; atol=1e-5, rtol=1e-2) + end broken = might_fail end # TODO: test for gradients