Fix the linux compile (NoGPU.cpp)
This commit is contained in:
Родитель
ed219c1add
Коммит
b21e61904f
|
@ -78,7 +78,8 @@ COMMON_SRC = Common/fileutil.cpp Common/DataWriter.cpp Common/ConfigFile.cpp Com
|
|||
MATH_SRC = Math/Math/Matrix.cpp Math/Math/CPUMatrix.cpp Math/Math/CPUSparseMatrix.cpp Math/Math/NoGPU.cpp
|
||||
CN_SRC = MachineLearning/CNTK/NetworkDescriptionLanguage.cpp MachineLearning/CNTK/CNTK.cpp MachineLearning/CNTK/ComputationNode.cpp \
|
||||
MachineLearning/CNTK/ModelEditLanguage.cpp \
|
||||
MachineLearning/CNTK/SimpleNetworkBuilder.cpp MachineLearning/CNTK/tests.cpp MachineLearning/CNTKEval/CNTKEval.cpp
|
||||
MachineLearning/CNTK/SimpleNetworkBuilder.cpp \
|
||||
MachineLearning/CNTK/Profiler.cpp MachineLearning/CNTK/tests.cpp MachineLearning/CNTKEval/CNTKEval.cpp
|
||||
BINARYREADER_SRC = DataReader/BinaryReader/BinaryWriter.cpp DataReader/BinaryReader/BinaryReader.cpp DataReader/BinaryReader/BinaryFile.cpp
|
||||
HTKMLFREADER_SRC = DataReader/HTKMLFReader_linux/HTKMLFWriter.cpp DataReader/HTKMLFReader_linux/DataWriter.cpp DataReader/HTKMLFReader_linux/DataReader.cpp DataReader/HTKMLFReader_linux/HTKMLFReader.cpp
|
||||
KALDIREADER_SRC = DataReader/KaldiReader/HTKMLFWriter.cpp DataReader/KaldiReader/DataWriter.cpp DataReader/KaldiReader/DataReader.cpp DataReader/KaldiReader/HTKMLFReader.cpp
|
||||
|
|
|
@ -85,7 +85,8 @@ MATH_SRC = Math/Math/Matrix.cpp Math/Math/GPUMatrix.cu Math/Math/GPUMatrixCUDAKe
|
|||
Math/Math/CPUMatrix.cpp Math/Math/CPUSparseMatrix.cpp #Math/Math/InstantiateTemplates.cu
|
||||
CN_SRC = MachineLearning/CNTK/NetworkDescriptionLanguage.cpp MachineLearning/CNTK/CNTK.cpp MachineLearning/CNTK/ComputationNode.cpp \
|
||||
MachineLearning/CNTK/ModelEditLanguage.cpp \
|
||||
MachineLearning/CNTK/SimpleNetworkBuilder.cpp MachineLearning/CNTK/tests.cpp MachineLearning/CNTK/Profiler.cpp MachineLearning/CNTKEval/CNTKEval.cpp
|
||||
MachineLearning/CNTK/SimpleNetworkBuilder.cpp \
|
||||
MachineLearning/CNTK/Profiler.cpp MachineLearning/CNTK/tests.cpp MachineLearning/CNTK/Profiler.cpp MachineLearning/CNTKEval/CNTKEval.cpp
|
||||
BINARYREADER_SRC = #DataReader/BinaryReader/BinaryWriter.cpp DataReader/BinaryReader/BinaryReader.cpp DataReader/BinaryReader/BinaryFile.cpp
|
||||
HTKMLFREADER_SRC = DataReader/HTKMLFReader_linux/HTKMLFWriter.cpp DataReader/HTKMLFReader_linux/DataWriter.cpp DataReader/HTKMLFReader_linux/DataReader.cpp DataReader/HTKMLFReader_linux/HTKMLFReader.cpp
|
||||
KALDIREADER_SRC = DataReader/KaldiReader/HTKMLFWriter.cpp DataReader/KaldiReader/DataWriter.cpp DataReader/KaldiReader/DataReader.cpp DataReader/KaldiReader/HTKMLFReader.cpp
|
||||
|
|
|
@ -76,7 +76,8 @@ COMMON_SRC = Common/fileutil.cpp Common/DataWriter.cpp Common/ConfigFile.cpp Com
|
|||
MATH_SRC = Math/Math/Matrix.cpp Math/Math/CPUMatrix.cpp Math/Math/CPUSparseMatrix.cpp Math/Math/NoGPU.cpp
|
||||
CN_SRC = MachineLearning/CNTK/NetworkDescriptionLanguage.cpp MachineLearning/CNTK/CNTK.cpp MachineLearning/CNTK/ComputationNode.cpp \
|
||||
MachineLearning/CNTK/ModelEditLanguage.cpp \
|
||||
MachineLearning/CNTK/SimpleNetworkBuilder.cpp MachineLearning/CNTK/tests.cpp MachineLearning/CNTKEval/CNTKEval.cpp
|
||||
MachineLearning/CNTK/SimpleNetworkBuilder.cpp \
|
||||
MachineLearning/CNTK/Profiler.cpp MachineLearning/CNTK/tests.cpp MachineLearning/CNTKEval/CNTKEval.cpp
|
||||
BINARYREADER_SRC = DataReader/BinaryReader/BinaryWriter.cpp DataReader/BinaryReader/BinaryReader.cpp DataReader/BinaryReader/BinaryFile.cpp
|
||||
HTKMLFREADER_SRC = DataReader/HTKMLFReader_linux/HTKMLFWriter.cpp DataReader/HTKMLFReader_linux/DataWriter.cpp DataReader/HTKMLFReader_linux/DataReader.cpp DataReader/HTKMLFReader_linux/HTKMLFReader.cpp
|
||||
KALDIREADER_SRC = DataReader/KaldiReader/HTKMLFWriter.cpp DataReader/KaldiReader/DataWriter.cpp DataReader/KaldiReader/DataReader.cpp DataReader/KaldiReader/HTKMLFReader.cpp
|
||||
|
|
|
@ -29,15 +29,15 @@
|
|||
# export LD_LIBRARY_PATH=/usr/local/acml5.3.0/gfortran64/lib:/usr/local/cuda/lib64:/usr/local/lib
|
||||
# export PATH=$PATH:/usr/local/bin:/usr/local/cuda/bin
|
||||
|
||||
CC = g++-4.9
|
||||
CC = g++-4.8
|
||||
NVCC = nvcc
|
||||
ARCH = x86_64
|
||||
DEVICE = gpu
|
||||
#BUILDTYPE = debug
|
||||
BUILDTYPE = release
|
||||
# comment following and uncomment the next one to enable MKL library
|
||||
#MATHLIB = acml
|
||||
MATHLIB = mkl
|
||||
MATHLIB = acml
|
||||
#MATHLIB = mkl
|
||||
# modify relevant path below for your system
|
||||
MKL_PATH = /usr/users/yzhang87/tools/composer_xe_2015.2.164
|
||||
ACML_PATH = /usr/users/yzhang87/code/acml/gfortran64
|
||||
|
@ -65,14 +65,18 @@ else
|
|||
MATHLIB_LIB = -L$(ACML_PATH)/lib -lacml -lm -lpthread
|
||||
MATHLIB_DEFINE = -DUSE_ACML
|
||||
endif
|
||||
CUDA_PATH = /scratch/cuda-7.0
|
||||
CUDA_PATH = /scratch/cuda-6.5
|
||||
CUDA_INCLUDE = $(CUDA_PATH)/include
|
||||
CUDA_LIB = -L$(CUDA_PATH)/lib64 -lcublas -lcudart -lcuda -lcurand -lcusparse -lnvidia-ml
|
||||
|
||||
NVML_INCLUDE = /scratch/usr/include/nvidia/gdk # install and include it @ https://developer.nvidia.com/gpu-deployment-kit
|
||||
|
||||
|
||||
# Add KALDI (you need to add your Kaldi path into this file)
|
||||
include kaldi_vars.mk
|
||||
|
||||
INCFLAGS = -I Common/Include -I Math/Math -I MachineLearning/cn -I $(CUDA_INCLUDE) -I $(MATHLIB_INCLUDE) $(KALDI_INCLUDES)
|
||||
INCFLAGS = -I Common/Include -I Math/Math -I MachineLearning/CNTK -I $(CUDA_INCLUDE) -I $(MATHLIB_INCLUDE) $(KALDI_INCLUDES) -I $(NVML_INCLUDE)
|
||||
|
||||
|
||||
CFLAGS = -msse3 -std=c++0x -std=c++11 -D_POSIX_SOURCE -D_XOPEN_SOURCE=600 -D__USE_XOPEN2K $(MATHLIB_DEFINE) -fopenmp -fpermissive $(KALDI_DEFINES)
|
||||
|
||||
|
@ -82,9 +86,10 @@ COMMON_SRC = Common/fileutil.cpp Common/DataWriter.cpp Common/ConfigFile.cpp Com
|
|||
Common/Eval.cpp Common/File.cpp Common/BestGpu.cpp Common/TimerUtility.cpp
|
||||
MATH_SRC = Math/Math/Matrix.cpp Math/Math/GPUMatrix.cu Math/Math/GPUMatrixCUDAKernels.cu Math/Math/GPUSparseMatrix.cu Math/Math/GPUWatcher.cu \
|
||||
Math/Math/CPUMatrix.cpp Math/Math/CPUSparseMatrix.cpp #Math/Math/InstantiateTemplates.cu
|
||||
CN_SRC = MachineLearning/cn/NetworkDescriptionLanguage.cpp MachineLearning/cn/cn.cpp MachineLearning/cn/ComputationNode.cpp \
|
||||
MachineLearning/cn/ModelEditLanguage.cpp MachineLearning/cn/PTaskGraphBuilder.cpp \
|
||||
MachineLearning/cn/SimpleNetworkBuilder.cpp MachineLearning/cn/tests.cpp MachineLearning/CNTKEval/CNTKEval.cpp
|
||||
CN_SRC = MachineLearning/CNTK/NetworkDescriptionLanguage.cpp MachineLearning/CNTK/CNTK.cpp MachineLearning/CNTK/ComputationNode.cpp \
|
||||
MachineLearning/CNTK/ModelEditLanguage.cpp \
|
||||
MachineLearning/CNTK/SimpleNetworkBuilder.cpp \
|
||||
MachineLearning/CNTK/Profiler.cpp MachineLearning/CNTK/tests.cpp MachineLearning/CNTKEval/CNTKEval.cpp
|
||||
BINARYREADER_SRC = #DataReader/BinaryReader/BinaryWriter.cpp DataReader/BinaryReader/BinaryReader.cpp DataReader/BinaryReader/BinaryFile.cpp
|
||||
HTKMLFREADER_SRC = DataReader/HTKMLFReader_linux/HTKMLFWriter.cpp DataReader/HTKMLFReader_linux/DataWriter.cpp DataReader/HTKMLFReader_linux/DataReader.cpp DataReader/HTKMLFReader_linux/HTKMLFReader.cpp
|
||||
KALDIREADER_SRC = DataReader/KaldiReader/HTKMLFWriter.cpp DataReader/KaldiReader/DataWriter.cpp DataReader/KaldiReader/DataReader.cpp DataReader/KaldiReader/HTKMLFReader.cpp
|
||||
|
@ -114,7 +119,7 @@ DEP := $(patsubst %.o, %.d, $(OBJ))
|
|||
|
||||
SEPARATOR = "=-----------------------------------------------------------="
|
||||
|
||||
all: $(BINDIR)/cn.exe $(BINDIR)/UCIFastReader.so $(BINDIR)/LMSequenceReader.so $(BINDIR)/LUSequenceReader.so $(BINDIR)/HTKMLFReader.so $(BINDIR)/Kaldi2Reader.so
|
||||
all: $(BINDIR)/cntk $(BINDIR)/UCIFastReader.so $(BINDIR)/LMSequenceReader.so $(BINDIR)/LUSequenceReader.so $(BINDIR)/HTKMLFReader.so $(BINDIR)/Kaldi2Reader.so
|
||||
|
||||
|
||||
ln -sf $(CURDIR)/$(BINDIR)/* bin
|
||||
|
@ -154,7 +159,7 @@ $(BINDIR)/Kaldi2Reader.so: $(KALDI2READER_OBJ) $(CORE_OBJ)
|
|||
#BinaryReader: ${BINARYREADER_SRC:.cpp=.o} ${COMMON_SRC:.cpp=.o}
|
||||
# $(CC) -o $(addsuffix .so, $@) $^ -fPIC -shared
|
||||
|
||||
$(BINDIR)/cn.exe: $(CORE_OBJ)
|
||||
$(BINDIR)/cntk: $(CORE_OBJ)
|
||||
@echo $(SEPARATOR)
|
||||
@mkdir -p $(dir $@)
|
||||
@echo building output for $(ARCH) with build type $(BUILDTYPE)
|
||||
|
|
|
@ -232,6 +232,12 @@ namespace Microsoft {
|
|||
|
||||
template<class ElemType> void GPUSparseMatrix<ElemType>::InplaceTranspose() { }
|
||||
|
||||
template<class ElemType>
|
||||
GPUMatrix<ElemType> GPUSparseMatrix<ElemType>::ColumnSliceToDense(size_t startColumn, size_t numCols) const
|
||||
{
|
||||
return ElemType(0);
|
||||
}
|
||||
|
||||
template<class ElemType> ElemType GPUSparseMatrix<ElemType>::SumOfAbsElements() const
|
||||
{
|
||||
return ElemType(0);
|
||||
|
@ -1050,7 +1056,7 @@ namespace Microsoft {
|
|||
|
||||
template<class ElemType>
|
||||
void GPUMatrix<ElemType>::AssignNoiseContrastiveEstimation(const GPUMatrix<ElemType>& a,
|
||||
const GPUMatrix<ElemType>& b, size_t sampleCount, GPUMatrix<ElemType>& tmp, GPUMatrix<ElemType>& c)
|
||||
const GPUMatrix<ElemType>& b, const GPUMatrix<ElemType>& bias, size_t sampleCount, GPUMatrix<ElemType>& tmp, GPUMatrix<ElemType>& c)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче