bridge.utils.cuda_graph#

Module Contents#

Functions#

_as_list

_member_name

_member_name_list

_member_names

_supports_cuda_graph_modules

_module_value

cuda_graph_module_names

Return configured per-layer CUDA graph module names.

set_cuda_graph_modules

Set per-layer CUDA graph modules using the current MCore API when available.

clear_cuda_graph_modules

Clear per-layer CUDA graph modules using the active MCore API.

set_full_iteration_cuda_graph

Enable full-iteration CUDA graph capture using the current MCore API.

has_cuda_graph_module

Return whether a per-layer CUDA graph module is enabled.

is_full_iteration_cuda_graph

Return whether config enables full-iteration CUDA graph capture.

uses_local_cuda_graph_manager

Return whether Bridge should create a local MCore CudaGraphManager.

API#

bridge.utils.cuda_graph._as_list(value: Any) list[Any]#
bridge.utils.cuda_graph._member_name(value: Any) str#
bridge.utils.cuda_graph._member_name_list(value: Any) list[str]#
bridge.utils.cuda_graph._member_names(value: Any) set[str]#
bridge.utils.cuda_graph._supports_cuda_graph_modules(config: Any) bool#
bridge.utils.cuda_graph._module_value(name: str)#
bridge.utils.cuda_graph.cuda_graph_module_names(config: Any) list[str]#

Return configured per-layer CUDA graph module names.

bridge.utils.cuda_graph.set_cuda_graph_modules(
config: Any,
modules: Any,
) None#

Set per-layer CUDA graph modules using the current MCore API when available.

bridge.utils.cuda_graph.clear_cuda_graph_modules(config: Any) None#

Clear per-layer CUDA graph modules using the active MCore API.

bridge.utils.cuda_graph.set_full_iteration_cuda_graph(config: Any) None#

Enable full-iteration CUDA graph capture using the current MCore API.

bridge.utils.cuda_graph.has_cuda_graph_module(config: Any, module: Any) bool#

Return whether a per-layer CUDA graph module is enabled.

Supports both the current MCore cuda_graph_modules API and the deprecated cuda_graph_scope values still present in older Bridge configs.

bridge.utils.cuda_graph.is_full_iteration_cuda_graph(config: Any) bool#

Return whether config enables full-iteration CUDA graph capture.

bridge.utils.cuda_graph.uses_local_cuda_graph_manager(config: Any) bool#

Return whether Bridge should create a local MCore CudaGraphManager.