(prof)
| 64 | return tensorboard_trace_handler(cfg.tb_dir) |
| 65 | |
| 66 | def handler(prof) -> None: |
| 67 | step = prof.step_num |
| 68 | chrome_path = cfg.chrome_path |
| 69 | os.makedirs(os.path.dirname(chrome_path) or ".", exist_ok=True) |
| 70 | prof.export_chrome_trace(chrome_path) |
| 71 | cfg.exported_chrome_path = chrome_path |
| 72 | logger.info(f"[Profile] step={step} chrome={chrome_path}") |
| 73 | |
| 74 | return handler |
| 75 |