Skip to content

Commit 2f21ed7

Browse files
Manjunath Kudlurkeveman
authored andcommitted
Initial commit
1 parent f91701c commit 2f21ed7

37 files changed

+104973
-0
lines changed

CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
cmake_minimum_required(VERSION 3.22)
2+
project(CTransformer)
3+
4+
set(CMAKE_CXX_STANDARD 20)
5+
6+
option(NEON_OPT "enable neon optimizations" ON)
7+
if (NEON_OPT)
8+
add_compile_definitions(NEON_OPT=true)
9+
endif()
10+
11+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Ofast -fPIC -fopenmp -march=native")
12+
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g -fPIC -march=native")
13+
14+
enable_testing()
15+
16+
add_subdirectory(lib)
17+
add_subdirectory(examples/whisper)

examples/whisper/CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
find_package(Python COMPONENTS Interpreter Development)
2+
find_package(pybind11 CONFIG)
3+
4+
set(SOURCE_FILES
5+
whisper.h
6+
whisper.cc
7+
)
8+
9+
add_library(whisper SHARED STATIC ${SOURCE_FILES})
10+
target_include_directories(whisper PRIVATE ${PROJECT_SOURCE_DIR}/lib)
11+
target_link_libraries(whisper
12+
PRIVATE ctransformer
13+
)
14+
15+
pybind11_add_module(pybind_whisper MODULE pybind_whisper.cc)
16+
pybind11_extension(pybind_whisper)
17+
target_include_directories(pybind_whisper PRIVATE ${PROJECT_SOURCE_DIR}/lib)
18+
target_link_libraries(pybind_whisper
19+
PRIVATE whisper
20+
)
21+
22+
install(TARGETS pybind_whisper DESTINATION .)

examples/whisper/__init__.py

Whitespace-only changes.
629 KB
Binary file not shown.

0 commit comments

Comments
 (0)