mirror of
https://github.com/karpathy/llm.c.git
synced 2026-07-28 20:35:09 -04:00
small adjustments to Makefile and gitignore
This commit is contained in:
parent
e70bc19af5
commit
fced6d180f
2 changed files with 22 additions and 7 deletions
15
.gitignore
vendored
15
.gitignore
vendored
|
|
@ -1,9 +1,24 @@
|
|||
# dot files and such
|
||||
.vscode/
|
||||
|
||||
# data files
|
||||
data/
|
||||
|
||||
# .bin files generated by Python
|
||||
gpt2_124M.bin
|
||||
gpt2_124M_debug_state.bin
|
||||
gpt2_tokenizer.bin
|
||||
|
||||
# binaries
|
||||
test_gpt2
|
||||
test_gpt2cu
|
||||
train_gpt2
|
||||
train_gpt2cu
|
||||
dev/cuda/*_forward
|
||||
dev/cuda/*_backward
|
||||
dev/cuda/classifier_fused
|
||||
dev/cuda/adamw
|
||||
dev/cuda/matmul_backward_bias
|
||||
|
||||
# log files
|
||||
*.log
|
||||
14
Makefile
14
Makefile
|
|
@ -37,24 +37,24 @@ ifeq ($(shell uname), Darwin)
|
|||
LDFLAGS += -L/opt/homebrew/opt/libomp/lib
|
||||
LDLIBS += -lomp
|
||||
INCLUDES += -I/opt/homebrew/opt/libomp/include
|
||||
$(info NICE Compiling with OpenMP support)
|
||||
$(info OpenMP found, compiling with OpenMP support)
|
||||
else ifeq ($(shell [ -d /usr/local/opt/libomp/lib ] && echo "exists"), exists)
|
||||
CFLAGS += -Xclang -fopenmp -DOMP
|
||||
LDFLAGS += -L/usr/local/opt/libomp/lib
|
||||
LDLIBS += -lomp
|
||||
INCLUDES += -I/usr/local/opt/libomp/include
|
||||
$(info NICE Compiling with OpenMP support)
|
||||
$(info OpenMP found, compiling with OpenMP support)
|
||||
else
|
||||
$(warning OOPS Compiling without OpenMP support)
|
||||
$(warning OpenMP not found, skipping OpenMP support)
|
||||
endif
|
||||
else
|
||||
ifeq ($(shell echo | $(CC) -fopenmp -x c -E - > /dev/null 2>&1; echo $$?), 0)
|
||||
# Ubuntu or other Linux distributions
|
||||
CFLAGS += -fopenmp -DOMP
|
||||
LDLIBS += -lgomp
|
||||
$(info NICE Compiling with OpenMP support)
|
||||
$(info OpenMP found, compiling with OpenMP support)
|
||||
else
|
||||
$(warning OOPS Compiling without OpenMP support)
|
||||
$(warning OpenMP not found, skipping OpenMP support)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
@ -66,9 +66,9 @@ TARGETS = train_gpt2 test_gpt2
|
|||
|
||||
# Conditional inclusion of CUDA targets
|
||||
ifeq ($(NVCC),)
|
||||
$(info nvcc not found, skipping CUDA build)
|
||||
$(info nvcc not found, skipping CUDA builds)
|
||||
else
|
||||
$(info nvcc found, including CUDA build)
|
||||
$(info nvcc found, including CUDA builds)
|
||||
TARGETS += train_gpt2cu test_gpt2cu
|
||||
endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue