nerf_pl icon indicating copy to clipboard operation
nerf_pl copied to clipboard

cuda arch 86 not supported

Open eyebies opened this issue 2 years ago • 3 comments

Thanks for sharing the repo ! I am facing issues when I try to setup torchsearchsorted. Whats the easiest way to fix this ? Would it suffice if I just add the arch in the cpp_extension file ? thanks again !

eyebies avatar Mar 30 '22 04:03 eyebies

Cause / Solution:

SM86 requires cuda>=11.1.

You'll have to install PyTorch with support for cuda>=11.1 and update pillow. This will also require using the dev branch, or updating the python scripts manually to use the new searchsorted PyTorch namespace that replaced the torchsearchsorted submodule (the dev branch updates torchsearchsorted to use torch.searchsorted).

Updated Repo Example

Working repo is forked for this example

Patch Dev Branch Example

After cloning the updated dev branch, install the requirements then update PyTorch and pillow.

Steps

  1. Create a conda or venv environment (conda is recommended because it has dependency management).
  2. Activate the environment
  3. Installing the requirements.txt with pip.
  4. Updating Pytorch with conda
  5. Updating pillow with conda

Conda Example

  1. conda create -n nerf_pl
  2. conda activate nerf_pl # Adds conda environment to path temporarily to use the nerf_pl environment
  3. python=3.7 pip install -r requirements.txt
  4. conda install -y pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
  5. conda update pillow -c conda-forge # Through conda because it has dependency management

Additional requirements:

Cuda / Cuda Toolkit / NVIDIA GPU Support in Python

  • Ensure you have the updated NVIDIA drivers installed for the version of Cuda Toolkit required.
  • Same error / GPU unavailable? Check to ensure that the proper version of cuda is installed on your system if you have build issues or the GPU is not available during runtime. Conda and Pip use their own cuda builds for PyTorch with GPU support, but you may need to specify the cuda toolkit path if building PyTorch another way. When running python script, it should use this corresponding cuda build during runtime, but if you have any issues using the GPU try updating your local cuda installation to cuda>11.1 (1.1.6.2+ should work with 11.3, but it never hurts to match the cuda version installed on your machine with the version you want in python).

Recommended tips:

Updates: 2022-09-07 : Added clarification information regarding torchsearchsorted move into PyTorch framework

AngeloSavich avatar Apr 25 '22 08:04 AngeloSavich

This helped me a lot, I will just add that for cloning the dev branch I have used git clone -b dev --recursive https://github.com/kwea123/nerf_pl

So far, everything is working for me. I have Ubuntu 22.04 and CUDA 11.7, GPU: RTX 3090.

povolann avatar Sep 07 '22 07:09 povolann

Glad to hear!

Please feel free to let me know if you have any NeRF related questions. I am always happy to help, debug, and share.

To clarify the git command arguments for others:

Argument Meaning, from git docs and git submodule docs

-b / --branch : Instead of pointing the newly created HEAD to the branch pointed to by the cloned repository’s HEAD, point to branch instead. In a non-bare repository, this is the branch that will be checked out.

--recursive / --recursive-submodules : After the clone is created, initialize and clone submodules within based on the provided pathspec. If no pathspec is provided, all submodules are initialized and cloned.

AngeloSavich avatar Sep 07 '22 20:09 AngeloSavich