| 455 | } |
| 456 | )"; |
| 457 | void puzzle13(Context &ctx) { |
| 458 | printf("\n\nPuzzle 13\n\n"); |
| 459 | static constexpr size_t N = 6; |
| 460 | static constexpr size_t TPB = 8; |
| 461 | static constexpr size_t BATCH = 4; |
| 462 | Tensor a = createTensor(ctx, {BATCH, N}, kf32, makeData<N * BATCH>().data()); |
| 463 | Tensor output = createTensor(ctx, {BATCH}, kf32); |
| 464 | struct Params { |
| 465 | uint32_t TPB = TPB; |
| 466 | uint32_t size = N; |
| 467 | }; |
| 468 | |
| 469 | Kernel op = |
| 470 | createKernel(ctx, {kPuzzle13, {TPB, 1, 1}}, |
| 471 | Bindings{a, output}, {1, BATCH, 1}, Params{TPB, N}); |
| 472 | showResult<BATCH>(ctx, op, output); |
| 473 | } |
| 474 | |
| 475 | // Puzzle 14 : Matrix Multiply!! |
| 476 | // Implement a kernel that computes the matrix product of a and b and stores it in out. |
nothing calls this directly
no test coverage detected