Install & Compatibility
Where this runs
tested against v2.3.8 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
build_error
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 13.6s · import 0.000s · 499MB
514MB installed
● package 514MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
SparseConv3d
✓ from spconv import SparseConv3d
✗ from spconv import SparseConv3d
Minimal example constructing a SparseConvTensor and passing it through a sparse CNN.
import torch
from spconv import SparseConv3d, SparseSequential, SparseConvTensor
# Create a sparse tensor (batch_size=1, channels=4, depth=10, height=10, width=10)
coords = torch.randint(0, 10, (100, 4)).int() # (n_points, 4) -> batch_idx, x, y, z
coords[:, 0] = 0 # batch index 0
features = torch.randn(100, 4)
tensor = SparseConvTensor(features, coords, spatial_shape=(10, 10, 10), batch_size=1)
# Define a simple sparse 3D convolutional network
model = SparseSequential(
SparseConv3d(4, 8, kernel_size=3, padding=1),
SparseConv3d(8, 16, kernel_size=3, padding=1),
)
# Forward pass
output = model(tensor)
print(output.features.shape) # torch.Size([100, 16])
Upgrade
Version history
2.3.8latest on PyPI · released Dec 15, 2024
Audit
Dependencies
torchrequiredRuntime dependency; spconv builds on PyTorch tensors and CUDA.