diff options
author | Joshua Bakita <bakitajoshua@gmail.com> | 2023-10-25 09:50:48 -0400 |
---|---|---|
committer | Joshua Bakita <bakitajoshua@gmail.com> | 2023-10-25 09:50:48 -0400 |
commit | a1418db164af92d350234dfe6846884562c9e227 (patch) | |
tree | 6da98922342ea76cca3617240d2258de7be8a9ab | |
parent | e415e282be53a3d8264b67d22b4b15b518f71099 (diff) |
Allow custom nvcc location when running make + ignore gdb history
To specify a custom path to nvcc when building:
`make NVCC=/my/path/to/nvcc`
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | copy_experiments/Makefile | 5 |
3 files changed, 7 insertions, 4 deletions
@@ -1,3 +1,4 @@ | |||
1 | **/.gdb_history | ||
1 | preemption_logger | 2 | preemption_logger |
2 | constant_cycles_kernel | 3 | constant_cycles_kernel |
3 | copy_experiments/copy_contender | 4 | copy_experiments/copy_contender |
@@ -1,12 +1,13 @@ | |||
1 | .PHONY: all copy_experiments clean | 1 | .PHONY: all copy_experiments clean |
2 | NVCC ?= nvcc | ||
2 | 3 | ||
3 | all: constant_cycles_kernel preemption_logger copy_experiments | 4 | all: constant_cycles_kernel preemption_logger copy_experiments |
4 | 5 | ||
5 | constant_cycles_kernel: constant_cycles_kernel.cu testbench.h | 6 | constant_cycles_kernel: constant_cycles_kernel.cu testbench.h |
6 | nvcc constant_cycles_kernel.cu -o constant_cycles_kernel | 7 | $(NVCC) constant_cycles_kernel.cu -o constant_cycles_kernel |
7 | 8 | ||
8 | preemption_logger: task_host_utilities.cu preemption_logger.cu testbench.h | 9 | preemption_logger: task_host_utilities.cu preemption_logger.cu testbench.h |
9 | nvcc preemption_logger.cu -o preemption_logger -g | 10 | $(NVCC) preemption_logger.cu -o preemption_logger -g |
10 | 11 | ||
11 | copy_experiments: | 12 | copy_experiments: |
12 | $(MAKE) -C $@ | 13 | $(MAKE) -C $@ |
diff --git a/copy_experiments/Makefile b/copy_experiments/Makefile index b2d55c2..ede22dc 100644 --- a/copy_experiments/Makefile +++ b/copy_experiments/Makefile | |||
@@ -1,12 +1,13 @@ | |||
1 | .PHONY: all clean | 1 | .PHONY: all clean |
2 | NVCC ?= nvcc | ||
2 | 3 | ||
3 | all: copy_contender mon_cross_ctx_copies | 4 | all: copy_contender mon_cross_ctx_copies |
4 | 5 | ||
5 | copy_contender: copy_contender.cu copy_testbench.h ../testbench.h | 6 | copy_contender: copy_contender.cu copy_testbench.h ../testbench.h |
6 | /usr/local/cuda/bin/nvcc copy_contender.cu -o $@ -lcuda -g | 7 | $(NVCC) copy_contender.cu -o $@ -lcuda -g |
7 | 8 | ||
8 | mon_cross_ctx_copies: mon_cross_ctx_copies.cu copy_testbench.h ../testbench.h | 9 | mon_cross_ctx_copies: mon_cross_ctx_copies.cu copy_testbench.h ../testbench.h |
9 | /usr/local/cuda/bin/nvcc mon_cross_ctx_copies.cu -o $@ -lcuda -lpthread -g | 10 | $(NVCC) mon_cross_ctx_copies.cu -o $@ -lcuda -lpthread -g |
10 | 11 | ||
11 | clean: | 12 | clean: |
12 | rm -f copy_contender mon_cross_ctx_copies | 13 | rm -f copy_contender mon_cross_ctx_copies |