diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c66ec73e..7a9cc630a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -682,6 +682,9 @@ endif() add_library(ggml OBJECT ggml.cpp ggml.h + print.hpp + ggml-internal.hpp + llama-internal.hpp ggml-alloc.cpp ggml-alloc.h ggml-backend.cpp diff --git a/examples/main/main.cpp b/examples/main/main.cpp index b64e19bd2..aaf4937e4 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -287,7 +287,6 @@ int main(int argc, char ** argv) { return 1; } print_fields(*ctx); - print_fields(*ctx_guidance); //print_fields(session_tokens); // debug message about similarity of saved session, if applicable size_t n_matching_session_tokens = 0; @@ -376,6 +375,10 @@ int main(int argc, char ** argv) { for (int i = 0; i < (int) guidance_inp.size(); i++) { LOG_TEE("%6d -> '%s'\n", guidance_inp[i], llama_token_to_piece(ctx, guidance_inp[i]).c_str()); } + + print_fields(*ctx_guidance); + + } if (params.n_keep > 0) { diff --git a/print.hpp b/print.hpp index 8b9e0d322..4becf313e 100644 --- a/print.hpp +++ b/print.hpp @@ -438,7 +438,7 @@ REFL_FIELD( logits_all ) //REFL_FIELD( work_buffer) REFL_FIELD( buf_compute) REFL_FIELD( buf_alloc) -REFL_FIELD( alloc ) +//REFL_FIELD( alloc ) #ifdef GGML_USE_METAL REFL_FIELD( ctx_metal ) @@ -552,6 +552,7 @@ struct hidden : refl::attr::usage::field {}; // // A generic function to print out the fields of any object template void print_fields(const T& t) { + //return; // // Get the type descriptor of the object constexpr auto type = refl::reflect(); @@ -571,7 +572,9 @@ void print_fields(const T& t) { auto member1 = member(t); //if(member1){ std::cout << "Auto:" << member.name <<"\n"; + //if(member1){ print_fields(member1); + //} //} //else { //std::cout << "NULL:" << member.name <<"\n";