Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into argmin_argmax
commit
fa002cd67c
@ -0,0 +1,42 @@
|
||||
if (NOT WITH_ANAKIN)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(ANAKIN_INSTALL_DIR "${THIRD_PARTY_PATH}/install/anakin" CACHE PATH
|
||||
"Anakin install path." FORCE)
|
||||
set(ANAKIN_INCLUDE "${ANAKIN_INSTALL_DIR}" CACHE STRING "root of Anakin header files")
|
||||
set(ANAKIN_LIBRARY "${ANAKIN_INSTALL_DIR}" CACHE STRING "path of Anakin library")
|
||||
|
||||
set(ANAKIN_COMPILE_EXTRA_FLAGS -Wno-error=unused-variable -Wno-error=format-extra-args -Wno-error=comment -Wno-error=format -Wno-error=switch -Wno-error=return-type -Wno-error=non-virtual-dtor -Wno-reorder -Wno-error=cpp)
|
||||
|
||||
set(ANAKIN_LIBRARY_URL "https://github.com/pangge/Anakin/releases/download/3.0/anakin_release_simple.tar.gz")
|
||||
|
||||
# A helper function used in Anakin, currently, to use it, one need to recursively include
|
||||
# nearly all the header files.
|
||||
function(fetch_include_recursively root_dir)
|
||||
if (IS_DIRECTORY ${root_dir})
|
||||
include_directories(${root_dir})
|
||||
endif()
|
||||
|
||||
file(GLOB ALL_SUB RELATIVE ${root_dir} ${root_dir}/*)
|
||||
foreach(sub ${ALL_SUB})
|
||||
if (IS_DIRECTORY ${root_dir}/${sub})
|
||||
fetch_include_recursively(${root_dir}/${sub})
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# download library
|
||||
message(STATUS "Download Anakin library from ${ANAKIN_LIBRARY_URL}")
|
||||
execute_process(COMMAND bash -c "mkdir -p ${ANAKIN_INSTALL_DIR}")
|
||||
execute_process(COMMAND bash -c "rm -rf ${ANAKIN_INSTALL_DIR}/*")
|
||||
execute_process(COMMAND bash -c "cd ${ANAKIN_INSTALL_DIR}; wget -q ${ANAKIN_LIBRARY_URL}")
|
||||
execute_process(COMMAND bash -c "mkdir -p ${ANAKIN_INSTALL_DIR}")
|
||||
execute_process(COMMAND bash -c "cd ${ANAKIN_INSTALL_DIR}; tar xzf anakin_release_simple.tar.gz")
|
||||
|
||||
if (WITH_ANAKIN)
|
||||
message(STATUS "Anakin for inference is enabled")
|
||||
message(STATUS "Anakin is set INCLUDE:${ANAKIN_INCLUDE} LIBRARY:${ANAKIN_LIBRARY}")
|
||||
fetch_include_recursively(${ANAKIN_INCLUDE})
|
||||
link_directories(${ANAKIN_LIBRARY})
|
||||
endif()
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,25 @@
|
||||
# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# 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.
|
||||
#
|
||||
|
||||
if(APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=pessimizing-move")
|
||||
endif(APPLE)
|
||||
|
||||
cc_library(tape_variable SRCS variable.cc DEPS ${FLUID_CORE_MODULES})
|
||||
cc_library(tape SRCS tape.cc DEPS ${FLUID_CORE_MODULES} ${GLOB_OP_LIB} tape_variable)
|
||||
|
||||
cc_test(test_tape
|
||||
SRCS test_tape.cc
|
||||
DEPS tape tape_variable)
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue