File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -861,6 +861,7 @@ namespace pycuda
861861 return result;
862862 }
863863
864+ #if CUDAPP_CUDA_VERSION >= 7500
864865 inline
865866 py::tuple get_stream_priority_range ()
866867 {
@@ -869,6 +870,7 @@ namespace pycuda
869870 CUDAPP_CALL_GUARDED (cuCtxGetStreamPriorityRange, (&leastPriority, &greatestPriority));
870871 return py::make_tuple (leastPriority, greatestPriority);
871872 }
873+ #endif
872874
873875
874876
@@ -1006,8 +1008,17 @@ namespace pycuda
10061008 CUstream m_stream;
10071009
10081010 public:
1009- stream (unsigned int flags=0 , int priority=0 )
1010- { CUDAPP_CALL_GUARDED (cuStreamCreateWithPriority, (&m_stream, flags, priority)); }
1011+
1012+ #if CUDAPP_CUDA_VERSION >= 7500
1013+ stream (unsigned int flags=0 , int priority=0 )
1014+ { CUDAPP_CALL_GUARDED (cuStreamCreateWithPriority, (&m_stream, flags, priority)); }
1015+ #else
1016+ if (priority != 0 )
1017+ throw pycuda::error (" stream" , CUDA_ERROR_INVALID_HANDLE,
1018+ " priority!=0 setting isn't supported for your CUDA version" );
1019+ stream (unsigned int flags=0 )
1020+ { CUDAPP_CALL_GUARDED (cuStreamCreate, (&m_stream, flags)); }
1021+ #endif
10111022
10121023 ~stream ()
10131024 {
You can’t perform that action at this time.
0 commit comments