mirror of https://github.com/explosion/spaCy.git
Revert "Revert "Merge branch 'develop' of https://github.com/explosion/spaCy into develop""
This reverts commit f41e626844
.
This commit is contained in:
parent
f41e626844
commit
8b7a74570f
|
@ -14,6 +14,7 @@ from collections import OrderedDict
|
|||
import inspect
|
||||
import warnings
|
||||
from thinc.neural._classes.model import Model
|
||||
from thinc.neural.ops import NumpyOps
|
||||
import functools
|
||||
import cytoolz
|
||||
import itertools
|
||||
|
@ -241,7 +242,12 @@ def is_in_jupyter():
|
|||
|
||||
|
||||
def get_cuda_stream(require=False):
|
||||
return CudaStream() if CudaStream is not None else None
|
||||
if CudaStream is None:
|
||||
return None
|
||||
elif isinstance(Model.ops, NumpyOps):
|
||||
return None
|
||||
else:
|
||||
return CudaStream()
|
||||
|
||||
|
||||
def get_async(stream, numpy_array):
|
||||
|
|
Loading…
Reference in New Issue