mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-16 07:01:58 +03:00
Make cuda streams non-blocking by default
This commit is contained in:
parent
ca0759b325
commit
b2e8f37965
|
@ -317,13 +317,13 @@ def is_in_jupyter():
|
|||
return False
|
||||
|
||||
|
||||
def get_cuda_stream(require=False):
|
||||
def get_cuda_stream(require=False, non_blocking=True):
|
||||
if CudaStream is None:
|
||||
return None
|
||||
elif isinstance(Model.ops, NumpyOps):
|
||||
return None
|
||||
else:
|
||||
return CudaStream()
|
||||
return CudaStream(non_blocking=non_blocking)
|
||||
|
||||
|
||||
def get_async(stream, numpy_array):
|
||||
|
|
Loading…
Reference in New Issue
Block a user