The CUDA Graphs API provides explicit graph-construction functions, and also separately provides stream-capture functionality that automatically records an existing, already-written sequence of CUDA API calls directly into an equivalent graph object, letting an existing CUDA application adopt CUDA Graphs with comparatively minimal required code restructuring. This stream-capture-based graph-construction option is specifically what makes CUDA Graphs adoption considerably more practical for existing, already-written CUDA codebases, compared to requiring that same existing codebase instead be more substantially rewritten just to use CUDA Graphs' alternative explicit graph-construction API directly.