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

"guided_scatter_maps_kernel" not implemented for 'Bool' #1

Closed
gafniguy opened this issue Oct 9, 2019 · 5 comments
Closed

"guided_scatter_maps_kernel" not implemented for 'Bool' #1

gafniguy opened this issue Oct 9, 2019 · 5 comments

Comments

@gafniguy
Copy link

gafniguy commented Oct 9, 2019

Hi,

I'm trying to run any of the demo scripts and getting this error from the CUDA section. It is running on a fresh conda environment configured with the requirements file with CUDA 10. Any idea?

Thanks for making the project available.

`
Traceback (most recent call last):
File "learn_shape_from_target.py", line 105, in
baseline=opt.baseline, benchmark=opt.benchmark)

File "learn_shape_from_target.py", line 35, in trainShapeOnImage
trainer.create_reference(refScene)

File "/home/guygafni/projects/point_cloud_render/neural_textures/DSS/DSS/utils/trainer.py", line 147, in create_reference
self.groundtruths = renderScene(refScene, self.opt, self.cameras)
File "/home/guygafni/projects/point_cloud_render/neural_textures/DSS/DSS/utils/trainer.py", line 92, in renderScene
result = splatter.render().detach()

File "/home/guygafni/projects/point_cloud_render/neural_textures/DSS/DSS/core/renderer.py", line 882, in render

self.local_occlusion = guided_scatter_maps(numPoint, occludedMap.unsqueeze(-1), pointIdxMap, boundingBoxes)

RuntimeError: "guided_scatter_maps_kernel" not implemented for 'Bool' (operator() at DSS/cuda/rasterize_forward_cuda_kernel.cu:339)

frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x47 (0x7fc9c4702e37 in /home/guygafni/anaconda3/envs/DSS/lib/python3.7/site-packages/torch/lib/libc10.so)

frame #1: + 0x3733b (0x7fc99b53133b in /home/guygafni/projects/point_cloud_render/neural_textures/DSS/DSS/cuda/rasterize_forward.cpython-37m-x86_64-linux-gnu.so)

frame #2: guided_scatter_maps_cuda(long, at::Tensor const&, at::Tensor const&, at::Tensor const&) + 0x358 (0x7fc99b53178b in /home/guygafni/projects/point_cloud_render/neural_textures/DSS/DSS/cuda/rasterize_forward.cpython-37m-x86_64-linux-gnu.so)

frame #3: guided_scatter_maps(long, at::Tensor const&, at::Tensor const&, at::Tensor const&) + 0x9e (0x7fc99b51ba2e in /home/guygafni/projects/point_cloud_render/neural_textures/DSS/DSS/cuda/rasterize_forward.cpython-37m-x86_64-linux-gnu.so)

frame #4: + 0x30e7b (0x7fc99b52ae7b in /home/guygafni/projects/point_cloud_render/neural_textures/DSS/DSS/cuda/rasterize_forward.cpython-37m-x86_64-linux-gnu.so)

frame #5: + 0x2c8f0 (0x7fc99b5268f0 in /home/guygafni/projects/point_cloud_render/neural_textures/DSS/DSS/cuda/rasterize_forward.cpython-37m-x86_64-linux-gnu.so)

frame #28: __libc_start_main + 0xf0 (0x7fca04247830 in /lib/x86_64-linux-gnu/libc.so.6)
`

@katadam100
Copy link

katadam100 commented Oct 10, 2019

I get the exact same error, with cuda 10.

@krrish94
Copy link

I run into the same error too. (I'm using CUDA 10.0; also tried with CUDA 9.2, if it helps).

@krrish94
Copy link

I got around the error by adding a line here
https://github.com/yifita/DSS/blob/master/DSS/core/renderer.py#L881

I cast occludedMap to float() by adding a line just below the line referenced above

occludedMap = occludedMap.float()

However, I don't know if that should indeed be the fix. Maybe @yifita can comment.

@yifita
Copy link
Owner

yifita commented Oct 27, 2019

This is an issue due to a breaking change in pytorch 1.2.0. Boolean is no longer interpreted as uint8.
The solution posted by @krrish94 works. On the other hand, one can also change the map to uint8.

I got around the error by adding a line here
https://github.com/yifita/DSS/blob/master/DSS/core/renderer.py#L881

I cast occludedMap to float() by adding a line just below the line referenced above

occludedMap = occludedMap.float()

However, I don't know if that should indeed be the fix. Maybe @yifita can comment.

@yifita
Copy link
Owner

yifita commented Dec 19, 2019

I've updated the requirements.txt so that now pytorch 1.1.0 should be used.
This should fix this compatibility issue.

@yifita yifita closed this as completed Dec 19, 2019
@yifita yifita mentioned this issue Dec 19, 2019
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

4 participants