GithubHelp home page GithubHelp logo

Comments (19)

Zju-George avatar Zju-George commented on July 3, 2024 22

@maartenjv Yes that's the problem I mentioned before.
You just need to find rasterize_cuda_kernel.cu, open it with any text editor and find atomicAdd(),
replace the function with

  #if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 600

  #else
  static __inline__ __device__ double atomicAdd(double *address, double val) {
    unsigned long long int* address_as_ull = (unsigned long long int*)address;
    unsigned long long int old = *address_as_ull, assumed;
    if (val==0.0)
      return __longlong_as_double(old);
    do {
      assumed = old;
      old = atomicCAS(address_as_ull, assumed, __double_as_longlong(val +__longlong_as_double(assumed)));
    } while (assumed != old);
    return __longlong_as_double(old);
  }


  #endif

leave a comment if you succeed

from neural_renderer.

Zju-George avatar Zju-George commented on July 3, 2024 1

yes you just find the torch.h file and delete the 7th line,
and you may encounter another problem, then comment again, I will show you how to fix @maartenjv

from neural_renderer.

BingEdison avatar BingEdison commented on July 3, 2024 1

I've compiled using conda , did you compile from pulled git and not pip install of neural renderer?

from neural_renderer.

nkolot avatar nkolot commented on July 3, 2024

There is no support for Windows currently and I don't plan to support it in the future either.

from neural_renderer.

Zju-George avatar Zju-George commented on July 3, 2024

image
after a long time struggling, i build this on windows, if you need you can write Emali:[email protected] to me if you wish

from neural_renderer.

maartenjv avatar maartenjv commented on July 3, 2024

Hello, I have the same problem, getting many of these messages during install:

warning C4251: 'torch::optim::RMSprop::grad_average_buffers': class 'std::vector<at::Tensor,std::allocator<_Ty>>' needs to have dll-interface to be used by clients of class 'torch::optim::RMSprop' with [ _Ty=at::Tensor ]

And finally this one:
C:\ProgramData\Anaconda3\lib\site-packages\torch\include\torch\csrc\api\include\torch/torch.h(7): fatal error C1021: invalid preprocessor command 'warning'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe' failed with exit status 2

I am running Windows 7, Anaconda 3, CUDA 10, pytorch 1.1.0

from neural_renderer.

maartenjv avatar maartenjv commented on July 3, 2024

Thanks, it seems to be going on for longer now, although the dll warnings are still there.
Now there is a different error:

neural_renderer/cuda/rasterize_cuda_kernel.cu(9): error: function "atomicAdd(double *, double)" has already been defined

1 error detected in the compilation of "....../AppData/Local/Temp/tmpxft_00001ee4_00000000-8_rasterize_cuda_kernel.cpp4.ii".
error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe' failed with exit status 2

from neural_renderer.

maartenjv avatar maartenjv commented on July 3, 2024

seems to be working, ill test some more.

thanks a lot!

from neural_renderer.

BingEdison avatar BingEdison commented on July 3, 2024

solved issues with windows install , thanks mate!

from neural_renderer.

v-prgmr avatar v-prgmr commented on July 3, 2024

@BingEdison , hey mate, I created a venv and installed neural-renderer after modifying the rasterize_cuda_kernel.cu and everything installed. However I do get a warning in the early stages of the build - error checking for compiler version, but it proceeds and installs neural-renderer within this venv.

When i try to test one of the examples, I get a ImportError as follows

Traceback (most recent call last):
  File "example4.py", line 15, in <module>
    import neural_renderer as nr
  File "E:\Git Repos\neural_renderer\nr\lib\site-packages\neural_renderer_pytorch-1.1.3-py3.6-win-amd64.egg\neural_renderer\__init__.py", line 3, in <module>
    from .load_obj import load_obj
  File "E:\Git Repos\neural_renderer\nr\lib\site-packages\neural_renderer_pytorch-1.1.3-py3.6-win-amd64.egg\neural_renderer\load_obj.py", line 8, in <module>
    import neural_renderer.cuda.load_textures as load_textures_cuda
ImportError: DLL load failed: The specified module could not be found.

Do you have suggestions?

from neural_renderer.

v-prgmr avatar v-prgmr commented on July 3, 2024

Yes, I am working on the pulled git. Which branch did you use ? @BingEdison

from neural_renderer.

yzhao666 avatar yzhao666 commented on July 3, 2024

It worked for me. @Zju-George Thanks a million!

from neural_renderer.

huytuong010101 avatar huytuong010101 commented on July 3, 2024

@Zju-George Thank u so much, it work for me

from neural_renderer.

ismeyueyue avatar ismeyueyue commented on July 3, 2024

@huytuong010101 Where did you find the torch.h file? I'm struggling on this installation

from neural_renderer.

Towel2000 avatar Towel2000 commented on July 3, 2024

Would anyone please tell me which line of torch.h I actually need to delete?
Mine's has nothing on line7, which is troublesome. I tried installing for more than a month.

from neural_renderer.

qingqing5r44 avatar qingqing5r44 commented on July 3, 2024

hi, you can find torch related files in your anaconda spin virtual environment. Just search "torch.h" there. Mine is "Anaconda3\envs\spin\Lib\site-packages\torch\include\torch\csrc\api\include\torch\torch.h"

@huytuong010101 Where did you find the torch.h file? I'm struggling on this installation

Hi, you can find torch related files in your anaconda spin virtual environment. Just search "torch.h" there. Mine is "Anaconda3\envs\spin\Lib\site-packages\torch\include\torch\csrc\api\include\torch\torch.h"

from neural_renderer.

qingqing5r44 avatar qingqing5r44 commented on July 3, 2024

Would anyone please tell me which line of torch.h I actually need to delete? Mine's has nothing on line7, which is troublesome. I tried installing for more than a month.

Hi, you should delete line 7 of torch.h, which is shown below.
#warning \ "Including torch/torch.h for C++ extensions is deprecated. Please include torch/extension.h"

from neural_renderer.

qingqing5r44 avatar qingqing5r44 commented on July 3, 2024

Thanks to all the instructions above, I have just installed neural_renderer_pytorch successfully in Win10. (using neural_renderer_pytorch-win10 version)

Here I'd like to give one tip we might use while installing. After following the above steps, we may still find errors like this.
neural_renderer/cuda/load_textures_cuda_kernel.cu(103): error: calling a __host__ function("__roundf") from a __global__ function("_NV_ANON_NAMESPACE::load_textures_cuda_kernel<float> ") is not allowed
At this time, you need to change the "floor/ceil/round" into "floorf/ceilf/roundf" in the corresponding source code. Then the errors would disappear.

Hope this notice helps you all :)

from neural_renderer.

ModeSky avatar ModeSky commented on July 3, 2024

My environment is windows10, torch1.8, cuda11.3. Running python setup.py install reports the following error. What is the problem
image

from neural_renderer.

Related Issues (20)

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.