{"library":"spconv-cu126","title":"spconv (CUDA 12.6)","type":"library","description":"Spatial sparse convolution library for PyTorch, optimized for 3D point cloud processing. Version 2.3.8 supports CUDA 12.6 and Python >=3.9. Release cadence is irregular, with major version bumps coinciding with PyTorch/CUDA version support.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install spconv-cu126"],"cli":null},"imports":["from spconv import SparseConv3d","from spconv import SparseSequential","from spconv import SparseConvTensor"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/traveller59/spconv","docs":null,"changelog":null,"pypi":"https://pypi.org/project/spconv-cu126/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"import torch\nfrom spconv import SparseConv3d, SparseSequential, SparseConvTensor\n\n# Create a sparse tensor (batch_size=1, channels=4, depth=10, height=10, width=10)\ncoords = torch.randint(0, 10, (100, 4)).int()  # (n_points, 4) -> batch_idx, x, y, z\ncoords[:, 0] = 0  # batch index 0\nfeatures = torch.randn(100, 4)\ntensor = SparseConvTensor(features, coords, spatial_shape=(10, 10, 10), batch_size=1)\n\n# Define a simple sparse 3D convolutional network\nmodel = SparseSequential(\n    SparseConv3d(4, 8, kernel_size=3, padding=1),\n    SparseConv3d(8, 16, kernel_size=3, padding=1),\n)\n\n# Forward pass\noutput = model(tensor)\nprint(output.features.shape)  # torch.Size([100, 16])","lang":"python","description":"Minimal example constructing a SparseConvTensor and passing it through a sparse CNN.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}