GithubHelp home page GithubHelp logo

promaton / torch-points-kernels Goto Github PK

View Code? Open in Web Editor NEW

This project forked from torch-points3d/torch-points-kernels

0.0 0.0 0.0 314 KB

Pytorch kernels for spatial operations on point clouds

License: MIT License

Shell 0.53% C++ 54.29% Python 20.61% C 1.22% Cuda 22.52% Batchfile 0.17% Dockerfile 0.66%

torch-points-kernels's Introduction

3D Point Cloud Kernels

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

PyPI version Deploy Unittests

Installation

Update: we now provide precompiled Conda packages for the latest PyTorch/CUDA combinations (PyTorch >= 1.10.0). To install with conda:

conda install -c torch-points3d torch-points-kernels

Or, you can compile the wheel yourself for any PyTorch/CUDA combination (must have a matching installation of CUDA toolkit):

pip install torch-points-kernels

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

FORCE_CUDA=1 pip install torch-points-kernels

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

torch-points-kernels's People

Contributors

ccinc avatar duducheng avatar humanpose1 avatar hzxie avatar lucagrementieri avatar milesial avatar nicolas-chaulet avatar pre-commit-ci[bot] avatar tchaton avatar tristanheywood avatar uakh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.