File size: 9,848 Bytes
f62a28c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
{
  "op": "ai.onnx.ReduceProd",
  "cases": [
    {
      "name": "reduce-prod-axis0-1024x512",
      "preset": "smoke",
      "vars": { "dtype": "float32", "rows": 1024, "cols": 512 },
      "attrs": { "axes": [0], "keepdims": 0 },
      "inputs": {
        "x": { "shape": [1024, 512], "dtype": "float32", "dist": "normal", "seed": 967, "offset": 1, "scale": 0.001 }
      },
      "outputs": { "y": { "shape": [512], "dtype": "float32" } },
      "bench": {
        "primary": true,
        "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype)" }]
      }
    },
    {
      "name": "rows_1024_cols_32",
      "attrs": { "axes": [1], "keepdims": 0 },
      "inputs": { "x": { "dtype": "float32", "shape": [1024, 32] } },
      "outputs": { "y": { "dtype": "float32", "shape": [1024] } }
    },
    {
      "name": "reduceprod-lastaxis-f32-4096x4096",
      "preset": "smoke",
      "vars": { "rows": 4096, "cols": 4096 },
      "attrs": { "axes": [1], "keepdims": 0 },
      "inputs": { "x": { "shape": [4096, 4096], "dtype": "float32", "dist": "normal", "seed": 117, "scale": 0.2 } },
      "outputs": { "y": { "shape": [4096], "dtype": "float32" } },
      "bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] }
    },
    {
      "name": "reduceprod-r3-last-64x64x4096",
      "preset": "smoke",
      "vars": { "rows": 4096, "cols": 4096 },
      "attrs": { "axes": [2], "keepdims": 0 },
      "inputs": { "x": { "shape": [64, 64, 4096], "dtype": "float32", "dist": "normal", "seed": 73, "scale": 0.001 } },
      "outputs": { "y": { "shape": [64, 64], "dtype": "float32" } },
      "bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] }
    },
    {
      "name": "axis0-large-65536x512",
      "preset": "smoke",
      "vars": { "rows": 65536, "cols": 512 },
      "attrs": { "axes": [0], "keepdims": 0 },
      "inputs": {
        "x": { "shape": [65536, 512], "dtype": "float32", "dist": "uniform", "scale": 0.001, "offset": 1, "seed": 311 }
      },
      "outputs": { "y": { "shape": [512], "dtype": "float32" } },
      "bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] }
    },
    {
      "name": "axis0-tall-16384x1024",
      "preset": "smoke",
      "vars": { "rows": 16384, "cols": 1024 },
      "attrs": { "axes": [0], "keepdims": 0 },
      "inputs": {
        "x": { "shape": [16384, 1024], "dtype": "float32", "dist": "uniform", "scale": 0.001, "offset": 1, "seed": 312 }
      },
      "outputs": { "y": { "shape": [1024], "dtype": "float32" } },
      "bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] }
    },
    {
      "name": "reduceprod-lastaxis-scalar-f32-2048x4095",
      "preset": "smoke",
      "vars": { "dtype": "float32", "rows": 2048, "cols": 4095 },
      "attrs": { "axes": [1], "keepdims": 0 },
      "inputs": {
        "x": { "shape": [2048, 4095], "dtype": "float32", "dist": "normal", "seed": 419, "scale": 0.001, "offset": 1 }
      },
      "outputs": { "y": { "shape": [2048], "dtype": "float32" } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype)" }] }
    },
    {
      "name": "reduceprod-r3-mid-axis1-64x256x4096",
      "preset": "stress",
      "provenance": { "notes": "Stress-only capacity case: declared tensors occupy 257 MiB of GPU storage." },
      "vars": { "dtype": "float32", "d0": 64, "d1": 256, "d2": 4096 },
      "attrs": { "axes": [1], "keepdims": 0 },
      "inputs": {
        "x": {
          "shape": [64, 256, 4096],
          "dtype": "float32",
          "dist": "normal",
          "seed": 421,
          "scale": 0.001,
          "offset": 1
        }
      },
      "outputs": { "y": { "shape": [64, 4096], "dtype": "float32" } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "args.d0 * args.d1 * args.d2 * dtypeBytes(args.dtype)" }] }
    },
    {
      "name": "reduceprod-tree-i32-lastaxis-256x4096",
      "preset": "smoke",
      "vars": { "dtype": "int32", "rows": 256, "cols": 4096 },
      "attrs": { "axes": [1], "keepdims": 0 },
      "inputs": {
        "x": { "shape": [256, 4096], "dtype": "int32", "dist": "uniform", "seed": 423, "scale": 1, "offset": 1 }
      },
      "outputs": { "y": { "shape": [256], "dtype": "int32" } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype)" }] }
    },
    {
      "name": "reduceprod-fullreduce-r3-256x256x256-keepdims",
      "preset": "smoke",
      "vars": { "rows": 65536, "cols": 256 },
      "attrs": { "keepdims": 1 },
      "inputs": {
        "x": {
          "shape": [256, 256, 256],
          "dtype": "float32",
          "dist": "uniform",
          "seed": 511,
          "scale": 0.001,
          "offset": 0.9995
        }
      },
      "outputs": { "y": { "shape": [1, 1, 1], "dtype": "float32" } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] }
    },
    {
      "name": "tree-per-row-cliff-f32-lastaxis-524288x64",
      "preset": "stress",
      "vars": { "dtype": "float32", "rows": 524288, "cols": 64 },
      "attrs": { "axes": [-1], "keepdims": 0 },
      "inputs": {
        "x": { "shape": [524288, 64], "dtype": "float32", "dist": "normal", "seed": 8821, "scale": 0.001, "offset": 1 }
      },
      "outputs": { "y": { "shape": [524288], "dtype": "float32" } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype)" }] }
    },
    {
      "name": "reduceprod-rowserial-boundary-8192x1024",
      "preset": "stress",
      "vars": { "dtype": "float32", "rows": 8192, "cols": 1024 },
      "attrs": { "axes": [-1], "keepdims": 0 },
      "inputs": {
        "x": { "shape": [8192, 1024], "dtype": "float32", "dist": "normal", "seed": 8821, "scale": 0.001, "offset": 1 }
      },
      "outputs": { "y": { "shape": [8192], "dtype": "float32" } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype)" }] },
      "provenance": {
        "notes": "Pins the row-serial selector boundary at rows >= ROW_SERIAL_MIN_ROWS and cols <= ROW_SERIAL_MAX_COLS."
      }
    },
    {
      "name": "reduceprod-tree-boundary-4096x1024",
      "preset": "stress",
      "vars": { "dtype": "float32", "rows": 4096, "cols": 1024 },
      "attrs": { "axes": [-1], "keepdims": 0 },
      "inputs": {
        "x": { "shape": [4096, 1024], "dtype": "float32", "dist": "normal", "seed": 8821, "scale": 0.001, "offset": 1 }
      },
      "outputs": { "y": { "shape": [4096], "dtype": "float32" } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype)" }] },
      "provenance": {
        "notes": "One row-count notch outside the row-serial region, where the row-per-workgroup tree wins by 1.7x. Pairs with the 8192x1024 case to bracket ROW_SERIAL_MIN_ROWS."
      }
    },
    {
      "name": "i32-fullreduce-single-lane-64x64x8-keepdims",
      "preset": "stress",
      "vars": { "dtype": "int32", "numel": 32768 },
      "attrs": { "keepdims": 1 },
      "inputs": {
        "x": { "shape": [64, 64, 8], "dtype": "int32", "dist": "randint", "seed": 8823, "min": -2, "max": 2 }
      },
      "outputs": { "y": { "shape": [1, 1, 1], "dtype": "int32" } },
      "bench": { "metrics": [{ "type": "bandwidth", "value": "args.numel * dtypeBytes(args.dtype)" }] }
    },
    {
      "name": "reduceprod-rank3-spatial-axes12-f32-128x256x256-pathology",
      "preset": "stress",
      "provenance": {
        "source": "authored for branch coverage",
        "notes": "Rank-3 multi-axis reduction with 128 output lanes, each serially scanning a 256x256 plane. Inputs stay close to one so the long product remains finite."
      },
      "attrs": { "axes": [1, 2], "keepdims": 1 },
      "inputs": {
        "x": {
          "shape": [128, 256, 256],
          "dtype": "float32",
          "dist": "uniform",
          "seed": 909,
          "scale": 0.0002,
          "offset": 0.9999
        }
      },
      "outputs": { "y": { "shape": [128, 1, 1], "dtype": "float32", "dist": "empty" } },
      "bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "128 * 256 * 256 * 4" }] }
    },
    {
      "name": "reduceprod-rank4-spatial-axes23-f32-2x64x256x256-pathology",
      "preset": "stress",
      "provenance": {
        "source": "authored for branch coverage",
        "notes": "Rank-4 multi-axis reduction with 128 output lanes, each serially scanning a 256x256 plane. Inputs stay close to one so the long product remains finite."
      },
      "attrs": { "axes": [2, 3], "keepdims": 1 },
      "inputs": {
        "x": {
          "shape": [2, 64, 256, 256],
          "dtype": "float32",
          "dist": "uniform",
          "seed": 910,
          "scale": 0.0002,
          "offset": 0.9999
        }
      },
      "outputs": { "y": { "shape": [2, 64, 1, 1], "dtype": "float32", "dist": "empty" } },
      "bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "2 * 64 * 256 * 256 * 4" }] }
    },
    {
      "name": "reduceprod-axis0-f32-131072x15-narrow-splitk-boundary",
      "preset": "stress",
      "vars": { "rows": 131072, "cols": 15 },
      "attrs": { "axes": [0], "keepdims": 0 },
      "inputs": { "x": { "shape": [131072, 15], "dtype": "float32", "dist": "constant", "value": 1 } },
      "outputs": { "y": { "shape": [15], "dtype": "float32", "dist": "empty" } },
      "bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] }
    }
  ],
  "tunableSpace": { "WORKGROUP_SIZE": [64, 128, 256] }
}