Pre-flight checklist
What happened
unchecked
genesis: rigid_solver.py lines 744-833
# TODO: Simple numpy-based for-loop for now as it is not performance critical
for i_b_, i_b in enumerate(envs_idx):
# Compute the inverted mass matrix efficiently
mass_mat_L_inv = np.eye(self.n_dofs_)
for i_d in range(self.n_dofs_):
for j_d in range(i_d):
mass_mat_L_inv[i_d] -= mass_mat_L[i_d, j_d, i_b] * mass_mat_L_inv[j_d]
mass_mat_inv = (mass_mat_L_inv * mass_mat_D_inv[:, i_b]) @ mass_mat_L_inv.T
# ... per-link Jacobian build + A = jac @ mass_mat_inv @ jac.T ...
# Stop there if not batched
if not batched:
break
当对为 armature/mass/friction 使用域随机化,会开启batch,对每个 env 都跑一遍:先 O(n_dofs²) 求质量矩阵逆,再对每根连杆(~30)组雅可比做矩阵乘计算,在单核 CPU 上串行。导致训练启动非常慢,4096环境需约15~20分钟。
以上为gpt5.6给我的解释。
Steps to reproduce
uv run genelab train Genelab-Velocity-Mattress-Unitree-G1-v0 --num_envs 4096
Environment
genelab 0.4.0
genesis 1.2.1
torch 2.10.0+cu128 cuda 12.8
RL backend
rsl_rl
Simulation backend
GPU (gpu=True)
Logs / traceback
Anything else
No response
Pre-flight checklist
What happened
unchecked
genesis: rigid_solver.py lines 744-833
# TODO: Simple numpy-based for-loop for now as it is not performance critical
for i_b_, i_b in enumerate(envs_idx):
# Compute the inverted mass matrix efficiently
mass_mat_L_inv = np.eye(self.n_dofs_)
for i_d in range(self.n_dofs_):
for j_d in range(i_d):
mass_mat_L_inv[i_d] -= mass_mat_L[i_d, j_d, i_b] * mass_mat_L_inv[j_d]
mass_mat_inv = (mass_mat_L_inv * mass_mat_D_inv[:, i_b]) @ mass_mat_L_inv.T
# ... per-link Jacobian build + A = jac @ mass_mat_inv @ jac.T ...
# Stop there if not batched
if not batched:
break
当对为 armature/mass/friction 使用域随机化,会开启batch,对每个 env 都跑一遍:先 O(n_dofs²) 求质量矩阵逆,再对每根连杆(~30)组雅可比做矩阵乘计算,在单核 CPU 上串行。导致训练启动非常慢,4096环境需约15~20分钟。
以上为gpt5.6给我的解释。
Steps to reproduce
uv run genelab train Genelab-Velocity-Mattress-Unitree-G1-v0 --num_envs 4096
Environment
RL backend
rsl_rl
Simulation backend
GPU (gpu=True)
Logs / traceback
Anything else
No response