Python class
AlwaysSignalBuffersMixin
AlwaysSignalBuffersMixinโ
class max.pipelines.lib.AlwaysSignalBuffersMixin
Bases: object
Mixin for models that always require signal buffers.
Use this for models that use VocabParallelEmbedding or other distributed components that always perform allreduce, even on single-device setups.
Models using this mixin build graphs that always include signal buffer inputs, regardless of device count. This is typically because they use distributed embedding layers or other components that call allreduce operations unconditionally.
devicesโ
Device list that must be provided by the model class.
signal_buffersโ
Override to always create signal buffers.
Models using this mixin have distributed components that always perform allreduce, even for single-device setups. Therefore, signal buffers are always required to match the graph inputs.
In compile-only mode (virtual device mode), returns an empty list to avoid GPU memory allocation which is not supported.
-
Returns:
-
List of signal buffer tensors, one per device, or empty list in compile-only mode.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!