Skip to content

Commit

Permalink
Implement stream priority feature
Browse files Browse the repository at this point in the history
  • Loading branch information
dmenig committed Nov 23, 2021
1 parent 351bc65 commit c08a582
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions doc/driver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ Constants
CUDA 6.0 and above.
.. versionadded:: 2014.1
.. attribute :: HOST_NATIVE_ATOMIC_SUPPORTED
SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO
PAGEABLE_MEMORY_ACCESS
Expand Down Expand Up @@ -813,7 +813,7 @@ Devices and Contexts
Concurrency and Streams
-----------------------

.. class:: Stream(flags=0)
.. class:: Stream(flags=0, priority=0)

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

Expand Down
4 changes: 2 additions & 2 deletions src/cpp/cuda.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -997,8 +997,8 @@ namespace pycuda
CUstream m_stream;

public:
stream(unsigned int flags=0)
{ CUDAPP_CALL_GUARDED(cuStreamCreate, (&m_stream, flags)); }
stream(unsigned int flags=0, int priority=0)
{ CUDAPP_CALL_GUARDED(cuStreamCreateWithPriority, (&m_stream, flags, priority)); }

~stream()
{
Expand Down
2 changes: 1 addition & 1 deletion src/wrapper/wrap_cudadrv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ BOOST_PYTHON_MODULE(_driver)
{
typedef stream cl;
py::class_<cl, boost::noncopyable, shared_ptr<cl> >
("Stream", py::init<unsigned int>(py::arg("flags")=0))
("Stream", py::init<unsigned int, int>(py::arg("flags")=0, py::arg("priority")=0))
.DEF_SIMPLE_METHOD(synchronize)
.DEF_SIMPLE_METHOD(is_done)
#if CUDAPP_CUDA_VERSION >= 3020
Expand Down

0 comments on commit c08a582

Please sign in to comment.