From ed8c462dc79461c434cdd69f378743d1258c624b Mon Sep 17 00:00:00 2001 From: nihui Date: Mon, 25 Mar 2019 11:55:52 -0700 Subject: [PATCH] Fix caffe2 build with BLAS=OpenBLAS (#18422) 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 | 1 + caffe2/utils/math/reduce.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/caffe2/utils/math/elementwise.cc b/caffe2/utils/math/elementwise.cc index 96e4644..7e56c26 100644 --- a/caffe2/utils/math/elementwise.cc +++ b/caffe2/utils/math/elementwise.cc @@ -13,6 +13,7 @@ #include "caffe2/core/context.h" #include "caffe2/utils/eigen_utils.h" +#include "caffe2/utils/math.h" namespace caffe2 { namespace math { diff --git a/caffe2/utils/math/reduce.cc b/caffe2/utils/math/reduce.cc index 09824df..c71d353 100644 --- a/caffe2/utils/math/reduce.cc +++ b/caffe2/utils/math/reduce.cc @@ -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" -- 2.7.4