You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2019/07/19 03:42:25 UTC

[incubator-mxnet] 05/28: Fix compilation for GPU only. (MSHADOW_USE_CUDA=1, rest is 0)

This is an automated email from the ASF dual-hosted git repository.

zhasheng pushed a commit to tag v1.1
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git

commit 27b3aebe8f878dbfc5d325ed3d44161a6fe9c314
Author: Jan Bujak <j+...@jabster.pl>
AuthorDate: Sat Apr 12 23:10:38 2014 +0200

    Fix compilation for GPU only. (MSHADOW_USE_CUDA=1, rest is 0)
---
 mshadow/tensor_expr_engine-inl.hpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/mshadow/tensor_expr_engine-inl.hpp b/mshadow/tensor_expr_engine-inl.hpp
index ffb95c9..9c5f2c7 100644
--- a/mshadow/tensor_expr_engine-inl.hpp
+++ b/mshadow/tensor_expr_engine-inl.hpp
@@ -262,10 +262,12 @@ namespace mshadow{
         struct DotEngine{
             inline static void Eval( Tensor<Device,ddim> &dst, const Tensor<Device,ldim> &lhs, const Tensor<Device,rdim> &rhs, real_t scale );
         };
-        #if (MSHADOW_USE_CBLAS||MSHADOW_USE_MKL)
+
         // handles the dot
         template<typename Device>
         struct BLASEngine;
+
+        #if (MSHADOW_USE_CBLAS||MSHADOW_USE_MKL)
         template<>
         struct BLASEngine<cpu>{
             inline static CBLAS_TRANSPOSE GetT( bool t ){
@@ -294,6 +296,7 @@ namespace mshadow{
                 cblas_dger(CblasColMajor,m,n,alpha,X,incX,Y,incY,A,lda);
             }
         };
+        #endif // MSHADOW_USE_CBLAS || MSHADOW_USE_MKL
 
         #if MSHADOW_USE_CUDA
         // All CuBLAS goes to here, use legacy API: not threadsafe
@@ -378,9 +381,8 @@ namespace mshadow{
                 }
             }
         };
-        #endif // MSHADOW_USE_CBLAS || MSHADOW_USE_MKL
-    }; // namespace expr
 
+    }; // namespace expr
 
     namespace expr{
         /*! \brief some engine that evaluate complex expression */