From 496466f78f32455c7b1889bd2ad06937d2e8dce1 Mon Sep 17 00:00:00 2001 From: Andrej Karpathy Date: Mon, 24 Jul 2023 23:13:59 +0000 Subject: [PATCH] add rundebug to makefile, useful for spotting issues and such --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 768ce56..d178b3d 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,11 @@ run: run.c gcc -O3 -o run run.c -lm +# useful for a debug build, can then e.g. analyze with valgrind, example: +# $ valgrind --leak-check=full ./run out/model.bin 1.0 3 +rundebug: run.c + gcc -g -o run run.c -lm + # https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html # https://simonbyrne.github.io/notes/fastmath/ # -Ofast enables all -O3 optimizations.