| 338 | } |
| 339 | )"; |
| 340 | void puzzle10(Context &ctx) { |
| 341 | printf("\n\nPuzzle 10\n\n"); |
| 342 | static constexpr size_t N = 8; |
| 343 | static constexpr size_t Wx = 8; |
| 344 | Tensor a = createTensor(ctx, {N}, kf32, makeData<N>().data()); |
| 345 | Tensor b = createTensor(ctx, {N}, kf32, makeData<N>().data()); |
| 346 | Tensor output = createTensor(ctx, {1}, kf32); |
| 347 | struct Params { |
| 348 | uint32_t size = N; |
| 349 | }; |
| 350 | |
| 351 | Kernel op = |
| 352 | createKernel(ctx, {kPuzzle10, {Wx, 1, 1}}, |
| 353 | Bindings{a, b, output}, {1, 1, 1}, Params{N}); |
| 354 | showResult<1>(ctx, op, output); |
| 355 | } |
| 356 | |
| 357 | // Puzzle 11 : Convolution |
| 358 | // Implement a kernel that computes a 1D convolution between a and b and stores it in out. |
nothing calls this directly
no test coverage detected