Skip to content

[Bug]: Condition kernel not available; cannot build graph_do_while on RTX 3060 (SM 8.6) #2631

@dlhsok

Description

@dlhsok

Bug Description

Example using GPU crashes on my RTX 3060 Laptop GPU (SM 8.6).

Steps to Reproduce

conda activate agent # The env that has genesis installed (commit 7a1aecc).
cd
python ./examples/fem_hard_and_soft_constraint.py

Expected Behavior

The example starts up normally.

Screenshots/Videos

No response

Relevant log output

python fem_hard_and_soft_constraint.py 
[Genesis] [23:34:56] [INFO] ╭───────────────────────────────────────────────────────────────────╮
[Genesis] [23:34:56] [INFO] │┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈ Genesis ┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈│
[Genesis] [23:34:56] [INFO] ╰───────────────────────────────────────────────────────────────────╯
[Genesis] [23:34:56] [INFO] Running on [NVIDIA GeForce RTX 3060 Laptop GPU] with backend gs.cuda. Device memory: 5.65 GB.
[Genesis] [23:34:56] [INFO] 🚀 Genesis initialized. 🔖 version: 0.4.4, 🎨 theme: dark, 🌱 seed: None, 🐛 debug: False, 📏 precision: 32, 🔥 performance: False, 💬 verbose: INFO
[Genesis] [23:34:58] [INFO] Scene <b79250a> created.
[Genesis] [23:34:58] [INFO] Adding <gs.engine.entities.RigidEntity>. idx: 0, uid: <a10a337>, morph: <gs.morphs.Plane>, material: <gs.materials.Rigid>.
[Genesis] [23:34:58] [INFO] Adding <gs.engine.entities.FEMEntity>. idx: 1, uid: <f7fd58f>, morph: <gs.morphs.Sphere>, material: <gs.materials.FEM.Elastic>.
parsing switches
success
Delaunizing vertices...
Delaunay seconds:  0.04195
Creating surface mesh ...
Surface mesh seconds:  0.000752
Recovering boundaries...
Boundary recovery seconds:  0.000767
Removing exterior tetrahedra ...
Exterior tets removal seconds:  7.5e-05
Recovering Delaunayness...
Delaunay recovery seconds:  0.010887
Refining mesh...
Refinement seconds:  0.010501
Smoothing vertices...
Mesh smoothing seconds:  0.009339
Improving mesh...
Mesh improvement seconds:  0.000622

Writing nodes.
Writing elements.

Writing faces.
Writing edges.

Output seconds:  0.000144
Total running seconds:  0.075112
Statistics:

  Input points: 642
  Input facets: 1280
  Input segments: 1920
  Input holes: 0
  Input regions: 0

  Mesh points: 966
  Mesh tetrahedra: 3772
  Mesh faces: 8184
  Mesh faces on exterior boundary: 1280
  Mesh faces on input facets: 1280
  Mesh edges on input segments: 1920
  Steiner points inside domain: 324

[Genesis] [23:35:00] [INFO] Adding <gs.engine.entities.FEMEntity>. idx: 2, uid: <a54e4d3>, morph: <gs.morphs.Box>, material: <gs.materials.FEM.Elastic>.
parsing switches
success
Delaunizing vertices...
Delaunay seconds:  5.3e-05
Creating surface mesh ...
Surface mesh seconds:  3.1e-05
Recovering boundaries...
Boundary recovery seconds:  0.000239
Removing exterior tetrahedra ...
Exterior tets removal seconds:  8e-06
Suppressing Steiner points ...
Steiner suppression seconds:  4e-06
Recovering Delaunayness...
Delaunay recovery seconds:  3.1e-05
Refining mesh...
Refinement seconds:  4.2e-05
Smoothing vertices...
Mesh smoothing seconds:  0.000122
Improving mesh...
Mesh improvement seconds:  1.5e-05

Writing nodes.
Writing elements.

Writing faces.
Writing edges.

Output seconds:  1.1e-05
Total running seconds:  0.000674
Statistics:

  Input points: 8
  Input facets: 12
  Input segments: 18
  Input holes: 0
  Input regions: 0

  Mesh points: 9
  Mesh tetrahedra: 12
  Mesh faces: 30
  Mesh faces on exterior boundary: 12
  Mesh faces on input facets: 12
  Mesh edges on input segments: 18
  Steiner points inside domain: 1

video_fps: 1000.0, frame_interval: 10
[Genesis] [23:35:00] [INFO] Building scene <b79250a>...
[Genesis] [23:35:00] [INFO] Entity <f7fd58f> added. class: FEMEntity, morph: Sphere, size: (3772, 966), material: <gs.materials.FEM.Elastic>.
[Genesis] [23:35:01] [INFO] Entity <a54e4d3> added. class: FEMEntity, morph: Box, size: (12, 9), material: <gs.materials.FEM.Elastic>.
[Genesis] [23:35:01] [INFO] Compiling simulation kernels...
[W 03/31/26 23:35:02.406 404169] [gpu_graph_manager.cpp:ensure_condition_kernel_loaded@219] graph_do_while requires SM 9.0+ (Hopper), but this device is SM 86. Falling back to non-graph path.
[E 03/31/26 23:35:02.406 404169] [gpu_graph_manager.cpp:try_launch@417] Condition kernel not available; cannot build graph_do_while


Traceback (most recent call last):
  File "/home/tom/Genesis/examples/fem_hard_and_soft_constraint.py", line 140, in <module>
    main()
  File "/home/tom/Genesis/examples/fem_hard_and_soft_constraint.py", line 75, in main
    scene.build()
  File "/home/tom/Genesis/genesis/utils/misc.py", line 139, in wrapper
    return method(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/tom/Genesis/genesis/engine/scene.py", line 884, in build
    self._sim.step()
  File "/home/tom/Genesis/genesis/engine/simulator.py", line 287, in step
    self.substep(self.cur_substep_local)
  File "/home/tom/Genesis/genesis/engine/simulator.py", line 322, in substep
    self.substep_pre_coupling(f)
  File "/home/tom/Genesis/genesis/engine/simulator.py", line 334, in substep_pre_coupling
    solver.substep_pre_coupling(f)
  File "/home/tom/Genesis/genesis/engine/solvers/rigid/rigid_solver.py", line 1201, in substep_pre_coupling
    self.substep(f)
  File "/home/tom/Genesis/genesis/engine/solvers/rigid/rigid_solver.py", line 946, in substep
    self._func_constraint_force()
  File "/home/tom/Genesis/genesis/engine/solvers/rigid/rigid_solver.py", line 1036, in _func_constraint_force
    self.constraint_solver.resolve()
  File "/home/tom/Genesis/genesis/engine/solvers/rigid/constraint/solver.py", line 220, in resolve
    func_solve_body(
  File "/home/tom/anaconda3/envs/agent/lib/python3.11/site-packages/quadrants/lang/_perf_dispatch.py", line 306, in __call__
    res = dispatch_impl(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/tom/anaconda3/envs/agent/lib/python3.11/site-packages/quadrants/lang/_perf_dispatch.py", line 59, in __call__
    return self.__wrapped__(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/tom/Genesis/genesis/engine/solvers/rigid/constraint/solver_breakdown.py", line 850, in func_solve_decomposed
    _kernel_solve_gpu_graph(
  File "/home/tom/anaconda3/envs/agent/lib/python3.11/site-packages/quadrants/lang/_quadrants_callable.py", line 96, in __call__
    return self.wrapper.__call__(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/tom/anaconda3/envs/agent/lib/python3.11/site-packages/quadrants/lang/kernel_impl.py", line 147, in wrapped_func
    return primal(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/tom/anaconda3/envs/agent/lib/python3.11/site-packages/quadrants/lang/kernel.py", line 594, in __call__
    ret = self.launch_kernel(key, kernel_cpp, compiled_kernel_data, *py_args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/tom/anaconda3/envs/agent/lib/python3.11/site-packages/quadrants/lang/kernel.py", line 524, in launch_kernel
    raise e from None
  File "/home/tom/anaconda3/envs/agent/lib/python3.11/site-packages/quadrants/lang/kernel.py", line 519, in launch_kernel
    prog.launch_kernel(compiled_kernel_data, launch_ctx)
RuntimeError: [gpu_graph_manager.cpp:try_launch@417] Condition kernel not available; cannot build graph_do_while

[Genesis] [23:35:02] [ERROR] RuntimeError: [gpu_graph_manager.cpp:try_launch@417] Condition kernel not available; cannot build graph_do_while
[Genesis] [23:35:02] [INFO] 💤 Exiting Genesis and caching compiled kernels...

Environment

  • OS: [Ubuntu 22.04]
  • GPU/CPU [RTX 3060 Laptop GPU, Intel I7-12700H]
  • GPU-595.45.04
  • CUDA-13.2

Release version or Commit ID

Commit 7a1aecc

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions