| 22 | namespace { |
| 23 | |
| 24 | int64_t get_grid_size(int64_t nr_elements, int64_t block_size) { |
| 25 | // unroll three times in the kernel |
| 26 | int64_t a = nr_elements / (block_size * 2); |
| 27 | int64_t b = (nr_elements - 1) / (block_size * 3) + 1; |
| 28 | return std::max(a, b); |
| 29 | } |
| 30 | |
| 31 | template <int out_dim, typename ctype> |
| 32 | void setup_and_launch(const JITExecutor* fusion_opr, CUfunction func, int block_size) { |
no test coverage detected