mirror of
https://github.com/karpathy/llm.c.git
synced 2026-07-27 20:25:09 -04:00
Check if file exists using platform specific commands & Add *.o to gitignore
Signed-off-by: Jun Zhang <jun@junz.org>
This commit is contained in:
parent
2d43e5bc97
commit
9e645314e6
2 changed files with 8 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -24,6 +24,7 @@ dev/cuda/matmul_backward_bias
|
|||
dev/cuda/nccl_all_reduce
|
||||
*.obj
|
||||
*.exe
|
||||
*.o
|
||||
|
||||
# log files
|
||||
*.log
|
||||
|
|
|
|||
8
Makefile
8
Makefile
|
|
@ -23,9 +23,15 @@ NVCC_CUDNN =
|
|||
USE_CUDNN ?= 0
|
||||
|
||||
# Function to check if a file exists in the PATH
|
||||
ifneq ($(OS), Windows_NT)
|
||||
define file_exists_in_path
|
||||
$(shell where $(1) 2>nul || which $(1) 2>/dev/null)
|
||||
$(which $(1) 2>/dev/null)
|
||||
endef
|
||||
else
|
||||
define file_exists_in_path
|
||||
$(shell where $(1) 2>nul)
|
||||
endef
|
||||
endif
|
||||
|
||||
ifneq ($(CI),true) # if not in CI, then use the GPU query
|
||||
ifndef GPU_COMPUTE_CAPABILITY # set to defaults if: make GPU_COMPUTE_CAPABILITY=
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue