<commit_before>NOTHREAD = 0 # set to 1 to disable threads

CC = g++
CFLAGS = -Wall -march=native -funroll-loops -g -D__STDC_FORMAT_MACROS
CFLAGS += -I../ -DEIGEN_DONT_PARALLELIZE # for Eigen
CFLAGS += $(shell $(CC) -dumpversion | awk '{if(NR==1 && $$1>="4.6") print "-Ofast"; else print "-O3";}')
NVCC_CFLAGS = -O3 -march=native -funroll-loops
LDFLAGS = -lm -lstdc++
ifeq ($(NOTHREAD), 1)
	CFLAGS += -DNOTHREAD
else
	CFLAGS += -pthread
endif

NVCC_RESULT := $(shell which nvcc 2> /dev/null)
NVCC_TEST := $(notdir $(NVCC_RESULT))
ifeq ($(NVCC_TEST), nvcc)
	LDFLAGS += -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas
else
	CFLAGS += -DNOCUDA
endif

UNAME := $(shell uname)
ifeq ($(UNAME), Darwin)
	CFLAGS += -DNORT
else
	LDFLAGS += -lrt
endif

LAYER_OBJ_FILES = layers/simple_layer.o layers/gru_layer.o layers/scrn_layer.o layers/layer_stack.o layers/interface.o
OBJ_FILES = hierarchical_softmax.o nce.o words.o maxent.o nnet.o $(LAYER_OBJ_FILES)
ifeq ($(NVCC_TEST), nvcc)<commit_msg>Restore g++ build<commit_after>NOTHREAD = 0 # set to 1 to disable threads

CC = g++
CFLAGS = -Wall -march=native -funroll-loops -g -D__STDC_FORMAT_MACROS --std=gnu++11
CFLAGS += -I../ -DEIGEN_DONT_PARALLELIZE # for Eigen
CFLAGS += $(shell $(CC) -dumpversion | awk '{if(NR==1 && $$1>="4.6") print "-Ofast"; else print "-O3";}')
NVCC_CFLAGS = -O3 -march=native -funroll-loops
LDFLAGS = -lm -lstdc++
ifeq ($(NOTHREAD), 1)
	CFLAGS += -DNOTHREAD
else
	CFLAGS += -pthread
endif

NVCC_RESULT := $(shell which nvcc 2> /dev/null)
NVCC_TEST := $(notdir $(NVCC_RESULT))
ifeq ($(NVCC_TEST), nvcc)
	LDFLAGS += -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas
else
	CFLAGS += -DNOCUDA
endif

UNAME := $(shell uname)
ifeq ($(UNAME), Darwin)
	CFLAGS += -DNORT
else
	LDFLAGS += -lrt
endif

LAYER_OBJ_FILES = layers/simple_layer.o layers/gru_layer.o layers/scrn_layer.o layers/layer_stack.o layers/interface.o
OBJ_FILES = hierarchical_softmax.o nce.o words.o maxent.o nnet.o $(LAYER_OBJ_FILES)
ifeq ($(NVCC_TEST), nvcc)
{'fraction_non_alphanumeric': 0.16481854838709678, 'fraction_numerical': 0.01310483870967742, 'mean_word_length': 4.423497267759563, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6472271', 'n_tokens_mistral': 850, 'n_tokens_neox': 809, 'n_words': 198}