Skip to content

Commit

Permalink
fixup! implement stream priority
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Mar 14, 2023
1 parent 9406496 commit 1f8cfa3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CUDAKernels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ function KernelAbstractions.priority!(::CUDABackend, prio::Symbol)
if !(prio in (:high, :normal, :low))
error("priority must be one of :high, :normal, :low")
end
return nothing

range = CUDA.priority_range()
# 0:-1:-5
Expand All @@ -280,9 +279,10 @@ function KernelAbstractions.priority!(::CUDABackend, prio::Symbol)
CUDA.record(event, old_stream)

@debug "Switching default stream" flags priority
new_stream = CuStream(; flags, priority))
new_stream = CuStream(; flags, priority)
CUDA.wait(event, new_stream)
stream!(new_stream)
return nothing
end

end

0 comments on commit 1f8cfa3

Please sign in to comment.