Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

window11, is it possible to install tiny-cuda-nn? #443

Open
kotran88 opened this issue Jun 3, 2024 · 2 comments
Open

window11, is it possible to install tiny-cuda-nn? #443

kotran88 opened this issue Jun 3, 2024 · 2 comments

Comments

@kotran88
Copy link

kotran88 commented Jun 3, 2024

I did everything including format all my environment but it is not working
window11 with gpu nvidia 3090
installed visual studio 2022 with C build tool checked
cuda version is 11.8
nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:41:10_Pacific_Daylight_Time_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0
>>> print(torch.__version__)
2.1.2+cu118

(nerfstudio) C:\Users\jung\tiny-cuda-nn>cmake --version
cmake version 3.29.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).


(nerfstudio) C:\Users\jung\tiny-cuda-nn>ninja --version
1.9.0

every version is meet as required in tinycudann specification...

but it cause error in installing it.

first,
pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

and it cause error...

 ninja: build stopped: subcommand failed.
      Traceback (most recent call last):
        File "C:\Users\jung\AppData\Local\anaconda3\envs\nerfstudio\lib\site-packages\torch\utils\cpp_extension.py", line 2100, in _run_ninja_build
          subprocess.run(
        File "C:\Users\jung\AppData\Local\anaconda3\envs\nerfstudio\lib\subprocess.py", line 516, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>

   File "C:\Users\jung\AppData\Local\anaconda3\envs\nerfstudio\lib\site-packages\torch\utils\cpp_extension.py", line 2116, in _run_ninja_build
          raise RuntimeError(message) from e
      RuntimeError: Error compiling objects for extension
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for tinycudann
  Running setup.py clean for tinycudann
Failed to build tinycudann
ERROR: Could not build wheels for tinycudann, which is required to install pyproject.toml-based projects

also, I tried
https://github.com/NVlabs/tiny-cuda-nn?tab=readme-ov-file#compilation-windows--linux

on Developer PowerShell for vs2022,
image

@Edward-HE
Copy link

Edward-HE commented Jun 4, 2024

I've been lately delving into the installation of tiny-cuda-nn, particularly on the Windows platform (which is acknowledged to have a much more arduous installation environment than the Linux platform). I discovered the misunderstandings existing in the previous issues and summarized a viable solution. You can directly try out the tips as follows:

  • Install PyTorch and the corresponding version of full CUDA (apparently, it seems you've done it correctly).
  • Install the MSVC 2022 compilation chain (just ensure to install the following components):
    • MSVC Build tools (latest)
    • Windows 11 SDK
    • C++ CMake tools for Windows
  • [Key Point] Compile and Install with x64 Native Tools Command Prompt for VS 2022 !!! (Use the compile install instead of the pip command)
git clone --recursive https://github.com/nvlabs/tiny-cuda-nn
cd tiny-cuda-nn/bindings/torch
# Switch to the Python environment you wish to install.
python setup.py install
  • Wait for approximately 3 minutes.
  • Finish!

By using the tips above, you can bypass almost all potential problems and fully leverage the super-fast compilation of ninja.

@tim-win
Copy link

tim-win commented Jun 7, 2024

I'd like to meet someone who pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch works for, I've run into issues every time I've tried to perform the install that way.

Manually cloning the repo and building the bindings/torch manually is required for linux far as I can tell, giving up on the standard install recommendation was the first step toward getting this to run correctly.

Is NVLabs open to contracting a build engineer? Install issues have been plaguing this (otherwise great) repo since, based on google searches, 2022 if not earlier. Hate to see a bunch of cool tech utilize this library only for it to be a massive build-chain barrier for entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants