-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (24 loc) · 819 Bytes
/
Copy pathMakefile
File metadata and controls
31 lines (24 loc) · 819 Bytes
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
KERNELS ?=
GNUPLOT ?= gnuplot
PSTOPDF ?= ps2pdf
AWK ?= awk
KERNEL_ARGS := $(patsubst %, --kernel=% , $(KERNELS))
# Remove all NCU output above the actual CSV data
%.csv: %.ncu
$(AWK) '/^==PROF==/ {last=NR} {lines[NR]=$$0} END {for (i=last+1; i<=NR; i++) print lines[i]}' $< > $@
define PLOT_RULE
%.$(1).plt: %.csv $(1).plt.jinja ncu2jinja.py
./ncu2jinja.py $(KERNEL_ARGS) --template=./$(1).plt.jinja < $$< > $$@
endef
$(eval $(call PLOT_RULE,roofline-fp))
$(eval $(call PLOT_RULE,roofline-inst))
$(eval $(call PLOT_RULE,roofline-shared))
$(eval $(call PLOT_RULE,hist-occupancy))
$(eval $(call PLOT_RULE,hist-instmix))
$(eval $(call PLOT_RULE,hist-predication))
%.ps: %.plt
$(GNUPLOT) -e "outfile='$@'" $<
%.pdf: %.ps
$(PSTOPDF) $< $@
clean:
@rm -f *.pdf *.plt *.ps *.csv