Skip to content

Commit

Permalink
Add ggml rpc to cmake (#827)
Browse files Browse the repository at this point in the history
  • Loading branch information
abetlen committed May 17, 2024
1 parent 9988298 commit 7cf94a2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ option(GGML_METAL "ggml: use Metal" OF
option(GGML_METAL_NDEBUG "ggml: disable Metal debugging" OFF)
option(GGML_METAL_SHADER_DEBUG "ggml: compile Metal with -fno-fast-math" OFF)
option(GGML_METAL_EMBED_LIBRARY "ggml: embed Metal library" OFF)
option(GGML_RPC "ggml: use RPC" OFF)

option(GGML_CUDA_FORCE_DMMV "ggml: use dmmv instead of mmvq CUDA kernels" OFF)
option(GGML_CUDA_FORCE_MMQ "ggml: use mmq kernels instead of cuBLAS" OFF)
Expand Down
11 changes: 11 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,16 @@ if (GGML_METAL)
)
endif()

if (GGML_RPC)
add_compile_definitions(GGML_USE_RPC)

if (WIN32)
set(GGML_EXTRA_LIBS ${GGML_EXTRA_LIBS} ws2_32)
endif()

set(GGML_RPC_SOURCES ggml-rpc.cpp)
endif()

if (GGML_PERF)
set(GGML_EXTRA_FLAGS ${GGML_EXTRA_FLAGS} -DGGML_PERF)
endif()
Expand All @@ -419,6 +429,7 @@ add_library(${TARGET}
${GGML_CUDA_SOURCES}
${GGML_OPENCL_SOURCES}
${GGML_METAL_SOURCES}
${GGML_RPC_SOURCES}
)

target_include_directories(${TARGET} PUBLIC
Expand Down

0 comments on commit 7cf94a2

Please sign in to comment.