8 cl::sycl::gpu_selector selector;
9 Eigen::QueueInterface queue(selector);
10 #define BM_FuncWithInput2DimsGPU(FUNC, D1, D2) \ 11 static void BM_##FUNC##_##D1##x##D2(int iters, int N) { \ 12 StopBenchmarkTiming(); \ 13 Eigen::SyclDevice device(&queue); \ 14 BenchmarkSuite<Eigen::SyclDevice, float> suite(device, D1, D2); \ 17 BENCHMARK_RANGE(BM_##FUNC##_##D1##x##D2, 10, 10); 19 BM_FuncWithInput2DimsGPU(rowReduction, 256, 100352);
20 BM_FuncWithInput2DimsGPU(rowReduction, 64, 100352);
21 BM_FuncWithInput2DimsGPU(rowReduction, 512, 25088);
22 BM_FuncWithInput2DimsGPU(rowReduction, 128, 25088);
23 BM_FuncWithInput2DimsGPU(rowReduction, 102, 6272);
24 BM_FuncWithInput2DimsGPU(rowReduction, 256, 6272);
25 BM_FuncWithInput2DimsGPU(rowReduction, 204, 1568);
26 BM_FuncWithInput2DimsGPU(rowReduction, 512, 1568);
27 BM_FuncWithInput2DimsGPU(rowReduction, 1024, 1568);
28 BM_FuncWithInput2DimsGPU(rowReduction, 2048, 1568);
30 BM_FuncWithInput2DimsGPU(colReduction, 100352, 256);
31 BM_FuncWithInput2DimsGPU(colReduction, 100352, 64);
32 BM_FuncWithInput2DimsGPU(colReduction, 25088, 512);
33 BM_FuncWithInput2DimsGPU(colReduction, 6272, 102);
34 BM_FuncWithInput2DimsGPU(colReduction, 25088, 128);
35 BM_FuncWithInput2DimsGPU(colReduction, 6272, 256);
36 BM_FuncWithInput2DimsGPU(colReduction, 1568, 204);
37 BM_FuncWithInput2DimsGPU(colReduction, 1568, 512);
38 BM_FuncWithInput2DimsGPU(colReduction, 1568, 1024);
39 BM_FuncWithInput2DimsGPU(colReduction, 1568, 2048);
40 BM_FuncWithInput2DimsGPU(fullReduction, 1001, 1);
41 BM_FuncWithInput2DimsGPU(fullReduction, 2050048, 1);
42 BM_FuncWithInput2DimsGPU(fullReduction, 2097152, 1);
43 BM_FuncWithInput2DimsGPU(fullReduction, 2048, 1);
44 BM_FuncWithInput2DimsGPU(fullReduction, 262144, 1);
45 BM_FuncWithInput2DimsGPU(fullReduction, 256, 1);
46 BM_FuncWithInput2DimsGPU(fullReduction, 589824, 1);
47 BM_FuncWithInput2DimsGPU(fullReduction, 1024, 1);
48 BM_FuncWithInput2DimsGPU(fullReduction, 524288, 1);
49 BM_FuncWithInput2DimsGPU(fullReduction, 512, 1);
50 BM_FuncWithInput2DimsGPU(fullReduction, 2359296, 1);
51 BM_FuncWithInput2DimsGPU(fullReduction, 1048576, 1);
52 BM_FuncWithInput2DimsGPU(fullReduction, 131072, 1);
53 BM_FuncWithInput2DimsGPU(fullReduction, 16384, 1);
54 BM_FuncWithInput2DimsGPU(fullReduction, 9408, 1);
55 BM_FuncWithInput2DimsGPU(fullReduction, 64, 1);
56 BM_FuncWithInput2DimsGPU(fullReduction, 4096, 1);
57 BM_FuncWithInput2DimsGPU(fullReduction, 36864, 1);
58 BM_FuncWithInput2DimsGPU(fullReduction, 32768, 1);
59 BM_FuncWithInput2DimsGPU(fullReduction, 128, 1);
60 BM_FuncWithInput2DimsGPU(fullReduction, 147456, 1);
61 BM_FuncWithInput2DimsGPU(fullReduction, 65536, 1);
62 #define BM_FuncGPU(FUNC) \ 63 static void BM_##FUNC(int iters, int N) { \ 64 StopBenchmarkTiming(); \ 65 Eigen::SyclDevice device(&queue); \ 66 BenchmarkSuite<Eigen::SyclDevice, float> suite(device, N); \ 69 BENCHMARK_RANGE(BM_##FUNC, 10, 5000); 71 BM_FuncGPU(rowReduction);
72 BM_FuncGPU(colReduction);
73 BM_FuncGPU(fullReduction);
76 BM_FuncGPU(typeCasting);
81 BM_FuncGPU(shuffling);
84 BM_FuncGPU(broadcasting);
85 BM_FuncGPU(coeffWiseOp);
86 BM_FuncGPU(algebraicFunc);
87 BM_FuncGPU(transcendentalFunc);
89 #define BM_FuncWithInputDimsGPU(FUNC, D1, D2, D3) \ 90 static void BM_##FUNC##_##D1##x##D2##x##D3(int iters, int N) { \ 91 StopBenchmarkTiming(); \ 92 Eigen::SyclDevice device(&queue); \ 93 BenchmarkSuite<Eigen::SyclDevice, float> suite(device, D1, D2, D3); \ 96 BENCHMARK_RANGE(BM_##FUNC##_##D1##x##D2##x##D3, 10, 5000); 108 BM_FuncWithInputDimsGPU(contractionRowMajorAT,
N,
N,
N);
109 BM_FuncWithInputDimsGPU(contractionRowMajorAT, 64,
N,
N);
110 BM_FuncWithInputDimsGPU(contractionRowMajorAT,
N, 64,
N);
111 BM_FuncWithInputDimsGPU(contractionRowMajorAT,
N,
N, 64);
113 BM_FuncWithInputDimsGPU(contractionRowMajorBT,
N,
N,
N);
114 BM_FuncWithInputDimsGPU(contractionRowMajorBT, 64,
N,
N);
115 BM_FuncWithInputDimsGPU(contractionRowMajorBT,
N, 64,
N);
116 BM_FuncWithInputDimsGPU(contractionRowMajorBT,
N,
N, 64);
119 BM_FuncWithInputDimsGPU(contractionRowMajorABT,
N,
N,
N);
120 BM_FuncWithInputDimsGPU(contractionRowMajorABT, 64,
N,
N);
121 BM_FuncWithInputDimsGPU(contractionRowMajorABT,
N, 64,
N);
122 BM_FuncWithInputDimsGPU(contractionRowMajorABT,
N,
N, 64);
125 #define BM_FuncWithKernelDimsGPU(FUNC, DIM1, DIM2) \ 126 static void BM_##FUNC##_##DIM1##x##DIM2(int iters, int N) { \ 127 StopBenchmarkTiming(); \ 128 Eigen::SyclDevice device(&queue); \ 129 BenchmarkSuite<Eigen::SyclDevice, float> suite(device, N); \ 130 suite.FUNC(iters, DIM1, DIM2); \ 132 BENCHMARK_RANGE(BM_##FUNC##_##DIM1##x##DIM2, 128, 5000); 134 BM_FuncWithKernelDimsGPU(convolution, 7, 1);
135 BM_FuncWithKernelDimsGPU(convolution, 1, 7);
136 BM_FuncWithKernelDimsGPU(convolution, 7, 4);
137 BM_FuncWithKernelDimsGPU(convolution, 4, 7);
138 BM_FuncWithKernelDimsGPU(convolution, 7, 64);
139 BM_FuncWithKernelDimsGPU(convolution, 64, 7);
void contractionRowMajor(const Device &device_, TensorIndex num_iters, TensorIndex m_, TensorIndex k_, TensorIndex n_)
void contraction(const Device &device_, TensorIndex num_iters, TensorIndex m_, TensorIndex k_, TensorIndex n_)