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

RuntimeError: make_default_context() wasn't able to create a context on any of the 1 detected devices,RuntimeError: PyCUDA init failed, cannot use torch buffer #47

Open
Aurora-chevalier opened this issue Apr 8, 2023 · 4 comments

Comments

@Aurora-chevalier
Copy link

Aurora-chevalier commented Apr 8, 2023

Great job!I'm having a bit of an issue with head mode. When I run python train.py --config configs/train_example.yaml --pipeline READ.pipelines.ogl.TexturePipeline --crop_size 256x256, I was able to train successfully and finish evaluating the model. However, when I run python viewer.py --config downloads/kitti6.yaml, I get the following error:

loading pointcloud...
no normals in Data/pointcloud.ply
=== 3D model ===
VERTICES: 2547322
EXTENT: [ -84.91281891 -12.33472538 -234.02790833] [ 68.9091568 47.1550293 685.07629395]

================
new viewport size (1216, 368)
[w] Cannot read STENCIL size from the framebuffer
[i] Using GLFW (GL 3.1)
Traceback (most recent call last):
File "/home/ubuntu/READ/READ/gl/render.py", line 29, in _init_buffers
import pycuda.gl.autoinit # this may fails in headless mode
File "/home/ubuntu/anaconda3/envs/READ/lib/python3.9/site-packages/pycuda-2022.2.2-py3.9-linux-x86_64.egg/pycuda/gl/autoinit.py", line 10, in
context = make_default_context(lambda dev: cudagl.make_context(dev))
File "/home/ubuntu/anaconda3/envs/READ/lib/python3.9/site-packages/pycuda-2022.2.2-py3.9-linux-x86_64.egg/pycuda/tools.py", line 226, in make_default_context
raise RuntimeError(
RuntimeError: make_default_context() wasn't able to create a context on any of the 1 detected devices

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/ubuntu/READ/viewer.py", line 551, in
my_app = MyApp(args)
File "/home/ubuntu/READ/viewer.py", line 182, in init
self.off_render = OffscreenRender(viewport_size=self.viewport_size, out_buffer_location=self.out_buffer_location,
File "/home/ubuntu/READ/READ/gl/render.py", line 19, in init
self._init_buffers(viewport_size, out_buffer_location)
File "/home/ubuntu/READ/READ/gl/render.py", line 31, in _init_buffers
raise RuntimeError('PyCUDA init failed, cannot use torch buffer')
RuntimeError: PyCUDA init failed, cannot use torch buffer

I would appreciate it if you could give me a little advice.Thanks

@booker-max
Copy link

Hello, I also encountered the same problem, did you solve it?

@aidenchn
Copy link

hello,one year past,have you solved the problem? I have the same situation with you,help.

@Fireworker20th
Copy link

Has anyone solved this problem?

@13678066760
Copy link

Hi,did any one sovle the problem?

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

5 participants