From 16cd7a926344873efddbecc7820b748fb3e33ad0 Mon Sep 17 00:00:00 2001 From: augustin64 Date: Fri, 4 Nov 2022 12:36:59 +0100 Subject: [PATCH 1/3] Update launch.json --- .vscode/launch.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 3ad601f..5c80732 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "name": "mnist/main", "type": "cppdbg", "request": "launch", - "program": "${workspaceFolder}/out/mnist_main", + "program": "${workspaceFolder}/build/mnist-main", "args": [ "train", "--images", @@ -34,7 +34,7 @@ "name": "mnist/preview", "type": "cppdbg", "request": "launch", - "program": "${workspaceFolder}/out/mnist_preview", + "program": "${workspaceFolder}/build/mnist-preview", "args": [ "data/mnist/t10k-images-idx3-ubyte", "data/mnist/t10k-labels-idx1-ubyte" @@ -58,7 +58,7 @@ "name": "cnn/main train", "type": "cppdbg", "request": "launch", - "program": "${workspaceFolder}/out/cnn_main", + "program": "${workspaceFolder}/build/cnn-main", "args": [ "train", "--dataset", "mnist", @@ -85,7 +85,7 @@ "name": "cnn/main dev-conv", "type": "cppdbg", "request": "launch", - "program": "${workspaceFolder}/out/cnn_main", + "program": "${workspaceFolder}/build/cnn-main", "args": [ "dev", "--conv" From 40d07bdb53a26d0e7c066be409e90815a435d8b9 Mon Sep 17 00:00:00 2001 From: augustin64 Date: Fri, 4 Nov 2022 12:43:47 +0100 Subject: [PATCH 2/3] Update Makefile --- Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index a9f8714..5a485ee 100644 --- a/Makefile +++ b/Makefile @@ -44,20 +44,20 @@ all: mnist cnn; mnist: $(BUILDDIR)/mnist-main $(BUILDDIR)/mnist-utils $(BUILDDIR)/mnist-preview; $(BUILDDIR)/mnist-main: $(MNIST_SRCDIR)/main.c $(BUILDDIR)/mnist.o $(BUILDDIR)/mnist_neuron_io.o $(BUILDDIR)/mnist_neural_network.o - $(CC) $(CFLAGS) $(MNIST_SRCDIR)/main.c $(BUILDDIR)/mnist.o $(BUILDDIR)/mnist_neuron_io.o $(BUILDDIR)/mnist_neural_network.o -o $(BUILDDIR)/mnist-main + $(CC) $(MNIST_SRCDIR)/main.c $(BUILDDIR)/mnist.o $(BUILDDIR)/mnist_neuron_io.o $(BUILDDIR)/mnist_neural_network.o -o $(BUILDDIR)/mnist-main $(CFLAGS) $(BUILDDIR)/mnist-utils: $(MNIST_SRCDIR)/utils.c $(BUILDDIR)/mnist_neural_network.o $(BUILDDIR)/mnist_neuron_io.o $(BUILDDIR)/mnist.o - $(CC) $(CFLAGS) $^ -o $@ + $(CC) $^ -o $@ $(CFLAGS) $(BUILDDIR)/mnist-preview: $(MNIST_SRCDIR)/preview.c $(BUILDDIR)/mnist.o - $(CC) $(CFLAGS) $^ -o $@ + $(CC) $^ -o $@ $(CFLAGS) # .o files $(BUILDDIR)/mnist.o: $(MNIST_SRCDIR)/mnist.c $(MNIST_SRCDIR)/include/mnist.h - $(CC) $(CFLAGS) -c $< -o $@ + $(CC) -c $< -o $@ $(CFLAGS) $(BUILDDIR)/mnist_%.o: $(MNIST_SRCDIR)/%.c $(MNIST_SRCDIR)/include/%.h - $(CC) $(CFLAGS) -c $< -o $@ + $(CC) -c $< -o $@ $(CFLAGS) # @@ -66,13 +66,13 @@ $(BUILDDIR)/mnist_%.o: $(MNIST_SRCDIR)/%.c $(MNIST_SRCDIR)/include/%.h cnn: $(BUILDDIR)/cnn-main; $(BUILDDIR)/cnn-main: $(CNN_SRCDIR)/main.c $(BUILDDIR)/cnn_train.o $(BUILDDIR)/cnn_cnn.o $(BUILDDIR)/cnn_creation.o $(BUILDDIR)/cnn_initialisation.o $(BUILDDIR)/cnn_make.o $(BUILDDIR)/cnn_neuron_io.o $(BUILDDIR)/cnn_function.o $(BUILDDIR)/cnn_utils.o $(BUILDDIR)/cnn_free.o $(BUILDDIR)/cnn_convolution.o $(BUILDDIR)/cnn_backpropagation.o $(BUILDDIR)/colors.o $(BUILDDIR)/mnist.o - $(CC) $(CFLAGS) $^ -o $@ + $(CC) $^ -o $@ $(CFLAGS) $(BUILDDIR)/cnn-main-cuda: $(BUILDDIR)/cnn_main.o $(BUILDDIR)/cnn_train.o $(BUILDDIR)/cnn_cnn.o $(BUILDDIR)/cnn_creation.o $(BUILDDIR)/cnn_initialisation.o $(BUILDDIR)/cnn_make.o $(BUILDDIR)/cnn_neuron_io.o $(BUILDDIR)/cnn_function.o $(BUILDDIR)/cnn_utils.o $(BUILDDIR)/cnn_free.o $(BUILDDIR)/cnn_cuda_convolution.o $(BUILDDIR)/cnn_backpropagation.o $(BUILDDIR)/colors.o $(BUILDDIR)/mnist.o $(NVCC) $(NVCCFLAGS) $^ -o $@ $(BUILDDIR)/cnn_%.o: $(CNN_SRCDIR)/%.c $(CNN_SRCDIR)/include/%.h - $(CC) $(CFLAGS) -c $< -o $@ + $(CC) -c $< -o $@ $(CFLAGS) $(BUILDDIR)/cnn_cuda_%.o: $(CNN_SRCDIR)/%.cu $(CNN_SRCDIR)/include/%.h ifndef NVCC_INSTALLED @@ -84,7 +84,7 @@ endif # Build general files # $(BUILDDIR)/%.o: $(SRCDIR)/%.c $(SRCDIR)/include/%.h - $(CC) $(CFLAGS) -c $< -o $@ + $(CC) -c $< -o $@ $(CFLAGS) # # Tests @@ -101,11 +101,11 @@ prepare-tests: build/test-cnn_%: test/cnn_%.c $(CNN_OBJ) $(BUILDDIR)/colors.o $(BUILDDIR)/mnist.o - $(CC) $(CFLAGS) $^ -o $@ + $(CC) $^ -o $@ $(CFLAGS) # mnist.o est déjà inclus en tant que mnist_mnist.o build/test-mnist_%: test/mnist_%.c $(MNIST_OBJ) $(BUILDDIR)/colors.o - $(CC) $(CFLAGS) $^ -o $@ + $(CC) $^ -o $@ $(CFLAGS) $(BUILDDIR)/test-cnn_%: test/cnn_%.cu $(BUILDDIR)/cnn_cuda_%.o $(BUILDDIR)/colors.o $(BUILDDIR)/mnist.o ifndef NVCC_INSTALLED From 67515e6315f6c7982178729ebac2a97b8aa15bd4 Mon Sep 17 00:00:00 2001 From: augustin64 Date: Fri, 4 Nov 2022 12:45:05 +0100 Subject: [PATCH 3/3] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5a485ee..b634289 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ endif # Build general files # $(BUILDDIR)/%.o: $(SRCDIR)/%.c $(SRCDIR)/include/%.h - $(CC) -c $< -o $@ $(CFLAGS) + $(CC) -c $< -o $@ $(CFLAGS) # # Tests