Skip to content

Commit d8a65d9

Browse files
authored
Merge pull request #8 from JuliaGPU/jps/dagger-0.10
Update to Dagger 0.10
2 parents f4957e0 + f4dc86b commit d8a65d9

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

.gitlab-ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ include:
44
# CUDA.jl
55

66
cuda:1.5:
7-
image: ubuntu:bionic
87
extends:
98
- .julia:1.5
109
- .test

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Requires = "ae029012-a4dd-5104-9daa-d747884805df"
1111

1212
[compat]
1313
Adapt = "1, 2"
14-
Dagger = "0.9 - 0.10"
14+
Dagger = "0.10"
1515
Requires = "1"
1616
julia = "1"
1717

src/DaggerGPU.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ macro gpuproc(PROC, T)
1313
Dagger.iscompatible_arg(proc::Dagger.ThreadProc, opts, x::$T) = false
1414

1515
# Adapt to/from the appropriate type
16-
Dagger.move(ctx, from_proc::OSProc, to_proc::$PROC, x) = adapt($T, x)
17-
Dagger.move(ctx, from_proc::$PROC, to_proc::OSProc, x) = adapt(Array, x)
16+
Dagger.move(from_proc::OSProc, to_proc::$PROC, x) = adapt($T, x)
17+
Dagger.move(from_proc::$PROC, to_proc::OSProc, x) = adapt(Array, x)
1818
end
1919
end
2020

src/cu.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ end
1212
@gpuproc(CuArrayDeviceProc, CuArray)
1313
const CuArrayProc = CuArrayDeviceProc
1414
#= FIXME: CUDA IPC
15-
function Dagger.move(ctx, from::CuArrayDeviceProc, to::CuArrayDeviceProc, x)
15+
function Dagger.move(from::CuArrayDeviceProc, to::CuArrayDeviceProc, x)
1616
if from === to
1717
return x
1818
else
@@ -34,7 +34,7 @@ struct CuArraySMProc <: Dagger.Processor
3434
end
3535
@gpuproc(CuArraySMProc, CuArray)
3636
#= FIXME: CUDA IPC
37-
function Dagger.move(ctx, from::CuArraySMProc, to::CuArraySMProc, x)
37+
function Dagger.move(from::CuArraySMProc, to::CuArraySMProc, x)
3838
if from.device === to.device
3939
return x
4040
else

test/runtests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@ function generate_thunks()
1919
delayed((xs...)->[sum(xs)])(as...)
2020
end
2121

22+
@test DaggerGPU.cancompute(:CUDA) || DaggerGPU.cancompute(:ROC)
23+
2224
@testset "CUDA" begin
2325
if !DaggerGPU.cancompute(:CUDA)
2426
@warn "No CUDA devices available, skipping tests"
2527
else
28+
didtest = true
2629
cuproc = DaggerGPU.processor(:CUDA)
2730
b = generate_thunks()
2831
opts = Dagger.Sch.ThunkOptions(;proctypes=[cuproc])
@@ -39,6 +42,7 @@ end
3942
if !DaggerGPU.cancompute(:ROC)
4043
@warn "No ROCm devices available, skipping tests"
4144
else
45+
didtest = true
4246
rocproc = DaggerGPU.processor(:ROC)
4347
b = generate_thunks()
4448
opts = Dagger.Sch.ThunkOptions(;proctypes=[rocproc])

0 commit comments

Comments
 (0)