docstr: XLA Profiler will help you debug and optimize training workload performance for your models using Cloud TPU
  performance tools.
  
  Args:
      port: the port to start the profiler server on. An exception is
          raised if the provided port is invalid or busy.
docstr_tok: ["XLA","Profiler","will","help","you","debug","and","optimize","training","workload","performance","for","your","models","using","Cloud","TPU","performance","tools",".","Args",":","port",":","the","port","to","start","the","profiler","server","on",".","An","exception","is","raised","if","the","provided","port","is","invalid","or","busy","."]
code: def __init__(self, port: int = 9012) -> None:
      """XLA Profiler will help you debug and optimize training workload performance for your models using Cloud TPU
      performance tools.
  
      Args:
          port: the port to start the profiler server on. An exception is
              raised if the provided port is invalid or busy.
  
      """
      if not _XLA_AVAILABLE:
          raise ModuleNotFoundError(str(_XLA_AVAILABLE))
      super().__init__(dirpath=None, filename=None)
      self.port = port
      self._recording_map: Dict = {}
      self._step_recoding_map: Dict = {}
      self._start_trace: bool = False
  
file_path: pytorch-lightning/src/lightning/pytorch/profilers/xla.py
imports: import logging
  from typing import Dict
  from typing_extensions import override
  from lightning.fabric.accelerators.xla import _XLA_AVAILABLE
  from lightning.pytorch.profilers.profiler import Profiler
label_desc: Use image node_id 1 to create a new XLAProfiler object from inherited base classes: Profiler with example: obj = XLAProfiler(port)