4Y1TNkU4VMDOm8kjAk7js5 changeset

Changeset636439383166 (b)
ParentNone (a)
ab
0+
0+# Rules for generating all the kernels of these types.
0+.PHONY: counts
0+.PHONY: hists
0+.PHONY: sorts
0+.PHONY: counts64
0+.PHONY: hists64
0+.PHONY: sorts64
0+
0+# Rules for detecting changes in .cu files effecting these kernels.
0+.PHONY: count
0+.PHONY: hist
0+.PHONY: sort
0+
0+
0+# Relative paths
0+# Note that the caller must define BITS
0+ifeq ($(BITS), 64)
0+        CUBIN = ../cubin
0+        ISA = ../isa
0+endif
0+
0+ifeq ($(BITS), 64)
0+        CUBIN ../cubin64
0+        ISA = ../isa64
0+endif
0+
0+# Compiler options
0+NVCCFLAGS = --cubin -Xptxas=-v -arch=compute_20 -code=sm_20 -m=$(BITS)
0+
0+T128 = -D NUM_THREADS=128
0+T256 = -D NUM_THREADS=256
0+
0+INDEX = -D VALUE_TYPE_INDEX
0+KEY = -D VALUE_TYPE_NONE
0+SINGLE = -D VALUE_TYPE_SINGLE
0+MULTI = -D VALUE_TYPE_MULTI
0+
0+LIST = -D SCATTER_TRANSACTION_LIST
0+SIMPLE = -D SCATTER_SIMPLE
0+
0+SORTFLAGS = $(NVCCFLAGS) -D VALUES_PER_THREAD=8
0+
0+
0+# Generate all kernels.
0+all : \
0+        sorts hists counts
0+
0+
0+# Generate all .isa files
0+counts : \
0+        $(ISA)/count.isa
0+
0+hists : \
0+        $(ISA)/hist_simple.isa
0+       
0+sorts : \
0+        $(ISA)/sort_128_8_index_simple.isa \
0+        $(ISA)/sort_128_8_key_simple.isa \
0+        $(ISA)/sort_128_8_single_simple.isa \
0+        $(ISA)/sort_128_8_multi_simple.isa \
0+        $(ISA)/sort_256_8_index_simple.isa \
0+        $(ISA)/sort_256_8_key_simple.isa \
0+        $(ISA)/sort_256_8_single_simple.isa \
0+        $(ISA)/sort_256_8_multi_simple.isa
0+       
0+
0+# Generate all .isa files from a pattern with cuobjdump.
0+$(ISA)/%.isa : $(CUBIN)/%.cubin
0+        cuobjdump -sass $< > $@
0+       
0+       
0+# Define dependencies for count, hist, and sort
0+count : count.cu countgen.cu common.cu
0+hist : histgen.cu histogram.cu common.cu params.cu \
0+        hist1.cu hist2.cu hist3.cu hist3_64.cu
0+sort : common.cu params.cu sort.cu sortcommon.cu sortgen.cu \
0+        sortgeneric.cu sortscan1.cu sortscan2.cu sortscan3.cu sortstore.cu
0+       
0+         
0+# Build count cubins
0+$(CUBIN)/count.cubin : count
0+        nvcc $(NVCCFLAGS) -o $@ countgen.cu
0+       
0+# Build hist cubins
0+$(CUBIN)/hist_simple.cubin : hist
0+        nvcc $(NVCCFLAGS) -o $@ histgen.cu
0+
0+# Build sort cubins
0+$(CUBIN)/sort_128_8_index_simple.cubin : sort
0+        nvcc $(SORTFLAGS) $(T128) $(INDEX) $(SIMPLE) -o $@ sortgen.cu
0+       
0+$(CUBIN)/sort_128_8_key_simple.cubin : sort
0+        nvcc $(SORTFLAGS) $(T128) $(KEY) $(SIMPLE) -o $@ sortgen.cu
0+       
0+$(CUBIN)/sort_128_8_single_simple.cubin : sort
0+        nvcc $(SORTFLAGS) $(T128) $(SINGLE) $(SIMPLE) -o $@ sortgen.cu
0+       
0+$(CUBIN)/sort_128_8_multi_simple.cubin : sort
0+        nvcc $(SORTFLAGS) $(T128) $(MULTI) $(SIMPLE) -o $@ sortgen.cu
0+       
0+$(CUBIN)/sort_256_8_index_simple.cubin : sort
0+        nvcc $(SORTFLAGS) $(T256) $(INDEX) $(SIMPLE) -o $@ sortgen.cu
0+       
0+$(CUBIN)/sort_256_8_key_simple.cubin : sort
0+        nvcc $(SORTFLAGS) $(T256) $(KEY) $(SIMPLE) -o $@ sortgen.cu
0+       
0+$(CUBIN)/sort_256_8_single_simple.cubin : sort
0+        nvcc $(SORTFLAGS) $(T256) $(SINGLE) $(SIMPLE) -o $@ sortgen.cu
0+       
0+$(CUBIN)/sort_256_8_multi_simple.cubin : sort
0+        nvcc $(SORTFLAGS) $(T256) $(MULTI) $(SIMPLE) -o $@ sortgen.cu
0+       
...
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
--- Revision None
+++ Revision 636439383166
@@ -0,0 +1,113 @@
+
+# Rules for generating all the kernels of these types.
+.PHONY: counts
+.PHONY: hists
+.PHONY: sorts
+.PHONY: counts64
+.PHONY: hists64
+.PHONY: sorts64
+
+# Rules for detecting changes in .cu files effecting these kernels.
+.PHONY: count
+.PHONY: hist
+.PHONY: sort
+
+
+# Relative paths
+# Note that the caller must define BITS
+ifeq ($(BITS), 64)
+ CUBIN = ../cubin
+ ISA = ../isa
+endif
+
+ifeq ($(BITS), 64)
+ CUBIN ../cubin64
+ ISA = ../isa64
+endif
+
+# Compiler options
+NVCCFLAGS = --cubin -Xptxas=-v -arch=compute_20 -code=sm_20 -m=$(BITS)
+
+T128 = -D NUM_THREADS=128
+T256 = -D NUM_THREADS=256
+
+INDEX = -D VALUE_TYPE_INDEX
+KEY = -D VALUE_TYPE_NONE
+SINGLE = -D VALUE_TYPE_SINGLE
+MULTI = -D VALUE_TYPE_MULTI
+
+LIST = -D SCATTER_TRANSACTION_LIST
+SIMPLE = -D SCATTER_SIMPLE
+
+SORTFLAGS = $(NVCCFLAGS) -D VALUES_PER_THREAD=8
+
+
+# Generate all kernels.
+all : \
+ sorts hists counts
+
+
+# Generate all .isa files
+counts : \
+ $(ISA)/count.isa
+
+hists : \
+ $(ISA)/hist_simple.isa
+
+sorts : \
+ $(ISA)/sort_128_8_index_simple.isa \
+ $(ISA)/sort_128_8_key_simple.isa \
+ $(ISA)/sort_128_8_single_simple.isa \
+ $(ISA)/sort_128_8_multi_simple.isa \
+ $(ISA)/sort_256_8_index_simple.isa \
+ $(ISA)/sort_256_8_key_simple.isa \
+ $(ISA)/sort_256_8_single_simple.isa \
+ $(ISA)/sort_256_8_multi_simple.isa
+
+
+# Generate all .isa files from a pattern with cuobjdump.
+$(ISA)/%.isa : $(CUBIN)/%.cubin
+ cuobjdump -sass $< > $@
+
+
+# Define dependencies for count, hist, and sort
+count : count.cu countgen.cu common.cu
+hist : histgen.cu histogram.cu common.cu params.cu \
+ hist1.cu hist2.cu hist3.cu hist3_64.cu
+sort : common.cu params.cu sort.cu sortcommon.cu sortgen.cu \
+ sortgeneric.cu sortscan1.cu sortscan2.cu sortscan3.cu sortstore.cu
+
+
+# Build count cubins
+$(CUBIN)/count.cubin : count
+ nvcc $(NVCCFLAGS) -o $@ countgen.cu
+
+# Build hist cubins
+$(CUBIN)/hist_simple.cubin : hist
+ nvcc $(NVCCFLAGS) -o $@ histgen.cu
+
+# Build sort cubins
+$(CUBIN)/sort_128_8_index_simple.cubin : sort
+ nvcc $(SORTFLAGS) $(T128) $(INDEX) $(SIMPLE) -o $@ sortgen.cu
+
+$(CUBIN)/sort_128_8_key_simple.cubin : sort
+ nvcc $(SORTFLAGS) $(T128) $(KEY) $(SIMPLE) -o $@ sortgen.cu
+
+$(CUBIN)/sort_128_8_single_simple.cubin : sort
+ nvcc $(SORTFLAGS) $(T128) $(SINGLE) $(SIMPLE) -o $@ sortgen.cu
+
+$(CUBIN)/sort_128_8_multi_simple.cubin : sort
+ nvcc $(SORTFLAGS) $(T128) $(MULTI) $(SIMPLE) -o $@ sortgen.cu
+
+$(CUBIN)/sort_256_8_index_simple.cubin : sort
+ nvcc $(SORTFLAGS) $(T256) $(INDEX) $(SIMPLE) -o $@ sortgen.cu
+
+$(CUBIN)/sort_256_8_key_simple.cubin : sort
+ nvcc $(SORTFLAGS) $(T256) $(KEY) $(SIMPLE) -o $@ sortgen.cu
+
+$(CUBIN)/sort_256_8_single_simple.cubin : sort
+ nvcc $(SORTFLAGS) $(T256) $(SINGLE) $(SIMPLE) -o $@ sortgen.cu
+
+$(CUBIN)/sort_256_8_multi_simple.cubin : sort
+ nvcc $(SORTFLAGS) $(T256) $(MULTI) $(SIMPLE) -o $@ sortgen.cu
+