yajiemiao / eesen

The official repository of the Eesen project
Apache License 2.0
202 stars 72 forks source link

gpucompute: cuda-matrix.cc:1075:57: error: ‘cuda_apply_heaviside’ was not declared in this scope #8

Closed bmilde closed 8 years ago

bmilde commented 8 years ago

The function "cuda_apply_heaviside" does not seem to be declared in gpucompute. As a result, the current version of the gpu module (and EESEN) does not compile:

g++ -msse -msse2 -Wall -I.. -pthread -DKALDI_DOUBLEPRECISION=0 -DHAVE_POSIX_MEMALIGN -Wno-sign-compare -Wno-unused-local-typedefs -Winit-self -DHAVE_EXECINFO_H=1 -rdynamic -DHAVE_CXXABI_H -DHAVE_OPENBLAS -I /opt/openblas/include -I /srv/data/speech/eesen/tools/openfst/include -DHAVE_OPENFST_GE_10400 -std=c++0x -g -DHAVE_CUDA -I/usr/local/cuda/include -c -o cuda-matrix.o cuda-matrix.cc cuda-matrix.cc: In instantiation of ‘void eesen::CuMatrixBase::ApplyHeaviside() [with Real = float]’: cuda-matrix.cc:1227:16: required from here cuda-matrix.cc:1075:57: error: ‘cuda_apply_heaviside’ was not declared in this scope cuda_applyheaviside(dimGrid, dimBlock, data, Dim()); ^ cuda-matrix.cc: In instantiation of ‘void eesen::CuMatrixBase::ApplyHeaviside() [with Real = double]’: cuda-matrix.cc:1228:16: required from here cuda-matrix.cc:1075:57: error: ‘cuda_apply_heaviside’ was not declared in this scope make: *\ [cuda-matrix.o] Error 1

As ApplyHeaviside() was introduced in the last commit and searching for cuda_apply_heaviside points to it being available in Kaldi's cu-kernels.h but not in EESEN, my guess is that there were some changes missing in the last commit.

bmilde commented 8 years ago

Copying over the appropriate functions from a recent KALDI trunk lets me compile gpucompute:

inline void cuda_apply_heaviside(dim3 Gr, dim3 Bl, float* mat, MatrixDim dim) { cudaF_apply_heaviside(Gr,Bl,mat,dim); } inline void cuda_apply_heaviside(dim3 Gr, dim3 Bl, float* mat, MatrixDim dim) { cudaD_apply_heaviside(Gr,Bl,mat,dim); }

and the functions cudaF_apply_heaviside and cudaD_apply_heaviside

and the actual implementation in function _apply_heaviside

yajiemiao commented 8 years ago

Please update to the latest. This will solve the problem.