Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: saienduri <[email protected]>
  • Loading branch information
saienduri committed Nov 9, 2024
1 parent 4834cc5 commit 40fa10b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
20 changes: 17 additions & 3 deletions experimental/benchmarks/sdxl/benchmark_sdxl_rocm.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def run_sdxl_unet_rocm_benchmark(rocm_chip):
# iree benchmark command for full sdxl pipeline
return run_iree_command(exec_args)


def run_sdxl_punet_int8_fp16_rocm_benchmark(rocm_chip):
exec_args = [
"iree-benchmark-module",
Expand All @@ -136,6 +137,7 @@ def run_sdxl_punet_int8_fp16_rocm_benchmark(rocm_chip):
# iree benchmark command for full sdxl pipeline
return run_iree_command(exec_args)


def run_sdxl_prompt_encoder_rocm_benchmark(rocm_chip):
exec_args = [
"iree-benchmark-module",
Expand Down Expand Up @@ -366,7 +368,11 @@ def test_sdxl_rocm_benchmark(
]
if rocm_chip == "gfx942":
mean_time_rows.append(
["Punet F16", f"{benchmark_punet_int8_fp16_mean_time}", f"{goldentime_rocm_punet_int8_fp16}"]
[
"Punet F16",
f"{benchmark_punet_int8_fp16_mean_time}",
f"{goldentime_rocm_punet_int8_fp16}",
]
)

# Create dispatch count table's header and rows
Expand All @@ -382,7 +388,11 @@ def test_sdxl_rocm_benchmark(
]
if rocm_chip == "gfx942":
dispatch_count_rows.append(
["Punet F16", f"{punet_int8_fp16_dispatch_count}", f"{goldendispatch_rocm_punet_int8_fp16}"]
[
"Punet F16",
f"{punet_int8_fp16_dispatch_count}",
f"{goldendispatch_rocm_punet_int8_fp16}",
]
)

# Create binary size table's header and rows
Expand All @@ -398,7 +408,11 @@ def test_sdxl_rocm_benchmark(
]
if rocm_chip == "gfx942":
binary_size_rows.append(
["Punet F16", f"{punet_int8_fp16_binary_size}", f"{goldensize_rocm_punet_int8_fp16}"]
[
"Punet F16",
f"{punet_int8_fp16_binary_size}",
f"{goldensize_rocm_punet_int8_fp16}",
]
)

# Create mean time table using tabulate
Expand Down
6 changes: 6 additions & 0 deletions experimental/benchmarks/sdxl/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,12 @@ def goldentime_rocm_e2e(request):
def goldentime_rocm_unet(request):
return request.config.getoption("--goldentime-rocm-unet-ms")


@pytest.fixture
def goldentime_rocm_punet_int8_fp16(request):
return request.config.getoption("--goldentime-rocm-punet-int8-fp16-ms")


@pytest.fixture
def goldentime_rocm_clip(request):
return request.config.getoption("--goldentime-rocm-clip-ms")
Expand All @@ -124,10 +126,12 @@ def goldentime_rocm_vae(request):
def goldendispatch_rocm_unet(request):
return request.config.getoption("--goldendispatch-rocm-unet")


@pytest.fixture
def goldendispatch_rocm_punet_int8_fp16(request):
return request.config.getoption("--goldendispatch-rocm-punet-int8-fp16")


@pytest.fixture
def goldendispatch_rocm_clip(request):
return request.config.getoption("--goldendispatch-rocm-clip")
Expand All @@ -142,10 +146,12 @@ def goldendispatch_rocm_vae(request):
def goldensize_rocm_unet(request):
return request.config.getoption("--goldensize-rocm-unet-bytes")


@pytest.fixture
def goldensize_rocm_punet_int8_fp16(request):
return request.config.getoption("--goldensize-rocm-punet-int8-fp16-bytes")


@pytest.fixture
def goldensize_rocm_clip(request):
return request.config.getoption("--goldensize-rocm-clip-bytes")
Expand Down

0 comments on commit 40fa10b

Please sign in to comment.