NervanaSystems / deepspeech

DeepSpeech neon implementation
Apache License 2.0
222 stars 69 forks source link

Compilation for CPU (non GPU systems) fails #6

Closed pankaj2701 closed 7 years ago

pankaj2701 commented 7 years ago

Trying to compile on Ubuntu 16.04 without a GPU card. Getting the following error /home/pankaj/deepspeech/src/transforms/warp-ctc/src/ctc_entrypoint.cpp:49:30: error: ‘cudaStream_t’ has not been declared cudaStream_t stream, ^ /home/pankaj/deepspeech/src/transforms/warp-ctc/src/ctc_entrypoint.cpp: In function ‘int compute_ctc_gpu(const float, float, const int, const int, const int, int, int, float, int, char)’: /home/pankaj/deepspeech/src/transforms/warp-ctc/src/ctc_entrypoint.cpp:50:53: error: conflicting declaration of C function ‘int compute_ctc_gpu(const float, float, const int, const int, const int, int, int, float, int, char)’ char ctc_gpu_workspace){ ^ In file included from /home/pankaj/deepspeech/src/transforms/warp-ctc/src/ctc_entrypoint.cpp:5:0: /home/pankaj/deepspeech/src/transforms/warp-ctc/include/ctc.h:99:5: note: previous declaration ‘int compute_ctc_gpu(const float, float, const int, const int, const int, int, int, float, CUstream, char)’ int compute_ctc_gpu(const float* const activations, ^ CMakeFiles/warpctc.dir/build.make:62: recipe for target 'CMakeFiles/warpctc.dir/src/ctc_entrypoint.cpp.o' failed

michaelcapizzi commented 7 years ago

I had the same problem.

I was able to figure out that this happens because warp-ctc (the Baidu code used in the cost function by this project) does not easily allow compilation without CUDA. I have open issue on their github for this: https://github.com/baidu-research/warp-ctc/issues/57

In the meantime, I had to make a few changes to the make file of warp-ctc, along with a few changes to the ctc.py file in this project, and I'm currently trying to train a model to see if it works.

(If it does, I'll happily identify the manual changes to the code I had to make for anyone else who is interested)

But it would be fantastic if this project could be built without requiring CUDA.

tyler-nervana commented 7 years ago

Thanks a lot for reporting this. Have a look at #8 and see if it has solved your issues. We need to do a bit more testing before merging to master, but it compiles properly on our systems.