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)
Notes
Input conversion and lazy building happen on every call, so a block behaves the same in eager mode and under
torch.compile.Compiling a block with a traceable
build()before its first call costs one additional trace, becausebuiltchanges during that call. Calling the block once eagerly beforehand avoids the additional trace.With
fullgraph=True,build()must itself be traceable. Call the block once eagerly first ifbuild()createstorch.nn.Parameterinstances or uses unsupported Python or NumPy operations. Otherwise, compilation raisestorch._dynamo.exc.Unsupported. Withoutfullgraph=True, unsupported build operations cause graph breaks instead.Methods
Attributes