Conformance tooling¶
- class torch_lattice_conformance.generate.SparseInputSpec(channels, batch_size, spatial_shape, rows_per_batch, dtype=torch.float32, stride=(1, 1, 1))[source]¶
Bases:
object- Parameters:
- class torch_lattice_conformance.generate.FuzzCase(name, family, seed, output_kind, input_mode, rtol, atol, metadata)[source]¶
Bases:
object- Parameters:
name (str)
family (Literal['sparse_classifier', 'sparse_feature_chain', 'sparse_branch', 'target_branch', 'transpose_chain', 'generative_transpose', 'point_voxel', 'quantized_classifier'])
seed (int)
output_kind (Literal['dense', 'sparse'])
input_mode (Literal['sparse_kwargs', 'dense_kwargs'])
rtol (float)
atol (float)
- class torch_lattice_conformance.generate.SparseChainModel(stages, *, global_pool=None, head=None)[source]¶
Bases:
Module- Parameters:
stages (list[nn.Module])
global_pool (nn.Module | None)
head (nn.Module | None)
- 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.- Parameters:
x (SparseTensor)
- class torch_lattice_conformance.generate.SparseBranchModel(left, right, tail, *, merge, join)[source]¶
Bases:
Module- Parameters:
left (nn.Module)
right (nn.Module)
tail (nn.Module)
merge (Literal['add', 'cat'])
join (Literal['inner', 'outer'])
- 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.- Return type:
- Parameters:
x (SparseTensor)
- class torch_lattice_conformance.generate.TargetBranchModel(pre, target_conv)[source]¶
Bases:
Module- Parameters:
pre (nn.Module)
target_conv (spnn.Conv3d)
- forward(x, target)[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.- Return type:
- Parameters:
x (SparseTensor)
target (SparseTensor)
- class torch_lattice_conformance.generate.PointVoxelRoundTrip(*, voxel_size, origin, reduction, interpolation)[source]¶
Bases:
Module- Parameters:
- forward(points, features, batch_indices, active_rows)[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.
- torch_lattice_conformance.e2e.generate(root)[source]¶
Write the complete deterministic cross-runtime fixture corpus.
- class torch_lattice_conformance.e2e.SparseClassifier[source]¶
Bases:
Module- 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.- Return type:
- Parameters:
x (SparseTensor)
- class torch_lattice_conformance.e2e.QuantizedClassifier[source]¶
Bases:
Module- 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.- Return type:
- Parameters:
x (SparseTensor)
- class torch_lattice_conformance.e2e.TargetBranch[source]¶
Bases:
Module- forward(x, target)[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.- Return type:
- Parameters:
x (SparseTensor)
target (SparseTensor)
- class torch_lattice_conformance.e2e.PointVoxel(*args, **kwargs)[source]¶
Bases:
Module- forward(points, features, batch_indices, active_rows)[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 torch_lattice_conformance.e2e.TransposeConvolution[source]¶
Bases:
Module- 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.- Return type:
- Parameters:
x (SparseTensor)
- class torch_lattice_conformance.e2e.GenerativeTransposeConvolution[source]¶
Bases:
Module- 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.- Return type:
- Parameters:
x (SparseTensor)
- class torch_lattice_conformance.e2e.NormalizedConvolution[source]¶
Bases:
Module- 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.- Return type:
- Parameters:
x (SparseTensor)
- class torch_lattice_conformance.e2e.CanonicalKernelLayout[source]¶
Bases:
ModuleNon-cubic row-distinct kernel used to lock the artifact ABI.
- 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.- Return type:
- Parameters:
x (SparseTensor)
- class torch_lattice_conformance.e2e.PoolTranspose[source]¶
Bases:
Module- forward(source, target)[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.- Return type:
- Parameters:
source (SparseTensor)
target (SparseTensor)
- class torch_lattice_conformance.e2e.TargetTransposeConvolution[source]¶
Bases:
Module- forward(source, target)[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.- Return type:
- Parameters:
source (SparseTensor)
target (SparseTensor)
- class torch_lattice_conformance.e2e.TrilinearUpsample[source]¶
Bases:
Module- forward(source, target)[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.- Return type:
- Parameters:
source (SparseTensor)
target (SparseTensor)
- class torch_lattice_conformance.e2e.SparseReindex(*args, **kwargs)[source]¶
Bases:
Module- forward(source, target)[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.- Return type:
- Parameters:
source (SparseTensor)
target (SparseTensor)
- class torch_lattice_conformance.e2e.GameleonReproductionBlock[source]¶
Bases:
ModuleCompact training/export gate for Gameleon’s sparse decoder routes.
- 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.- Return type:
- Parameters:
x (SparseTensor)