Runtime Configuration

cuRobo runtime configuration flags.

These module-level flags control runtime behavior. Set them in Python before creating any cuRobo objects:

import curobo._src.runtime as runtime

runtime.cuda_graphs = False   # disable CUDA graph capture
runtime.torch_compile = True  # enable torch.compile
runtime.kernel_launch_sm_count = 32  # select small-GPU launch policies
torch_compile: bool = False

Enable torch.compile for eligible cuRobo kernels.

torch_compile_slow: bool = False

Enable torch.compile for operations that are slow to compile.

torch_jit: bool = True

Enable torch.jit.script for eligible cuRobo functions.

cuda_graphs: bool = True

Enable CUDA graph capture for solvers. Significantly improves throughput at the cost of a one-time warm-up overhead.

skip_checks: bool = True

Skip repeat runtime validation on performance-sensitive paths. Enable only when tensor references and shapes remain stable between calls.

cuda_graph_reset: bool = False

Enable CUDA graph reset when tensor memory references change. Requires CUDA 12.0+.

cuda_streams: bool = True

Enable separate CUDA streams for parallel kernel execution.

cuda_event_timers: bool = True

Enable CUDA event-based timers for profiling.

kernel_launch_sm_count: int | None = None

Override the SM count used to select kernel launch policies. This does not partition the GPU or restrict kernels to this number of physical SMs. Set it before constructing cuRobo objects or capturing CUDA graphs.

resolve_kernel_launch_sm_count(
actual_sm_count,
)

Return the SM count to use for launch-policy selection.

Parameters:

actual_sm_count (int)

Return type:

int

use_small_gpu_launch_policy(
actual_sm_count,
)

Return whether kernels should use the small-GPU launch policy.

Parameters:

actual_sm_count (int)

Return type:

bool

cache_dir: str = '/home/runner/.cache/curobo'

Directory for cuRobo outputs (example results, saved configs, etc.). Defaults to ~/.cache/curobo.

debug: bool = False

Enable general debug mode (additional checks and logging).

debug_cuda_graphs: bool = False

Enable CUDA graph debug mode.

debug_cuda_compile: bool = False

Enable debug compilation flags for CUDA kernels.

debug_nan: bool = False

If True, disable CUDA graphs and check for NaN values during optimization.

debug_timers: bool = False

Enable debug timing output and print results to stdout.

debug_trajopt: bool = False

Print trajectory optimization results for debugging.

profiler: bool = False

Enable profiler hooks (e.g., for Nsight Systems).

Inverse dynamics in motion planning

MotionPlannerCfg.create(enable_inverse_dynamics=False) disables inverse-dynamics computation and effort constraints throughout IK, path search, trajectory optimization, dense validation, and time optimization. Collision checking and joint position, velocity, acceleration, and jerk limits remain active. enable_timeopt remains independent and defaults to true. The inverse-dynamics option defaults to true, preserving existing per-stage settings.

Standalone TrajOptSolverCfg.create and TrajectoryTimeOptCfg expose the same option. Timeopt results return torque=None when disabled. Such plans do not provide torque feasibility guarantees and do not require effort limits or inertials for time optimization.

The native equivalents are MotionPlanningConfig::enable_inverse_dynamics, TrajectoryOptimizationConfig::enable_inverse_dynamics, and TrajectoryTimeOptConfig::enable_inverse_dynamics. Setting the planner option false overrides every stage’s effort-check flag. Standalone native timeopt returns a null torque pointer and does not load the rollout/dynamics manifest when disabled. Both Python and native execution retain CUDA graph support.