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

stage 0 mesh extraction RasterizeCudaContext segmentation fault #73

Open
SeryeongKim opened this issue Jul 21, 2023 · 7 comments
Open

Comments

@SeryeongKim
Copy link

SeryeongKim commented Jul 21, 2023

When executing the line self.glctx = dr.RasterizeGLContext(output_db=False) in the mark_unseen_triangles function in nerf/renderer.py during stage 0 mesh extraction,

Segmentation fault occurs
at self.cpp_wrapper = _get_plugin(gl=True).RasterizeGLStateWrapper(output_db, mode == 'automatic', cuda_device_idx)
in init() of class RasterizeGLContext in nvdiffrast/nvdiffrast/torch/ops.py.

I changed verbose=True option in torch.utils.cpp_extension.load in the _get_plugin method by referring to the nvdiffrast post. (NVlabs/nvdiffrast#46)

However, a segmentation fault occurs when running the RasterizeGLStateWrapper function.

Is there any way to solve this problem?

image

my docker environment is as follows

  1. python3.8.10
  2. cuda 11.6
  3. cudnn 8
  4. torch.version = 1.12.0+cu116

Thank you

@mowangmodi
Copy link

how to slove

@toomy0toons
Copy link

hi are you using a remote headless server?
i find its impossible to initialize a gl context with headless server.
try using cudarasterizer with max res 2048 and see if its works

@mowangmodi
Copy link

No,I use a remote head server

@SeryeongKim
Copy link
Author

Using cudarasterizer not using raterizeglcontex with res 2048 is working. (like @toomy0toons simulation case)

But for the fine res (ex, higher than res 2048) simulation, raterizeglcontex should be used.

In my case, I should simulate with res >2048.

How can I solve segmentation fault by raterizeglcontex ?

@toomy0toons
Copy link

No,I use a remote head server
how are you getting display? if you are tunneling through like x11 or any remote methods you cannot use GL.
If not, check driver versions and softlinks to gl libs.

@toomy0toons
Copy link

Using cudarasterizer not using raterizeglcontex with res 2048 is working. (like @toomy0toons simulation case)

But for the fine res (ex, higher than res 2048) simulation, raterizeglcontex should be used.

In my case, I should simulate with res >2048.

How can I solve segmentation fault by raterizeglcontex ?

what is your gpu and nvidia driver version?
check if nvirasteizer is compiled with correct gpu . and you driver version supports it.
also it is impossible to render gl context if using remote headless server

@bgyarfas
Copy link

I had the same issue and it only happened when running the stage with --vis_pose.

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