Enable crash reports for radpajama executables

This commit is contained in:
Justine Tunney 2023-05-13 21:16:03 -07:00
parent 296ee3ec58
commit 89d1fad7ee
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
5 changed files with 15 additions and 0 deletions

View file

@ -26,6 +26,7 @@
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include "libc/log/log.h"
#include "third_party/ggml/ggml.h" #include "third_party/ggml/ggml.h"
#include "third_party/libcxx/cstdio" #include "third_party/libcxx/cstdio"
#include "third_party/libcxx/map" #include "third_party/libcxx/map"
@ -47,6 +48,8 @@ static const std::map<std::string, enum gptneox_ftype> GPTNEOX_FTYPE_MAP = {
// ./quantize models/llama/ggml-model.bin models/llama/ggml-model-quant.bin type // ./quantize models/llama/ggml-model.bin models/llama/ggml-model-quant.bin type
// //
int main(int argc, char ** argv) { int main(int argc, char ** argv) {
ShowCrashReports();
ggjt_v1(); ggjt_v1();
ggml_time_init(); ggml_time_init();

View file

@ -31,6 +31,7 @@
#include "libc/calls/struct/sigaction.h" #include "libc/calls/struct/sigaction.h"
#include "libc/calls/struct/siginfo.h" #include "libc/calls/struct/siginfo.h"
#include "libc/calls/weirdtypes.h" #include "libc/calls/weirdtypes.h"
#include "libc/log/log.h"
#include "libc/runtime/pathconf.h" #include "libc/runtime/pathconf.h"
#include "libc/runtime/runtime.h" #include "libc/runtime/runtime.h"
#include "libc/runtime/sysconf.h" #include "libc/runtime/sysconf.h"
@ -84,6 +85,8 @@ int main(int argc, char ** argv) {
gpt_params params; gpt_params params;
params.model = "./examples/redpajama/models/pythia/ggml-RedPajama-INCITE-Chat-3B-v1-f16.bin"; params.model = "./examples/redpajama/models/pythia/ggml-RedPajama-INCITE-Chat-3B-v1-f16.bin";
ShowCrashReports();
if (gpt_params_parse(argc, argv, params) == false) { if (gpt_params_parse(argc, argv, params) == false) {
return 1; return 1;
} }
@ -186,6 +189,8 @@ int main(int argc, char ** argv) {
return 0; return 0;
} }
ShowCrashReports();
// Always interactive for RedPajama chat model // Always interactive for RedPajama chat model
params.interactive = true; params.interactive = true;

View file

@ -31,6 +31,7 @@
#include "libc/calls/struct/sigaction.h" #include "libc/calls/struct/sigaction.h"
#include "libc/calls/struct/siginfo.h" #include "libc/calls/struct/siginfo.h"
#include "libc/calls/weirdtypes.h" #include "libc/calls/weirdtypes.h"
#include "libc/log/log.h"
#include "libc/runtime/pathconf.h" #include "libc/runtime/pathconf.h"
#include "libc/runtime/runtime.h" #include "libc/runtime/runtime.h"
#include "libc/runtime/sysconf.h" #include "libc/runtime/sysconf.h"
@ -83,6 +84,8 @@ int main(int argc, char ** argv) {
gpt_params params; gpt_params params;
params.model = "./examples/redpajama/models/pythia/ggml-RedPajama-INCITE-Instruct-3B-v1-f16.bin"; params.model = "./examples/redpajama/models/pythia/ggml-RedPajama-INCITE-Instruct-3B-v1-f16.bin";
ShowCrashReports();
if (gpt_params_parse(argc, argv, params) == false) { if (gpt_params_parse(argc, argv, params) == false) {
return 1; return 1;
} }

View file

@ -26,6 +26,7 @@
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include "libc/log/log.h"
#include "third_party/ggml/ggml.h" #include "third_party/ggml/ggml.h"
#include "third_party/libcxx/cstdio" #include "third_party/libcxx/cstdio"
#include "third_party/libcxx/map" #include "third_party/libcxx/map"
@ -47,6 +48,8 @@ static const std::map<std::string, enum gptneox_ftype> GPTNEOX_FTYPE_MAP = {
// ./quantize models/llama/ggml-model.bin models/llama/ggml-model-quant.bin type // ./quantize models/llama/ggml-model.bin models/llama/ggml-model-quant.bin type
// //
int main(int argc, char ** argv) { int main(int argc, char ** argv) {
ShowCrashReports();
ggjt_v1(); ggjt_v1();
ggml_time_init(); ggml_time_init();

View file

@ -79,6 +79,7 @@ THIRD_PARTY_RADPAJAMA_MAIN_DIRECTDEPS = \
LIBC_CALLS \ LIBC_CALLS \
LIBC_FMT \ LIBC_FMT \
LIBC_INTRIN \ LIBC_INTRIN \
LIBC_LOG \
LIBC_NEXGEN32E \ LIBC_NEXGEN32E \
LIBC_RUNTIME \ LIBC_RUNTIME \
LIBC_STDIO \ LIBC_STDIO \