{"id":24618,"library":"spconv-cu126","title":"spconv (CUDA 12.6)","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.","status":"active","version":"2.3.8","language":"python","source_language":"en","source_url":"https://github.com/traveller59/spconv","tags":["sparse convolution","3d","point cloud","cuda","pytorch"],"install":[{"cmd":"pip install spconv-cu126","lang":"bash","label":"Install for CUDA 12.6"}],"dependencies":[{"reason":"Runtime dependency; spconv builds on PyTorch tensors and CUDA.","package":"torch","optional":false}],"imports":[{"wrong":"from spconv import SparseConv3d","symbol":"SparseConv3d","correct":"from spconv import SparseConv3d"}],"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."},"warnings":[{"fix":"Port code from v1.x patterns (e.g., SparseConv3d import path changed from spconv.conv to spconv).","message":"spconv v2.x is not compatible with spconv v1.x; the API and internal data structures changed completely.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Match the CUDA major version of your PyTorch installation. Check with: torch.version.cuda","message":"The 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.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Ensure coordinates tensor is .int() (int32) before passing to SparseConvTensor.","message":"SparseConvTensor indices must be integer tensors of type torch.int32 (or convertible). Using torch.int64 may silently fail or throw an error.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'12.6':3,20 '2.3.8':17 '3.9':23 '3d':12,39 'bump':31 'cadenc':25 'cloud':14,41 'coincid':32 'convolut':6,38 'cuda':2,19,42 'irregular':27 'librari':7 'major':29 'optim':10 'point':13,40 'process':15 'python':22 'pytorch':9,43 'pytorch/cuda':34 'releas':24 'spars':5,37 'spatial':4 'spconv':1 'support':18,36 'version':16,30,35","created_at":"2026-05-01T08:14:02.478374+00:00","updated_at":"2026-05-01T08:14:02.478374+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'SparseConv3d' from 'spconv' (/tmp/tmpg1yrzi2r/venv/lib/python3.12/site-packages/spconv/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.3.8","cli_name":"","cli_version":null,"type":"library","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,"categories":["ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}