From f002603fd69b8a67b0a1de5b7866ce217c85996b Mon Sep 17 00:00:00 2001 From: Alexis Montoison <35051714+amontoison@users.noreply.github.com> Date: Tue, 5 Nov 2024 20:31:37 -0600 Subject: [PATCH] [buildkite] Add CI builds on GPUs (#113) * [buildkite] Add CI builds on GPUs * Update pipeline.yml * Update pipeline.yml again * Remove self-hosted builds * Fix pipeline.yml * Fix pipeline.yml * Update pipeline.yml added more env variables for Intel * env oneAPI * is env an issue? * Project.toml for test * project env * cleanup buildkite --------- Co-authored-by: Sungho Shin --- .buildkite/pipeline.yml | 78 ++++++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 42 ++++++++++---------- Project.toml | 16 -------- test/Project.toml | 18 +++++++++ 4 files changed, 117 insertions(+), 37 deletions(-) create mode 100644 .buildkite/pipeline.yml create mode 100644 test/Project.toml diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml new file mode 100644 index 0000000..b641f84 --- /dev/null +++ b/.buildkite/pipeline.yml @@ -0,0 +1,78 @@ +steps: + - label: "Nvidia GPUs -- CUDA.jl" + plugins: + - JuliaCI/julia#v1: + version: "1.10" + agents: + queue: "juliagpu" + cuda: "*" + env: + EXAMODELS_TEST_CUDA: 1 + command: | + julia --color=yes --project=./test -e ' + using Pkg + Pkg.develop(path=".") + Pkg.instantiate() + include("test/runtests.jl")' + timeout_in_minutes: 30 + + - label: "AMD GPUs -- AMDGPU.jl" + plugins: + - JuliaCI/julia#v1: + version: "1.10" + agents: + queue: "juliagpu" + rocm: "*" + rocmgpu: "*" + env: + EXAMODELS_TEST_AMDGPU: 1 + JULIA_NUM_THREADS: 4 + JULIA_AMDGPU_CORE_MUST_LOAD: "1" + JULIA_AMDGPU_HIP_MUST_LOAD: "1" + JULIA_AMDGPU_DISABLE_ARTIFACTS: "1" + command: | + julia --color=yes --project=./test -e ' + using Pkg + Pkg.develop(path=".") + Pkg.instantiate() + include("test/runtests.jl")' + timeout_in_minutes: 30 + + - label: "Intel GPUs -- oneAPI.jl" + plugins: + - JuliaCI/julia#v1: + version: "1.10" + agents: + queue: "juliagpu" + intel: "*" + env: + EXAMODELS_TEST_ONEAPI: 1 + OverrideDefaultFP64Settings: 1 + IGC_EnableDPEmulation: 1 + command: | + julia --color=yes --project=./test -e ' + using Pkg + Pkg.develop(path=".") + Pkg.instantiate() + include("test/runtests.jl")' + timeout_in_minutes: 30 + + # - label: "Apple M1 GPUs -- Metal.jl" + # plugins: + # - JuliaCI/julia#v1: + # version: "1.10" + # agents: + # queue: "juliaecosystem" + # os: "macos" + # arch: "aarch64" + # env: + # EXAMODELS_TEST_METAL: "TRUE" + # command: | + # julia --color=yes --project -e ' + # using Pkg + # Pkg.develop(path=".") + # Pkg.add("Metal") + # Pkg.add("KernelAbstractions") + # Pkg.instantiate() + # include("test/runtests.jl")' + # timeout_in_minutes: 30 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4d90729..0bebcc1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,24 +18,24 @@ jobs: version: ${{ matrix.julia-version }} - uses: julia-actions/julia-buildpkg@latest - uses: julia-actions/julia-runtest@latest - test-self-hosted: - env: - EXAMODELS_TEST_CUDA: 1 - EXAMODELS_TEST_AMDGPU: 1 - EXAMODELS_TEST_ONEAPI: 1 - runs-on: self-hosted - strategy: - matrix: - julia-version: ['1'] - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@latest - with: - version: ${{ matrix.julia-version }} - - uses: julia-actions/julia-buildpkg@latest - - uses: julia-actions/julia-runtest@latest - - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 - with: - file: lcov.info - token: ${{ secrets.CODECOV_TOKEN }} + # test-self-hosted: + # env: + # EXAMODELS_TEST_CUDA: 1 + # EXAMODELS_TEST_AMDGPU: 1 + # EXAMODELS_TEST_ONEAPI: 1 + # runs-on: self-hosted + # strategy: + # matrix: + # julia-version: ['1'] + # steps: + # - uses: actions/checkout@v2 + # - uses: julia-actions/setup-julia@latest + # with: + # version: ${{ matrix.julia-version }} + # - uses: julia-actions/julia-buildpkg@latest + # - uses: julia-actions/julia-runtest@latest + # - uses: julia-actions/julia-processcoverage@v1 + # - uses: codecov/codecov-action@v1 + # with: + # file: lcov.info + # token: ${{ secrets.CODECOV_TOKEN }} diff --git a/Project.toml b/Project.toml index 5bcc4d7..697e00c 100644 --- a/Project.toml +++ b/Project.toml @@ -46,19 +46,3 @@ SpecialFunctions = "2" julia = "1.9" oneAPI = "1" -[extras] -CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" -Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" -KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" -MadNLP = "2621e9c9-9eb4-46b1-8089-e8c72242dfb6" -NLPModels = "a4795742-8479-5a88-8948-cc11e1c8c1a6" -NLPModelsIpopt = "f4238b75-b362-5c4c-b852-0801c9a21d71" -NLPModelsJuMP = "792afdf1-32c1-5681-94e0-d7bf7a5df49e" -Percival = "01435c0c-c90d-11e9-3788-63660f8fbccc" -PowerModels = "c36e90e8-916a-50a6-bd94-075b64ef4655" -Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[targets] -test = ["Test", "NLPModels", "NLPModelsIpopt", "KernelAbstractions", "CUDA", "AMDGPU", "oneAPI", "MadNLP", "Percival", "PowerModels", "JuMP", "NLPModelsJuMP", "Downloads", "Random", "ForwardDiff", "SpecialFunctions"] diff --git a/test/Project.toml b/test/Project.toml new file mode 100644 index 0000000..82fa05d --- /dev/null +++ b/test/Project.toml @@ -0,0 +1,18 @@ +[deps] +CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" +Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" +KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" +MadNLP = "2621e9c9-9eb4-46b1-8089-e8c72242dfb6" +NLPModels = "a4795742-8479-5a88-8948-cc11e1c8c1a6" +NLPModelsIpopt = "f4238b75-b362-5c4c-b852-0801c9a21d71" +NLPModelsJuMP = "792afdf1-32c1-5681-94e0-d7bf7a5df49e" +Percival = "01435c0c-c90d-11e9-3788-63660f8fbccc" +PowerModels = "c36e90e8-916a-50a6-bd94-075b64ef4655" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" +Ipopt = "b6b21f68-93f8-5de0-b562-5493be1d77c9" +JuMP = "4076af6c-e467-56ae-b986-b466b2749572" +SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" +oneAPI = "8f75cd03-7ff8-4ecb-9b8f-daf728133b1b" \ No newline at end of file