Skip to main content

3D Point Cloud Kernels

Pytorch CPU and CUDA kernels for spatial search and interpolation for 3D point clouds.

PyPI version Deploy Unittests

Installation

Requires torch version 1.0 or higher to be installed before proceeding. Once this is done, simply run

pip install torch-points-kernels

or with poetry:

poetry add torch-points-kernels

To force CUDA installation (for example on Docker builds) please use the flag FORCE_CUDA like

pip install torch-points-kernels FORCE_CUDA=1

Usage

import torch
import torch_points_kernels.points_cuda

Build and test

python setup.py build_ext --inplace
python -m unittest

Troubleshooting

Compilation issues

Ensure that at least PyTorch 1.4.0 is installed and verify that cuda/bin and cuda/include are in your $PATH and $CPATH respectively, e.g.:

$ python -c "import torch; print(torch.__version__)"
>>> 1.4.0

$ echo $PATH
>>> /usr/local/cuda/bin:...

$ echo $CPATH
>>> /usr/local/cuda/include:...

On the compilation, if you have this error: error: cannot call member function 'void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() it means that your nvcc version is too old. The version must be at least 10.1.168. To check the version:

nvcc --version
>>> V10.1.168

Windows compilation

On Windows you may have this error when compiling:

error: member "torch::jit::detail::ModulePolicy::all_slots" may not be initialized
error: member "torch::jit::detail::ParameterPolicy::all_slots" may not be initialized
error: member "torch::jit::detail::BufferPolicy::all_slots" may not be initialized
error: member "torch::jit::detail::AttributePolicy::all_slots" may not be initialized

This requires you to edit some of your pytorch header files, use this script as a guide.

CUDA kernel failed : no kernel image is available for execution on the device

This can happen when trying to run the code on a different GPU than the one used to compile the torch-points-kernels library. Uninstall torch-points-kernels, clear cache, and reinstall after setting the TORCH_CUDA_ARCH_LIST environment variable. For example, for compiling with a Tesla T4 (Turing 7.5) and running the code on a Tesla V100 (Volta 7.0) use:

export TORCH_CUDA_ARCH_LIST="7.0;7.5"

See this useful chart for more architecture compatibility.

Projects using those kernels.

Pytorch Point Cloud Benchmark

Credit

Metadata

Release files for torch-points-kernels 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for torch-points-kernels 0.7.0
File Size Uploaded
torch-points-kernels-0.7.0.tar.gz 44.5 kB Details

Release files / torch-points-kernels-0.7.0.tar.gz

Download URL torch-points-kernels-0.7.0.tar.gz
Size 44.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a93d6c69fe2035e81c066b6ca6d2264cecdb368677152a231a69f686f00f6571
BLAKE2b-256 checksum
How to use checksums
5b166a12bfffb6f3625cf07e1485d61ac92f895dab1bf9dd9cb92b0ad99a6c23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.0 importlib_metadata/3.7.3 packaging/20.9 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release history Release notifications | RSS feed

This release

0.7.0 This release

1 release file

0.6.10

1 release file

0.6.9

1 release file

0.6.8

1 release file

0.6.7

1 release file

0.6.6

1 release file

0.6.5

1 release file

0.6.4

1 release file

0.6.3

1 release file

0.6.2

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page