You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to render my simulation with OpenGL but when I try to create the renderer object I get an error saying that 'cuda' is requested. Why can I not specify that the simulation should run with cpu? There is no device keyword argument, I also tried running the code with wp.ScopedDevice('cpu') and got the same error.
builder = wps.ModelBuilder()
wps.parse_mjcf(
'single_rod_spring.xml',
builder
)
self.model = builder.finalize()
self.integrator = wps.SemiImplicitIntegrator()
self.state0 = self.model.state()
self.state1 = self.model.state()
# Set up the renderer
with wp.ScopedDevice('cpu'):
self.renderer = wpr.SimRendererOpenGL(self.model, stage_path)
Here is the error:
self.renderer = wpr.SimRendererOpenGL(self.model, stage_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/warp/sim/render.py", line 79, in init
super().init(path, scaling=scaling, fps=fps, up_axis=up_axis, **render_kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/warp/render/render_opengl.py", line 1039, in init
self._device = wp.get_cuda_device()
^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/warp/context.py", line 3799, in get_cuda_device
return runtime.get_current_cuda_device()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/warp/context.py", line 3669, in get_current_cuda_device
raise RuntimeError('"cuda" device requested but this build of Warp does not support CUDA')
RuntimeError: "cuda" device requested but this build of Warp does not support CUDA
System Information
Running with warp-lang 1.4.1 on Python 3.11.6 with macOS
The text was updated successfully, but these errors were encountered:
Bug Description
I am trying to render my simulation with OpenGL but when I try to create the renderer object I get an error saying that 'cuda' is requested. Why can I not specify that the simulation should run with cpu? There is no device keyword argument, I also tried running the code with wp.ScopedDevice('cpu') and got the same error.
Here is the code snippet:
Let this class represent the spring-rod system
class System:
def init(self, stage_path="spring_rod.usd"):
fps = 60
self.frame_dt = 1.0 / fps
self.sim_substeps = 5
self.sim_dt = self.frame_dt / self.sim_substeps
self.sim_time = 0.0
Here is the error:
self.renderer = wpr.SimRendererOpenGL(self.model, stage_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/warp/sim/render.py", line 79, in init
super().init(path, scaling=scaling, fps=fps, up_axis=up_axis, **render_kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/warp/render/render_opengl.py", line 1039, in init
self._device = wp.get_cuda_device()
^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/warp/context.py", line 3799, in get_cuda_device
return runtime.get_current_cuda_device()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/warp/context.py", line 3669, in get_current_cuda_device
raise RuntimeError('"cuda" device requested but this build of Warp does not support CUDA')
RuntimeError: "cuda" device requested but this build of Warp does not support CUDA
System Information
Running with warp-lang 1.4.1 on Python 3.11.6 with macOS
The text was updated successfully, but these errors were encountered: