Registry / ai-ml / spconv-cu126

spconv-cu126

JSON →
library2.3.8pypypiunverified

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.

pip install spconv-cu126
INSTALL
IMPORT
SIG · SPCONV-CU126
S
spconv-cu126
ai-mlpythonv2.3.8
Install
13.6s avg
Import
—
Disk
514MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.9–3.13
musl
3.9–3.13
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
musl
py 3.10–3.95 runs
build_error
glibc
py 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])
Debug
Known issues
breakingspconv v2.x is not compatible with spconv v1.x; the API and internal data structures changed completely.
fix
Port code from v1.x patterns (e.g., SparseConv3d import path changed from spconv.conv to spconv).
affects: >=2.0.0
gotchaThe library provides separate wheels for each CUDA version (e.g., spconv-cu118, spconv-cu121, spconv-cu126). Installing the wrong wheel may cause CUDA runtime errors.
fix
Match the CUDA major version of your PyTorch installation. Check with: torch.version.cuda
affects: >=2.0.0
gotchaSparseConvTensor indices must be integer tensors of type torch.int32 (or convertible). Using torch.int64 may silently fail or throw an error.
fix
Ensure coordinates tensor is .int() (int32) before passing to SparseConvTensor.
affects: all
Upgrade
Version history
2.3.8latest on PyPI · released Dec 15, 2024
Audit
Dependencies
torchrequiredRuntime dependency; spconv builds on PyTorch tensors and CUDA.
Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources