MCPcopy Create free account
hub / github.com/Luce-Org/lucebox-hub / nsys_profile

Function nsys_profile

server/scripts/profile.py:150–158  ·  view source on GitHub ↗
(cmd: list[str], rep_out: Path)

Source from the content-addressed store, hash-verified

148
149
150def 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
161def _num(row: dict, *names) -> float:

Callers 1

mainFunction · 0.85

Calls 2

runMethod · 0.80
writeMethod · 0.80

Tested by

no test coverage detected