Fix caffe2 build with BLAS=OpenBLAS (#18422)
authornihui <shuizhuyuanluo@126.com>
Mon, 25 Mar 2019 18:55:52 +0000 (11:55 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 25 Mar 2019 18:59:10 +0000 (11:59 -0700)
Summary:
g++ complains about failing to find the declaration of cblas_sscal and cblas_dscal BLAS function
let's fix it  :)

fedora 29, gcc 8.3.1, openblas 0.3.5
build with cmake -DBLAS=OpenBLAS ..
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18422

Differential Revision: D14598977

Pulled By: soumith

fbshipit-source-id: bde77bfb359d2ff38226401caeed78c114ef7468

caffe2/utils/math/elementwise.cc
caffe2/utils/math/reduce.cc

index 96e4644..7e56c26 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "caffe2/core/context.h"
 #include "caffe2/utils/eigen_utils.h"
+#include "caffe2/utils/math.h"
 
 namespace caffe2 {
 namespace math {
index 09824df..c71d353 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "caffe2/core/context.h"
 #include "caffe2/utils/eigen_utils.h"
+#include "caffe2/utils/math.h"
 #include "caffe2/utils/math/elementwise.h"
 #include "caffe2/utils/math/utils.h"