Fix cmake error when building with WITH_AVX=OFF.

mobile_baidu
dangqingqing 7 years ago
parent f78731c837
commit 7abd1bdfff

@ -1,3 +1 @@
if(WITH_AVX)
cc_library(activation_functions SRCS avx_functions.cc)
endif()
cc_library(activation_functions SRCS 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 <immintrin.h>
#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

Loading…
Cancel
Save