Skip to content

Commit

Permalink
Expose cudaStreamLegacy/cudaStreamPerThread in Python
Browse files Browse the repository at this point in the history
  • Loading branch information
pentschev committed Nov 23, 2020
1 parent fdbd8fc commit d789117
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/rmm/_lib/cuda_stream_view.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import os

from libc.stdint cimport uintptr_t
from rmm._lib.lib cimport cudaStreamPerThread


cdef class CudaStreamView:
Expand All @@ -29,7 +30,7 @@ cdef class CudaStreamView:
"""
if (stream == 0):
if int(os.environ.get("CUDA_PTDS", "0")) != 0:
self.c_obj.reset(new cuda_stream_view(<cudaStream_t>2))
self.c_obj.reset(new cuda_stream_view(cudaStreamPerThread))
else:
self.c_obj.reset(new cuda_stream_view())
else:
Expand Down
3 changes: 3 additions & 0 deletions python/rmm/_lib/lib.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ cdef extern from * nogil:

ctypedef void* cudaStream_t "cudaStream_t"

cudaStream_t cudaStreamLegacy
cudaStream_t cudaStreamPerThread

ctypedef enum cudaMemcpyKind "cudaMemcpyKind":
cudaMemcpyHostToHost = 0
cudaMemcpyHostToDevice = 1
Expand Down

0 comments on commit d789117

Please sign in to comment.