Skip to content

Commit

Permalink
Check if file exists using platform specific commands & Add *.o to gi…
Browse files Browse the repository at this point in the history
…tignore

Signed-off-by: Jun Zhang <[email protected]>
  • Loading branch information
junaire committed May 19, 2024
1 parent 2d43e5b commit 9e64531
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dev/cuda/matmul_backward_bias
dev/cuda/nccl_all_reduce
*.obj
*.exe
*.o

# log files
*.log
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit 9e64531

Please sign in to comment.