onnx_diagnostic.torch_export_patches.eval.model_cases

class onnx_diagnostic.torch_export_patches.eval.model_cases.AtenAsStrided[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.AtenInterpolate(*args, **kwargs)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.AtenNonZero(*args, **kwargs)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.AtenNonZeroTuple(*args, **kwargs)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.AtenRollPos(*args, **kwargs)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.AtenRollRelu(*args, **kwargs)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.BuildInIsInstance(n_dims: int = 3, n_targets: int = 1)[source][source]
forward(x, lx: list | Tensor)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.BuildInLen(n_dims: int = 3, n_targets: int = 1)[source][source]
forward(x, lx: list)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.ComplexPolar(*args, **kwargs)[source][source]
forward(x, angle)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.ControlFlowCond(*args, **kwargs)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.ControlFlowCond2Inputs(*args, **kwargs)[source][source]
forward(x, y)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.ControlFlowCond2Outputs(*args, **kwargs)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.ControlFlowCondConstant(*args, **kwargs)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.ControlFlowCondIdentity_153832(*args, **kwargs)[source][source]

#153832

forward(x, y)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.ControlFlowCondNestedModule[source][source]
class Submodule[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.ControlFlowCondNonZero(*args, **kwargs)[source][source]
forward(input_ids, image_features, vocab_size)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.ControlFlowNestCond(*args, **kwargs)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.ControlFlowScan(*args, **kwargs)[source][source]
static add(carry: Tensor, y: Tensor)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.ControlFlowScan2Carried(*args, **kwargs)[source][source]
static add(carry1: Tensor, carry2: Tensor, y1: Tensor, y2: Tensor)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.ControlFlowScanCDist(*args, **kwargs)[source][source]
static dist(carry: Tensor, x: Tensor)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.ControlFlowScanCDist2(*args, **kwargs)[source][source]
static dist(unused: Tensor, x: Tensor, samex: Tensor)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.ControlFlowScanCDistXY(*args, **kwargs)[source][source]
static dist(y: Tensor, scanned_x: Tensor)[source][source]
forward(x, y)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.ControlFlowScanDecomposition_151564(*args, **kwargs)[source][source]

#151564

classmethod dummy_loop(padded: Tensor, pos: Tensor)[source][source]
classmethod dummy_loop_with_scan(padded: Tensor, pos: Tensor)[source][source]
forward(images, position)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

classmethod select_when_exporting(f, f_scan)[source][source]
class onnx_diagnostic.torch_export_patches.eval.model_cases.ControlFlowScanInplace_153705(*args, **kwargs)[source][source]

#153705

forward(x, y)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.CreateFromShape(*args, **kwargs)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.CreateFromShapeThroughFunction(*args, **kwargs)[source][source]
static add_one(dim)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.CropLastDimensionWithTensorContent(*args, **kwargs)[source][source]
forward(x, shape)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.CropLastDimensionWithTensorShape(*args, **kwargs)[source][source]
forward(x, y)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.InplaceAdd[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.InplaceAdd2[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.InplaceAdd_Mul[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.InplaceCloneAdd_[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.InplaceSetItemEllipsis_1[source][source]
forward(index, update)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.InplaceSetItemEllipsis_2[source][source]
forward(index, update)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.InplaceSetItemMask(*args, **kwargs)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.InplaceSetItemSquare(*args, **kwargs)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.InplaceSetItemSquareAdd(*args, **kwargs)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.InplaceSetItemSquareAdd2(*args, **kwargs)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.SignatureFloat1(n_dims: int = 3, n_targets: int = 1)[source][source]
forward(x, alpha: float = 2.0)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.SignatureInt1(n_dims: int = 3, n_targets: int = 1)[source][source]
forward(x, i: int = 2)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.SignatureInt2(n_dims: int = 3, n_targets: int = 1)[source][source]
forward(x, i: int = 2)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.SignatureListFixedLength(n_dims: int = 3, n_targets: int = 1)[source][source]
forward(x, lx: list)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.SignatureListFixedWithNone(*args, **kwargs)[source][source]
forward(lx)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.SignatureListVariableLength(n_dims: int = 3, n_targets: int = 1)[source][source]
forward(x, lx: list)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.SignatureShapeAsIndex(n_dims: int = 3, n_targets: int = 1)[source][source]
forward(x, y)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class onnx_diagnostic.torch_export_patches.eval.model_cases.TypeBFloat16(*args, **kwargs)[source][source]
forward(x)[source][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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.