Skip to content

Commit

Permalink
Log more context when sdxl benchmark commands fail. (iree-org#17907)
Browse files Browse the repository at this point in the history
Progress on nod-ai/SHARK-TestSuite#286

Tested here:
https://github.com/iree-org/iree/actions/runs/9944277339/job/27470515222?pr=17907#step:7:171
(actually nvm, that failed before this script even ran... errr... well,
it's probably fine lol)

ci-exactly: build_packages,regression_test
  • Loading branch information
ScottTodd authored Jul 15, 2024
1 parent a56975d commit 0bc1518
Showing 1 changed file with 8 additions and 2 deletions.
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

0 comments on commit 0bc1518

Please sign in to comment.