-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
examples/rendering/demo can see nothing #386
Comments
could you provide more info? os version, wsl or native etc is this a freshly installed conda env? |
#318 |
I'm used windows wsl ubuntu,and this is a new conda env WSL:2
Ubuntu:22.04
CUDA:12.4
conda:24.11.1
Pytorch:2.5.1
Genesis:main nvcc info: (base) root@zhangiser-pc:~# nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Thu_Mar_28_02:18:24_PDT_2024
Cuda compilation tools, release 12.4, V12.4.131
Build cuda_12.4.r12.4/compiler.34097967_0 nvidia-smi info: (base) root@zhangiser-pc:~# nvidia-smi
Mon Dec 30 10:09:49 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.77.01 Driver Version: 566.36 CUDA Version: 12.7 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 4080 ... On | 00000000:01:00.0 Off | N/A |
| N/A 46C P0 593W / 155W | 0MiB / 12282MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+ pytorch info: (base) root@zhangiser-pc:~# conda activate torch
(torch) root@zhangiser-pc:~# python
Python 3.9.21 | packaged by conda-forge | (main, Dec 5 2024, 13:51:40)
[GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
True demo.py import os
os.environ['PYOPENGL_PLATFORM'] = 'glx'
import torch
import importlib.util
import genesis as gs
def main():
########################## init ##########################
gs.init(seed=0, precision="32", logging_level="debug")
########################## create a scene ##########################
scene = gs.Scene(
sim_options=gs.options.SimOptions(),
viewer_options=gs.options.ViewerOptions(
res=(1920, 1080),
camera_pos=(8.5, 0.0, 4.5),
camera_lookat=(3.0, 0.0, 0.5),
camera_fov=50,
),
rigid_options=gs.options.RigidOptions(enable_collision=False, gravity=(0, 0, 0)),
renderer=gs.renderers.RayTracer( # type: ignore
env_surface=gs.surfaces.Emission(
emissive_texture=gs.textures.ImageTexture(
image_path="textures/indoor_bright.png",
),
),
env_radius=15.0,
env_euler=(0, 0, 180),
lights=[
{"pos": (0.0, 0.0, 10.0), "radius": 3.0, "color": (15.0, 15.0, 15.0)},
],
),
)
########################## materials ##########################
########################## entities ##########################
# floor
plane = scene.add_entity(
morph=gs.morphs.Plane(
pos=(0.0, 0.0, -0.5),
),
surface=gs.surfaces.Aluminium(
ior=10.0,
),
)
# user specified external color texture
scene.add_entity(
morph=gs.morphs.Mesh(
file="meshes/sphere.obj",
scale=0.5,
pos=(0.0, -3, 0.0),
),
surface=gs.surfaces.Rough(
diffuse_texture=gs.textures.ColorTexture(
color=(1.0, 0.5, 0.5),
),
),
)
# user specified color (using color shortcut)
scene.add_entity(
morph=gs.morphs.Mesh(
file="meshes/sphere.obj",
scale=0.5,
pos=(0.0, -1.8, 0.0),
),
surface=gs.surfaces.Rough(
color=(1.0, 1.0, 1.0),
),
)
# smooth shortcut
scene.add_entity(
morph=gs.morphs.Mesh(
file="meshes/sphere.obj",
scale=0.5,
pos=(0.0, -0.6, 0.0),
),
surface=gs.surfaces.Smooth(
color=(0.6, 0.8, 1.0),
),
)
# Iron
scene.add_entity(
morph=gs.morphs.Mesh(
file="meshes/sphere.obj",
scale=0.5,
pos=(0.0, 0.6, 0.0),
),
surface=gs.surfaces.Iron(
color=(1.0, 1.0, 1.0),
),
)
# Gold
scene.add_entity(
morph=gs.morphs.Mesh(
file="meshes/sphere.obj",
scale=0.5,
pos=(0.0, 1.8, 0.0),
),
surface=gs.surfaces.Gold(
color=(1.0, 1.0, 1.0),
),
)
# Glass
scene.add_entity(
morph=gs.morphs.Mesh(
file="meshes/sphere.obj",
scale=0.5,
pos=(0.0, 3.0, 0.0),
),
surface=gs.surfaces.Glass(
color=(1.0, 1.0, 1.0),
),
)
# Opacity
scene.add_entity(
morph=gs.morphs.Mesh(
file="meshes/sphere.obj",
scale=0.5,
pos=(2.0, -3, 0.0),
),
surface=gs.surfaces.Smooth(color=(1.0, 1.0, 1.0, 0.5)),
)
# asset's own attributes
scene.add_entity(
morph=gs.morphs.Mesh(
file="meshes/wooden_sphere_OBJ/wooden_sphere.obj",
scale=0.15,
pos=(2.2, -2.3, 0.0),
),
)
# override asset's attributes
scene.add_entity(
morph=gs.morphs.Mesh(
file="meshes/wooden_sphere_OBJ/wooden_sphere.obj",
scale=0.15,
pos=(2.2, -1.0, 0.0),
),
surface=gs.surfaces.Rough(
diffuse_texture=gs.textures.ImageTexture(
image_path="textures/checker.png",
)
),
)
########################## cameras ##########################
cam_0 = scene.add_camera(
res=(1600, 900),
pos=(8.5, 0.0, 1.5),
lookat=(3.0, 0.0, 0.7),
fov=60,
GUI=True,
spp=512,
)
scene.build()
########################## forward + backward twice ##########################
scene.reset()
horizon = 2000
for i in range(horizon):
scene.step()
cam_0.render()
if __name__ == "__main__":
main() |
Can you try to install nvidia-driver-550 for CUDA12.4? |
When running on NVIDIA driver 550 with CUDA 12.4, all files except the IK tutorial file worked without any issues. I made various attempts to resolve the segmentation fault in the IK tutorial file, and I confirmed that the segmentation fault does not occur in the CUDA 12.1 environment. |
@Kashu7100 @coghks625 And the error is still there. C:\Users\zhangiser>nvidia-smi
Mon Dec 30 20:10:27 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 552.44 Driver Version: 552.44 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 4080 ... WDDM | 00000000:01:00.0 Off | N/A |
| N/A 45C P0 29W / 155W | 0MiB / 12282MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+ error info[Segmentation fault (core dumped)]: (torch) root@zhangiser-pc:/usr/Genesis# /root/miniconda3/envs/torch/bin/python /usr/Genesis/examples/rendering/demo.py
[Genesis] [18:53:33] [INFO] ╭─────────────────────────────────────────────────────────────────────────────────────╮
[Genesis] [18:53:33] [INFO] │┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉ Genesis ┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉│
[Genesis] [18:53:33] [INFO] ╰─────────────────────────────────────────────────────────────────────────────────────╯
[Genesis] [18:53:34] [INFO] Running on [NVIDIA GeForce RTX 4080 Laptop GPU] with backend gs.cuda. Device memory: 11.99 GB.
[Genesis] [18:53:36] [DEBUG] [Taichi] version 1.7.2, llvm 15.0.4, commit 0131dce9, linux, python 3.9.21
[Genesis] [18:53:36] [DEBUG] [Taichi] Starting on arch=cuda
[Genesis] [18:53:36] [INFO] 🚀 Genesis initialized. 🔖 version: 0.2.0, 🌱 seed: 0, 📏 precision: '32', 🐛 debug: False, 🎨 theme: 'dark'.
[Genesis] [18:53:39] [INFO] Scene <579af45> created.
[Genesis] [18:53:39] [INFO] Adding <gs.RigidEntity>. idx: 0, uid: <c233424>, morph: <gs.morphs.Plane>, material: <gs.materials.Rigid>.
[Genesis] [18:53:39] [DEBUG] Preprocessed `.gsd` file found in cache for geom idx 0.
[Genesis] [18:53:39] [INFO] Adding <gs.RigidEntity>. idx: 1, uid: <ddf49f8>, morph: <gs.morphs.Mesh(file='/root/miniconda3/envs/torch/lib/python3.9/site-packages/genesis/assets/meshes/sphere.obj')>, material: <gs.materials.Rigid>.
[Genesis] [18:53:40] [DEBUG] Preprocessed `.gsd` file found in cache for geom idx 1.
[Genesis] [18:53:40] [INFO] Adding <gs.RigidEntity>. idx: 2, uid: <5284270>, morph: <gs.morphs.Mesh(file='/root/miniconda3/envs/torch/lib/python3.9/site-packages/genesis/assets/meshes/sphere.obj')>, material: <gs.materials.Rigid>.
[Genesis] [18:53:40] [DEBUG] Preprocessed `.gsd` file found in cache for geom idx 2.
[Genesis] [18:53:40] [INFO] Adding <gs.RigidEntity>. idx: 3, uid: <83c3566>, morph: <gs.morphs.Mesh(file='/root/miniconda3/envs/torch/lib/python3.9/site-packages/genesis/assets/meshes/sphere.obj')>, material: <gs.materials.Rigid>.
[Genesis] [18:53:40] [DEBUG] Preprocessed `.gsd` file found in cache for geom idx 3.
[Genesis] [18:53:40] [INFO] Adding <gs.RigidEntity>. idx: 4, uid: <47933bc>, morph: <gs.morphs.Mesh(file='/root/miniconda3/envs/torch/lib/python3.9/site-packages/genesis/assets/meshes/sphere.obj')>, material: <gs.materials.Rigid>.
[Genesis] [18:53:40] [DEBUG] Preprocessed `.gsd` file found in cache for geom idx 4.
[Genesis] [18:53:40] [INFO] Adding <gs.RigidEntity>. idx: 5, uid: <849b29b>, morph: <gs.morphs.Mesh(file='/root/miniconda3/envs/torch/lib/python3.9/site-packages/genesis/assets/meshes/sphere.obj')>, material: <gs.materials.Rigid>.
[Genesis] [18:53:40] [DEBUG] Preprocessed `.gsd` file found in cache for geom idx 5.
[Genesis] [18:53:40] [INFO] Adding <gs.RigidEntity>. idx: 6, uid: <8b3d6fc>, morph: <gs.morphs.Mesh(file='/root/miniconda3/envs/torch/lib/python3.9/site-packages/genesis/assets/meshes/sphere.obj')>, material: <gs.materials.Rigid>.
[Genesis] [18:53:40] [DEBUG] Preprocessed `.gsd` file found in cache for geom idx 6.
[Genesis] [18:53:40] [INFO] Adding <gs.RigidEntity>. idx: 7, uid: <beb84a4>, morph: <gs.morphs.Mesh(file='/root/miniconda3/envs/torch/lib/python3.9/site-packages/genesis/assets/meshes/sphere.obj')>, material: <gs.materials.Rigid>.
[Genesis] [18:53:40] [DEBUG] Preprocessed `.gsd` file found in cache for geom idx 7.
[Genesis] [18:53:40] [INFO] Adding <gs.RigidEntity>. idx: 8, uid: <f7ab5cf>, morph: <gs.morphs.Mesh(file='/root/miniconda3/envs/torch/lib/python3.9/site-packages/genesis/assets/meshes/wooden_sphere_OBJ/wooden_sphere.obj')>, material: <gs.materials.Rigid>.
[Genesis] [18:53:41] [DEBUG] Preprocessed `.gsd` file found in cache for geom idx 8.
[Genesis] [18:53:41] [INFO] Adding <gs.RigidEntity>. idx: 9, uid: <8dde267>, morph: <gs.morphs.Mesh(file='/root/miniconda3/envs/torch/lib/python3.9/site-packages/genesis/assets/meshes/wooden_sphere_OBJ/wooden_sphere.obj')>, material: <gs.materials.Rigid>.
[Genesis] [18:53:42] [DEBUG] Preprocessed `.gsd` file found in cache for geom idx 9.
[Genesis] [18:53:42] [INFO] Building scene <579af45>...
[Genesis] [18:53:45] [INFO] Compiling simulation kernels...
[Genesis] [18:53:48] [INFO] Building visualizer...
Segmentation fault (core dumped) |
@zhangiser try cuda 12.1 |
I have tried cuda12.1 but also get Segmentation fault (core dumped) (base) root@zhangiser-pc:/usr/wsl# nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Mon_Apr__3_17:16:06_PDT_2023
Cuda compilation tools, release 12.1, V12.1.105
Build cuda_12.1.r12.1/compiler.32688072_0 nvidia-smi: (base) root@zhangiser-pc:/usr/wsl# nvidia-smi
Tue Dec 31 10:50:15 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.76.01 Driver Version: 552.44 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 4080 ... On | 00000000:01:00.0 Off | N/A |
| N/A 48C P0 26W / 155W | 0MiB / 12282MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+ torch info: (base) root@zhangiser-pc:/usr/wsl# conda activate torch
(torch) root@zhangiser-pc:/usr/wsl# python
Python 3.9.21 | packaged by conda-forge | (main, Dec 5 2024, 13:51:40)
[GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
True Guess maybe other problems. |
I just installed LuisaRenderPy,and run examples/rendering/demo,there show a black window,but i can see nothing
The text was updated successfully, but these errors were encountered: