Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 10 committers (10.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.4%) to scientific vocabulary
Keywords
Repository
Spatial Sparse Convolution Library
Basic Info
Statistics
- Stars: 2,113
- Watchers: 22
- Forks: 385
- Open Issues: 183
- Releases: 0
Topics
Metadata Files
README.md
SpConv: Spatially Sparse Convolution Library
| | PyPI | Install |Downloads |
| -------------- |:---------------------:| ---------------------:| ---------------------:|
| CPU (Linux Only) | |
pip install spconv | |
| CUDA 10.2 |
|
pip install spconv-cu102| |
| CUDA 11.3 |
|
pip install spconv-cu113| |
| CUDA 11.4 |
|
pip install spconv-cu114| |
| CUDA 11.6 |
|
pip install spconv-cu116| |
| CUDA 11.7 |
|
pip install spconv-cu117| |
| CUDA 11.8 |
|
pip install spconv-cu118| |
| CUDA 12.0 |
|
pip install spconv-cu120| |
spconv is a project that provide heavily-optimized sparse convolution implementation with tensor core support. check benchmark to see how fast spconv 2.x runs.
Spconv 1.x code. We won't provide any support for spconv 1.x since it's deprecated. use spconv 2.x if possible. <!--remove this message in spconv 2.2-->
Check spconv 2.x algorithm introduction to understand sparse convolution algorithm in spconv 2.x!
WARNING
Use spconv >= cu114 if possible. cuda 11.4 can compile greatly faster kernel in some situation.
Update Spconv: you MUST UNINSTALL all spconv/cumm/spconv-cuxxx/cumm-cuxxx first, use pip list | grep spconv and pip list | grep cumm to check all installed package. then use pip to install new spconv.
NEWS
spconv 2.3: int8 quantization support. see docs and examples for more details.
spconv 2.2: ampere feature support (by EvernightAurora), pure c++ code generation, nvrtc, drop python 3.6
Spconv 2.2 vs Spconv 2.1
- faster fp16 conv kernels (~5-30%) in ampere GPUs (tested in RTX 3090)
- greatly faster int8 conv kernels (~1.2x-2.7x) in ampere GPUs (tested in RTX 3090)
- drop python 3.6 support
- nvrtc support: kernel in old GPUs will be compiled in runtime.
- libspconv: pure c++ build of all spconv ops. see example
- tf32 kernels, faster fp32 training, disabled by default. set
import spconv as spconv_core; spconv_core.constants.SPCONV_ALLOW_TF32 = Trueto enable them. - all weights are KRSC layout, some old model can't be loaded anymore.
Spconv 2.1 vs Spconv 1.x
- spconv now can be installed by pip. see install section in readme for more details. Users don't need to build manually anymore!
- Microsoft Windows support (only windows 10 has been tested).
- fp32 (not tf32) training/inference speed is increased (+50~80%)
- fp16 training/inference speed is greatly increased when your layer support tensor core (channel size must be multiple of 8).
- int8 op is ready, but we still need some time to figure out how to run int8 in pytorch.
- doesn't depend on pytorch binary, but you may need at least pytorch >= 1.5.0 to run spconv 2.x.
- since spconv 2.x doesn't depend on pytorch binary (never in future), it's impossible to support torch.jit/libtorch inference.
Usage
Firstly you need to use import spconv.pytorch as spconv in spconv 2.x.
Then see this.
Don't forget to check performance guide.
Common Solution for Some Bugs
see common problems.
Install
You need to install python >= 3.7 first to use spconv 2.x.
You need to install CUDA toolkit first before using prebuilt binaries or build from source.
You need at least CUDA 11.0 to build and run spconv 2.x. We won't offer any support for CUDA < 11.0.
Prebuilt
We offer python 3.7-3.11 and cuda 10.2/11.3/11.4/11.7/12.0 prebuilt binaries for linux (manylinux).
We offer python 3.7-3.11 and cuda 10.2/11.4/11.7/12.0 prebuilt binaries for windows 10/11.
For Linux users, you need to install pip >= 20.3 first to install prebuilt.
WARNING: spconv-cu117 may require CUDA Driver >= 515.
pip install spconv for CPU only (Linux Only). you should only use this for debug usage, the performance isn't optimized due to manylinux limit (no omp support).
pip install spconv-cu102 for CUDA 10.2
pip install spconv-cu113 for CUDA 11.3 (Linux Only)
pip install spconv-cu114 for CUDA 11.4
pip install spconv-cu117 for CUDA 11.7
pip install spconv-cu120 for CUDA 12.0
NOTE It's safe to have different minor cuda version between system and conda (pytorch) in CUDA >= 11.0 because of CUDA Minor Version Compatibility. For example, you can use spconv-cu114 with anaconda version of pytorch cuda 11.1 in a OS with CUDA 11.2 installed.
NOTE In Linux, you can install spconv-cuxxx without install CUDA to system! only suitable NVIDIA driver is required. for CUDA 11, we need driver >= 450.82. You may need newer driver if you use newer CUDA. for cuda 11.8, you need to have driver >= 520 installed.
Prebuilt GPU Support Matrix
See this page to check supported GPU names by arch.
If you use a GPU architecture that isn't compiled in prebuilt, spconv will use NVRTC to compile a slightly slower kernel.
| CUDA version | GPU Arch List | | -------------- |:---------------------:| | 11.1~11.7 | 52,60,61,70,75,80,86 | | 11.8+ | 60,70,75,80,86,89,90 |
Build from source for development (JIT, recommend)
The c++ code will be built automatically when you change c++ code in project.
For NVIDIA Embedded Platforms, you need to specify cuda arch before build: export CUMM_CUDA_ARCH_LIST="7.2" for xavier, export CUMM_CUDA_ARCH_LIST="6.2" for TX2, export CUMM_CUDA_ARCH_LIST="8.7" for orin.
You need to remove cumm in requires section in pyproject.toml after install editable cumm and before install spconv due to pyproject limit (can't find editable installed cumm).
You need to ensure pip list | grep spconv and pip list | grep cumm show nothing before install editable spconv/cumm.
Linux
- uninstall spconv and cumm installed by pip
- install build-essential, install CUDA
git clone https://github.com/FindDefinition/cumm,cd ./cumm,pip install -e .git clone https://github.com/traveller59/spconv,cd ./spconv,pip install -e .- in python,
import spconvand wait for build finish.
Windows
- uninstall spconv and cumm installed by pip
- install visual studio 2019 or newer. make sure C++ development component is installed. install CUDA
- set powershell script execution policy
- start a new powershell, run
tools/msvc_setup.ps1 git clone https://github.com/FindDefinition/cumm,cd ./cumm,pip install -e .git clone https://github.com/traveller59/spconv,cd ./spconv,pip install -e .- in python,
import spconvand wait for build finish.
Build wheel from source (not recommend, this is done in CI.)
You need to rebuild cumm first if you are build along a CUDA version that not provided in prebuilts.
Linux
- install build-essential, install CUDA
- run
export SPCONV_DISABLE_JIT="1" - run
pip install pccm cumm wheel - run
python setup.py bdist_wheel+pip install dists/xxx.whl
Windows
- install visual studio 2019 or newer. make sure C++ development component is installed. install CUDA
- set powershell script execution policy
- start a new powershell, run
tools/msvc_setup.ps1 - run
$Env:SPCONV_DISABLE_JIT = "1" - run
pip install pccm cumm wheel - run
python setup.py bdist_wheel+pip install dists/xxx.whl
Citation
If you find this project useful in your research, please consider cite:
latex
@misc{spconv2022,
title={Spconv: Spatially Sparse Convolution Library},
author={Spconv Contributors},
howpublished = {\url{https://github.com/traveller59/spconv}},
year={2022}
}
Contributers
- EvernightAurora: add ampere feature.
Note
The work is done when the author is an employee at Tusimple.
LICENSE
Apache 2.0
Owner
- Name: Yan Yan
- Login: traveller59
- Kind: user
- Repositories: 3
- Profile: https://github.com/traveller59
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - name: "Spconv Contributors" title: "Spconv: Spatially Sparse Convolution Library" date-released: 2022-10-12 url: "https://github.com/traveller59/spconv" license: Apache-2.0
GitHub Events
Total
- Issues event: 36
- Watch event: 240
- Issue comment event: 88
- Push event: 4
- Pull request event: 5
- Fork event: 22
- Create event: 1
Last Year
- Issues event: 36
- Watch event: 240
- Issue comment event: 88
- Push event: 4
- Pull request event: 5
- Fork event: 22
- Create event: 1
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| yan.yan | y****b@o****m | 115 |
| traveller59 | s****n@f****m | 50 |
| yan.yan | y****r@o****m | 44 |
| xmyqsh | x****h@g****m | 5 |
| tusimple | t****e@d****i | 5 |
| EvernightAurora | 2****8@q****m | 2 |
| Benzlxs | 8****s | 2 |
| benzlxs | x****i@u****u | 2 |
| dev-fennek | 5****k | 1 |
| Mohammad Shahedul Islam | m****m@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 283
- Total pull requests: 15
- Average time to close issues: 4 months
- Average time to close pull requests: 13 days
- Total issue authors: 234
- Total pull request authors: 13
- Average comments per issue: 2.46
- Average comments per pull request: 0.2
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 33
- Pull requests: 6
- Average time to close issues: 29 days
- Average time to close pull requests: 4 minutes
- Issue authors: 31
- Pull request authors: 4
- Average comments per issue: 0.91
- Average comments per pull request: 0.17
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- shuyuan-wang (10)
- akjt (6)
- QING-ML (4)
- hygxy (3)
- hlyyyyy (3)
- ArseniuML (3)
- Miles629 (3)
- konyul (3)
- emilyemliyM (3)
- sun-sey (2)
- rangganast (2)
- Haerxu (2)
- shawnding (2)
- MrForExample (2)
- Gofinge (2)
Pull Request Authors
- xiaohuang2004 (2)
- x1y9 (2)
- zahidpichen (2)
- StefOe (2)
- yinguobing (2)
- FindDefinition (1)
- WanchaoYao (1)
- APassbyDreg (1)
- waveleaf27 (1)
- Jhonve (1)
- JiaqingFu (1)
- huixiancheng (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 13
-
Total downloads:
- pypi 376,680 last-month
- Total docker downloads: 369
-
Total dependent packages: 2
(may contain duplicates) -
Total dependent repositories: 192
(may contain duplicates) - Total versions: 255
- Total maintainers: 1
pypi.org: spconv
spatial sparse convolution
- Homepage: https://github.com/traveller59/spconv
- Documentation: https://spconv.readthedocs.io/
- License: Apache License 2.0
-
Latest release: 2.3.8
published about 1 year ago
Rankings
Maintainers (1)
pypi.org: spconv-cu113
spatial sparse convolution
- Homepage: https://github.com/traveller59/spconv
- Documentation: https://spconv-cu113.readthedocs.io/
- License: Apache License 2.0
-
Latest release: 2.3.6
published almost 3 years ago
Rankings
Maintainers (1)
pypi.org: spconv-cu111
spatial sparse convolution
- Homepage: https://github.com/traveller59/spconv
- Documentation: https://spconv-cu111.readthedocs.io/
- License: Apache License 2.0
-
Latest release: 2.1.25
published over 3 years ago
Rankings
Maintainers (1)
pypi.org: spconv-cu114
spatial sparse convolution
- Homepage: https://github.com/traveller59/spconv
- Documentation: https://spconv-cu114.readthedocs.io/
- License: Apache License 2.0
-
Latest release: 2.3.8
published about 1 year ago
Rankings
Maintainers (1)
proxy.golang.org: github.com/traveller59/spconv
- Documentation: https://pkg.go.dev/github.com/traveller59/spconv#section-documentation
- License: apache-2.0
-
Latest release: v2.3.8+incompatible
published about 1 year ago
Rankings
pypi.org: spconv-cu117
spatial sparse convolution
- Homepage: https://github.com/traveller59/spconv
- Documentation: https://spconv-cu117.readthedocs.io/
- License: Apache License 2.0
-
Latest release: 2.3.6
published almost 3 years ago
Rankings
Maintainers (1)
pypi.org: spconv-cu116
spatial sparse convolution
- Homepage: https://github.com/traveller59/spconv
- Documentation: https://spconv-cu116.readthedocs.io/
- License: Apache License 2.0
-
Latest release: 2.3.6
published almost 3 years ago
Rankings
Maintainers (1)
pypi.org: spconv-cu102
spatial sparse convolution
- Homepage: https://github.com/traveller59/spconv
- Documentation: https://spconv-cu102.readthedocs.io/
- License: Apache License 2.0
-
Latest release: 2.3.6
published almost 3 years ago
Rankings
Maintainers (1)
pypi.org: spconv-cu118
spatial sparse convolution
- Homepage: https://github.com/traveller59/spconv
- Documentation: https://spconv-cu118.readthedocs.io/
- License: Apache License 2.0
-
Latest release: 2.3.8
published about 1 year ago
Rankings
Maintainers (1)
pypi.org: spconv-cu120
spatial sparse convolution
- Homepage: https://github.com/traveller59/spconv
- Documentation: https://spconv-cu120.readthedocs.io/
- License: Apache License 2.0
-
Latest release: 2.3.6
published almost 3 years ago
Rankings
Maintainers (1)
pypi.org: spconv-cu121
spatial sparse convolution
- Homepage: https://github.com/traveller59/spconv
- Documentation: https://spconv-cu121.readthedocs.io/
- License: Apache License 2.0
-
Latest release: 2.3.8
published about 1 year ago
Rankings
Maintainers (1)
pypi.org: spconv-cu126
spatial sparse convolution
- Homepage: https://github.com/traveller59/spconv
- Documentation: https://spconv-cu126.readthedocs.io/
- License: Apache License 2.0
-
Latest release: 2.3.8
published about 1 year ago
Rankings
Maintainers (1)
pypi.org: spconv-cu124
spatial sparse convolution
- Homepage: https://github.com/traveller59/spconv
- Documentation: https://spconv-cu124.readthedocs.io/
- License: Apache License 2.0
-
Latest release: 2.3.8
published about 1 year ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout master composite
- actions/setup-python v4 composite
- dorny/paths-filter v2 composite
- ilammy/msvc-dev-cmd v1 composite
- pypa/gh-action-pypi-publish release/v1 composite
- actions/stale v4 composite