]> git.djapps.eu Git - pkg/ggml/sources/ggml/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 18:44:10 +0000 (20:44 +0200)
commitb3bcd556add1f61c7402a37417773f2d03a39b46
tree263efc1de1ce306271e0e4af4208beaa88391b8f
parent4624d4aeff7dd5552a9ea077dd46c6e4dfe134e0
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
include/ggml/ggml-backend.h
include/ggml/ggml.h
src/ggml-backend-impl.h
src/ggml-backend.c
src/ggml-cuda.cu
src/ggml-cuda.h
src/ggml-metal.h
src/ggml-metal.m
src/ggml.c