Skip to content

Commit 2bdcaff

Browse files
fix buildkite
1 parent a0553a8 commit 2bdcaff

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

GNNGraphs/test/gnngraph.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ end
9898
# See https://github.com/JuliaGPU/CUDA.jl/pull/1093
9999
mat_gpu = adjacency_matrix(g_gpu)
100100
@test mat_gpu isa AbstractMatrix{Int}
101-
@test get_device(mat_gpu) == dev
101+
@test get_device(mat_gpu) isa AbstractGPUDevice
102102
@test Array(mat_gpu) == adj_mat
103103
end
104104
end
@@ -108,7 +108,7 @@ end
108108
if TEST_GPU && !(dev isa MetalDevice)
109109
mat_gpu = normalized_laplacian(g_gpu)
110110
@test mat_gpu isa AbstractMatrix{Float32}
111-
@test get_device(mat_gpu) == dev
111+
@test get_device(mat_gpu)isa AbstractGPUDevice
112112
@test Array(mat_gpu) == mat
113113
end
114114
end
@@ -118,7 +118,7 @@ end
118118
mat = scaled_laplacian(g)
119119
mat_gpu = scaled_laplacian(g_gpu)
120120
@test mat_gpu isa AbstractMatrix{Float32}
121-
@test get_device(mat_gpu) == dev
121+
@test get_device(mat_gpu) isa AbstractGPUDevice
122122
@test Array(mat_gpu) mat
123123
end
124124
end
@@ -133,10 +133,10 @@ end
133133
s_cpu, t_cpu = edge_index(g)
134134
s_gpu, t_gpu = edge_index(g_gpu)
135135
@test s_gpu isa AbstractVector{Int}
136-
@test get_device(s_gpu) == dev
136+
@test get_device(s_gpu) isa AbstractGPUDevice
137137
@test Array(s_gpu) == s_cpu
138138
@test t_gpu isa AbstractVector{Int}
139-
@test get_device(t_gpu) == dev
139+
@test get_device(t_gpu) isa AbstractGPUDevice
140140
@test Array(t_gpu) == t_cpu
141141
end
142142
end

GNNGraphs/test/query.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ end
185185
d = degree(g)
186186
d_gpu = degree(g_gpu)
187187
@test d_gpu isa AbstractVector{Int}
188-
@test get_device(d_gpu) == dev
188+
@test get_device(d_gpu) isa AbstractGPUDevice
189189
@test Array(d_gpu) == d
190190
end
191191

@@ -199,7 +199,7 @@ end
199199
d = degree(g)
200200
d_gpu = degree(g_gpu)
201201
@test d_gpu isa AbstractArray{Float32}
202-
@test get_device(d_gpu) == dev
202+
@test get_device(d_gpu) isa AbstractGPUDevice
203203
@test Array(d_gpu) d
204204
end
205205
end

GNNGraphs/test/temporalsnapshotsgnngraph.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ end
145145
tsg.tgdata.x = rand(Float32, 5)
146146
tsg = tsg |> dev
147147
@test tsg.snapshots[1].ndata.x isa AbstractMatrix{Float32}
148-
@test get_device(tsg.snapshots[1].ndata.x) == dev
148+
@test get_device(tsg.snapshots[1].ndata.x) isa AbstractGPUDevice
149149
@test tsg.snapshots[end].ndata.x isa AbstractMatrix{Float32}
150-
@test get_device(tsg.snapshots[end].ndata.x) == dev
150+
@test get_device(tsg.snapshots[end].ndata.x) isa AbstractGPUDevice
151151
@test tsg.tgdata.x isa AbstractVector{Float32}
152-
@test get_device(tsg.tgdata.x) == dev
152+
@test get_device(tsg.tgdata.x) isa AbstractGPUDevice
153153
# num_nodes and num_edges are not copied to the device
154154
@test tsg.num_nodes isa Vector{Int}
155155
@test tsg.num_edges isa Vector{Int}

GNNGraphs/test/test_module.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ using FiniteDifferences: FiniteDifferences
2828
using Reexport: @reexport
2929
using MLUtils: MLUtils
3030
using Zygote: gradient
31+
using MLDataDevices: AbstractGPUDevice
3132
@reexport using SparseArrays
3233
@reexport using MLDataDevices
3334
@reexport using Random
@@ -36,7 +37,7 @@ using Zygote: gradient
3637
@reexport using GNNGraphs
3738
@reexport using Test
3839
@reexport using Graphs
39-
export MLUtils, gradient
40+
export MLUtils, gradient, AbstractGPUDevice
4041
export ngradient, GRAPH_TYPES
4142

4243

0 commit comments

Comments
 (0)