yobx.torch._model_eval_cases#
- class yobx.torch._model_eval_cases.AtenAsStrided[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.AtenInterpolate(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.AtenNonZero(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.AtenNonZeroTuple(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.AtenRollPos(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.AtenRollRelu(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.BuildInIsInstance(n_dims: int = 3, n_targets: int = 1)[source]#
- forward(x, lx: list | Tensor)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.BuildInLen(n_dims: int = 3, n_targets: int = 1)[source]#
- forward(x, lx: list)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ComplexPolar(*args: Any, **kwargs: Any)[source]#
- forward(x, angle)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ControlFlowCond(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ControlFlowCond2Inputs(*args: Any, **kwargs: Any)[source]#
- forward(x, y)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ControlFlowCond2Outputs(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ControlFlowCondConstant(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ControlFlowCondIdentity_153832(*args: Any, **kwargs: Any)[source]#
-
- forward(x, y)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ControlFlowCondNestedModule[source]#
- class Submodule[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ControlFlowCondNonZero(*args: Any, **kwargs: Any)[source]#
- forward(input_ids, image_features, vocab_size)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ControlFlowNestCond(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ControlFlowScan(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ControlFlowScan2Carried(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ControlFlowScanCDist(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ControlFlowScanCDist2(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ControlFlowScanCDistXY(*args: Any, **kwargs: Any)[source]#
- forward(x, y)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ControlFlowScanDecomposition_151564(*args: Any, **kwargs: Any)[source]#
-
- forward(images, position)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ControlFlowScanInplace_153705(*args: Any, **kwargs: Any)[source]#
-
- forward(x, y)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ControlFlowWhileDec(*args: Any, **kwargs: Any)[source]#
- forward(ci, a, b)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ControlFlowWhileInc(*args: Any, **kwargs: Any)[source]#
- forward(ci, a, b)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.CreateFromShape(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.CreateFromShapeThroughFunction(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.CropLastDimensionWithTensorContent(*args: Any, **kwargs: Any)[source]#
- forward(x, shape)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.CropLastDimensionWithTensorShape(*args: Any, **kwargs: Any)[source]#
- forward(x, y)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ExportWithDimension0(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.ExportWithDimension1(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.InplaceAdd[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.InplaceAdd2[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.InplaceAdd_Mul[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.InplaceCloneAdd_[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.InplaceSetItemEllipsis_1[source]#
- forward(index, update)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.InplaceSetItemEllipsis_2[source]#
- forward(index, update)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.InplaceSetItemMask(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.InplaceSetItemSquare(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.InplaceSetItemSquareAdd(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.InplaceSetItemSquareAdd2(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.SignatureFloat1(n_dims: int = 3, n_targets: int = 1)[source]#
- forward(x, alpha: float = 2.0)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.SignatureInt1(n_dims: int = 3, n_targets: int = 1)[source]#
- forward(x, i: int = 2)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.SignatureInt2(n_dims: int = 3, n_targets: int = 1)[source]#
- forward(x, i: int = 2)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.SignatureListFixedLength(n_dims: int = 3, n_targets: int = 1)[source]#
- forward(x, lx: list)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.SignatureListFixedWithNone(*args: Any, **kwargs: Any)[source]#
- forward(lx)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.SignatureListVariableLength(n_dims: int = 3, n_targets: int = 1)[source]#
- forward(x, lx: list)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.SignatureShapeAsIndex(n_dims: int = 3, n_targets: int = 1)[source]#
- forward(x, y)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.TypeBFloat16(*args: Any, **kwargs: Any)[source]#
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.Vmap(*args: Any, **kwargs: Any)[source]#
- forward(x, y)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class yobx.torch._model_eval_cases.VmapPython(*args: Any, **kwargs: Any)[source]#
- forward(x, y)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- yobx.torch._model_eval_cases.patched_vmap(func, in_dims=0, out_dims=0, use_scan: bool = False)[source]#
Python implementation of
torch.vmap(). The implementation raises an issue when it is being exported withtorch.export.export()when the function is called with non tensors arguments and the batch size is dynamic.