Skip to content

latest ggml version sync #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@


cmake_minimum_required(VERSION 3.12)
project("tortoise")


set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

add_executable(tortoise main.cpp common.cpp)
option(DEBUG "Debug mode" OFF)
option(GGML_CUDA "cuda mode" OFF)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should there be a GGML_METAL option similarly declared here?


option(GGML_CUBLAS "cuda mode" OFF)
if(DEBUG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g3 -O0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3 -O0")
set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -g3 -O0")
set(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -g3 -O0")
set(GGML_DEBUG ON CACHE BOOL "Debug mode")
endif()

if (GGML_CUBLAS)
add_definitions(-DGGML_USE_CUBLAS)
if (GGML_CUDA)
add_definitions(-DGGML_USE_CUDA)
endif()

if (GGML_METAL)
Expand All @@ -20,7 +24,7 @@ if (GGML_METAL)
endif()

add_subdirectory(ggml)

add_executable(tortoise main.cpp common.cpp)
target_link_libraries(tortoise PUBLIC ggml)
target_include_directories(tortoise PUBLIC . )
target_compile_features(tortoise PUBLIC cxx_std_11)
target_compile_features(tortoise PUBLIC cxx_std_11)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This is tested with mac os arm
````
mkdir build
cd build
cmake .. -DGGML_CUBLAS=ON
cmake .. -DGGML_CUDA=ON
make
````
This is tested with Ubuntu 22.04 and cuda 12.0 and a 1070ti
Expand Down
2 changes: 1 addition & 1 deletion ggml
Submodule ggml updated from e6846f to e3cb75
Loading