summaryrefslogtreecommitdiff
path: root/misc/ggml
diff options
context:
space:
mode:
Diffstat (limited to 'misc/ggml')
-rw-r--r--misc/ggml/Makefile36
-rw-r--r--misc/ggml/distinfo3
-rw-r--r--misc/ggml/files/patch-tests_CMakeLists.txt11
-rw-r--r--misc/ggml/pkg-descr13
-rw-r--r--misc/ggml/pkg-plist22
5 files changed, 85 insertions, 0 deletions
diff --git a/misc/ggml/Makefile b/misc/ggml/Makefile
new file mode 100644
index 000000000000..b332c2d881c5
--- /dev/null
+++ b/misc/ggml/Makefile
@@ -0,0 +1,36 @@
+PORTNAME= ggml
+DISTVERSION= g20250828
+CATEGORIES= misc # machine-learning
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Tensor library for machine learning
+WWW= https://github.com/ggerganov/ggml
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= cmake:testing compiler:c++17-lang python:run shebangfix
+USE_LDCONFIG= yes
+
+USE_GITHUB= yes
+GH_ACCOUNT= ggerganov
+GH_TAGNAME= 83835ff
+
+CMAKE_ON= BUILD_SHARED_LIBS
+CMAKE_OFF= GGML_BUILD_TESTS GGML_BUILD_EXAMPLES
+CMAKE_TESTING_ON= GGML_BUILD_TESTS
+
+BINARY_ALIAS= git=false
+
+OPTIONS_DEFINE= VULKAN
+OPTIONS_DEFAULT= VULKAN
+OPTIONS_SUB= yes
+
+VULKAN_CMAKE_BOOL= GGML_VULKAN
+VULKAN_BUILD_DEPENDS= glslc:graphics/shaderc \
+ vulkan-headers>0:graphics/vulkan-headers
+VULKAN_LIB_DEPENDS= libvulkan.so:graphics/vulkan-loader
+
+# tests as of g20250828: 100% tests passed, 0 tests failed out of 21
+
+.include <bsd.port.mk>
diff --git a/misc/ggml/distinfo b/misc/ggml/distinfo
new file mode 100644
index 000000000000..a17e9ebaeb14
--- /dev/null
+++ b/misc/ggml/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1756957568
+SHA256 (ggerganov-ggml-g20250828-83835ff_GH0.tar.gz) = 42e76df96d99c86e9fe15a87dfe5eab6c0a117497d5bb6c4ef154dbf7b5e805c
+SIZE (ggerganov-ggml-g20250828-83835ff_GH0.tar.gz) = 2072055
diff --git a/misc/ggml/files/patch-tests_CMakeLists.txt b/misc/ggml/files/patch-tests_CMakeLists.txt
new file mode 100644
index 000000000000..d6d713231e9a
--- /dev/null
+++ b/misc/ggml/files/patch-tests_CMakeLists.txt
@@ -0,0 +1,11 @@
+--- tests/CMakeLists.txt.orig 2025-09-04 04:13:15 UTC
++++ tests/CMakeLists.txt
+@@ -114,7 +114,7 @@ else()
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:AVX")
+ endif()
+ else()
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfma -mf16c -mavx -mavx2")
++ #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfma -mf16c -mavx -mavx2")
+ endif()
+ endif()
+
diff --git a/misc/ggml/pkg-descr b/misc/ggml/pkg-descr
new file mode 100644
index 000000000000..611fa3ef39ae
--- /dev/null
+++ b/misc/ggml/pkg-descr
@@ -0,0 +1,13 @@
+ggml is a tensor library for machine learning.
+
+Features:
+* Written in C
+* 16-bit float support
+* Integer quantization support (4-bit, 5-bit, 8-bit, etc.)
+* Automatic differentiation
+* ADAM and L-BFGS optimizers
+* Optimized for Apple Silicon
+* On x86 architectures utilizes AVX / AVX2 intrinsics
+* On ppc64 architectures utilizes VSX intrinsics
+* No third-party dependencies
+* Zero memory allocations during runtime
diff --git a/misc/ggml/pkg-plist b/misc/ggml/pkg-plist
new file mode 100644
index 000000000000..9c74452171bf
--- /dev/null
+++ b/misc/ggml/pkg-plist
@@ -0,0 +1,22 @@
+include/ggml-alloc.h
+include/ggml-backend.h
+include/ggml-blas.h
+include/ggml-cann.h
+include/ggml-cpp.h
+include/ggml-cpu.h
+include/ggml-cuda.h
+include/ggml-metal.h
+include/ggml-opt.h
+include/ggml-rpc.h
+include/ggml-sycl.h
+include/ggml-vulkan.h
+include/ggml-webgpu.h
+include/ggml.h
+include/gguf.h
+lib/cmake/ggml/ggml-config.cmake
+lib/cmake/ggml/ggml-version.cmake
+lib/libggml-base.so
+lib/libggml-cpu.so
+%%VULKAN%%lib/libggml-vulkan.so
+lib/libggml.so
+share/pkgconfig/ggml.pc