mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-15 06:09:01 +03:00
Try to make cuda call non-blocking
This commit is contained in:
parent
b2e8f37965
commit
4da1c1c211
|
@ -263,7 +263,7 @@ class ParserStepModel(Model):
|
||||||
self.state2vec = precompute_hiddens(len(docs), self.tokvecs, layers[1],
|
self.state2vec = precompute_hiddens(len(docs), self.tokvecs, layers[1],
|
||||||
drop=drop)
|
drop=drop)
|
||||||
self.vec2scores = layers[-1]
|
self.vec2scores = layers[-1]
|
||||||
self.cuda_stream = util.get_cuda_stream()
|
self.cuda_stream = util.get_cuda_stream(non_blocking=True)
|
||||||
self.backprops = []
|
self.backprops = []
|
||||||
self._class_mask = numpy.zeros((self.vec2scores.nO,), dtype='f')
|
self._class_mask = numpy.zeros((self.vec2scores.nO,), dtype='f')
|
||||||
self._class_mask.fill(1)
|
self._class_mask.fill(1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user