|
Mila
Deep Neural Network Library
|
Transformer-owned shared activation workspace for QwenAttentionBlock (pooling). More...
Public Types | |
| using | MR = typename DeviceTypeTraits<TDeviceType>::memory_resource |
| using | TensorType = Tensor<TPrecision, MR> |
Public Member Functions | |
| std::size_t | deviceStorageBytes () const |
| Total device bytes held, for memory accounting. | |
Transformer-owned shared activation workspace for QwenAttentionBlock (pooling).
One slot set serves every layer: the inference path is strictly sequential, so exactly one block is live at a time. Slots are sized [B, chunk, width]; components view prefixes. The single stream slot is alias-safe – a block's input is last read at res_1, mid-block, and only overwritten by its own res_2 at block end.
The DeltaNet block will need a DIFFERENT workspace (chunk-parallel delta-rule buffers, convolution staging), which is exactly the mismatch section 7 records against ITransformerBlock's concrete GqaState. Keeping this struct per-block-kind rather than per-family is what leaves room for that.