File size: 12,057 Bytes
9337f34
 
 
 
 
 
bf84eb7
9337f34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1022a75
9337f34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1022a75
9337f34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1022a75
9337f34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
{
  "cases": [
    {
      "name": "row_updates",
      "inputs": {
        "data": { "dtype": "float32", "shape": [4096, 768] },
        "indices": { "dtype": "int32", "shape": [128, 1], "min": 0, "max": 4096 },
        "updates": { "dtype": "float32", "shape": [128, 768] }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [4096, 768] } }
    },
    {
      "name": "row_updates_reduction_add",
      "preset": "smoke",
      "attrs": { "reduction": "add" },
      "inputs": {
        "data": { "dtype": "float32", "shape": [4096, 768], "dist": "normal", "seed": 1 },
        "indices": { "dtype": "int32", "shape": [512, 1], "dist": "linearMod", "mod": 4096, "step": 9 },
        "updates": { "dtype": "float32", "shape": [512, 768], "dist": "normal", "seed": 2 }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [4096, 768], "dist": "empty" } },
      "bench": {
        "primary": true,
        "metrics": [
          {
            "type": "bandwidth",
            "value": "4 * (2 * numel(shapes.data) + 3 * numel(shapes.updates)) + 4 * numel(shapes.indices)"
          }
        ]
      }
    },
    {
      "name": "row_updates_reduction_max",
      "preset": "smoke",
      "attrs": { "reduction": "max" },
      "inputs": {
        "data": { "dtype": "float32", "shape": [4096, 768], "dist": "normal", "seed": 1 },
        "indices": { "dtype": "int32", "shape": [512, 1], "dist": "linearMod", "mod": 4096, "step": 9 },
        "updates": { "dtype": "float32", "shape": [512, 768], "dist": "normal", "seed": 2 }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [4096, 768], "dist": "empty" } }
    },
    {
      "name": "scalar_updates_reduction_add_contended_1m",
      "preset": "stress",
      "attrs": { "reduction": "add" },
      "inputs": {
        "data": { "dtype": "float32", "shape": [1024], "dist": "normal", "seed": 1 },
        "indices": { "dtype": "int32", "shape": [1048576, 1], "dist": "randint", "min": 0, "max": 1024, "seed": 3 },
        "updates": { "dtype": "float32", "shape": [1048576], "dist": "normal", "seed": 2 }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [1024], "dist": "empty" } }
    },
    {
      "name": "scalar_updates_reduction_add_single_slot_1m",
      "preset": "stress",
      "attrs": { "reduction": "add" },
      "inputs": {
        "data": { "dtype": "float32", "shape": [1024], "dist": "normal", "seed": 1 },
        "indices": { "dtype": "int32", "shape": [1048576, 1], "dist": "constant", "value": 0 },
        "updates": { "dtype": "float32", "shape": [1048576], "dist": "normal", "seed": 2 }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [1024], "dist": "empty" } }
    },
    {
      "name": "row_updates_dense_8192x1024",
      "preset": "model",
      "inputs": {
        "data": { "dtype": "float32", "shape": [8192, 1024], "dist": "normal", "seed": 701 },
        "indices": { "dtype": "int32", "shape": [8192, 1], "dist": "linearMod", "mod": 8192, "step": 7 },
        "updates": { "dtype": "float32", "shape": [8192, 1024], "dist": "normal", "seed": 703 }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [8192, 1024], "dist": "empty" } },
      "bench": {
        "primary": false,
        "metrics": [
          {
            "type": "bandwidth",
            "value": "4 * (2 * numel(shapes.data) + numel(shapes.updates)) + 4 * numel(shapes.indices)"
          }
        ]
      }
    },
    {
      "name": "f16_reduction_add_single_lane_serial_cliff",
      "preset": "smoke",
      "attrs": { "reduction": "add" },
      "inputs": {
        "data": { "dtype": "float16", "shape": [4096, 768], "dist": "normal", "seed": 1 },
        "indices": { "dtype": "int32", "shape": [512, 1], "dist": "linearMod", "mod": 4096, "step": 9 },
        "updates": { "dtype": "float16", "shape": [512, 768], "dist": "normal", "seed": 2 }
      },
      "outputs": { "output": { "dtype": "float16", "shape": [4096, 768], "dist": "empty" } },
      "bench": {
        "metrics": [
          {
            "type": "bandwidth",
            "value": "2 * (2 * numel(shapes.data) + 3 * numel(shapes.updates)) + 4 * numel(shapes.indices)"
          }
        ]
      }
    },
    {
      "name": "f32_reduction_add_atomic_parallel_control",
      "preset": "smoke",
      "attrs": { "reduction": "add" },
      "inputs": {
        "data": { "dtype": "float32", "shape": [4096, 768], "dist": "normal", "seed": 1 },
        "indices": { "dtype": "int32", "shape": [512, 1], "dist": "linearMod", "mod": 4096, "step": 9 },
        "updates": { "dtype": "float32", "shape": [512, 768], "dist": "normal", "seed": 2 }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [4096, 768], "dist": "empty" } },
      "bench": {
        "metrics": [
          {
            "type": "bandwidth",
            "value": "4 * (2 * numel(shapes.data) + 3 * numel(shapes.updates)) + 4 * numel(shapes.indices)"
          }
        ]
      }
    },
    {
      "name": "int8_reduction_add_atomic_path_control",
      "preset": "smoke",
      "attrs": { "reduction": "add" },
      "inputs": {
        "data": { "dtype": "int8", "shape": [1024], "dist": "constant", "value": 0 },
        "indices": { "dtype": "int32", "shape": [262144, 1], "dist": "randint", "min": 0, "max": 1024, "seed": 3 },
        "updates": { "dtype": "int8", "shape": [262144], "dist": "constant", "value": 1 }
      },
      "outputs": { "output": { "dtype": "int8", "shape": [1024], "dist": "empty" } },
      "bench": {
        "metrics": [
          { "type": "bandwidth", "value": "numel(shapes.data) + 3 * numel(shapes.updates) + 4 * numel(shapes.indices)" }
        ]
      }
    },
    {
      "name": "f16_row_update_none_unaligned770_batch0_cliff",
      "preset": "smoke",
      "inputs": {
        "data": { "dtype": "float16", "shape": [4096, 770], "dist": "normal", "seed": 11 },
        "indices": { "dtype": "int32", "shape": [128, 1], "dist": "linearMod", "mod": 4096, "step": 9 },
        "updates": { "dtype": "float16", "shape": [128, 770], "dist": "normal", "seed": 12 }
      },
      "outputs": { "output": { "dtype": "float16", "shape": [4096, 770], "dist": "empty" } },
      "bench": {
        "metrics": [
          {
            "type": "bandwidth",
            "value": "2 * (2 * numel(shapes.data) + numel(shapes.updates)) + 4 * numel(shapes.indices)"
          }
        ]
      }
    },
    {
      "name": "f16_row_update_none_aligned768_rowfast_control",
      "preset": "smoke",
      "inputs": {
        "data": { "dtype": "float16", "shape": [4096, 768], "dist": "normal", "seed": 11 },
        "indices": { "dtype": "int32", "shape": [128, 1], "dist": "linearMod", "mod": 4096, "step": 9 },
        "updates": { "dtype": "float16", "shape": [128, 768], "dist": "normal", "seed": 12 }
      },
      "outputs": { "output": { "dtype": "float16", "shape": [4096, 768], "dist": "empty" } },
      "bench": {
        "metrics": [
          {
            "type": "bandwidth",
            "value": "2 * (2 * numel(shapes.data) + numel(shapes.updates)) + 4 * numel(shapes.indices)"
          }
        ]
      }
    },
    {
      "name": "f16_reduction_add_scalar_updates_rank1_single_thread",
      "preset": "stress",
      "attrs": { "reduction": "add" },
      "inputs": {
        "data": { "dtype": "float16", "shape": [16384], "dist": "normal", "seed": 20 },
        "indices": { "dtype": "int32", "shape": [16384, 1], "dist": "randint", "min": 0, "max": 16384, "seed": 21 },
        "updates": { "dtype": "float16", "shape": [16384], "dist": "normal", "seed": 22 }
      },
      "outputs": { "output": { "dtype": "float16", "shape": [16384], "dist": "empty" } },
      "bench": {
        "metrics": [
          {
            "type": "bandwidth",
            "value": "2 * (2 * numel(shapes.data) + 3 * numel(shapes.updates)) + 4 * numel(shapes.indices)"
          }
        ]
      }
    },
    {
      "name": "f32_sparse_copy_dominates_tiny_scatter",
      "preset": "stress",
      "inputs": {
        "data": { "dtype": "float32", "shape": [307200, 13], "dist": "normal", "seed": 30 },
        "indices": { "dtype": "int32", "shape": [8, 1], "dist": "randint", "min": 0, "max": 307200, "seed": 31 },
        "updates": { "dtype": "float32", "shape": [8, 13], "dist": "normal", "seed": 32 }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [307200, 13], "dist": "empty" } },
      "bench": {
        "metrics": [
          {
            "type": "bandwidth",
            "value": "4 * (2 * numel(shapes.data) + numel(shapes.updates)) + 4 * numel(shapes.indices)"
          }
        ]
      }
    },
    {
      "name": "scalar-loss-accumulation-add-4m-single-output-pathology",
      "preset": "model",
      "attrs": { "reduction": "add" },
      "vars": { "count": 4194304, "dtype": "float32" },
      "inputs": {
        "data": { "dtype": "float32", "shape": [1], "dist": "constant", "value": 0 },
        "indices": { "dtype": "int32", "shape": [4194304, 1], "dist": "constant", "value": 0 },
        "updates": { "dtype": "float32", "shape": [4194304], "dist": "normal", "seed": 33, "scale": 0.001 }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [1], "dist": "empty" } },
      "bench": {
        "metrics": [
          { "type": "bandwidth", "value": "args.count * (dtypeBytes(args.dtype) + 4) + 2 * dtypeBytes(args.dtype)" }
        ]
      }
    },
    {
      "name": "padding-token-hotspot-add-2m-vocab131072",
      "preset": "stress",
      "attrs": { "reduction": "add" },
      "inputs": {
        "data": { "dtype": "float32", "shape": [131072], "dist": "constant", "value": 0 },
        "indices": { "dtype": "int32", "shape": [2097152, 1], "dist": "constant", "value": 0 },
        "updates": { "dtype": "float32", "shape": [2097152], "dist": "constant", "value": 1 }
      },
      "outputs": { "output": { "dtype": "float32", "shape": [131072], "dist": "empty" } },
      "bench": {
        "primary": true,
        "metrics": [
          {
            "type": "bandwidth",
            "value": "4 * (2 * numel(shapes.data) + 3 * numel(shapes.updates)) + 4 * numel(shapes.indices)"
          }
        ]
      }
    },
    {
      "name": "f16-sparse-router-gradient-65536-into16384",
      "preset": "stress",
      "attrs": { "reduction": "add" },
      "inputs": {
        "data": { "dtype": "float16", "shape": [16384], "dist": "constant", "value": 0 },
        "indices": { "dtype": "int32", "shape": [65536, 1], "dist": "randint", "min": 0, "max": 16384, "seed": 41 },
        "updates": { "dtype": "float16", "shape": [65536], "dist": "normal", "seed": 42, "scale": 0.01 }
      },
      "outputs": { "output": { "dtype": "float16", "shape": [16384], "dist": "empty" } },
      "bench": {
        "primary": true,
        "metrics": [
          {
            "type": "bandwidth",
            "value": "2 * (2 * numel(shapes.data) + 3 * numel(shapes.updates)) + 4 * numel(shapes.indices)"
          }
        ]
      }
    },
    {
      "name": "f16-router-max-262144-into16384-single-column",
      "preset": "stress",
      "provenance": {
        "notes": "Large f16 max reduction that exercises the serialized reduction_slice route; the atomic-add control distinguishes the non-add reduction gap."
      },
      "attrs": { "reduction": "max" },
      "inputs": {
        "data": { "dtype": "float16", "shape": [16384], "dist": "constant", "value": 0 },
        "indices": { "dtype": "int32", "shape": [262144, 1], "dist": "randint", "min": 0, "max": 16384, "seed": 43 },
        "updates": { "dtype": "float16", "shape": [262144], "dist": "normal", "seed": 44 }
      },
      "outputs": { "output": { "dtype": "float16", "shape": [16384], "dist": "empty" } },
      "bench": {
        "metrics": [
          {
            "type": "bandwidth",
            "value": "2 * (2 * numel(shapes.data) + 3 * numel(shapes.updates)) + 4 * numel(shapes.indices)"
          }
        ]
      }
    }
  ]
}