]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
ggml : introduce GGML_CALL function annotation (llama/4850)
authorJustine Tunney <redacted>
Tue, 16 Jan 2024 11:16:33 +0000 (03:16 -0800)
committerGeorgi Gerganov <redacted>
Wed, 17 Jan 2024 19:21:09 +0000 (21:21 +0200)
commit138eaebeadf743b4e0eaeee9fd0a7caa83d0b7f0
treedf458f0db6d066c49d2e80c4ef3cc9763837ebaf
parent61b9192f27f58dd21fb2c1a5572daded9e0ecefb
ggml : introduce GGML_CALL function annotation (llama/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