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
738 B26 linesraw
1#include "ggml-impl.h"
2
3#include <cstdlib>
4#include <exception>
5
6static std::terminate_handler previous_terminate_handler;
7
8GGML_NORETURN static void ggml_uncaught_exception() {
9    ggml_print_backtrace();
10    if (previous_terminate_handler) {
11        previous_terminate_handler();
12    }
13    abort(); // unreachable unless previous_terminate_handler was nullptr
14}
15
16static bool ggml_uncaught_exception_init = []{
17    const char * GGML_NO_BACKTRACE = getenv("GGML_NO_BACKTRACE");
18    if (GGML_NO_BACKTRACE) {
19        return false;
20    }
21    const auto prev{std::get_terminate()};
22    GGML_ASSERT(prev != ggml_uncaught_exception);
23    previous_terminate_handler = prev;
24    std::set_terminate(ggml_uncaught_exception);
25    return true;
26}();