-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (43 loc) · 1.23 KB
/
Makefile
File metadata and controls
60 lines (43 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.PHONY: all
all: run-nvidia run-amd
./scripts/plot.sh
## Plotting
.PHONY: plot
plot:
./scripts/plot.sh
## Running
.PHONY: run
run: run-nvidia run-amd
.PHONY: run-nvidia
run-nvidia: build
./scripts/runner.sh ./scripts/run_program_for_nvidia.sh
.PHONY: run-amd
run-amd: build
./scripts/runner.sh ./scripts/run_program_for_amd.sh
.PHONY: enter-nvidia
enter-nvidia: build
docker run --rm -itv /tmp:/store --privileged --entrypoint /bin/bash --gpus all --security-opt seccomp=unconfined benchmarks/plos25-gpu-atomics-nvidia
.PHONY: enter-amd
enter-amd: build
docker run --rm -itv /tmp:/store --privileged --entrypoint /bin/bash --device /dev/kfd --device /dev/dri --security-opt seccomp=unconfined benchmarks/plos25-gpu-atomics-amd
## Building
.PHONY: build
build: nvidia_arch.txt amdgpu_arch.txt
./scripts/build.sh
nvidia_arch.txt:
./scripts/generate_nvidia_arch.sh
amdgpu_arch.txt:
amdgpu-arch | sort -u | sed -e 's/^/--offload-arch=/' | sed -e ':a;N;$!ba;s/\n/ /g' > amdgpu_arch.txt
## Cleaning
.PHONY: clean
clean: clean-data clean-plots clean-arch-files
.PHONY: clean-data
clean-data:
rm -rf data
.PHONY: clean-plots
clean-plots:
rm -rf plots
.PHONY: clean-arch-files
clean-arch-files:
rm -f amdgpu_arch.txt
rm -f nvidia_arch.txt