File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -861,6 +861,7 @@ namespace pycuda
861
861
return result;
862
862
}
863
863
864
+ #if CUDAPP_CUDA_VERSION >= 7500
864
865
inline
865
866
py::tuple get_stream_priority_range ()
866
867
{
@@ -869,6 +870,7 @@ namespace pycuda
869
870
CUDAPP_CALL_GUARDED (cuCtxGetStreamPriorityRange, (&leastPriority, &greatestPriority));
870
871
return py::make_tuple (leastPriority, greatestPriority);
871
872
}
873
+ #endif
872
874
873
875
874
876
@@ -1006,8 +1008,17 @@ namespace pycuda
1006
1008
CUstream m_stream;
1007
1009
1008
1010
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
1011
1022
1012
1023
~stream ()
1013
1024
{
You can’t perform that action at this time.
0 commit comments