From 4491b327902a24a6aed99ff9c2c9917650d824d5 Mon Sep 17 00:00:00 2001 From: Saeed Maleki Date: Fri, 23 Aug 2019 21:32:20 +0000 Subject: [PATCH] fixed bug in setup.py --- MANIFEST.in | 5 ++++- horovod/common/ops/msallreduce_cuda_operations.cc | 3 +++ setup.py | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 3c7fd6f533..9daf388a61 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ -recursive-include * *.h *.hpp *.cc *.md +recursive-include * *.h *.hpp *.cc *.md *.ipp include LICENSE horovod.lds horovod.exp prune .eggs @@ -19,3 +19,6 @@ exclude third_party/eigen/Eigen/src/SparseCholesky/* graft third_party/gloo/cmake recursive-include third_party/gloo CMakeLists.txt recursive-include third_party/gloo *.in + +# include cmake related files for msallreduce kernel +graft horovod/common/ops/cuda/ diff --git a/horovod/common/ops/msallreduce_cuda_operations.cc b/horovod/common/ops/msallreduce_cuda_operations.cc index 606f92f81d..8b7488b2e5 100644 --- a/horovod/common/ops/msallreduce_cuda_operations.cc +++ b/horovod/common/ops/msallreduce_cuda_operations.cc @@ -78,6 +78,9 @@ cudaDataType_t CublasContext::GetCublasDataType(T* variable) { } //thread_local cublasHandle_t MsCudaAllreduceOp::cublas_Handle; +thread_local double* MsCudaAllreduceOp::device_normsq_memory_a; +thread_local double* MsCudaAllreduceOp::device_normsq_memory_b; +thread_local double* MsCudaAllreduceOp::device_dot_product_memory; MsCudaAllreduceOp::MsCudaAllreduceOp(MPIContext* mpi_context, CUDAContext* cuda_context, HorovodGlobalState* global_state) : MsAllreduceOp(mpi_context, global_state), cuda_context_(cuda_context) { diff --git a/setup.py b/setup.py index 616e535cf6..ce2bde13bc 100644 --- a/setup.py +++ b/setup.py @@ -661,6 +661,7 @@ def get_common_options(build_ext): if have_cuda: MACROS += [('HAVE_CUDA', '1')] INCLUDES += cuda_include_dirs + INCLUDES += ['horovod/common/ops/cuda'] SOURCES += ['horovod/common/ops/cuda_operations.cc', 'horovod/common/ops/mpi_cuda_operations.cc', 'horovod/common/ops/msallreduce_cuda_operations.cc']