"""spconv.pytorch stub.""" import torch import torch.nn as nn from enum import IntEnum class ConvAlgo: Native = 0 MaskImplicitGemm = 1 class SparseConvTensor: def __init__(self, features=None, indices=None, spatial_shape=None, batch_size=1): self.features = features self.indices = indices self.spatial_shape = spatial_shape self.batch_size = batch_size def SubMConv3d(in_channels, out_channels, kernel_size, bias=True, indice_key=None, algo=None, **kw): raise NotImplementedError("spconv stub: SubMConv3d not implemented for ZeroGPU") def SparseConv3d(in_channels, out_channels, kernel_size, stride=1, padding=0, bias=True, indice_key=None, algo=None, **kw): raise NotImplementedError("spconv stub: SparseConv3d not implemented for ZeroGPU") def SparseInverseConv3d(in_channels, out_channels, kernel_size, indice_key=None, bias=True, algo=None, **kw): raise NotImplementedError("spconv stub: SparseInverseConv3d not implemented for ZeroGPU") def SparseSequential(*args): return nn.Sequential(*args)