| 265 | } |
| 266 | )"; |
| 267 | void puzzle8(Context &ctx) { |
| 268 | printf("\n\nPuzzle 8\n\n"); |
| 269 | static constexpr size_t N = 8; |
| 270 | static constexpr size_t Wx = 4; |
| 271 | static constexpr size_t Bx = 2; |
| 272 | Tensor a = createTensor(ctx, {N}, kf32, makeData<N>().data()); |
| 273 | Tensor output = createTensor(ctx, {N}, kf32); |
| 274 | struct Params { |
| 275 | uint32_t size = N; |
| 276 | uint32_t TPB = 8; |
| 277 | }; |
| 278 | |
| 279 | Kernel op = |
| 280 | createKernel(ctx, {kPuzzle8, {Wx, 1, 1}}, |
| 281 | Bindings{a, output}, {Bx, 1, 1}, Params{N, 8}); |
| 282 | showResult<N>(ctx, op, output); |
| 283 | } |
| 284 | |
| 285 | // Puzzle 9 : Pooling |
| 286 | // Implement a kernel that sums together the last 3 position of a and stores it in out. |
nothing calls this directly
no test coverage detected