'spacy train textcat use gpu 0 - copy

> import spacy
> spacy.require_gpu(0)

enter image description here

nlp uses gpu 0 - copy

> spacy.require_gpu(0)
> nlp = spacy.load('en_core_web_sm')
> %timeit nlp('Hello world!')

enter image description here

and I executed python -m spacy train -g 0 -V --output ./output config.cfg it uses gpu 0 - copy

Depends on DirectX Team, gpu - copy just for transfer data, so spacy train doesn't use gpu to compute?

A GPU engine represents an independent unit of silicon on the GPU that can be scheduled and can operate in parallel with one another. For example, a copy engine may be used to transfer data around while a 3D engine is used for 3D rendering. While the 3D engine can also be used to move data around, simple data transfers can be offloaded to the copy engine, allowing the 3D engine to work on more complex tasks, improving overall performance. In this case both the copy engine and the 3D engine would operate in parallel.

Here are my environment

conda info

     active environment : NLP
    active env location : E:\Anaconda\envs\NLP
            shell level : 2
       user config file : C:\Users\84174\.condarc
 populated config files : C:\Users\84174\.condarc
          conda version : 4.10.3
    conda-build version : 3.21.6
         python version : 3.9.7.final.0
       virtual packages : __cuda=11.6=0
                          __win=0=0
                          __archspec=1=x86_64
       base environment : E:\Anaconda  (writable)
      conda av data dir : E:\Anaconda\etc\conda
  conda av metadata url : None
           channel URLs : https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/win-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/noarch
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/win-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/noarch
          package cache : E:\Anaconda\pkgs
                          C:\Users\84174\.conda\pkgs
                          C:\Users\84174\AppData\Local\conda\conda\pkgs
       envs directories : E:\Anaconda\envs
                          C:\Users\84174\.conda\envs
                          C:\Users\84174\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.10.3 requests/2.26.0 CPython/3.9.7 Windows/10 Windows/10.0.19043
          administrator : False
             netrc file : None
           offline mode : False


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source