diff --git a/Makefile b/Makefile deleted file mode 100644 index bfb3cbe..0000000 --- a/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -CXX ?= g++ -CXXFLAGS ?= -O3 -march=native -ffast-math -funroll-loops -std=c++17 -Wall -Wextra -Wno-unused-parameter -LDFLAGS ?= -pthread - -SRC := main.cpp \ - xenith/core/model.cpp \ - xenith/core/backward.cpp \ - xenith/core/trainer.cpp \ - xenith/core/checkpoint.cpp \ - xenith/core/generate.cpp \ - xenith/core/gradcheck.cpp - -OBJ := $(SRC:.cpp=.o) -DEP := $(OBJ:.o=.d) -BIN := bin/xenith - -# Без -include .d make считает ПЕРВУЮ цель в make-файле целью по умолчанию. -# Если первой стоит "-include $(DEP)", сборка молча превращается в no-op: -# ни один .o не пересобирается, и правки исходников не доходят до бинарника. -# Именно так мы потеряли час: gradcheck показывал одни и те же числа -# после нескольких исправлений. Поэтому первая цель здесь — всегда all. -ALL_OBJ := $(OBJ) - -all: $(BIN) -.PHONY: all - -bin: - mkdir -p bin - -$(BIN): $(ALL_OBJ) - @mkdir -p bin - $(CXX) $(ALL_OBJ) -o $@ $(LDFLAGS) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -MMD -MP -c $< -o $@ - -debug: - $(MAKE) clean - $(MAKE) CXXFLAGS="-O1 -g -std=c++17 -Wall -Wextra -Wno-unused-parameter -fsanitize=address,undefined" \ - LDFLAGS="-pthread -fsanitize=address,undefined" - -clean: - rm -f $(OBJ) $(DEP) $(BIN) - -.PHONY: debug clean - --include $(DEP) diff --git a/main.d b/main.d deleted file mode 100644 index 34cde8f..0000000 --- a/main.d +++ /dev/null @@ -1,9 +0,0 @@ -main.o: main.cpp xenith/core/checkpoint.h xenith/core/model.h \ - xenith/core/tensor.h xenith/core/generate.h xenith/core/train.h \ - xenith/core/gradcheck.h -xenith/core/checkpoint.h: -xenith/core/model.h: -xenith/core/tensor.h: -xenith/core/generate.h: -xenith/core/train.h: -xenith/core/gradcheck.h: diff --git a/main.o b/main.o deleted file mode 100644 index d02cc36..0000000 Binary files a/main.o and /dev/null differ