ShichenLiu / SoftRas

Project page of paper "Soft Rasterizer: A Differentiable Renderer for Image-based 3D Reasoning"
MIT License
1.24k stars 156 forks source link

misaligned address in windows 10 #7

Closed tgarsiel closed 5 years ago

tgarsiel commented 5 years ago

demo_render.py works fine but in demo_deform.py I get this error (windows 10 python 3.7 cuda 10) set CUDA_VISIBLE_DEVICES=0 & python examples/demo_deform.py Loss: 0.8354: 0%| | 0/20000 [00:00<?, ?it/s]THCudaCheck FAIL file=C:/w/1/s/windows/pytorch/aten/src\THC/THCReduceAll.cuh line=327 error=74 : misaligned address Traceback (most recent call last): File "examples/demo_deform.py", line 111, in main() File "examples/demo_deform.py", line 100, in main loss.backward() File "D:\apps\python3\lib\site-packages\torch\tensor.py", line 107, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph) File "D:\apps\python3\lib\site-packages\torch\autograd__init__.py", line 93, in backward allow_unreachable=True) # allow_unreachable flag RuntimeError: cuda runtime error (74) : misaligned address at C:/w/1/s/windows/pytorch/aten/src\THC/THCReduceAll.cuh:327

ShichenLiu commented 5 years ago

I have not tried it on windows. My environment is on Ubuntu 16/18. It seems that some CUDA code doesn't work on windows. Can you try it on Ubuntu? I will try to figure out where the problem is.

tgarsiel commented 5 years ago

Works on Ubuntu. Thanks.