| 256 | } |
| 257 | |
| 258 | void testAttention(Context &ctx) { |
| 259 | static constexpr size_t B = 6; |
| 260 | static constexpr size_t T = 32; // token index |
| 261 | static constexpr size_t C = 3072; // input channels |
| 262 | static constexpr size_t QKV_DIM = 256; |
| 263 | static constexpr size_t N_HEADS = 12; |
| 264 | static constexpr size_t OC = |
| 265 | QKV_DIM * N_HEADS * 3; // output channels, 3 for Q, K, V |
| 266 | std::array<float, B * T * C> inputArr; |
| 267 | std::array<float, B * OC> outputArr; |
| 268 | std::array<float, C * OC> weightArr; |
| 269 | } |
| 270 | |
| 271 | int main(int argc, char **argv) { |
| 272 | Context ctx = createContext(); |
nothing calls this directly
no outgoing calls
no test coverage detected