| 360 | } |
| 361 | )"; |
| 362 | void puzzle9(Context &ctx) { |
| 363 | printf("\n\nPuzzle 9\n\n"); |
| 364 | static constexpr size_t N = 8; |
| 365 | static constexpr size_t Wx = 8; |
| 366 | Tensor a = createTensor(ctx, {N}, kf32, makeData<N>().data()); |
| 367 | Tensor output = createTensor(ctx, {N}, kf32); |
| 368 | struct Params { |
| 369 | uint32_t size = N; |
| 370 | }; |
| 371 | |
| 372 | Kernel op = |
| 373 | createKernel(ctx, {kPuzzle9, {Wx, 1, 1}}, |
| 374 | Bindings{a, output}, {1, 1, 1}, Params{N}); |
| 375 | showResult<N>(ctx, op, output); |
| 376 | } |
| 377 | |
| 378 | // Puzzle 10 : Dot Product |
| 379 | // Implement a kernel that computes the dot-product of a and b and stores it in out. |
no test coverage detected