]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
ggml : introduce GGML_CALL function annotation (#4850)
authorJustine Tunney <redacted>
Tue, 16 Jan 2024 11:16:33 +0000 (03:16 -0800)
committerGitHub <redacted>
Tue, 16 Jan 2024 11:16:33 +0000 (13:16 +0200)
commita0b3ac8c48b66206b9c5921ce57bd5c0ea6557c3
treedc073f0aca7eee8afcd51ee660555fda5f3b6675
parentd75c232e1da56f19ac4d2530dadbe0ab3a11fde5
ggml : introduce GGML_CALL function annotation (#4850)

This change makes it possible to build ggml-cuda.cu and ggml-metal.m as
independent dynamic shared objects, that may be conditionally linked at
runtime in a multiplatform binary. It introduces a GGML_CALL annotation
that documents which functions have a cyclic call relationship, between
the application code and GPU modules.

This change does nothing, unless the build defines -DGGML_MULTIPLATFORM
which causes back-references and function pointers to conform to MS ABI
which is supported by NVCC, ROCm, XCode, GCC and Clang across platforms
ggml-backend-impl.h
ggml-backend.c
ggml-backend.h
ggml-cuda.cu
ggml-cuda.h
ggml-metal.h
ggml-metal.m
ggml.c
ggml.h