MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT-LLM / nvtx_range

Function nvtx_range

tensorrt_llm/_utils.py:900–919  ·  view source on GitHub ↗

Creates an NVTX range annotation for profiling. This function returns a context manager that marks the beginning and end of a range in NVIDIA Tools Extension (NVTX) profiling tools like Nsight Systems. Args: msg (str): The message/name for the NVTX range. color (st

(msg: str,
               color: str = "grey",
               domain: str = "TensorRT-LLM",
               category: Optional[str] = None)

Source from the content-addressed store, hash-verified

898
899
900def nvtx_range(msg: str,
901 color: str = "grey",
902 domain: str = "TensorRT-LLM",
903 category: Optional[str] = None):
904 """
905 Creates an NVTX range annotation for profiling.
906
907 This function returns a context manager that marks the beginning and end of a
908 range in NVIDIA Tools Extension (NVTX) profiling tools like Nsight Systems.
909
910 Args:
911 msg (str): The message/name for the NVTX range.
912 color (str, optional): The color to use for the range in the profiler. Defaults to "grey".
913 domain (str, optional): The domain name for the range. Defaults to "TensorRT-LLM".
914 category (str, optional): The category for the range. Defaults to None.
915
916 Returns:
917 contextmanager: A context manager that marks the NVTX range.
918 """
919 return nvtx.annotate(msg, color=color, domain=domain, category=category)
920
921
922def nvtx_range_debug(msg: str,

Callers 14

profile_allreduceFunction · 0.90
choose_oneMethod · 0.90
_profile_runnersMethod · 0.90
forwardMethod · 0.90
_get_image_featuresMethod · 0.90
_executor_loop_ppMethod · 0.90
nvtx_range_debugFunction · 0.85
copy_to_deviceMethod · 0.85
_store_argMethod · 0.85
_store_extra_argMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected