Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/ggml/blob/master/src/ggml-rpc/CMakeLists.txt # ggml [Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `ggml / src / ggml-rpc / CMakeLists.txt` 52 lines ยท 1855 bytes Raw Blame History 1 message(STATUS "Using RPC backend") 2 3 ggml_add_backend_library(ggml-rpc 4 ggml-rpc.cpp 5 log.cpp 6 transport.cpp 7 ) 8 9 if (WIN32) 10 target_link_libraries(ggml-rpc PRIVATE ws2_32) 11 endif() 12 13 # RDMA auto-detection: Linux RoCE/IB via libibverbs, Apple RDMA-over-Thunderbolt via librdma 14 if (APPLE) 15 set(RDMA_LIB_NAME rdma) 16 set(RDMA_DESC "Apple RDMA-over-Thunderbolt, UC") 17 elseif (NOT WIN32) 18 set(RDMA_LIB_NAME ibverbs) 19 set(RDMA_DESC "auto-detected") 20 endif() 21 22 if (RDMA_LIB_NAME) 23 find_library(RDMA_LIB ${RDMA_LIB_NAME}) 24 if (RDMA_LIB) 25 option(GGML_RPC_RDMA "ggml: enable RDMA transport for RPC" ON) 26 else() 27 option(GGML_RPC_RDMA "ggml: enable RDMA transport for RPC" OFF) 28 endif() 29 else() 30 set(GGML_RPC_RDMA OFF CACHE BOOL "RDMA not available on this platform" FORCE) 31 endif() 32 33 if (GGML_RPC_RDMA) 34 if (NOT RDMA_LIB) 35 find_library(RDMA_LIB ${RDMA_LIB_NAME} REQUIRED) 36 endif() 37 target_compile_definitions(ggml-rpc PRIVATE GGML_RPC_RDMA) 38 if (APPLE) 39 # librdma.dylib only exists on macOS 26.2 and later. Link it weakly so a build made 40 # where it exists still loads where it does not; checked at runtime before use 41 # but with BUILD_SHARED_LIBS=OFF ggml-rpc is a static archive and never links 42 # so the librdma symbols used by transport-apple.cpp stay undefined. 43 target_link_options(ggml-rpc PUBLIC "LINKER:-weak_library,${RDMA_LIB}") 44 target_compile_definitions(ggml-rpc PRIVATE GGML_RPC_RDMA_APPLE) 45 target_sources(ggml-rpc PRIVATE transport-apple.cpp) 46 else() 47 target_link_libraries(ggml-rpc PRIVATE ${RDMA_LIB}) 48 endif() 49 message(STATUS " RDMA transport enabled (${RDMA_DESC})") 50 else() 51 message(STATUS " RDMA transport disabled") 52 endif()