char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
5594d1322
char/aliceai-t5-moe
1#pragma once 2 3#include <memory> 4#include <string> 5#include <vector> 6 7// common debug functions and structs 8 9struct common_params ; 10 11// Intended to use as callback for ggml_backend_sched_eval_callback 12// prints tensors that are processed in the computation graph 13// by default prints all tensors, but can be configured by creating a `common_debug_cb_user_data` instance with 14// non-empty filter_patterns. See examples/debug.cpp for possible usage patterns 15// `common_debug_cb_user_data` contains `abort_on_nan` flag that determines whether an error should be thrown whenever a NaN is encountered 16// in a tensor (useful for stopping debug sessions on first erroneous tensor) 17// The callback data will be passed as the third parameter (user_data) 18bool common_debug_cb_eval (struct ggml_tensor * t ,bool ask ,void * user_data ); 19 20struct common_debug_cb_user_data { 21struct impl ; 22std ::unique_ptr < impl > pimpl ; 23 24common_debug_cb_user_data (); 25~ common_debug_cb_user_data (); 26 27common_debug_cb_user_data ( const common_debug_cb_user_data & ) = delete ; 28common_debug_cb_user_data & operator = ( const common_debug_cb_user_data & ) = delete ; 29 30common_debug_cb_user_data (common_params & params , const std :: vector < std :: string > & filter_patterns , bool abort_on_nan = false); 31};