yeyupiaoling / MASR

Pytorch实现的流式与非流式的自动语音识别框架,同时兼容在线和离线识别,目前支持Conformer、Squeezeformer、DeepSpeech2模型,支持多种数据增强方法。
Apache License 2.0
572 stars 100 forks source link

gpu can't run #10

Closed C4712 closed 3 years ago

C4712 commented 3 years ago

GPU execution requested, but not compiled with GPU support

yeyupiaoling commented 3 years ago

What's wrong?

C4712 commented 3 years ago

GPU execution requested, but not compiled with GPU support,this problem maybe because wrap_ctc can't load gpu,but i replace by torch.nn.Ctcloss,the loss alway in 6 or 7,the cer is 1.0,

C4712 commented 3 years ago

because in server write code it is not essay to find the wrap_ctc source code,can you help me solve the problem

yeyupiaoling commented 3 years ago

@5859wang See this document: https://github.com/yeyupiaoling/MASR/edit/master/README.md

  1. 安装warp-CTC,目前warp-CTC只支持CUDA10.1。如果安装过程中出现c10/cuda/CUDAGuard.h: 没有那个文件或目录错误,将pytorch_binding/src/binding.cpp#include <c10/cuda/CUDAGuard.h>修改成#include "ATen/cuda/CUDAGuard.h"
    git clone https://github.com/SeanNaren/warp-ctc.git
    cd warp-ctc
    mkdir build
    cd build
    cmake ..
    make -j4
    cd ../pytorch_binding
    python setup.py install
C4712 commented 3 years ago

i already install wrap_ctc and can successed exexutor the wrap_ctc test_gpu.py file,

yeyupiaoling commented 3 years ago

@5859wang What's your versionof CUDA?warp-CTC only support CUDA10.1. I don't understand you said but not compiled with GPU support

C4712 commented 3 years ago

my cuda version is 10.2,but i can run the wrap-ctc test_gpu.py fairseqe) [root@localhost tests]# python test_gpu.py =========================================================================== test session starts =========================================================================== platform linux -- Python 3.6.2, pytest-6.1.2, py-1.9.0, pluggy-0.13.1 rootdir: /data/wh/MASR/warp-ctc/pytorch_binding, configfile: setup.cfg plugins: hydra-core-1.0.4 collected 5 items

test_gpu.py ..... [100%]

============================================================================ 5 passed in 5.76s

C4712 commented 3 years ago

your mean is the wrap-ctc install successed,but can't transfer cuda?only cuda10.1 can run the Ctcloss,cuda10.2 install successed can't still transfer

yeyupiaoling commented 3 years ago

@5859wang No, CUDA 10.2 can also be used, and mine is cuda10.2.May I see the error message?