nemo_rl.utils.nsys#

Module Contents#

Classes#

Functions#

_parse_extra_options

Parse NRL_NSYS_EXTRA_OPTIONS as a JSON object of nsys flag -> value.

maybe_gpu_profile_step

wrap_with_nvtx_name

A decorator to wrap a function with an NVTX range with the given name.

Data#

API#

nemo_rl.utils.nsys.NRL_NSYS_WORKER_PATTERNS#

‘get(…)’

nemo_rl.utils.nsys.NRL_NSYS_PROFILE_STEP_RANGE#

‘get(…)’

nemo_rl.utils.nsys._parse_extra_options(raw: str) dict[str, Any]#

Parse NRL_NSYS_EXTRA_OPTIONS as a JSON object of nsys flag -> value.

Empty string parses to an empty dict. Invalid JSON or non-object payloads raise so misconfiguration surfaces immediately rather than silently being ignored.

nemo_rl.utils.nsys.NRL_NSYS_EXTRA_OPTIONS: dict[str, Any]#

‘_parse_extra_options(…)’

class nemo_rl.utils.nsys.ProfilablePolicy#

Bases: typing.Protocol

start_gpu_profiling() None#
stop_gpu_profiling() None#
nemo_rl.utils.nsys.maybe_gpu_profile_step(
policy: nemo_rl.utils.nsys.ProfilablePolicy,
step: int,
)#
nemo_rl.utils.nsys.wrap_with_nvtx_name(name: str)#

A decorator to wrap a function with an NVTX range with the given name.