# This allows find_package to access configurations installed inside overlay
list(APPEND CMAKE_PREFIX_PATH "${NNFW_OVERLAY_DIR}")
-macro(nnfw_include PREFIX)
+macro(nnas_include PREFIX)
include("${CMAKE_SOURCE_DIR}/cmake/modules/${PREFIX}.cmake")
-endmacro(nnfw_include)
+endmacro(nnas_include)
# 'find_package()' wrapper to find in cmake/packages folder
#
# identify platform: HOST_PLATFORM, TARGET_PLATFORM and related
# note: this should be placed before flags and options setting
-nnfw_include(IdentifyPlatform)
+nnas_include(IdentifyPlatform)
# apply compilation flags
# note: this should be placed after cmake/option/option_xxx.cmake files
target_link_libraries(nnfw_coverage INTERFACE gcov)
endif(ENABLE_COVERAGE)
-nnfw_include(AddSubdirectories)
+nnas_include(AddSubdirectories)
add_library(nnfw-header INTERFACE)
target_include_directories(nnfw-header INTERFACE ${NNAS_PROJECT_SOURCE_DIR}/runtimes/include)
function(ExternalSource_Download PREFIX URL)
- nnfw_include(StampTools)
+ nnas_include(StampTools)
get_filename_component(FILENAME ${URL} NAME)
endfunction(ExternalSource_Download)
function(ExternalSource_Get PREFIX DOWNLOAD_FLAG URL)
- nnfw_include(StampTools)
+ nnas_include(StampTools)
set(CACHE_DIR "${NNAS_EXTERNALS_DIR}")
set(OUT_DIR "${CACHE_DIR}/${PREFIX}")
function(_ARMComputeSource_import)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
set(ARMCOMPUTE_URL ${EXTERNAL_DOWNLOAD_SERVER}/ARM-software/ComputeLibrary/archive/v19.05.tar.gz)
function(_AbslSource_import)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
# NOTE The following URL comes from TensorFlow 1.12
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
function(_BoostSource_import)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
# EXTERNAL_DOWNLOAD_SERVER will be overwritten by CI server to use mirror server.
envoption(EXTERNAL_DOWNLOAD_SERVER "http://sourceforge.net")
function(_cpuinfoSource_import)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
set(CPUINFO_URL ${EXTERNAL_DOWNLOAD_SERVER}/pytorch/cpuinfo/archive/d5e37adf1406cf899d7d9ec1d317c47506ccb970.tar.gz)
function(_EigenSource_import)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
# NOTE TensorFlow 1.12 downloads Eign from the following URL
envoption(EXTERNAL_DOWNLOAD_SERVER "https://bitbucket.org")
function(_enum34Source_import)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
envoption(EXTERNAL_DOWNLOAD_SERVER "https://bitbucket.org")
set(ENUM34_URL ${EXTERNAL_DOWNLOAD_SERVER}/stoneleaf/enum34/get/1.1.6.tar.gz)
function(_FP16Source_import)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
set(FP16_URL ${EXTERNAL_DOWNLOAD_SERVER}/Maratyszcza/FP16/archive/febbb1c163726b5db24bed55cc9dc42529068997.tar.gz)
function(_FXdivSource_import)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
set(FXDIV_URL ${EXTERNAL_DOWNLOAD_SERVER}/Maratyszcza/FXdiv/archive/f8c5354679ec2597792bc70a9e06eff50c508b9a.tar.gz)
function(_FarmhashSource_import)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
# NOTE TensorFlow 1.12 downloads farmhash from the following URL
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
function(_FlatBuffersSource_import)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
# NOTE TensorFlow 1.12 downloads FlatBuffers from the following URL
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
function(_GEMMLowpSource_import)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
# NOTE TensorFlow 1.12 uses the following URL
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
if(${BUILD_GTEST})
- nnfw_include(ExternalSourceTools)
- nnfw_include(ExternalProjectTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(ExternalProjectTools)
+ nnas_include(OptionTools)
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
set(GTEST_URL ${EXTERNAL_DOWNLOAD_SERVER}/google/googletest/archive/release-1.8.0.tar.gz)
return()
endif(NOT (TARGET_ARCH_BASE STREQUAL "x86_64"))
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
# NOTE TensorFlow 1.12 downloads NEON2SSE from the following URL
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
set(NNPACK_LIBRARY_TYPE "static" CACHE STRING "")
set(PTHREADPOOL_LIBRARY_TYPE "static" CACHE STRING "")
set(CPUINFO_LIBRARY_TYPE "static" CACHE STRING "")
- nnfw_include(ExternalProjectTools)
+ nnas_include(ExternalProjectTools)
add_extdirectory("${NNPACK_SOURCE_DIR}" nnpack EXCLUDE_FROM_ALL)
# We build static versions of nnpack and pthreadpool but link
# them into a shared library (high-perf-backend), so they need PIC.
return()
endif(NOT DOWNLOAD_NNPACK)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
set(NNPACK_URL ${EXTERNAL_DOWNLOAD_SERVER}/Maratyszcza/NNPACK/archive/c039579abe21f5756e0f0e45e8e767adccc11852.tar.gz)
function(_NoniusSource_import)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
set(NONIUS_URL ${EXTERNAL_DOWNLOAD_SERVER}/libnonius/nonius/archive/v1.2.0-beta.1.tar.gz)
function(_PeachpySource_import)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
set(PEACHPY_URL ${EXTERNAL_DOWNLOAD_SERVER}/Maratyszcza/Opcodes/archive/6e2b0cd9f1403ecaf164dea7019dd54db5aea252.tar.gz)
ExternalSource_Get("python_opcodes" ${DOWNLOAD_NNPACK} ${PEACHPY_URL})
-
+
set(PYTHON_OPCODES_SOURCE_DIR ${python_opcodes_SOURCE_DIR} PARENT_SCOPE)
set(PYTHON_OPCODES_SOURCE_FOUND ${python_opcodes_SOURCE_GET} PARENT_SCOPE)
endfunction(_PeachpySource_import)
function(_PSIMDSource_import)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
set(PSIMD_URL ${EXTERNAL_DOWNLOAD_SERVER}/Maratyszcza/psimd/archive/90a938f30ba414ada2f4b00674ee9631d7d85e19.tar.gz)
function(_PeachpySource_import)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
set(PEACHPY_URL ${EXTERNAL_DOWNLOAD_SERVER}/Maratyszcza/PeachPy/archive/01d15157a973a4ae16b8046313ddab371ea582db.tar.gz)
function(_pthreadpoolSource_import)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
set(PTHREADPOOL_URL ${EXTERNAL_DOWNLOAD_SERVER}/Maratyszcza/pthreadpool/archive/6673a4c71fe35e077c6843a74017d9c25610c537.tar.gz)
function(_SIXSource_import)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
set(six_URL ${EXTERNAL_DOWNLOAD_SERVER}/benjaminp/six/archive/1.11.0.tar.gz)
# Optional packages
nnfw_find_package(NEON2SSESource QUIET)
- nnfw_include(ExternalProjectTools)
+ nnas_include(ExternalProjectTools)
add_extdirectory("${CMAKE_CURRENT_LIST_DIR}/TensorFlowLite" tflite)
set(TensorFlowLite_FOUND TRUE)
return()
endif(NOT DOWNLOAD_TENSORFLOW)
- nnfw_include(ExternalSourceTools)
- nnfw_include(OptionTools)
+ nnas_include(ExternalSourceTools)
+ nnas_include(OptionTools)
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
set(TENSORFLOW_URL ${EXTERNAL_DOWNLOAD_SERVER}/tensorflow/tensorflow/archive/v1.13.1.tar.gz)