Lines Matching full:shape
64 struct Shape { struct
73 Shape(std::int32_t n, std::int32_t m, std::int32_t k) in Shape() function
104 double run_gemms(std::vector<Shape>* shapes) { in run_gemms() argument
106 for (auto& shape : *shapes) { in run_gemms()
107 ops += run_gemm(shape.n, shape.m, shape.k, shape.working_set().lhs, in run_gemms()
108 shape.working_set().rhs, shape.working_set().result); in run_gemms()
159 void time_all(std::vector<Shape>* shapes, std::int32_t repetitions, in time_all()
179 void time_one(Shape* shape, double max_time) { in time_one() argument
184 std::cout << std::setprecision(6) << std::fixed << shape->n << ", " in time_one()
185 << shape->m << ", " << shape->k << ", " << std::flush; in time_one()
190 for (int i = 0; i < shape->repetitions; ++i) { in time_one()
191 ops += run_gemm(shape->n, shape->m, shape->k, shape->working_set().lhs, in time_one()
192 shape->working_set().rhs, shape->working_set().result); in time_one()
193 shape->next_working_set(); in time_one()
196 times.push_back(delta_time / shape->repetitions); in time_one()
204 std::vector<Shape> googlenet_gemms; in main()
205 googlenet_gemms.push_back(Shape(12544, 64, 147)); in main()
206 googlenet_gemms.push_back(Shape(3136, 64, 64)); in main()
207 googlenet_gemms.push_back(Shape(3136, 192, 576)); in main()
208 googlenet_gemms.push_back(Shape(784, 64, 192)); in main()
209 googlenet_gemms.push_back(Shape(784, 96, 192)); in main()
210 googlenet_gemms.push_back(Shape(784, 128, 864)); in main()
211 googlenet_gemms.push_back(Shape(784, 16, 192)); in main()
212 googlenet_gemms.push_back(Shape(784, 32, 400)); in main()
213 googlenet_gemms.push_back(Shape(784, 32, 192)); in main()
214 googlenet_gemms.push_back(Shape(784, 128, 256)); in main()
215 googlenet_gemms.push_back(Shape(784, 128, 256)); in main()
216 googlenet_gemms.push_back(Shape(784, 192, 1152)); in main()
217 googlenet_gemms.push_back(Shape(784, 32, 256)); in main()
218 googlenet_gemms.push_back(Shape(784, 96, 800)); in main()
219 googlenet_gemms.push_back(Shape(784, 64, 256)); in main()
220 googlenet_gemms.push_back(Shape(196, 192, 480)); in main()
221 googlenet_gemms.push_back(Shape(196, 96, 480)); in main()
222 googlenet_gemms.push_back(Shape(196, 204, 864)); in main()
223 googlenet_gemms.push_back(Shape(196, 16, 480)); in main()
224 googlenet_gemms.push_back(Shape(196, 48, 400)); in main()
225 googlenet_gemms.push_back(Shape(196, 64, 480)); in main()
226 googlenet_gemms.push_back(Shape(196, 160, 508)); in main()
227 googlenet_gemms.push_back(Shape(196, 112, 508)); in main()
228 googlenet_gemms.push_back(Shape(196, 224, 1008)); in main()
229 googlenet_gemms.push_back(Shape(196, 24, 508)); in main()
230 googlenet_gemms.push_back(Shape(196, 64, 600)); in main()
231 googlenet_gemms.push_back(Shape(196, 64, 508)); in main()
232 googlenet_gemms.push_back(Shape(196, 128, 512)); in main()
233 googlenet_gemms.push_back(Shape(196, 128, 512)); in main()
234 googlenet_gemms.push_back(Shape(196, 256, 1152)); in main()
235 googlenet_gemms.push_back(Shape(196, 24, 512)); in main()
236 googlenet_gemms.push_back(Shape(196, 64, 600)); in main()
237 googlenet_gemms.push_back(Shape(196, 64, 512)); in main()
238 googlenet_gemms.push_back(Shape(196, 112, 512)); in main()
239 googlenet_gemms.push_back(Shape(196, 144, 512)); in main()
240 googlenet_gemms.push_back(Shape(196, 288, 1296)); in main()
241 googlenet_gemms.push_back(Shape(196, 32, 512)); in main()
242 googlenet_gemms.push_back(Shape(196, 64, 800)); in main()
243 googlenet_gemms.push_back(Shape(196, 64, 512)); in main()
244 googlenet_gemms.push_back(Shape(196, 256, 528)); in main()
245 googlenet_gemms.push_back(Shape(196, 160, 528)); in main()
246 googlenet_gemms.push_back(Shape(196, 320, 1440)); in main()
247 googlenet_gemms.push_back(Shape(196, 32, 528)); in main()
248 googlenet_gemms.push_back(Shape(196, 128, 800)); in main()
249 googlenet_gemms.push_back(Shape(196, 128, 528)); in main()
250 googlenet_gemms.push_back(Shape(49, 256, 832)); in main()
251 googlenet_gemms.push_back(Shape(49, 160, 832)); in main()
252 googlenet_gemms.push_back(Shape(49, 320, 1440)); in main()
253 googlenet_gemms.push_back(Shape(49, 48, 832)); in main()
254 googlenet_gemms.push_back(Shape(49, 128, 1200)); in main()
255 googlenet_gemms.push_back(Shape(49, 128, 832)); in main()
256 googlenet_gemms.push_back(Shape(49, 384, 832)); in main()
257 googlenet_gemms.push_back(Shape(49, 192, 832)); in main()
258 googlenet_gemms.push_back(Shape(49, 384, 1728)); in main()
259 googlenet_gemms.push_back(Shape(49, 48, 832)); in main()
260 googlenet_gemms.push_back(Shape(49, 128, 1200)); in main()
261 googlenet_gemms.push_back(Shape(49, 128, 832)); in main()
262 googlenet_gemms.push_back(Shape(16, 128, 508)); in main()
263 googlenet_gemms.push_back(Shape(1, 1024, 2048)); in main()
264 googlenet_gemms.push_back(Shape(1, 1008, 1024)); in main()
265 googlenet_gemms.push_back(Shape(16, 128, 528)); in main()
266 googlenet_gemms.push_back(Shape(1, 1024, 2048)); in main()
267 googlenet_gemms.push_back(Shape(1, 1008, 1024)); in main()
268 googlenet_gemms.push_back(Shape(1, 1008, 1024)); in main()
270 for (auto& shape : googlenet_gemms) { in main() local
271 shape.init(); in main()
274 std::vector<Shape> small_gemms; in main()
275 small_gemms.push_back(Shape(29232, 16, 25)); in main()
276 small_gemms.push_back(Shape(7308, 6, 400)); in main()
277 small_gemms.push_back(Shape(203, 3002, 216)); in main()
279 for (auto& shape : small_gemms) { in main() local
280 shape.init(); in main()
283 std::vector<Shape> others; in main()
284 others.push_back(Shape(100, 100, 100)); in main()
285 others.push_back(Shape(1000, 1000, 1000)); in main()
286 others.push_back(Shape(2000, 1000, 1000)); in main()
288 for (auto& shape : others) { in main() local
289 shape.init(); in main()
292 std::vector<Shape> lstm; in main()
293 lstm.push_back(Shape(1, 500, 320)); in main()
294 lstm.push_back(Shape(1, 100, 500)); in main()
295 lstm.push_back(Shape(1, 500, 500)); in main()
296 lstm.push_back(Shape(1, 500, 100)); in main()
297 lstm.push_back(Shape(1, 2000, 100)); in main()
299 for (auto& shape : lstm) { in main() local
300 shape.init(); in main()
315 for (auto& shape : googlenet_gemms) { in main() local
316 time_one(&shape, 0.10); in main()
319 for (auto& shape : small_gemms) { in main() local
320 time_one(&shape, 0.10); in main()
323 for (auto& shape : others) { in main() local
324 time_one(&shape, 0.10); in main()
327 for (auto& shape : lstm) { in main() local
328 time_one(&shape, 0.10); in main()