Skip to content

Commit

Permalink
Add support for specifying evalfile through make
Browse files Browse the repository at this point in the history
Bench: 3623609
  • Loading branch information
SzilBalazs committed Jul 18, 2023
1 parent 5a6bb8f commit ee2a4d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ ifeq ($(build), debug)
DEFINE_FLAGS = -DNATIVE
endif

DEFINE_FLAGS += -DVERSION=\"v$(VERSION_MAJOR).$(VERSION_MINOR).$(HASH)\" -DNDEBUG -D_CRT_SECURE_NO_WARNINGS
EVALFILE = corenet.bin
DEFINE_FLAGS += -DVERSION=\"v$(VERSION_MAJOR).$(VERSION_MINOR).$(HASH)\" -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -DEVALFILE=\"$(EVALFILE)\"
CXXFLAGS = $(DEFINE_FLAGS) $(ARCH_FLAGS) -flto -std=c++20 -O3 -pthread -Wall
EXE = $(NAME)-v$(VERSION_MAJOR)-$(VERSION_MINOR)
OUTPUT_BINARY = $(EXE)$(SUFFIX)
Expand Down
6 changes: 5 additions & 1 deletion src/network/nnue.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@
#include "layers/dense_layer.h"
#include "../external/incbin/incbin.h"

#ifndef EVALFILE
#define EVALFILE "corenet.bin"
#endif

namespace nn {

INCBIN(DefaultNetwork, "corenet.bin");
INCBIN(DefaultNetwork, EVALFILE);

class NNUE {

Expand Down

0 comments on commit ee2a4d3

Please sign in to comment.