|
1 | | -using Distributed |
2 | 1 | using Test |
| 2 | +using Distributed |
3 | 3 | addprocs(2, exeflags="--project") |
4 | 4 |
|
5 | 5 | @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 | + |
7 | 15 | using Distributed, Dagger, DaggerGPU |
| 16 | + using KernelAbstractions |
8 | 17 | end |
9 | 18 | @everywhere begin |
10 | 19 | function myfunc(X) |
|
52 | 61 | else |
53 | 62 | cuproc = DaggerGPU.processor(:CUDA) |
54 | 63 | b = generate_thunks() |
55 | | - opts = Dagger.Sch.ThunkOptions(;proctypes=[cuproc]) |
| 64 | + opts = Dagger.Sch.ThunkOptions(;proclist=[cuproc]) |
56 | 65 | c_pre = delayed(myfunc; options=opts)(b) |
57 | 66 | c = delayed(sum; options=opts)(b) |
58 | 67 |
|
59 | | - opts = Dagger.Sch.ThunkOptions(;proctypes=[Dagger.ThreadProc]) |
| 68 | + opts = Dagger.Sch.ThunkOptions(;proclist=[Dagger.ThreadProc]) |
60 | 69 | d = delayed(identity; options=opts)(c) |
61 | 70 | @test collect(d) == 20 |
62 | 71 |
|
| 72 | + @test_skip "KernelAbstractions" |
| 73 | + #= FIXME |
63 | 74 | @testset "KernelAbstractions" begin |
64 | 75 | cuproc = DaggerGPU.processor(:CUDA) |
65 | | - opts = Dagger.Sch.ThunkOptions(;proctypes=[cuproc]) |
| 76 | + opts = Dagger.Sch.ThunkOptions(;proclist=[cuproc]) |
66 | 77 | A = rand(Float32, 8) |
67 | 78 | _A = collect(delayed(fill_thunk)(A, 2.3); options=opts) |
68 | 79 | @test all(_A .== 2.3) |
69 | 80 | end |
| 81 | + =# |
70 | 82 | end |
71 | 83 | end |
72 | 84 |
|
|
76 | 88 | else |
77 | 89 | rocproc = DaggerGPU.processor(:ROC) |
78 | 90 | b = generate_thunks() |
79 | | - opts = Dagger.Sch.ThunkOptions(;proctypes=[rocproc]) |
| 91 | + opts = Dagger.Sch.ThunkOptions(;proclist=[rocproc]) |
80 | 92 | c_pre = delayed(myfunc; options=opts)(b) |
81 | 93 | c = delayed(sum; options=opts)(b) |
82 | 94 |
|
83 | | - opts = Dagger.Sch.ThunkOptions(;proctypes=[Dagger.ThreadProc]) |
| 95 | + opts = Dagger.Sch.ThunkOptions(;proclist=[Dagger.ThreadProc]) |
84 | 96 | d = delayed(identity; options=opts)(c) |
85 | 97 | @test collect(d) == 20 |
86 | 98 |
|
87 | 99 | @test_skip "KernelAbstractions" |
88 | 100 | #= FIXME |
89 | 101 | @testset "KernelAbstractions" begin |
90 | 102 | rocproc = DaggerGPU.processor(:ROC) |
91 | | - opts = Dagger.Sch.ThunkOptions(;proctypes=[rocproc]) |
| 103 | + opts = Dagger.Sch.ThunkOptions(;proclist=[rocproc]) |
92 | 104 | A = rand(Float32, 8) |
93 | 105 | _A = collect(delayed(fill_thunk)(A, 2.3); options=opts) |
94 | 106 | @test all(_A .== 2.3) |
|
0 commit comments