SPAC-4B-ZeroGPU / spac /sparse /__init__.py
Jack04810's picture
Build and validate native SPAC extensions for ZeroGPU Blackwell
c83d2d6 verified
Raw History Blame Contribute Delete
786 Bytes
"""TorchSparse primitives used by the released SPAC VQ-VAE."""
import importlib
BACKEND = "torchsparse"
ATTN = "sdpa"
DEBUG = False
_MODULES = {
"SparseTensor": "basic",
"sparse_batch_broadcast": "basic",
"sparse_batch_op": "basic",
"sparse_unbind": "basic",
"SparseGroupNorm32": "norm",
"SparseSiLU": "nonlinearity",
"SparseGELU": "nonlinearity",
"SparseTanh": "nonlinearity",
"SparseLinear": "linear",
"SparseConv3d": "conv",
"SparseDownsample": "spatial",
"SparseSubdivide": "spatial",
}
def __getattr__(name):
if name not in _MODULES:
raise AttributeError(name)
value = getattr(importlib.import_module(f".{_MODULES[name]}", __name__), name)
globals()[name] = value
return value
__all__ = list(_MODULES)