File size: 11,206 Bytes
8bfadd9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2bf2387
8bfadd9
 
 
 
 
 
 
 
 
 
 
 
 
 
2bf2387
8bfadd9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a0bbc3b
8bfadd9
 
 
 
 
 
 
 
 
 
 
 
 
 
2bf2387
8bfadd9
 
 
 
 
 
a0bbc3b
 
 
 
 
2bf2387
a0bbc3b
 
 
 
 
 
 
 
 
 
 
2bf2387
a0bbc3b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8bfadd9
 
 
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
{
  "tunableSpace": { "WORKGROUP_SIZE": [64, 128, 256] },
  "cases": [
    {
      "name": "attention_scores",
      "inputs": { "x": { "dtype": "float32", "shape": [32, 128] } },
      "outputs": { "y": { "dtype": "float32", "shape": [32, 128] } }
    },
    {
      "name": "logsoftmax-f32-1024x2048",
      "preset": "smoke",
      "vars": { "dtype": "float32", "rows": 1024, "cols": 2048 },
      "attrs": { "axis": 1 },
      "inputs": { "x": { "shape": [1024, 2048], "dtype": "float32", "dist": "normal", "seed": 211, "scale": 2 } },
      "outputs": { "y": { "shape": [1024, 2048], "dtype": "float32" } },
      "bench": {
        "primary": true,
        "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype) * 2" }]
      }
    },
    {
      "name": "logsoftmax-f32-16384x512",
      "preset": "stress",
      "vars": { "dtype": "float32", "rows": 16384, "cols": 512 },
      "attrs": { "axis": 1 },
      "inputs": { "x": { "shape": [16384, 512], "dtype": "float32", "dist": "normal", "seed": 212, "scale": 2 } },
      "outputs": { "y": { "shape": [16384, 512], "dtype": "float32" } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype) * 2" }] }
    },
    {
      "name": "logsoftmax-logits-1x262144",
      "preset": "model",
      "vars": { "dtype": "float32", "rows": 1, "cols": 262144 },
      "attrs": { "axis": 1 },
      "inputs": { "x": { "shape": [1, 262144], "dtype": "float32", "dist": "normal", "seed": 213, "scale": 4 } },
      "outputs": { "y": { "shape": [1, 262144], "dtype": "float32" } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype) * 2" }] }
    },
    {
      "name": "logsoftmax-f32-strided-axis1-64x1024x64",
      "preset": "stress",
      "vars": { "dtype": "float32", "rows": 64, "mid": 1024, "inner": 64 },
      "attrs": { "axis": 1 },
      "inputs": { "x": { "shape": [64, 1024, 64], "dtype": "float32", "dist": "normal", "seed": 311, "scale": 2 } },
      "outputs": { "y": { "shape": [64, 1024, 64], "dtype": "float32" } },
      "bench": {
        "metrics": [{ "type": "bandwidth", "value": "args.rows * args.mid * args.inner * dtypeBytes(args.dtype) * 2" }]
      }
    },
    {
      "name": "logsoftmax-f16-1024x2048-axis1",
      "preset": "stress",
      "vars": { "dtype": "float16", "rows": 1024, "cols": 2048 },
      "attrs": { "axis": 1 },
      "inputs": { "x": { "shape": [1024, 2048], "dtype": "float16", "dist": "normal", "seed": 312, "scale": 2 } },
      "outputs": { "y": { "shape": [1024, 2048], "dtype": "float16" } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype) * 2" }] }
    },
    {
      "name": "logsoftmax-f32-align-cliff-1024x2046",
      "preset": "stress",
      "vars": { "dtype": "float32", "rows": 1024, "cols": 2046 },
      "attrs": { "axis": 1 },
      "inputs": { "x": { "shape": [1024, 2046], "dtype": "float32", "dist": "normal", "seed": 313, "scale": 2 } },
      "outputs": { "y": { "shape": [1024, 2046], "dtype": "float32" } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype) * 2" }] }
    },
    {
      "name": "logsoftmax-f32-tallwide-70000x2048",
      "preset": "model",
      "vars": { "dtype": "float32", "rows": 70000, "cols": 2048 },
      "attrs": { "axis": 1 },
      "inputs": { "x": { "shape": [70000, 2048], "dtype": "float32", "dist": "normal", "seed": 314, "scale": 2 } },
      "outputs": { "y": { "shape": [70000, 2048], "dtype": "float32" } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype) * 2" }] }
    },
    {
      "name": "logsoftmax-f32-nosg-3pass-occupancy-131072x32",
      "preset": "stress",
      "vars": { "dtype": "float32", "rows": 131072, "cols": 32 },
      "attrs": { "axis": 1 },
      "inputs": { "x": { "shape": [131072, 32], "dtype": "float32", "dist": "normal", "seed": 411, "scale": 2 } },
      "outputs": { "y": { "shape": [131072, 32], "dtype": "float32" } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype) * 2" }] }
    },
    {
      "name": "logsoftmax-f32-strided-axis1-64x2048x130-packed4-control",
      "preset": "stress",
      "provenance": { "notes": "Measures LogSoftmax over 8,320 independent strided rows with an inner extent of 130." },
      "vars": { "dtype": "float32", "outer": 64, "axisDim": 2048, "inner": 130 },
      "attrs": { "axis": 1 },
      "inputs": { "x": { "shape": [64, 2048, 130], "dtype": "float32", "dist": "normal", "seed": 414, "scale": 2 } },
      "outputs": { "y": { "shape": [64, 2048, 130], "dtype": "float32", "dist": "empty" } },
      "bench": {
        "metrics": [
          { "type": "bandwidth", "value": "args.outer * args.axisDim * args.inner * dtypeBytes(args.dtype) * 2" }
        ]
      }
    },
    {
      "name": "logsoftmax-f32-strided-axis1-96x2048x130-crossover",
      "preset": "stress",
      "provenance": {
        "notes": "A large inner tail across 12,480 independent strided rows measures LogSoftmax on noncontiguous data."
      },
      "vars": { "dtype": "float32", "outer": 96, "axisDim": 2048, "inner": 130 },
      "attrs": { "axis": 1 },
      "inputs": { "x": { "shape": [96, 2048, 130], "dtype": "float32", "dist": "normal", "seed": 413, "scale": 2 } },
      "outputs": { "y": { "shape": [96, 2048, 130], "dtype": "float32", "dist": "empty" } },
      "bench": {
        "metrics": [
          { "type": "bandwidth", "value": "args.outer * args.axisDim * args.inner * dtypeBytes(args.dtype) * 2" }
        ]
      }
    },
    {
      "name": "logsoftmax-f32-strided-axis1-120x2048x130-large-inner",
      "preset": "stress",
      "provenance": {
        "source": "local fixture",
        "notes": "Inner=130 exercises the two-element tail of the scalar-aligned packed-4 online reducer while sharing one workgroup across four adjacent rows."
      },
      "vars": { "dtype": "float32", "outer": 120, "axisDim": 2048, "inner": 130 },
      "attrs": { "axis": 1 },
      "inputs": { "x": { "shape": [120, 2048, 130], "dtype": "float32", "dist": "normal", "seed": 412, "scale": 2 } },
      "outputs": { "y": { "shape": [120, 2048, 130], "dtype": "float32", "dist": "empty" } },
      "bench": {
        "metrics": [
          { "type": "bandwidth", "value": "args.outer * args.axisDim * args.inner * dtypeBytes(args.dtype) * 2" }
        ]
      }
    },
    {
      "name": "logsoftmax-f32-8192x512-midwidth",
      "provenance": { "notes": "A 512-column case measures LogSoftmax between the 128- and 2048-column shapes." },
      "preset": "smoke",
      "vars": { "dtype": "float32", "rows": 8192, "cols": 512 },
      "attrs": { "axis": 1 },
      "inputs": { "x": { "shape": [8192, 512], "dtype": "float32", "dist": "normal", "seed": 215, "scale": 2 } },
      "outputs": { "y": { "shape": [8192, 512], "dtype": "float32" } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype) * 2" }] }
    },
    {
      "name": "logsoftmax-f32-64x50257-vocab-odd-pathology",
      "preset": "stress",
      "provenance": {
        "notes": "Measures log-softmax over GPT-2's 50,257-token vocabulary width, which is not a multiple of four; its 50,260-wide sibling in this file is the nearest four-aligned control at nearly the same byte count."
      },
      "vars": { "dtype": "float32", "rows": 64, "cols": 50257 },
      "attrs": { "axis": 1 },
      "inputs": { "x": { "shape": [64, 50257], "dtype": "float32", "dist": "normal", "seed": 415, "scale": 4 } },
      "outputs": { "y": { "shape": [64, 50257], "dtype": "float32", "dist": "empty" } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype) * 2" }] }
    },
    {
      "name": "logsoftmax-f32-64x50260-vocab-control",
      "preset": "stress",
      "provenance": {
        "notes": "The next multiple-of-four vocabulary width above the paired 50,257-column case, with nearly the same input bytes."
      },
      "vars": { "dtype": "float32", "rows": 64, "cols": 50260 },
      "attrs": { "axis": 1 },
      "inputs": { "x": { "shape": [64, 50260], "dtype": "float32", "dist": "normal", "seed": 416, "scale": 4 } },
      "outputs": { "y": { "shape": [64, 50260], "dtype": "float32", "dist": "empty" } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype) * 2" }] }
    },
    {
      "name": "online_stream_axis31_f32",
      "attrs": { "axis": 1 },
      "inputs": { "x": { "dtype": "float32", "shape": [2, 31, 8], "dist": "normal", "seed": 913, "scale": 2 } },
      "outputs": { "y": { "dtype": "float32", "shape": [2, 31, 8] } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "numel(shapes.x) * 8" }] }
    },
    {
      "name": "online_stream_axis32_f32",
      "attrs": { "axis": 1 },
      "inputs": { "x": { "dtype": "float32", "shape": [2, 32, 8], "dist": "normal", "seed": 913, "scale": 2 } },
      "outputs": { "y": { "dtype": "float32", "shape": [2, 32, 8] } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "numel(shapes.x) * 8" }] }
    },
    {
      "name": "online_stream_axis33_f32",
      "attrs": { "axis": 1 },
      "inputs": { "x": { "dtype": "float32", "shape": [2, 33, 8], "dist": "normal", "seed": 913, "scale": 2 } },
      "outputs": { "y": { "dtype": "float32", "shape": [2, 33, 8] } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "numel(shapes.x) * 8" }] }
    },
    {
      "name": "online_stream_axis64_f32",
      "attrs": { "axis": 1 },
      "inputs": { "x": { "dtype": "float32", "shape": [2, 64, 8], "dist": "normal", "seed": 913, "scale": 2 } },
      "outputs": { "y": { "dtype": "float32", "shape": [2, 64, 8] } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "numel(shapes.x) * 8" }] }
    },
    {
      "name": "online_stream_axis65_f32",
      "attrs": { "axis": 1 },
      "inputs": { "x": { "dtype": "float32", "shape": [2, 65, 8], "dist": "normal", "seed": 913, "scale": 2 } },
      "outputs": { "y": { "dtype": "float32", "shape": [2, 65, 8] } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "numel(shapes.x) * 8" }] }
    },
    {
      "name": "online_stream_columns_tail_f32",
      "attrs": { "axis": 1 },
      "inputs": { "x": { "dtype": "float32", "shape": [129, 67, 130], "dist": "normal", "seed": 913, "scale": 2 } },
      "outputs": { "y": { "dtype": "float32", "shape": [129, 67, 130] } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "numel(shapes.x) * 8" }] }
    },
    {
      "name": "online_stream_four_way_tail_f32",
      "attrs": { "axis": 1 },
      "inputs": { "x": { "dtype": "float32", "shape": [2, 129, 8], "dist": "normal", "seed": 913, "scale": 2 } },
      "outputs": { "y": { "dtype": "float32", "shape": [2, 129, 8] } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "numel(shapes.x) * 8" }] },
      "tunables": { "STRIDED_ONLINE_STREAMS": 4 }
    }
  ]
}