| 411 | } |
| 412 | )"; |
| 413 | void puzzle10(Context &ctx) { |
| 414 | printf("\n\nPuzzle 10\n\n"); |
| 415 | static constexpr size_t N = 8; |
| 416 | static constexpr size_t Wx = 8; |
| 417 | Tensor a = createTensor(ctx, {N}, kf32, makeData<N>().data()); |
| 418 | Tensor b = createTensor(ctx, {N}, kf32, makeData<N>().data()); |
| 419 | Tensor output = createTensor(ctx, {1}, kf32); |
| 420 | struct Params { |
| 421 | uint32_t size = N; |
| 422 | }; |
| 423 | |
| 424 | Kernel op = |
| 425 | createKernel(ctx, {kPuzzle10, {Wx, 1, 1}}, |
| 426 | Bindings{a, b, output}, {1, 1, 1}, Params{N}); |
| 427 | showResult<1>(ctx, op, output); |
| 428 | } |
| 429 | |
| 430 | // Puzzle 11 : Convolution |
| 431 | // Implement a kernel that computes a 1D convolution between a and b and stores it in out. |
no test coverage detected