Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log more context when sdxl benchmark commands fail. #17907

Merged
merged 3 commits into from
Jul 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions experimental/benchmarks/sdxl/benchmark_sdxl_rocm.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ def run_iree_command(args: Sequence[str] = ()):
return_code = proc.returncode
if return_code == 0:
return 0, proc.stdout
logging.getLogger().info(f"Command failed with error: {proc.stderr}")
logging.getLogger().error(
f"Command failed!\n"
f"Stderr diagnostics:\n{proc.stderr}\n"
f"Stdout diagnostics:\n{proc.stdout}\n"
)
return 1, proc.stdout


Expand Down Expand Up @@ -174,8 +178,10 @@ def decode_output(bench_lines):

def job_summary_process(ret_value, output):
if ret_value == 1:
logging.getLogger().info("Running SDXL ROCm benchmark failed. Exiting")
# Output should have already been logged earlier.
logging.getLogger().error("Running SDXL ROCm benchmark failed. Exiting.")
return

bench_lines = output.decode().split("\n")[3:]
benchmark_results = decode_output(bench_lines)
logging.getLogger().info(benchmark_results)
Expand Down
Loading