Skip to content

Commit 1c573b3

Browse files
authored
Merge pull request #4204 from naxingyu/sync-pybind11-with-master
Sync pybind11 with master
2 parents e03474a + 33aa358 commit 1c573b3

File tree

526 files changed

+31565
-2796
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

526 files changed

+31565
-2796
lines changed

.github/stale.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Number of days of inactivity before an issue becomes stale.
2+
daysUntilStale: 60
3+
# Number of days of inactivity before a stale issue is closed.
4+
# TODO(kkm): Re-enable auto-closing when done with the current heap of old PRs.
5+
daysUntilClose: false
6+
# Issues with these labels will never be considered stale.
7+
exemptLabels:
8+
- discussion
9+
- enhancement
10+
- help-wanted
11+
- in progress
12+
- low-priority
13+
- newbie
14+
- stale-exclude
15+
- stopped development
16+
# Label to use when marking an issue as stale.
17+
staleLabel: stale
18+
# Comment to post when marking an issue as stale.
19+
markComment: >
20+
This issue has been automatically marked as stale by a bot solely because it
21+
has not had recent activity. Please add any comment (simply 'ping' is enough)
22+
to prevent the issue from being closed for 60 more days if you believe it
23+
should be kept open.
24+
# Comment to post when closing a stale issue.
25+
closeComment: >
26+
This issue has been automatically closed by a bot strictly because of
27+
inactivity. This does not mean that we think that this issue is not
28+
important! If you believe it has been closed hastily, add a comment
29+
to the issue and mention @kkm000, and I'll gladly reopen it.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ GSYMS
155155
/tools/python/
156156
/tools/ngram-1.3.7.tar.gz
157157
/tools/ngram-1.3.7/
158+
/tools/OpenBLAS*.tar.gz
158159

159160
# These CMakeLists.txt files are all genareted on the fly at the moment.
160161
# They are added here to avoid accidently checkin.
@@ -168,3 +169,4 @@ src/xml
168169
src/api
169170
html
170171

172+
.vscode

.gitpod.Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM gitpod/workspace-full
2+
3+
USER songmeixu
4+
5+
# Install custom tools, runtime, etc. using apt-get
6+
# For example, the command below would install "bastet" - a command line tetris clone:
7+
#
8+
# RUN sudo apt-get -q update && # sudo apt-get install -yq bastet && # sudo rm -rf /var/lib/apt/lists/*
9+
#
10+
# More information: https://www.gitpod.io/docs/config-docker/
11+
12+
FROM gitpod/workspace-full
13+
14+
RUN sudo apt-get update \
15+
&& sudo apt-get install -y \
16+
sox gfortran \
17+
&& sudo rm -rf /var/lib/apt/lists/*
18+
19+
RUN cd ~/GitHub/r-with-intel-mkl/ \
20+
&& wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB | sudo apt-key add - \
21+
&& sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list' \
22+
&& sudo apt-get update && sudo apt-get install intel-mkl-64bit

.gitpod.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
image:
2+
file: .gitpod.dockerfile
3+
4+
tasks:
5+
- init: echo "Replace me with a build script for the project."
6+
command: echo "Replace me with something that should run on every start, or just
7+
remove me entirely."

CMakeLists.txt

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@ include(GNUInstallDirs)
66
include(Utils)
77
include(third_party/get_third_party)
88

9-
# Should update cmake to a more recent version which supports FindPython3.
109
find_package(PythonInterp)
11-
if(NOT PYTHON_EXECUTABLE OR PYTHON_VERSION_MAJOR LESS 3)
12-
message(WARNING "Needs python3 to auto-generate most CMake files, but not found. "
13-
"Will try `python3` directly...")
14-
set(PYTHON_EXECUTABLE "python3")
10+
if(NOT PYTHON_EXECUTABLE)
11+
message(FATAL_ERROR "Needs python to auto-generate most CMake files, but not found.")
1512
endif()
1613

1714
message(STATUS "Running gen_cmake_skeleton.py")
@@ -63,12 +60,16 @@ if(MATHLIB STREQUAL "OpenBLAS")
6360
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/tools/CLAPACK)
6461
link_libraries(${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
6562
elseif(MATHLIB STREQUAL "MKL")
66-
set(BLA_VENDOR "Intel10_64lp")
67-
# find_package(BLAS REQUIRED)
63+
if(NOT DEFINED ENV{MKLROOT} OR "$ENV{MKLROOT}" STREQUAL "")
64+
message(FATAL_ERROR "Environment variable MKLROOT is not defined")
65+
else()
66+
message(STATUS "Finding MKL from \"$ENV{MKLROOT}\"")
67+
endif()
6868
normalize_env_path(ENV{MKLROOT})
69+
set(BLA_VENDOR "Intel10_64lp_seq") # use the single threaded MKL by default
6970
find_package(LAPACK REQUIRED)
7071
add_definitions(-DHAVE_MKL=1)
71-
include_directories($ENV{MKLROOT}/include) # TODO: maybe not use env, idk, find_package doesnt handle includes...
72+
include_directories($ENV{MKLROOT}/include)
7273
link_libraries(${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
7374
elseif(MATHLIB STREQUAL "Accelerate")
7475
execute_process(COMMAND sw_vers -productVersion
@@ -113,8 +114,6 @@ endif()
113114

114115
find_package(CUDA)
115116
if(CUDA_FOUND)
116-
set(CUB_ROOT_DIR "${PROJECT_SOURCE_DIR}/tools/cub")
117-
118117
set(CUDA_PROPAGATE_HOST_FLAGS ON)
119118
set(KALDI_CUDA_NVCC_FLAGS "--default-stream=per-thread;-std=c++${CMAKE_CXX_STANDARD}")
120119
if(MSVC)
@@ -146,6 +145,8 @@ if(CUDA_FOUND)
146145
include_directories(${NvToolExt_INCLUDE_DIR})
147146
link_libraries(${NvToolExt_LIBRARIES})
148147

148+
get_third_party(cub)
149+
set(CUB_ROOT_DIR "${CMAKE_BINARY_DIR}/cub")
149150
find_package(CUB REQUIRED)
150151
include_directories(${CUB_INCLUDE_DIR})
151152
endif()
@@ -159,7 +160,7 @@ if(${KALDI_USE_PATCH_NUMBER})
159160
endif()
160161

161162
get_third_party(openfst)
162-
set(OPENFST_ROOT_DIR ${CMAKE_CURRENT_BINARY_DIR}/openfst)
163+
set(OPENFST_ROOT_DIR ${CMAKE_BINARY_DIR}/openfst)
163164
include(third_party/openfst_lib_target)
164165
link_libraries(fst)
165166

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[![Build Status](https://travis-ci.com/kaldi-asr/kaldi.svg?branch=master)](https://travis-ci.com/kaldi-asr/kaldi)
2+
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/kaldi-asr/kaldi)
23
Kaldi Speech Recognition Toolkit
34
================================
45

0 commit comments

Comments
 (0)