(cmd: list[str], rep_out: Path)
| 148 | |
| 149 | |
| 150 | def nsys_profile(cmd: list[str], rep_out: Path) -> bool: |
| 151 | full = ["nsys", "profile", "-t", "cuda", "--force-overwrite", "true", |
| 152 | "-o", str(rep_out.with_suffix("")), *cmd] |
| 153 | try: |
| 154 | subprocess.run(full, capture_output=True, text=True, timeout=1800, check=True) |
| 155 | return True |
| 156 | except Exception as e: # noqa |
| 157 | sys.stderr.write(f"[profile] nsys profile failed: {e}\n") |
| 158 | return False |
| 159 | |
| 160 | |
| 161 | def _num(row: dict, *names) -> float: |