Update GPU docs for v2.0.14
@@ -157,3 +157,29 @@ p
+cell returns
+cell unicode
+cell The explanation, or #[code None] if not found in the glossary.
+
++h(3, "spacy.prefer_gpu") spacy.prefer_gpu
+ +tag function
+ +tag-new("2.0.14")
+
+p
+ | Allocate data and perform operations on #[+a("/usage/#gpu") GPU], if
+ | available. If data has already been allocated on CPU, it will not be
+ | moved. Ideally, this function should be called right after
+ | importing spaCy and #[em before] loading any models.
+
++aside-code("Example").
+ import spacy
+
+ spacy.prefer_gpu() # or: spacy.require_gpu()
+ nlp = spacy.load('en_core_web_sm')
+
++h(3, "spacy.require_gpu") spacy.require_gpu
+ +tag function
+ +tag-new("2.0.14")
+
+p
+ | Allocate data and perform operations on #[+a("/usage/#gpu") GPU]. Will
+ | raise an error if no GPU is available. If data has already been allocated
+ | on CPU, it will not be moved. Ideally, this function should be called
+ | right after importing spaCy and #[em before] loading any models.
