From d91fad16785000b127be06028fea96e2b6f32f46 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Mon, 9 Oct 2023 15:36:29 -0400 Subject: [PATCH] GPU Downstream testing --- .buildkite/pipeline.yml | 115 +++++++++++++++++++++++-------- .github/workflows/Downstream.yml | 63 ----------------- 2 files changed, 85 insertions(+), 93 deletions(-) delete mode 100644 .github/workflows/Downstream.yml diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index c69b3cf..7b11580 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,33 +1,88 @@ steps: - - label: ":julia: Julia: {{matrix.julia}}" - plugins: - - JuliaCI/julia#v1: - version: "{{matrix.julia}}" - - JuliaCI/julia-test#v1: - test_args: "--quickfail" - - JuliaCI/julia-coverage#v1: - codecov: true - dirs: - - src - env: - JULIA_AMDGPU_CORE_MUST_LOAD: "1" - JULIA_AMDGPU_HIP_MUST_LOAD: "1" - JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" - agents: - queue: "juliagpu" - rocm: "*" - rocmgpu: "*" - if: build.message !~ /\[skip tests\]/ - timeout_in_minutes: 60 - matrix: - setup: - julia: - - "1" - - "nightly" - adjustments: - - with: - julia: "nightly" - soft_fail: true + - group: ":julia: AMD GPU" + steps: + - label: ":julia: Julia: {{matrix.julia}}" + plugins: + - JuliaCI/julia#v1: + version: "{{matrix.julia}}" + - JuliaCI/julia-test#v1: + test_args: "--quickfail" + - JuliaCI/julia-coverage#v1: + codecov: true + dirs: + - src + env: + JULIA_AMDGPU_CORE_MUST_LOAD: "1" + JULIA_AMDGPU_HIP_MUST_LOAD: "1" + JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" + agents: + queue: "juliagpu" + rocm: "*" + rocmgpu: "*" + if: build.message !~ /\[skip tests\]/ + timeout_in_minutes: 60 + matrix: + setup: + julia: + - "1" + - "nightly" + adjustments: + - with: + julia: "nightly" + soft_fail: true + + - group: ":telescope: Downstream AMD GPU" + steps: + - label: ":julia: {{matrix.repo}} (Julia {{matrix.julia}} + AMD GPU)" + plugins: + - JuliaCI/julia#v1: + version: "{{matrix.julia}}" + - JuliaCI/julia-coverage#v1: + codecov: true + dirs: + - src + command: | + julia --code-coverage=user --color=yes --project -e ' + using Pkg + + repo = ENV["DOWNSTREAM_TEST_REPO"] + + println("--- :julia: Instantiating project") + withenv("JULIA_PKG_PRECOMPILE_AUTO" => 0) do + Pkg.instantiate() + + try + Pkg.develop(repo) + println("+++ :julia: Running tests") + Pkg.test("$(repo)"; coverage=true) + catch err + err isa Pkg.Resolve.ResolverError || rethrow() + @info "Not compatible with this release. No problem." exception=err + exit(0) + end + end + + println("+++ :julia: Finished Downstream Test")' + agents: + queue: "juliagpu" + rocm: "*" + rocmgpu: "*" + env: + GROUP: "AMDGPU" + JULIA_AMDGPU_CORE_MUST_LOAD: "1" + JULIA_AMDGPU_HIP_MUST_LOAD: "1" + JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" + DOWNSTREAM_TEST_REPO: "{{matrix.repo}}" + if: build.message !~ /\[skip tests\]/ || build.message !~ /\[skip downstream\]/ + timeout_in_minutes: 240 + matrix: + setup: + julia: + - "1" + repo: + - "Lux" + - "Boltz" + - "LuxLib" env: - SECRET_CODECOV_TOKEN: "pzi+i7ulYT/2ysEUMphrG4sYEgQHCqPiPSCej6OmwUiOE7JzFU1q9PwQ9Cv7q0JT+lgQ090cIkBrN6zgLS7rYF97mkNKqoJvGFMorzQ+ojHU0l2hgJGshAb1oxOOEjzneWEQVLjDp3dAYwmixCEHX2XzOz8usADIsNfKe1zq9r2n0PMlc7lTe6VwOtRvJ+Y2eSpsESGNl95HI35mb+35KjpGT8fyKNJ+QVkUX6zhcwm8BB05KHYrJmb66HUoXkAQUsnRR3FijN/aGFBVNmXdk4AlJvkazL5MSX7y5rzCJgx2nfiPz1ITuIK8Y3N/jH2L75iKs85HZ0TdbhHOno7/Sg==;U2FsdGVkX185y4i2XFeuhLYHK3mcKEPOHzoYChLiJyPYe0egwSC7NvcXYc/aLxNi9CCkt1xQCSK7hKSsdYZcGA==" \ No newline at end of file + SECRET_CODECOV_TOKEN: "pzi+i7ulYT/2ysEUMphrG4sYEgQHCqPiPSCej6OmwUiOE7JzFU1q9PwQ9Cv7q0JT+lgQ090cIkBrN6zgLS7rYF97mkNKqoJvGFMorzQ+ojHU0l2hgJGshAb1oxOOEjzneWEQVLjDp3dAYwmixCEHX2XzOz8usADIsNfKe1zq9r2n0PMlc7lTe6VwOtRvJ+Y2eSpsESGNl95HI35mb+35KjpGT8fyKNJ+QVkUX6zhcwm8BB05KHYrJmb66HUoXkAQUsnRR3FijN/aGFBVNmXdk4AlJvkazL5MSX7y5rzCJgx2nfiPz1ITuIK8Y3N/jH2L75iKs85HZ0TdbhHOno7/Sg==;U2FsdGVkX185y4i2XFeuhLYHK3mcKEPOHzoYChLiJyPYe0egwSC7NvcXYc/aLxNi9CCkt1xQCSK7hKSsdYZcGA==" diff --git a/.github/workflows/Downstream.yml b/.github/workflows/Downstream.yml deleted file mode 100644 index 42c1884..0000000 --- a/.github/workflows/Downstream.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Downstream -on: - pull_request: - branches: - - main - push: - branches: - - main -concurrency: - # Skip intermediate builds: always. - # Cancel intermediate builds: only if it is a pull request build. - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} -jobs: - test: - name: ${{ matrix.package.repo }}/${{ matrix.package.group }} - runs-on: ${{ matrix.os }} - env: - GROUP: ${{ matrix.package.group }} - strategy: - fail-fast: false - matrix: - julia-version: ["~1.9.0-0"] - os: [ubuntu-latest] - package: - - { user: LuxDL, repo: Lux.jl, group: AMDGPU } - - { user: LuxDL, repo: LuxLib.jl, group: AMDGPU } - if: contains(github.event.pull_request.labels.*.name, 'run downstream test') - steps: - - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@v1 - with: - version: ${{ matrix.julia-version }} - arch: x64 - - uses: julia-actions/julia-buildpkg@v1 - - name: Clone Downstream - uses: actions/checkout@v4 - with: - repository: ${{ matrix.package.user }}/${{ matrix.package.repo }} - path: downstream - - name: Load this and run the downstream tests - shell: julia --code-coverage=user --color=yes --project=downstream {0} - run: | - using Pkg - try - # force it to use this PR's version of the package - Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps - Pkg.update() - Pkg.test() # resolver may fail with test time deps - catch err - err isa Pkg.Resolve.ResolverError || rethrow() - # If we can't resolve that means this is incompatible by SemVer and this is fine - # It means we marked this as a breaking change, so we don't need to worry about - # Mistakenly introducing a breaking change, as we have intentionally made one - @info "Not compatible with this release. No problem." exception=err - exit(0) # Exit immediately, as a success - end - - uses: julia-actions/julia-processcoverage@v1 - with: - directories: src,ext - - uses: codecov/codecov-action@v3 - with: - files: lcov.info \ No newline at end of file