Skip to content

Commit

Permalink
#0: Fix mesh_device grid specification for tgg resnet tests after #12479
Browse files Browse the repository at this point in the history
 was merged
  • Loading branch information
tt-aho committed Sep 20, 2024
1 parent 00e1478 commit def05d1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions models/demos/tgg/resnet50/tests/test_perf_e2e_resnet50.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
)
@pytest.mark.parametrize(
"mesh_device",
((16, 4),),
((8, 8),),
indirect=True,
)
def test_perf(
Expand Down Expand Up @@ -53,7 +53,7 @@ def test_perf(
)
@pytest.mark.parametrize(
"mesh_device",
((16, 4),),
((8, 8),),
indirect=True,
)
def test_perf_trace(
Expand Down
4 changes: 2 additions & 2 deletions models/demos/tgg/resnet50/tests/test_resnet50_performant.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
@pytest.mark.parametrize("enable_async_mode", [True], indirect=True)
@pytest.mark.parametrize(
"mesh_device",
((16, 4),),
((8, 8),),
indirect=True,
)
def test_run_resnet50_inference(
Expand Down Expand Up @@ -56,7 +56,7 @@ def test_run_resnet50_inference(
@pytest.mark.parametrize("enable_async_mode", [True], indirect=True)
@pytest.mark.parametrize(
"mesh_device",
((16, 4),),
((8, 8),),
indirect=True,
)
def test_run_resnet50_trace_inference(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,5 +457,7 @@ def run_perf_resnet(
inference_time_cpu=cpu_time,
)

logger.info(f"{model_name} {comments} inference time (avg): {inference_time_avg}")
logger.info(
f"{model_name} {comments} inference time (avg): {inference_time_avg}, FPS: {batch_size/inference_time_avg}"
)
logger.info(f"{model_name} compile time: {compile_time}")
4 changes: 3 additions & 1 deletion models/demos/ttnn_resnet/tests/perf_e2e_resnet50.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,5 +372,7 @@ def run_perf_resnet(
inference_time_cpu=cpu_time,
)

logger.info(f"{model_name} {comments} inference time (avg): {inference_time_avg}")
logger.info(
f"{model_name} {comments} inference time (avg): {inference_time_avg}, FPS: {batch_size/inference_time_avg}"
)
logger.info(f"{model_name} compile time: {compile_time}")
4 changes: 2 additions & 2 deletions tests/ttnn/unit_tests/test_multi_device_trace_tgg.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@pytest.mark.parametrize(
"shape", [(1, 1, 512, 512), (1, 1, 32, 32), (1, 3, 32, 32), (1, 1, 256, 256), (1, 3, 512, 512), (1, 3, 128, 128)]
)
@pytest.mark.parametrize("mesh_device", [pytest.param((16, 4), id="16x4_grid")], indirect=True)
@pytest.mark.parametrize("mesh_device", [pytest.param((8, 8), id="8x8_grid")], indirect=True)
@pytest.mark.parametrize("enable_async", [True])
@pytest.mark.parametrize("enable_multi_cq", [False]) # To be toggled when Galaxy supports Multi-CQ
@pytest.mark.parametrize("device_params", [{"trace_region_size": 60000}], indirect=True)
Expand Down Expand Up @@ -119,7 +119,7 @@ def event_sync(event, record_cq, wait_cq):
"shape",
[(1, 1, 256, 256), (1, 1, 512, 512), (1, 1, 32, 32), (1, 3, 32, 32)],
)
@pytest.mark.parametrize("mesh_device", [pytest.param((16, 4), id="16x4_grid")], indirect=True)
@pytest.mark.parametrize("mesh_device", [pytest.param((8, 8), id="8x8_grid")], indirect=True)
@pytest.mark.parametrize("enable_async", [True])
@pytest.mark.parametrize("enable_multi_cq", [False]) # To be toggled when Galaxy supports Multi-CQ
@pytest.mark.parametrize("device_params", [{"trace_region_size": 200000}], indirect=True)
Expand Down

0 comments on commit def05d1

Please sign in to comment.