| 609 | } |
| 610 | )"; |
| 611 | void puzzle13(Context &ctx) { |
| 612 | printf("\n\nPuzzle 13\n\n"); |
| 613 | static constexpr size_t N = 6; |
| 614 | static constexpr size_t TPB = 8; |
| 615 | static constexpr size_t BATCH = 4; |
| 616 | Tensor a = createTensor(ctx, {BATCH, N}, kf32, makeData<N * BATCH>().data()); |
| 617 | Tensor output = createTensor(ctx, {BATCH}, kf32); |
| 618 | struct Params { |
| 619 | uint32_t TPB = TPB; |
| 620 | uint32_t size = N; |
| 621 | }; |
| 622 | |
| 623 | Kernel op = |
| 624 | createKernel(ctx, {kPuzzle13, {TPB, 1, 1}}, |
| 625 | Bindings{a, output}, {1, BATCH, 1}, Params{TPB, N}); |
| 626 | showResult<BATCH>(ctx, op, output); |
| 627 | } |
| 628 | |
| 629 | // Puzzle 14 : Matrix Multiply!! |
| 630 | // Implement a kernel that computes the matrix product of a and b and stores it in out. |
no test coverage detected