| 377 | } |
| 378 | )"; |
| 379 | void puzzle11(Context &ctx) { |
| 380 | printf("\n\nPuzzle 11\n\n"); |
| 381 | static constexpr size_t N = 6; |
| 382 | static constexpr size_t CONV = 3; |
| 383 | static constexpr size_t Wx = 8; |
| 384 | Tensor a = createTensor(ctx, {N}, kf32, makeData<N>().data()); |
| 385 | Tensor b = createTensor(ctx, {CONV}, kf32, makeData<CONV>().data()); |
| 386 | Tensor output = createTensor(ctx, {N}, kf32); |
| 387 | struct Params { |
| 388 | uint32_t size = N; |
| 389 | uint32_t TPB = 8; |
| 390 | }; |
| 391 | |
| 392 | Kernel op = |
| 393 | createKernel(ctx, {kPuzzle11, {N, 1, 1}}, |
| 394 | Bindings{a, b, output}, {Wx, 1, 1}, Params{N}); |
| 395 | showResult<N>(ctx, op, output); |
| 396 | } |
| 397 | |
| 398 | // Puzzle 12 : Prefix Sum |
| 399 | // Implement a kernel that computes a sum over a and stores it in out. |
nothing calls this directly
no test coverage detected