| 110 | using KernType = KernelGen::KernelPack::KernType; |
| 111 | |
| 112 | static inline bool check_layout_equal(const Layout& l1, const Layout& l2) { |
| 113 | bool ok_dim = l1.nr_dim == l2.nr_dim && l1.format == l2.format; |
| 114 | if (!ok_dim) { |
| 115 | return false; |
| 116 | } |
| 117 | for (int i = 0; i < l1.nr_dim; ++i) { |
| 118 | bool ok_shape = l1.dims[i] == l2.dims[i] && l1.stride[i] == l2.stride[i]; |
| 119 | if (!ok_shape) { |
| 120 | return false; |
| 121 | } |
| 122 | } |
| 123 | return true; |
| 124 | } |
| 125 | PerformanceResult proxy_kernel( |
| 126 | TensorNDArray tensor_array, StdKernelCall func, StdKernelInitCall init_func, |
| 127 | StdKernelWorkspaceCall workspace_func, StdKernelDeduceCall deduce_func, |