okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge f-own-1a (451f3e8a6): own-stack phase 1A and cleanup 5.4; the ggml/MMQ sources the engines build are vendored in third_party/strata-ggml (frozen at the pin, manifest and check), default engine builds need no llama.cpp download, the TQ overlay is plain files, CMakeLists.txt is split into cmake/backends/*; every engine unchanged (CUDA/HIP gfx1201/gfx1151/SYCL device code identical, SYCL 22/22 checksums, Metal 104/105 objects with only __TIME__ differing, CUDA tokens 26/26); release scripts still pass -DSTRATA_GGML_DIR (owner go 11-08)508e6999a

main
1.1 KiB38 linesraw
1#pragma once
2#include "ggml-backend-impl.h"
3#include "ggml-cpu-impl.h"
4#include "ggml.h"
5
6#ifdef __cplusplus
7#    include <vector>
8extern "C" {
9#endif
10
11// return true if op part of extra "accelerator"
12bool ggml_cpu_extra_compute_forward(struct ggml_compute_params * params, struct ggml_tensor * op);
13bool ggml_cpu_extra_work_size(int n_threads, const struct ggml_tensor * op, size_t * size);
14
15#ifdef __cplusplus
16}
17
18namespace ggml::cpu {
19// register in tensor->extra
20class tensor_traits {
21  public:
22    virtual ~tensor_traits();
23    virtual bool work_size(int n_threads, const struct ggml_tensor * op, size_t & size)        = 0;
24    virtual bool compute_forward(struct ggml_compute_params * params, struct ggml_tensor * op) = 0;
25};
26
27class extra_buffer_type {
28  public:
29    virtual ~extra_buffer_type();
30    virtual bool            supports_op(ggml_backend_dev_t dev, const struct ggml_tensor * op) = 0;
31    virtual tensor_traits * get_tensor_traits(const struct ggml_tensor * op)                   = 0;
32};
33}  // namespace ggml::cpu
34
35// implemented in ggml-cpu.cpp.
36std::vector<ggml_backend_buffer_type_t> & ggml_backend_cpu_get_extra_buffer_types();
37
38#endif