FLOPs computation for elementwise_add op. For elementwise_add(input,other): input_shapes = [shape_of_input, shape_of_other] shape_of_input = [dim1, dim2, dim3 ...] shape_of_other = [odim1, odim2, odim3...] equation: flops = max(dim1, odim1) * max(dim2, odim2) * ma
(input_shapes, attrs)
| 174 | |
| 175 | @register_flops("elementwise_add") |
| 176 | def _elementwise_add_flops(input_shapes, attrs): |
| 177 | """FLOPs computation for elementwise_add op. |
| 178 | For elementwise_add(input,other): |
| 179 | input_shapes = [shape_of_input, shape_of_other] |
| 180 | shape_of_input = [dim1, dim2, dim3 ...] |
| 181 | shape_of_other = [odim1, odim2, odim3...] |
| 182 | equation: flops = max(dim1, odim1) * max(dim2, odim2) * max()... |
| 183 | """ |
| 184 | return _elementwise_flops_compute(input_shapes, attrs) |
| 185 | |
| 186 | |
| 187 | @register_flops("elementwise_mul") |
nothing calls this directly
no test coverage detected