未验证 提交 b49923b6 编写于 作者: Q qingqing01 提交者: GitHub

Merge pull request #5425 from qingqing01/avx_cmake

Fix cmake error when building with WITH_AVX=OFF.
if(WITH_AVX) cc_library(activation_functions SRCS avx_functions.cc)
cc_library(activation_functions SRCS avx_functions.cc)
endif()
...@@ -12,6 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -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 See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#ifdef __AVX__
#include <immintrin.h> #include <immintrin.h>
#include "paddle/operators/math/detail/activation_functions.h" #include "paddle/operators/math/detail/activation_functions.h"
// TODO(qingqing) refine this dependence // TODO(qingqing) refine this dependence
...@@ -84,3 +86,5 @@ __m256 Identity(const __m256 a, const __m256 b) { return a; } ...@@ -84,3 +86,5 @@ __m256 Identity(const __m256 a, const __m256 b) { return a; }
} // namespace math } // namespace math
} // namespace operators } // namespace operators
} // namespace paddle } // namespace paddle
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册