Block#
- class sionna.phy.block.Block(*args: Any, precision: Literal['single', 'double'] | None = None, device: str | None = None, **kwargs: Any)[source]#
Bases:
sionna.phy.object.ObjectAbstract class for Sionna PHY processing blocks.
All Sionna PHY processing blocks inherit from this class. It provides automatic input casting to the block’s precision, lazy building based on input shapes, and compatibility with
torch.compile.- Parameters:
precision (Literal['single', 'double'] | None) – Precision used for internal calculations and outputs. None (default) |
"single"|"double". If None,precisionis used. Defaults to None.device (str | None) – Device for computation (e.g.,
'cpu','cuda:0'). If None,deviceis used. Defaults to None.args (Any)
kwargs (Any)
Methods
- build(*arg_shapes, **kwarg_shapes)[source]#
Initialize the block based on the inputs’ shapes.
Subclasses can override this method to create tensors or sub-blocks whose sizes depend on the input shapes.
- Parameters:
*arg_shapes – Shapes of the positional arguments. Can be tuples (for tensors) or nested structures thereof (for lists/dicts of tensors).
**kwarg_shapes – Shapes of the keyword arguments. Can be tuples (for tensors) or nested structures thereof (for lists/dicts of tensors).
Attributes