| 91 | |
| 92 | template<typename T> |
| 93 | void range(Param<T> out, const int dim) { |
| 94 | constexpr int RANGE_TX = 32; |
| 95 | constexpr int RANGE_TY = 8; |
| 96 | constexpr int RANGE_TILEX = 512; |
| 97 | constexpr int RANGE_TILEY = 32; |
| 98 | |
| 99 | sycl::range<2> local(RANGE_TX, RANGE_TY); |
| 100 | |
| 101 | int blocksPerMatX = divup(out.info.dims[0], RANGE_TILEX); |
| 102 | int blocksPerMatY = divup(out.info.dims[1], RANGE_TILEY); |
| 103 | sycl::range<2> global(local[0] * blocksPerMatX * out.info.dims[2], |
| 104 | local[1] * blocksPerMatY * out.info.dims[3]); |
| 105 | sycl::nd_range<2> ndrange(global, local); |
| 106 | |
| 107 | getQueue().submit([&](sycl::handler& h) { |
| 108 | write_accessor<T> out_acc{*out.data, h}; |
| 109 | |
| 110 | h.parallel_for(ndrange, rangeOp<T>(out_acc, out.info, dim, |
| 111 | blocksPerMatX, blocksPerMatY)); |
| 112 | }); |
| 113 | ONEAPI_DEBUG_FINISH(getQueue()); |
| 114 | } |
| 115 | |
| 116 | } // namespace kernel |
| 117 | } // namespace oneapi |
no test coverage detected