From f9b66d0d9758c229c83d6cde5322ab453413398b Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Thu, 11 Nov 2021 02:16:58 -0600 Subject: [PATCH] Remove useless folders (#990) --- paddlespeech/emo/__init__.py | 13 -- paddlespeech/kws/__init__.py | 13 -- speechnn/.gitignore | 1 - speechnn/CMakeLists.txt | 56 ----- speechnn/cmake/third_party.cmake | 197 ------------------ speechnn/cmake/third_party/absl.cmake | 13 -- speechnn/cmake/third_party/boost.cmake | 49 ----- speechnn/cmake/third_party/eigen.cmake | 53 ----- speechnn/cmake/third_party/libsndfile.cmake | 11 - speechnn/cmake/third_party/openfst.cmake | 26 --- .../third_party/openfst_lib_target.cmake | 31 --- speechnn/cmake/third_party/threadpool.cmake | 36 ---- speechnn/cmake/third_party/version.cmake | 15 -- speechnn/core/transformers/.gitkeep | 0 speechnn/core/transformers/README.md | 9 - speechnn/env.sh | 10 - speechnn/examples/.gitkeep | 0 speechnn/examples/CMakeLists.txt | 0 speechnn/speechnn/CMakeLists.txt | 0 speechnn/speechnn/decoder/CMakeLists.txt | 2 - speechnn/speechnn/frontend/CMakeLists.txt | 0 .../speechnn/frontend/audio/CMakeLists.txt | 0 .../speechnn/frontend/text/CMakeLists.txt | 0 speechnn/speechnn/model/CMakeLists.txt | 0 speechnn/speechnn/nn/CMakeLists.txt | 0 speechnn/speechnn/protocol/CMakeLists.txt | 0 speechnn/speechnn/utils/CMakeLists.txt | 0 27 files changed, 535 deletions(-) delete mode 100644 paddlespeech/emo/__init__.py delete mode 100644 paddlespeech/kws/__init__.py delete mode 100644 speechnn/.gitignore delete mode 100644 speechnn/CMakeLists.txt delete mode 100644 speechnn/cmake/third_party.cmake delete mode 100644 speechnn/cmake/third_party/absl.cmake delete mode 100644 speechnn/cmake/third_party/boost.cmake delete mode 100644 speechnn/cmake/third_party/eigen.cmake delete mode 100644 speechnn/cmake/third_party/libsndfile.cmake delete mode 100644 speechnn/cmake/third_party/openfst.cmake delete mode 100644 speechnn/cmake/third_party/openfst_lib_target.cmake delete mode 100644 speechnn/cmake/third_party/threadpool.cmake delete mode 100644 speechnn/cmake/third_party/version.cmake delete mode 100644 speechnn/core/transformers/.gitkeep delete mode 100644 speechnn/core/transformers/README.md delete mode 100644 speechnn/env.sh delete mode 100644 speechnn/examples/.gitkeep delete mode 100644 speechnn/examples/CMakeLists.txt delete mode 100644 speechnn/speechnn/CMakeLists.txt delete mode 100644 speechnn/speechnn/decoder/CMakeLists.txt delete mode 100644 speechnn/speechnn/frontend/CMakeLists.txt delete mode 100644 speechnn/speechnn/frontend/audio/CMakeLists.txt delete mode 100644 speechnn/speechnn/frontend/text/CMakeLists.txt delete mode 100644 speechnn/speechnn/model/CMakeLists.txt delete mode 100644 speechnn/speechnn/nn/CMakeLists.txt delete mode 100644 speechnn/speechnn/protocol/CMakeLists.txt delete mode 100644 speechnn/speechnn/utils/CMakeLists.txt diff --git a/paddlespeech/emo/__init__.py b/paddlespeech/emo/__init__.py deleted file mode 100644 index 185a92b8..00000000 --- a/paddlespeech/emo/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2021 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. diff --git a/paddlespeech/kws/__init__.py b/paddlespeech/kws/__init__.py deleted file mode 100644 index 185a92b8..00000000 --- a/paddlespeech/kws/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2021 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. diff --git a/speechnn/.gitignore b/speechnn/.gitignore deleted file mode 100644 index 378eac25..00000000 --- a/speechnn/.gitignore +++ /dev/null @@ -1 +0,0 @@ -build diff --git a/speechnn/CMakeLists.txt b/speechnn/CMakeLists.txt deleted file mode 100644 index 88182eb4..00000000 --- a/speechnn/CMakeLists.txt +++ /dev/null @@ -1,56 +0,0 @@ -cmake_minimum_required(VERSION 3.14 FATAL_ERROR) - -project(speechnn VERSION 0.1) - -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/src CACHE PATH "Install path prefix." FORCE) -endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}") - -# include file -include(cmake/third_party.cmake) - - -set(CMAKE_VERBOSE_MAKEFILE on) -# set std-14 -set(CMAKE_CXX_STANDARD 14) - - -# # fc_patch dir -# set(FETCHCONTENT_QUIET off) -# get_filename_component(fc_patch "fc_patch" REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}") -# set(FETCHCONTENT_BASE_DIR ${fc_patch}) -# -# -# ############################################################################### -# # Option Configurations -# ############################################################################### -# # option configurations -# option(TEST_DEBUG "option for debug" OFF) -# -# -# ############################################################################### -# # Add local library -# ############################################################################### -# # system lib -# find_package() -# # if dir have CmakeLists.txt -# add_subdirectory() -# # if dir do not have CmakeLists.txt -# add_library(lib_name STATIC file.cc) -# target_link_libraries(lib_name item0 item1) -# add_dependencies(lib_name depend-target) -# -# -# ############################################################################### -# # Library installation -# ############################################################################### -# install() -# -# -# ############################################################################### -# # Build binary file -# ############################################################################### -# add_executable() -# target_link_libraries() -# diff --git a/speechnn/cmake/third_party.cmake b/speechnn/cmake/third_party.cmake deleted file mode 100644 index fdd7b53c..00000000 --- a/speechnn/cmake/third_party.cmake +++ /dev/null @@ -1,197 +0,0 @@ -include(ExternalProject) -# Creat a target named "third_party", which can compile external dependencies on all platform(windows/linux/mac) - -set(THIRD_PARTY_PATH "${CMAKE_BINARY_DIR}/third_party" CACHE STRING - "A path setting third party libraries download & build directories.") -set(THIRD_PARTY_CACHE_PATH "${CMAKE_SOURCE_DIR}" CACHE STRING - "A path cache third party source code to avoid repeated download.") - -set(THIRD_PARTY_BUILD_TYPE Release) -set(third_party_deps) - - -# cache funciton to avoid repeat download code of third_party. -# This function has 4 parameters, URL / REPOSITOR / TAG / DIR: -# 1. URL: specify download url of 3rd party -# 2. REPOSITORY: specify git REPOSITORY of 3rd party -# 3. TAG: specify git tag/branch/commitID of 3rd party -# 4. DIR: overwrite the original SOURCE_DIR when cache directory -# -# The function Return 1 PARENT_SCOPE variables: -# - ${TARGET}_DOWNLOAD_CMD: Simply place "${TARGET}_DOWNLOAD_CMD" in ExternalProject_Add, -# and you no longer need to set any donwnload steps in ExternalProject_Add. -# For example: -# Cache_third_party(${TARGET} -# REPOSITORY ${TARGET_REPOSITORY} -# TAG ${TARGET_TAG} -# DIR ${TARGET_SOURCE_DIR}) - -FUNCTION(cache_third_party TARGET) - SET(options "") - SET(oneValueArgs URL REPOSITORY TAG DIR) - SET(multiValueArgs "") - cmake_parse_arguments(cache_third_party "${optionps}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - STRING(REPLACE "extern_" "" TARGET_NAME ${TARGET}) - STRING(REGEX REPLACE "[0-9]+" "" TARGET_NAME ${TARGET_NAME}) - STRING(TOUPPER ${TARGET_NAME} TARGET_NAME) - IF(cache_third_party_REPOSITORY) - SET(${TARGET_NAME}_DOWNLOAD_CMD - GIT_REPOSITORY ${cache_third_party_REPOSITORY}) - IF(cache_third_party_TAG) - LIST(APPEND ${TARGET_NAME}_DOWNLOAD_CMD - GIT_TAG ${cache_third_party_TAG}) - ENDIF() - ELSEIF(cache_third_party_URL) - SET(${TARGET_NAME}_DOWNLOAD_CMD - URL ${cache_third_party_URL}) - ELSE() - MESSAGE(FATAL_ERROR "Download link (Git repo or URL) must be specified for cache!") - ENDIF() - IF(WITH_TP_CACHE) - IF(NOT cache_third_party_DIR) - MESSAGE(FATAL_ERROR "Please input the ${TARGET_NAME}_SOURCE_DIR for overwriting when -DWITH_TP_CACHE=ON") - ENDIF() - # Generate and verify cache dir for third_party source code - SET(cache_third_party_REPOSITORY ${cache_third_party_REPOSITORY} ${cache_third_party_URL}) - IF(cache_third_party_REPOSITORY AND cache_third_party_TAG) - STRING(MD5 HASH_REPO ${cache_third_party_REPOSITORY}) - STRING(MD5 HASH_GIT ${cache_third_party_TAG}) - STRING(SUBSTRING ${HASH_REPO} 0 8 HASH_REPO) - STRING(SUBSTRING ${HASH_GIT} 0 8 HASH_GIT) - STRING(CONCAT HASH ${HASH_REPO} ${HASH_GIT}) - # overwrite the original SOURCE_DIR when cache directory - SET(${cache_third_party_DIR} ${THIRD_PARTY_CACHE_PATH}/third_party/${TARGET}_${HASH}) - ELSEIF(cache_third_party_REPOSITORY) - STRING(MD5 HASH_REPO ${cache_third_party_REPOSITORY}) - STRING(SUBSTRING ${HASH_REPO} 0 16 HASH) - # overwrite the original SOURCE_DIR when cache directory - SET(${cache_third_party_DIR} ${THIRD_PARTY_CACHE_PATH}/third_party/${TARGET}_${HASH}) - ENDIF() - - IF(EXISTS ${${cache_third_party_DIR}}) - # judge whether the cache dir is empty - FILE(GLOB files ${${cache_third_party_DIR}}/*) - LIST(LENGTH files files_len) - IF(files_len GREATER 0) - list(APPEND ${TARGET_NAME}_DOWNLOAD_CMD DOWNLOAD_COMMAND "") - ENDIF() - ENDIF() - SET(${cache_third_party_DIR} ${${cache_third_party_DIR}} PARENT_SCOPE) - ENDIF() - - # Pass ${TARGET_NAME}_DOWNLOAD_CMD to parent scope, the double quotation marks can't be removed - SET(${TARGET_NAME}_DOWNLOAD_CMD "${${TARGET_NAME}_DOWNLOAD_CMD}" PARENT_SCOPE) -ENDFUNCTION() - -MACRO(UNSET_VAR VAR_NAME) - UNSET(${VAR_NAME} CACHE) - UNSET(${VAR_NAME}) -ENDMACRO() - -# Funciton to Download the dependencies during compilation -# This function has 2 parameters, URL / DIRNAME: -# 1. URL: The download url of 3rd dependencies -# 2. NAME: The name of file, that determin the dirname -# -FUNCTION(file_download_and_uncompress URL NAME) - set(options "") - set(oneValueArgs MD5) - set(multiValueArgs "") - cmake_parse_arguments(URL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - MESSAGE(STATUS "Download dependence[${NAME}] from ${URL}, MD5: ${URL_MD5}") - SET(${NAME}_INCLUDE_DIR ${THIRD_PARTY_PATH}/${NAME}/data PARENT_SCOPE) - ExternalProject_Add( - download_${NAME} - ${EXTERNAL_PROJECT_LOG_ARGS} - PREFIX ${THIRD_PARTY_PATH}/${NAME} - URL ${URL} - URL_MD5 ${URL_MD5} - TIMEOUT 120 - DOWNLOAD_DIR ${THIRD_PARTY_PATH}/${NAME}/data/ - SOURCE_DIR ${THIRD_PARTY_PATH}/${NAME}/data/ - DOWNLOAD_NO_PROGRESS 1 - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - UPDATE_COMMAND "" - INSTALL_COMMAND "" - ) - set(third_party_deps ${third_party_deps} download_${NAME} PARENT_SCOPE) -ENDFUNCTION() - - -# Correction of flags on different Platform(WIN/MAC) and Print Warning Message -if (APPLE) - if(WITH_MKL) - MESSAGE(WARNING - "Mac is not supported with MKL in Paddle yet. Force WITH_MKL=OFF.") - set(WITH_MKL OFF CACHE STRING "Disable MKL for building on mac" FORCE) - endif() -endif() - -if(WIN32 OR APPLE) - MESSAGE(STATUS "Disable XBYAK in Windows and MacOS") - SET(WITH_XBYAK OFF CACHE STRING "Disable XBYAK in Windows and MacOS" FORCE) - - if(WITH_LIBXSMM) - MESSAGE(WARNING - "Windows, Mac are not supported with libxsmm in Paddle yet." - "Force WITH_LIBXSMM=OFF") - SET(WITH_LIBXSMM OFF CACHE STRING "Disable LIBXSMM in Windows and MacOS" FORCE) - endif() - - if(WITH_BOX_PS) - MESSAGE(WARNING - "Windows or Mac is not supported with BOX_PS in Paddle yet." - "Force WITH_BOX_PS=OFF") - SET(WITH_BOX_PS OFF CACHE STRING "Disable BOX_PS package in Windows and MacOS" FORCE) - endif() - - if(WITH_PSLIB) - MESSAGE(WARNING - "Windows or Mac is not supported with PSLIB in Paddle yet." - "Force WITH_PSLIB=OFF") - SET(WITH_PSLIB OFF CACHE STRING "Disable PSLIB package in Windows and MacOS" FORCE) - endif() - - if(WITH_LIBMCT) - MESSAGE(WARNING - "Windows or Mac is not supported with LIBMCT in Paddle yet." - "Force WITH_LIBMCT=OFF") - SET(WITH_LIBMCT OFF CACHE STRING "Disable LIBMCT package in Windows and MacOS" FORCE) - endif() - - if(WITH_PSLIB_BRPC) - MESSAGE(WARNING - "Windows or Mac is not supported with PSLIB_BRPC in Paddle yet." - "Force WITH_PSLIB_BRPC=OFF") - SET(WITH_PSLIB_BRPC OFF CACHE STRING "Disable PSLIB_BRPC package in Windows and MacOS" FORCE) - endif() -endif() - -set(WITH_MKLML ${WITH_MKL}) -if(NOT DEFINED WITH_MKLDNN) - if(WITH_MKL AND AVX2_FOUND) - set(WITH_MKLDNN ON) - else() - message(STATUS "Do not have AVX2 intrinsics and disabled MKL-DNN") - set(WITH_MKLDNN OFF) - endif() -endif() - -if(WIN32 OR APPLE OR NOT WITH_GPU OR ON_INFER) - set(WITH_DGC OFF) -endif() - -if(${CMAKE_VERSION} VERSION_GREATER "3.5.2") - set(SHALLOW_CLONE "GIT_SHALLOW TRUE") # adds --depth=1 arg to git clone of External_Projects -endif() - - -########################### include third_party according to flags ############################### -include(third_party/libsndfile) # download, build, install libsndfile -include(third_party/boost) # download boost -include(third_party/eigen) # download eigen3 -include(third_party/threadpool) # download threadpool - - diff --git a/speechnn/cmake/third_party/absl.cmake b/speechnn/cmake/third_party/absl.cmake deleted file mode 100644 index c2a8eceb..00000000 --- a/speechnn/cmake/third_party/absl.cmake +++ /dev/null @@ -1,13 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -include(ExternalProject) -include(FetchContent) - -FetchContent_Declare( - absl - GIT_REPOSITORY "https://github.com/abseil/abseil-cpp.git" - GIT_TAG "20210324.1" -) - -FetchContent_MakeAvailable(absl) - - diff --git a/speechnn/cmake/third_party/boost.cmake b/speechnn/cmake/third_party/boost.cmake deleted file mode 100644 index eb0b2c15..00000000 --- a/speechnn/cmake/third_party/boost.cmake +++ /dev/null @@ -1,49 +0,0 @@ -include(ExternalProject) - -set(BOOST_PROJECT "extern_boost") -# To release PaddlePaddle as a pip package, we have to follow the -# manylinux1 standard, which features as old Linux kernels and -# compilers as possible and recommends CentOS 5. Indeed, the earliest -# CentOS version that works with NVIDIA CUDA is CentOS 6. And a new -# version of boost, say, 1.66.0, doesn't build on CentOS 6. We -# checked that the devtools package of CentOS 6 installs boost 1.41.0. -# So we use 1.41.0 here. -set(BOOST_VER "1.41.0") -set(BOOST_TAR "boost_1_41_0" CACHE STRING "" FORCE) -set(BOOST_URL "http://paddlepaddledeps.bj.bcebos.com/${BOOST_TAR}.tar.gz" CACHE STRING "" FORCE) - -MESSAGE(STATUS "BOOST_VERSION: ${BOOST_VER}, BOOST_URL: ${BOOST_URL}") - -set(BOOST_PREFIX_DIR ${THIRD_PARTY_PATH}/boost) -set(BOOST_SOURCE_DIR ${THIRD_PARTY_PATH}/boost/src/extern_boost) -cache_third_party(${BOOST_PROJECT} - URL ${BOOST_URL} - DIR BOOST_SOURCE_DIR) - -set(BOOST_INCLUDE_DIR "${BOOST_SOURCE_DIR}" CACHE PATH "boost include directory." FORCE) -set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM 1) -include_directories(${BOOST_INCLUDE_DIR}) - -if(WIN32 AND MSVC_VERSION GREATER_EQUAL 1600) - add_definitions(-DBOOST_HAS_STATIC_ASSERT) -endif() - -ExternalProject_Add( - ${BOOST_PROJECT} - ${EXTERNAL_PROJECT_LOG_ARGS} - "${BOOST_DOWNLOAD_CMD}" - URL_MD5 f891e8c2c9424f0565f0129ad9ab4aff - PREFIX ${BOOST_PREFIX_DIR} - DOWNLOAD_DIR ${BOOST_SOURCE_DIR} - SOURCE_DIR ${BOOST_SOURCE_DIR} - DOWNLOAD_NO_PROGRESS 1 - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - UPDATE_COMMAND "" - ) - -add_library(boost INTERFACE) - -add_dependencies(boost ${BOOST_PROJECT}) -set(Boost_INCLUDE_DIR ${BOOST_INCLUDE_DIR}) diff --git a/speechnn/cmake/third_party/eigen.cmake b/speechnn/cmake/third_party/eigen.cmake deleted file mode 100644 index 6a032307..00000000 --- a/speechnn/cmake/third_party/eigen.cmake +++ /dev/null @@ -1,53 +0,0 @@ -include(ExternalProject) - -# update eigen to the commit id f612df27 on 03/16/2021 -set(EIGEN_PREFIX_DIR ${THIRD_PARTY_PATH}/eigen3) -set(EIGEN_SOURCE_DIR ${THIRD_PARTY_PATH}/eigen3/src/extern_eigen3) -set(EIGEN_REPOSITORY https://gitlab.com/libeigen/eigen.git) -set(EIGEN_TAG f612df273689a19d25b45ca4f8269463207c4fee) - -cache_third_party(extern_eigen3 - REPOSITORY ${EIGEN_REPOSITORY} - TAG ${EIGEN_TAG} - DIR EIGEN_SOURCE_DIR) - -if(WIN32) - add_definitions(-DEIGEN_STRONG_INLINE=inline) -elseif(LINUX) - if(WITH_ROCM) - # For HIPCC Eigen::internal::device::numeric_limits is not EIGEN_DEVICE_FUNC - # which will cause compiler error of using __host__ funciont in __host__ __device__ - file(TO_NATIVE_PATH ${PADDLE_SOURCE_DIR}/patches/eigen/Meta.h native_src) - file(TO_NATIVE_PATH ${EIGEN_SOURCE_DIR}/Eigen/src/Core/util/Meta.h native_dst) - file(TO_NATIVE_PATH ${PADDLE_SOURCE_DIR}/patches/eigen/TensorReductionGpu.h native_src1) - file(TO_NATIVE_PATH ${EIGEN_SOURCE_DIR}/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h native_dst1) - set(EIGEN_PATCH_COMMAND cp ${native_src} ${native_dst} && cp ${native_src1} ${native_dst1}) - endif() -endif() - -set(EIGEN_INCLUDE_DIR ${EIGEN_SOURCE_DIR}) -INCLUDE_DIRECTORIES(${EIGEN_INCLUDE_DIR}) - -ExternalProject_Add( - extern_eigen3 - ${EXTERNAL_PROJECT_LOG_ARGS} - ${SHALLOW_CLONE} - "${EIGEN_DOWNLOAD_CMD}" - PREFIX ${EIGEN_PREFIX_DIR} - SOURCE_DIR ${EIGEN_SOURCE_DIR} - UPDATE_COMMAND "" - PATCH_COMMAND ${EIGEN_PATCH_COMMAND} - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" -) - -add_library(eigen3 INTERFACE) - -add_dependencies(eigen3 extern_eigen3) - -# sw not support thread_local semantic -if(WITH_SW) - add_definitions(-DEIGEN_AVOID_THREAD_LOCAL) -endif() diff --git a/speechnn/cmake/third_party/libsndfile.cmake b/speechnn/cmake/third_party/libsndfile.cmake deleted file mode 100644 index 05d5c6ed..00000000 --- a/speechnn/cmake/third_party/libsndfile.cmake +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -include(ExternalProject) -include(FetchContent) - -FetchContent_Declare( - libsndfile - GIT_REPOSITORY https://github.com/libsndfile/libsndfile.git - GIT_TAG v1.0.30 # tag v1.0.30 -) - -FetchContent_GetProperties(libsndfile) diff --git a/speechnn/cmake/third_party/openfst.cmake b/speechnn/cmake/third_party/openfst.cmake deleted file mode 100644 index 39f335a1..00000000 --- a/speechnn/cmake/third_party/openfst.cmake +++ /dev/null @@ -1,26 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -include(ExternalProject) -include(FetchContent) - -FetchContent_Declare( - openfst - GIT_REPOSITORY https://github.com/kkm000/openfst - GIT_TAG 338225416178ac36b8002d70387f5556e44c8d05 # tag win/1.7.2.1 -) - -FetchContent_GetProperties(openfst) -if(NOT openfst_POPULATED) - FetchContent_Populate(openfst) - include_directories(${openfst_SOURCE_DIR}/src/include) - - add_subdirectory(${openfst_SOURCE_DIR} ${openfst_BINARY_DIR}) - - install(DIRECTORY ${openfst_SOURCE_DIR}/src/include/ DESTINATION include/ - FILES_MATCHING PATTERN "*.h") - - install(TARGETS fst - EXPORT kaldi-targets - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -endif() diff --git a/speechnn/cmake/third_party/openfst_lib_target.cmake b/speechnn/cmake/third_party/openfst_lib_target.cmake deleted file mode 100644 index dde5efc4..00000000 --- a/speechnn/cmake/third_party/openfst_lib_target.cmake +++ /dev/null @@ -1,31 +0,0 @@ -if(NOT OPENFST_ROOT_DIR) - message(FATAL_ERROR) -endif() - -set(fst_source_dir ${OPENFST_ROOT_DIR}/src/lib) -set(fst_include_dir ${OPENFST_ROOT_DIR}/src/include) - -include_directories(${fst_include_dir}) -file(GLOB fst_sources "${fst_source_dir}/*.cc") - -add_library(fst ${fst_sources}) -target_include_directories(fst PUBLIC - $ - $ -) - -install(TARGETS fst - EXPORT kaldi-targets - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -) - -install(DIRECTORY ${fst_include_dir}/fst - DESTINATION include/openfst - PATTERN "test/*.h" EXCLUDE -) - -unset(fst_source_dir) -unset(fst_include_dir) -unset(fst_sources) diff --git a/speechnn/cmake/third_party/threadpool.cmake b/speechnn/cmake/third_party/threadpool.cmake deleted file mode 100644 index d2c249e9..00000000 --- a/speechnn/cmake/third_party/threadpool.cmake +++ /dev/null @@ -1,36 +0,0 @@ -INCLUDE(ExternalProject) - -SET(THREADPOOL_PREFIX_DIR ${THIRD_PARTY_PATH}/threadpool) -SET(THREADPOOL_SOURCE_DIR ${THIRD_PARTY_PATH}/threadpool/src/extern_threadpool) -if(WITH_ASCEND OR WITH_ASCEND_CL) - SET(THREADPOOL_REPOSITORY https://gitee.com/tianjianhe/ThreadPool.git) -else() - SET(THREADPOOL_REPOSITORY ${GIT_URL}/progschj/ThreadPool.git) -endif() -SET(THREADPOOL_TAG 9a42ec1329f259a5f4881a291db1dcb8f2ad9040) - -cache_third_party(extern_threadpool - REPOSITORY ${THREADPOOL_REPOSITORY} - TAG ${THREADPOOL_TAG} - DIR THREADPOOL_SOURCE_DIR) - -SET(THREADPOOL_INCLUDE_DIR ${THREADPOOL_SOURCE_DIR}) -INCLUDE_DIRECTORIES(${THREADPOOL_INCLUDE_DIR}) - -ExternalProject_Add( - extern_threadpool - ${EXTERNAL_PROJECT_LOG_ARGS} - ${SHALLOW_CLONE} - "${THREADPOOL_DOWNLOAD_CMD}" - PREFIX ${THREADPOOL_PREFIX_DIR} - SOURCE_DIR ${THREADPOOL_SOURCE_DIR} - UPDATE_COMMAND "" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" -) - -add_library(simple_threadpool INTERFACE) - -add_dependencies(simple_threadpool extern_threadpool) diff --git a/speechnn/cmake/third_party/version.cmake b/speechnn/cmake/third_party/version.cmake deleted file mode 100644 index c3780ee6..00000000 --- a/speechnn/cmake/third_party/version.cmake +++ /dev/null @@ -1,15 +0,0 @@ -function(get_version) - file(READ ${CMAKE_CURRENT_SOURCE_DIR}/src/.version version) - string(STRIP ${version} version) - execute_process(COMMAND git log -n1 --format=%H src/.version - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE version_commit - OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND git rev-list --count "${version_commit}..HEAD" - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE patch_number) - string(STRIP ${patch_number} patch_number) - - set(KALDI_VERSION ${version} PARENT_SCOPE) - set(KALDI_PATCH_NUMBER ${patch_number} PARENT_SCOPE) -endfunction() diff --git a/speechnn/core/transformers/.gitkeep b/speechnn/core/transformers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/speechnn/core/transformers/README.md b/speechnn/core/transformers/README.md deleted file mode 100644 index edbcb9cc..00000000 --- a/speechnn/core/transformers/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Fast Transformers for Speech - -- Conformer -- Transformer - -## Reference - -* https://github.com/NVIDIA/FasterTransformer.git -* https://github.com/idiap/fast-transformers diff --git a/speechnn/env.sh b/speechnn/env.sh deleted file mode 100644 index c7754d65..00000000 --- a/speechnn/env.sh +++ /dev/null @@ -1,10 +0,0 @@ -export MAIN_ROOT=${PWD} - -export PATH=${MAIN_ROOT}:${MAIN_ROOT}/utils:${PATH}:/usr/local/bin/ -export LC_ALL=C - -# Use UTF-8 in Python to avoid UnicodeDecodeError when LC_ALL=C -export PYTHONIOENCODING=UTF-8 -export PYTHONPATH=${MAIN_ROOT}:${PYTHONPATH} - -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/ diff --git a/speechnn/examples/.gitkeep b/speechnn/examples/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/speechnn/examples/CMakeLists.txt b/speechnn/examples/CMakeLists.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/speechnn/speechnn/CMakeLists.txt b/speechnn/speechnn/CMakeLists.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/speechnn/speechnn/decoder/CMakeLists.txt b/speechnn/speechnn/decoder/CMakeLists.txt deleted file mode 100644 index 259261bd..00000000 --- a/speechnn/speechnn/decoder/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -aux_source_directory(. DIR_LIB_SRCS) -add_library(decoder STATIC ${DIR_LIB_SRCS}) diff --git a/speechnn/speechnn/frontend/CMakeLists.txt b/speechnn/speechnn/frontend/CMakeLists.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/speechnn/speechnn/frontend/audio/CMakeLists.txt b/speechnn/speechnn/frontend/audio/CMakeLists.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/speechnn/speechnn/frontend/text/CMakeLists.txt b/speechnn/speechnn/frontend/text/CMakeLists.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/speechnn/speechnn/model/CMakeLists.txt b/speechnn/speechnn/model/CMakeLists.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/speechnn/speechnn/nn/CMakeLists.txt b/speechnn/speechnn/nn/CMakeLists.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/speechnn/speechnn/protocol/CMakeLists.txt b/speechnn/speechnn/protocol/CMakeLists.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/speechnn/speechnn/utils/CMakeLists.txt b/speechnn/speechnn/utils/CMakeLists.txt deleted file mode 100644 index e69de29b..00000000