| 120 | } |
| 121 | )"; |
| 122 | void puzzle4(Context &ctx) { |
| 123 | printf("\n\nPuzzle 4\n\n"); |
| 124 | static constexpr size_t Wx = 3; |
| 125 | static constexpr size_t Wy = 3; |
| 126 | static constexpr size_t N = 2; |
| 127 | Tensor input = createTensor(ctx, {N, N}, kf32, makeData<N * N>().data()); |
| 128 | Tensor output = createTensor(ctx, {N, N}, kf32); |
| 129 | struct Params { |
| 130 | uint32_t size = N; |
| 131 | }; |
| 132 | Kernel op = |
| 133 | createKernel(ctx, {kPuzzle4, /*workgroup size*/ {Wx, Wy, 1}}, |
| 134 | Bindings{input, output}, /* nWorkgroups */ {1, 1, 1}, Params{N}); |
| 135 | showResult<N, N, N>(ctx, op, output); |
| 136 | } |
| 137 | |
| 138 | // Puzzle 5 : Broadcast |
| 139 | // Implement a kernel that adds a and b and stores it in out. Inputs a and b |
nothing calls this directly
no test coverage detected