Skip to content

Commit 08fd338

Browse files
authored
Merge pull request #22 from EricHallahan/master
Update DaggerGPU to be compatible with Dagger 0.16
2 parents 8f11922 + f34b00e commit 08fd338

File tree

3 files changed

+32
-21
lines changed

3 files changed

+32
-21
lines changed

Project.toml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,7 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
1515
[compat]
1616
Adapt = "1, 2, 3"
1717
Dagger = "0.13.3, 0.14, 0.15, 0.16"
18-
KernelAbstractions = "0.5, 0.6, 0.7"
19-
MemPool = "0.3"
18+
KernelAbstractions = "0.5, 0.6, 0.7, 0.8"
19+
MemPool = "0.3, 0.4"
2020
Requires = "1"
21-
julia = "1"
22-
23-
[extras]
24-
AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e"
25-
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
26-
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
27-
Metal = "dde4c033-4e86-420c-a63e-0dd931031962"
28-
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
29-
30-
[targets]
31-
test = ["AMDGPU", "CUDA", "Distributed", "Test"]
21+
julia = "1.6"

test/Project.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[deps]
2+
AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e"
3+
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
4+
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
5+
Metal = "dde4c033-4e86-420c-a63e-0dd931031962"
6+
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
7+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
8+
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
9+
Dagger = "d58978e5-989f-55fb-8d15-ea34adc7bf54"

test/runtests.jl

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
using Distributed
21
using Test
2+
using Distributed
33
addprocs(2, exeflags="--project")
44

55
@everywhere begin
6-
using CUDA, AMDGPU, Metal, KernelAbstractions
6+
try using CUDA
7+
catch end
8+
9+
try using AMDGPU
10+
catch end
11+
12+
try using Metal
13+
catch end
14+
715
using Distributed, Dagger, DaggerGPU
16+
using KernelAbstractions
817
end
918
@everywhere begin
1019
function myfunc(X)
@@ -52,21 +61,24 @@ end
5261
else
5362
cuproc = DaggerGPU.processor(:CUDA)
5463
b = generate_thunks()
55-
opts = Dagger.Sch.ThunkOptions(;proctypes=[cuproc])
64+
opts = Dagger.Sch.ThunkOptions(;proclist=[cuproc])
5665
c_pre = delayed(myfunc; options=opts)(b)
5766
c = delayed(sum; options=opts)(b)
5867

59-
opts = Dagger.Sch.ThunkOptions(;proctypes=[Dagger.ThreadProc])
68+
opts = Dagger.Sch.ThunkOptions(;proclist=[Dagger.ThreadProc])
6069
d = delayed(identity; options=opts)(c)
6170
@test collect(d) == 20
6271

72+
@test_skip "KernelAbstractions"
73+
#= FIXME
6374
@testset "KernelAbstractions" begin
6475
cuproc = DaggerGPU.processor(:CUDA)
65-
opts = Dagger.Sch.ThunkOptions(;proctypes=[cuproc])
76+
opts = Dagger.Sch.ThunkOptions(;proclist=[cuproc])
6677
A = rand(Float32, 8)
6778
_A = collect(delayed(fill_thunk)(A, 2.3); options=opts)
6879
@test all(_A .== 2.3)
6980
end
81+
=#
7082
end
7183
end
7284

@@ -76,19 +88,19 @@ end
7688
else
7789
rocproc = DaggerGPU.processor(:ROC)
7890
b = generate_thunks()
79-
opts = Dagger.Sch.ThunkOptions(;proctypes=[rocproc])
91+
opts = Dagger.Sch.ThunkOptions(;proclist=[rocproc])
8092
c_pre = delayed(myfunc; options=opts)(b)
8193
c = delayed(sum; options=opts)(b)
8294

83-
opts = Dagger.Sch.ThunkOptions(;proctypes=[Dagger.ThreadProc])
95+
opts = Dagger.Sch.ThunkOptions(;proclist=[Dagger.ThreadProc])
8496
d = delayed(identity; options=opts)(c)
8597
@test collect(d) == 20
8698

8799
@test_skip "KernelAbstractions"
88100
#= FIXME
89101
@testset "KernelAbstractions" begin
90102
rocproc = DaggerGPU.processor(:ROC)
91-
opts = Dagger.Sch.ThunkOptions(;proctypes=[rocproc])
103+
opts = Dagger.Sch.ThunkOptions(;proclist=[rocproc])
92104
A = rand(Float32, 8)
93105
_A = collect(delayed(fill_thunk)(A, 2.3); options=opts)
94106
@test all(_A .== 2.3)

0 commit comments

Comments
 (0)