| 480 | } |
| 481 | )"; |
| 482 | void puzzle11(Context &ctx) { |
| 483 | printf("\n\nPuzzle 11\n\n"); |
| 484 | static constexpr size_t N = 6; |
| 485 | static constexpr size_t CONV = 3; |
| 486 | static constexpr size_t Wx = 8; |
| 487 | Tensor a = createTensor(ctx, {N}, kf32, makeData<N>().data()); |
| 488 | Tensor b = createTensor(ctx, {CONV}, kf32, makeData<CONV>().data()); |
| 489 | Tensor output = createTensor(ctx, {N}, kf32); |
| 490 | struct Params { |
| 491 | uint32_t size = N; |
| 492 | uint32_t TPB = 8; |
| 493 | }; |
| 494 | |
| 495 | Kernel op = |
| 496 | createKernel(ctx, {kPuzzle11, {N, 1, 1}}, |
| 497 | Bindings{a, b, output}, {Wx, 1, 1}, Params{N}); |
| 498 | showResult<N>(ctx, op, output); |
| 499 | } |
| 500 | |
| 501 | // Puzzle 12 : Prefix Sum |
| 502 | // Implement a kernel that computes a sum over a and stores it in out. |
no test coverage detected