interplane.Get Omega
Read in your language

ggml

[Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685)

Brought by drakestapleton

branch master Branches Tags History

ggml / src / ggml-openvino / CMakeLists.txt

33 lines · 1317 bytes Raw Blame History
1find_package(OpenVINO REQUIRED COMPONENTS Runtime Threading)
2find_package(OpenCL REQUIRED)
3
4message(STATUS "Found OpenVINO: ${OpenVINO_DIR} (found version \"${OpenVINO_VERSION}\")")
5
6file(GLOB_RECURSE GGML_HEADERS_OPENVINO "*.h" "*.hpp")
7file(GLOB_RECURSE GGML_SOURCES_OPENVINO "*.cpp")
8
9ggml_add_backend_library(ggml-openvino
10 ${GGML_SOURCES_OPENVINO}
11 ${GGML_HEADERS_OPENVINO}
12)
13
14target_link_libraries(ggml-openvino PRIVATE openvino::runtime openvino::threading OpenCL::OpenCL)
15
16# the OpenVINO RTTI macros take one argument and leave __VA_ARGS__ empty, which -Wpedantic reports
17if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
18 target_compile_options(ggml-openvino PRIVATE -Wno-gnu-zero-variadic-macro-arguments)
19elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
20 target_compile_options(ggml-openvino PRIVATE -Wno-pedantic)
21endif()
22
23if (WIN32)
24 target_link_libraries(ggml-openvino PRIVATE psapi)
25endif()
26
27if (GGML_OPENVINO)
28 if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
29 elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
30 else()
31 message(FATAL_ERROR "OpenVINO: OpenVINO toolkit supports x86-64 and arm64 but not ${CMAKE_SYSTEM_PROCESSOR}")
32 endif()
33endif()