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)
| 898 | |
| 899 | |
| 900 | def 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 | |
| 922 | def nvtx_range_debug(msg: str, |
no outgoing calls
no test coverage detected