Partial Fully Connected Layers
Split MAC Issue and Collect
fullyConnectedTileBlock launches the MEU and immediately reads the accumulators with accsum, which stalls until the MAC has finished. When the caller has independent work to do in that window (a flow read into another buffer, ALU work on earlier results), a MacDescriptor can be used to seperate the issuing and collection stages of the mac allowing for better pipelining.
const nn::MacDescriptor<nn::MacType::Int8, std::int32_t> mac;
mac.start<K>(qGateTile);
upWeightsFlow.issueRead(); // lands while the MAC runs
qGateAcc += mac.collect(qGateTile);
Between start and collect the operand must not change, the broadcast FIFO the MEU is consuming must not be popped, the accumulators must not be cleared, and the BroadcastFlow feeding the MAC must outlive the collect. Writes to core special registers stall until the MEU is idle, so they are safe but forfeit the overlap.
