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