From 346ef735e5915849f96abb726b07eafdbee2ddfc Mon Sep 17 00:00:00 2001 From: nocturn9x Date: Sun, 2 Feb 2025 12:23:41 +0100 Subject: [PATCH] Revert to HTTPS submodule, several QoL improvements to Makefile (bench 5844195) --- .gitmodules | 2 +- Makefile | 47 +++++++++++++++++++++++++++++++++++++---------- README.md | 2 +- nim.cfg | 2 +- 4 files changed, 40 insertions(+), 13 deletions(-) diff --git a/.gitmodules b/.gitmodules index ea144fb..c84ab0f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "networks"] path = networks - url = git@git.nocturn9x.space:heimdall-engine/networks + url = https://git.nocturn9x.space/heimdall-engine/networks diff --git a/Makefile b/Makefile index e34140a..7393faf 100644 --- a/Makefile +++ b/Makefile @@ -38,6 +38,8 @@ NFLAGS_NATIVE := $(NFLAGS) --passC:"$(CFLAGS_NATIVE)" -d:simd -d:avx2 CFLAGS_LEGACY := $(CFLAGS) -mtune=core2 -march=core2 NFLAGS_LEGACY := $(NFLAGS) --passC:"$(CFLAGS_LEGACY)" -u:simd -u:avx2 +OS_TAG := $(if $(OS),windows,linux) + ifeq ($(SKIP_DEPS),) avx512: deps net modern: deps net @@ -47,44 +49,69 @@ native: deps net endif avx512: + @echo Building AVX512 binary $(ECHO) nim c $(NFLAGS_AVX512) $(SRCDIR)/heimdall.nim modern: + @echo Building Haswell binary $(ECHO) nim c $(NFLAGS_MODERN) $(SRCDIR)/heimdall.nim zen2: + @echo Building Zen 2 binary $(ECHO) nim c $(NFLAGS_ZEN2) $(SRCDIR)/heimdall.nim legacy: + @echo Building Core 2 binary $(ECHO) nim c $(NFLAGS_LEGACY) $(SRCDIR)/heimdall.nim -native: - $(ECHO) nim c $(NFLAGS_NATIVE) $(SRCDIR)/heimdall.nim - deps: + @echo Verifying dependencies $(ECHO) nimble install -d net: + @echo Preparing neural network $(ECHO) git submodule update --init --recursive $(ECHO) cd networks && git fetch origin && git checkout FETCH_HEAD $(ECHO) git lfs fetch --include files/$(NET_NAME) # Check if AVX-512 is supported (cross-platform) -AVX512_SUPPORTED := $(shell $(CC) -dM -E -