From: nihui Date: Mon, 25 Mar 2019 18:55:52 +0000 (-0700) Subject: Fix caffe2 build with BLAS=OpenBLAS (#18422) X-Git-Tag: accepted/tizen/6.5/unified/20211028.231830~644 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ed8c462dc79461c434cdd69f378743d1258c624b;p=platform%2Fupstream%2Fpytorch.git 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 --- 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"