File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -644,6 +644,10 @@ Devices and Contexts
644644
645645 See also :mod: `pycuda.autoinit `.
646646
647+ .. function :: get_stream_priority_range()
648+
649+ Returns numerical values that correspond to the least and greatest stream priorities.
650+
647651.. class :: Device(number)
648652 Device(pci_bus_id)
649653
Original file line number Diff line number Diff line change @@ -531,7 +531,6 @@ namespace pycuda
531531 * to push contexts that are already active at a deeper stack level, so we
532532 * maintain all contexts floating other than the top one.
533533 */
534-
535534 // for friend decl
536535 namespace gl {
537536 boost::shared_ptr<context>
@@ -862,6 +861,16 @@ namespace pycuda
862861 return result;
863862 }
864863
864+ inline
865+ py::tuple get_stream_priority_range ()
866+ {
867+ int leastPriority;
868+ int greatestPriority;
869+ CUDAPP_CALL_GUARDED (cuCtxGetStreamPriorityRange, (&leastPriority, &greatestPriority));
870+ return py::make_tuple (leastPriority, greatestPriority);
871+ }
872+
873+
865874
866875#if CUDAPP_CUDA_VERSION >= 7000
867876 inline boost::shared_ptr<context> device::retain_primary_context ()
Original file line number Diff line number Diff line change @@ -1193,6 +1193,9 @@ BOOST_PYTHON_MODULE(_driver)
11931193 .add_property (" handle" , &cl::handle_int)
11941194 ;
11951195 }
1196+
1197+ DEF_SIMPLE_FUNCTION (get_stream_priority_range);
1198+
11961199 // }}}
11971200
11981201 // {{{ stream
You can’t perform that action at this time.
0 commit comments