MojoLlama
Archived Mojo/MAX quantizer and serving research repository (read-only history)
Brought by drakestapleton
MojoLlama / src / mojollama / benchmarks / fix_paths.py
| 1 | #!/usr/bin/env python3 |
| 2 | """Fix relative paths in benchmark scripts to point to kernels/.""" |
| 3 | import os, sys |
| 4 | |
| 5 | scripts = ['bench_batch_qwen36.py', 'bench_concurrent_qwen36.py'] |
| 6 | for s in scripts: |
| 7 | f = os.path.join(os.path.dirname(__file__), s) |
| 8 | with open(f) as fh: |
| 9 | content = fh.read() |
| 10 | old = "'kernels'" |
| 11 | new = "'..', '..', 'kernels'" |
| 12 | if old in content: |
| 13 | content = content.replace(old, new) |
| 14 | with open(f, 'w') as fh: |
| 15 | fh.write(content) |
| 16 | print(f"Fixed {s}") |
| 17 | else: |
| 18 | print(f"No change in {s}") |