Skip to content

Commit b67c441

Browse files
committed
Implement stream priority feature
1 parent 351bc65 commit b67c441

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

doc/driver.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ Constants
331331
CUDA 6.0 and above.
332332
333333
.. versionadded:: 2014.1
334-
334+
335335
.. attribute :: HOST_NATIVE_ATOMIC_SUPPORTED
336336
SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO
337337
PAGEABLE_MEMORY_ACCESS
@@ -813,7 +813,7 @@ Devices and Contexts
813813
Concurrency and Streams
814814
-----------------------
815815

816-
.. class:: Stream(flags=0)
816+
.. class:: Stream(flags=0, priority=0)
817817

818818
A handle for a queue of operations that will be carried out in order.
819819

src/cpp/cuda.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -997,8 +997,8 @@ namespace pycuda
997997
CUstream m_stream;
998998

999999
public:
1000-
stream(unsigned int flags=0)
1001-
{ CUDAPP_CALL_GUARDED(cuStreamCreate, (&m_stream, flags)); }
1000+
stream(unsigned int flags=0, int priority=0)
1001+
{ CUDAPP_CALL_GUARDED(cuStreamCreateWithPriority, (&m_stream, flags, priority)); }
10021002

10031003
~stream()
10041004
{

src/wrapper/wrap_cudadrv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1199,7 +1199,7 @@ BOOST_PYTHON_MODULE(_driver)
11991199
{
12001200
typedef stream cl;
12011201
py::class_<cl, boost::noncopyable, shared_ptr<cl> >
1202-
("Stream", py::init<unsigned int>(py::arg("flags")=0))
1202+
("Stream", py::init<unsigned int, int>(py::arg("flags")=0, py::arg("priority")=0))
12031203
.DEF_SIMPLE_METHOD(synchronize)
12041204
.DEF_SIMPLE_METHOD(is_done)
12051205
#if CUDAPP_CUDA_VERSION >= 3020

0 commit comments

Comments
 (0)