Skip to content

Commit

Permalink
buildkite AMDGPU (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello authored Nov 27, 2024
1 parent fc7a19f commit 3ed702b
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 13 deletions.
26 changes: 26 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,29 @@ steps:
GNN_TEST_CUDA: "true"
GNN_TEST_CPU: "false"
timeout_in_minutes: 60

- label: "GNN AMDGPU"
plugins:
- JuliaCI/julia#v1:
version: "1"
- JuliaCI/julia-coverage#v1:
dirs:
- GraphNeuralNetworks/src
command: |
julia --color=yes --depwarn=yes --project=GraphNeuralNetworks/test -e '
import Pkg
dev_pkgs = Pkg.PackageSpec[]
for pkg in ("GNNGraphs", "GNNlib", "GraphNeuralNetworks")
push!(dev_pkgs, Pkg.PackageSpec(path=pkg));
end
Pkg.develop(dev_pkgs)
Pkg.add(["AMDGPU"])
Pkg.test("GraphNeuralNetworks")'
agents:
queue: "juliagpu"
rocm: "*"
rocmgpu: "*"
env:
GNN_TEST_AMDGPU: "true"
GNN_TEST_CPU: "false"
timeout_in_minutes: 60
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
classes = dataset.metadata["classes"]
g = mldataset2gnngraph(dataset) |> device
X = g.ndata.features
y = onehotbatch(g.ndata.targets, classes)
y = onehotbatch(g.ndata.targets |> cpu, classes) |> device # https://github.com/FluxML/OneHotArrays.jl/issues/16
train_mask = g.ndata.train_mask
test_mask = g.ndata.test_mask
ytrain = y[:, train_mask]
Expand Down
25 changes: 13 additions & 12 deletions GraphNeuralNetworks/test/test_module.jl
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
@testmodule TestModule begin

using GraphNeuralNetworks
using Test
using Statistics, Random
using Flux
using Functors: fmapstructure_with_path
using Graphs
using ChainRulesTestUtils, FiniteDifferences
using Zygote
using SparseArrays
using Pkg

## Uncomment below to change the default test settings
Expand All @@ -18,21 +9,31 @@ using Pkg
# ENV["GNN_TEST_Metal"] = "true"

if get(ENV, "GNN_TEST_CUDA", "false") == "true"
# Pkg.add(["CUDA", "cuDNN"])
Pkg.add(["CUDA", "cuDNN"])
using CUDA
CUDA.allowscalar(false)
end
if get(ENV, "GNN_TEST_AMDGPU", "false") == "true"
# Pkg.add("AMDGPU")
Pkg.add("AMDGPU")
using AMDGPU
AMDGPU.allowscalar(false)
end
if get(ENV, "GNN_TEST_Metal", "false") == "true"
# Pkg.add("Metal")
Pkg.add("Metal")
using Metal
Metal.allowscalar(false)
end

using GraphNeuralNetworks
using Test
using Statistics, Random
using Flux
using Functors: fmapstructure_with_path
using Graphs
using ChainRulesTestUtils, FiniteDifferences
using Zygote
using SparseArrays


# from Base
export mean, randn, SparseArrays, AbstractSparseMatrix
Expand Down

0 comments on commit 3ed702b

Please sign in to comment.