Skip to content

Commit 1349243

Browse files
SDXL: reorg CI tests (tenstorrent#25278)
### Problem description SDXL frequent tests were taking too long to execute. ### What's changed Moved the long version of [test_unet_loop.py](https://github.com/tenstorrent/tt-metal/blob/ipotkonjak/sdxl_reorg_ci_tests/models/experimental/stable_diffusion_xl_base/tests/pcc/test_unet_loop.py) to L2 nightly pipeline. ### Checklist - [x] [Nightly tt-metal L2 tests](https://github.com/tenstorrent/tt-metal/actions/runs/16346610728/job/46182506315) CI passes - [x] [(Single-card) Frequent model and ttnn tests](https://github.com/tenstorrent/tt-metal/actions/runs/16347445646/job/46185468523) CI passes
1 parent 625fcc1 commit 1349243

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

.github/workflows/tt-metal-l2-nightly-impl.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ jobs:
3838
- name: ttnn nightly pool tests
3939
cmd: pytest tests/ttnn/nightly/unit_tests/operations/pool -xv -m "not disable_fast_runtime_mode"
4040
owner: U052J2QDDKQ # Pavle Josipovic
41+
- name: ttnn nightly sdxl tests
42+
cmd: if [[ "${{ inputs.runner-label }}" == "N300" ]]; then
43+
export WH_ARCH_YAML=wormhole_b0_80_arch_eth_dispatch.yaml;
44+
fi;
45+
pytest models/experimental/stable_diffusion_xl_base/tests/pcc/test_unet_loop.py --loop-iter-num=50 -xv -m "not disable_fast_runtime_mode"
46+
owner: U07N3CUUN05 # Iva Potkonjak
4147
container:
4248
image: ${{ inputs.docker-image || 'docker-image-unresolved!' }}
4349
env:

models/experimental/stable_diffusion_xl_base/conftest.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ def pytest_addoption(parser):
1818
default=5000,
1919
help="Number of prompts to process (default: 5000)",
2020
)
21+
parser.addoption(
22+
"--loop-iter-num",
23+
action="store",
24+
default=10,
25+
help="Number of iterations of denoising loop (default: 10)",
26+
)
2127

2228

2329
@pytest.fixture
@@ -35,3 +41,8 @@ def evaluation_range(request):
3541
num_prompts = 5000
3642

3743
return start_from, num_prompts
44+
45+
46+
@pytest.fixture
47+
def loop_iter_num(request):
48+
return int(request.config.getoption("--loop-iter-num"))

models/experimental/stable_diffusion_xl_base/tests/pcc/test_unet_loop.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
)
1919
from tests.ttnn.utils_for_testing import assert_with_pcc, comp_pcc
2020
import matplotlib.pyplot as plt
21+
from models.utility_functions import is_wormhole_b0
2122

2223

2324
def run_tt_denoising(
@@ -444,15 +445,12 @@ def run_unet_inference(ttnn_device, is_ci_env, prompts, num_inference_steps, cla
444445
logger.info(f"PCC of the last iteration is: {pcc_message}")
445446

446447

448+
@pytest.mark.skipif(not is_wormhole_b0(), reason="SDXL supported on WH only")
447449
@pytest.mark.parametrize("device_params", [{"l1_small_size": SDXL_L1_SMALL_SIZE}], indirect=True)
448450
@pytest.mark.parametrize(
449451
"prompt",
450452
(("An astronaut riding a green horse"),),
451453
)
452-
@pytest.mark.parametrize(
453-
"num_inference_steps",
454-
((50),),
455-
)
456454
@pytest.mark.parametrize(
457455
"classifier_free_guidance",
458456
[
@@ -464,7 +462,7 @@ def test_unet_loop(
464462
device,
465463
is_ci_env,
466464
prompt,
467-
num_inference_steps,
465+
loop_iter_num,
468466
classifier_free_guidance,
469467
):
470-
return run_unet_inference(device, is_ci_env, prompt, num_inference_steps, classifier_free_guidance)
468+
return run_unet_inference(device, is_ci_env, prompt, loop_iter_num, classifier_free_guidance)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../models/experimental/stable_diffusion_xl_base/conftest.py

0 commit comments

Comments
 (0)