Skip to content

Commit

Permalink
Removing unused args and misleading measurements.
Browse files Browse the repository at this point in the history
  • Loading branch information
eagarvey-amd committed Nov 14, 2024
1 parent 5dd512a commit b9a87d0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 5 additions & 1 deletion shortfin/python/shortfin_apps/sd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ You can check if this (or any) port is in use on Linux with `ss -ntl | grep 8000
```
python -m shortfin_apps.sd.server --device=amdgpu --device_ids=0 --build_preference=precompiled --topology="spx_single"
```

- Wait until your server outputs:
```
INFO - Application startup complete.
INFO - Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
```
- Run a CLI client in a separate shell:
```
python -m shortfin_apps.sd.simple_client --interactive
Expand Down
6 changes: 0 additions & 6 deletions shortfin/python/shortfin_apps/sd/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,6 @@ def main(argv, log_config=uvicorn.config.LOGGING_CONFIG):
parser = argparse.ArgumentParser()
parser.add_argument("--host", type=str, default=None)
parser.add_argument("--port", type=int, default=8000)
parser.add_argument(
"--root-path",
type=str,
default=None,
help="Root path to use for installing behind path based proxy.",
)
parser.add_argument(
"--timeout-keep-alive", type=int, default=5, help="Keep alive timeout"
)
Expand Down
4 changes: 3 additions & 1 deletion shortfin/python/shortfin_apps/sd/simple_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ async def static(args):
if not any([i is None for i in [latencies, sample_counts]]):
total_num_samples = sum(sample_counts)
sps = str(total_num_samples / (end - start))
print(f"Average throughput: {sps} samples per second")
# Until we have better measurements, don't report the throughput that includes saving images.
if not args.save:
print(f"Average throughput: {sps} samples per second")
else:
raise ValueError("Received error response from server.")

Expand Down

0 comments on commit b9a87d0

Please sign in to comment.