diff --git a/paddle/operators/math/detail/CMakeLists.txt b/paddle/operators/math/detail/CMakeLists.txt index 92eac9d3623ceb5464133b5e7baa2e30f764805f..0df1c060f9042067b655d987560a278f9fc46a5b 100644 --- a/paddle/operators/math/detail/CMakeLists.txt +++ b/paddle/operators/math/detail/CMakeLists.txt @@ -1,3 +1 @@ -if(WITH_AVX) - cc_library(activation_functions SRCS avx_functions.cc) -endif() +cc_library(activation_functions SRCS avx_functions.cc) diff --git a/paddle/operators/math/detail/avx_functions.cc b/paddle/operators/math/detail/avx_functions.cc index 6d9df654a48e990ec54d59c1e627aa1304122b21..921364788cd23e265fa0ca027bf1af3f81604489 100644 --- a/paddle/operators/math/detail/avx_functions.cc +++ b/paddle/operators/math/detail/avx_functions.cc @@ -12,6 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +#ifdef __AVX__ + #include #include "paddle/operators/math/detail/activation_functions.h" // TODO(qingqing) refine this dependence @@ -84,3 +86,5 @@ __m256 Identity(const __m256 a, const __m256 b) { return a; } } // namespace math } // namespace operators } // namespace paddle + +#endif