Skip to content

Commit 78cad4e

Browse files
bors[bot]vchuravy
andauthored
Merge #242
242: update to CUDA 3.0 and use task-local stream r=vchuravy a=vchuravy Co-authored-by: Valentin Churavy <[email protected]> Co-authored-by: Valentin Churavy <[email protected]>
2 parents c9eae1f + 16ebc14 commit 78cad4e

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

.ci/develop.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ Pkg.update()
55
root_directory = dirname(@__DIR__)
66

77
kernelabstractions = Pkg.PackageSpec(path = root_directory)
8-
cudakernels = Pkg.PackageSpec(path = joinpath(root_directory, "lib", "CUDAKernels"))
98

109
Pkg.develop(kernelabstractions)
11-
Pkg.develop(cudakernels)
1210
if !(VERSION < v"1.6-")
1311
rockernels = Pkg.PackageSpec(path = joinpath(root_directory, "lib", "ROCKernels"))
1412
Pkg.develop(rockernels)
13+
14+
cudakernels = Pkg.PackageSpec(path = joinpath(root_directory, "lib", "CUDAKernels"))
15+
Pkg.develop(cudakernels)
1516
end
1617
Pkg.build()
1718
Pkg.precompile()

.ci/test.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import Pkg
22

33
pkgs = [
44
"KernelAbstractions",
5-
"CUDAKernels",
65
]
76
if !(VERSION < v"1.6-")
87
push!(pkgs, "ROCKernels")
8+
push!(pkgs, "CUDAKernels")
99
end
1010

1111
Pkg.test(pkgs; coverage = true)

lib/CUDAKernels/Project.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "CUDAKernels"
22
uuid = "72cfdca4-0801-4ab0-bf6a-d52aa10adc57"
33
authors = ["Valentin Churavy <[email protected]>"]
4-
version = "0.1.0"
4+
version = "0.2.0"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
@@ -12,10 +12,10 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
1212
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
1313

1414
[compat]
15-
Adapt = "0.4, 1.0, 2.0, 3.0"
16-
CUDA = "~1.0, ~1.1, ~1.2, 1.3, 2"
15+
Adapt = "3.0"
16+
CUDA = "3.0"
1717
Cassette = "0.3.3"
1818
KernelAbstractions = "0.6"
1919
SpecialFunctions = "0.10, 1.0"
2020
StaticArrays = "0.12, 1.0"
21-
julia = "1.3"
21+
julia = "1.6"

lib/CUDAKernels/src/CUDAKernels.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ failed(::CudaEvent) = false
6565
isdone(ev::CudaEvent) = CUDA.query(ev.event)
6666

6767
function Event(::CUDADevice)
68-
stream = CUDA.CuDefaultStream()
68+
stream = CUDA.stream()
6969
event = CUDA.CuEvent(CUDA.EVENT_DISABLE_TIMING)
7070
CUDA.record(event, stream)
7171
CudaEvent(event)
@@ -85,11 +85,11 @@ function wait(::CPU, ev::CudaEvent, progress=yield)
8585
end
8686
end
8787

88-
# Use this to synchronize between computation using the CuDefaultStream
89-
wait(::CUDADevice, ev::CudaEvent, progress=nothing, stream=CUDA.CuDefaultStream()) = CUDA.wait(ev.event, stream)
88+
# Use this to synchronize between computation using the task local stream
89+
wait(::CUDADevice, ev::CudaEvent, progress=nothing, stream=CUDA.stream()) = CUDA.wait(ev.event, stream)
9090
wait(::CUDADevice, ev::NoneEvent, progress=nothing, stream=nothing) = nothing
9191

92-
function wait(::CUDADevice, ev::MultiEvent, progress=nothing, stream=CUDA.CuDefaultStream())
92+
function wait(::CUDADevice, ev::MultiEvent, progress=nothing, stream=CUDA.stream())
9393
dependencies = collect(ev.events)
9494
cudadeps = filter(d->d isa CudaEvent, dependencies)
9595
otherdeps = filter(d->!(d isa CudaEvent), dependencies)

0 commit comments

Comments
 (0)