Skip to content

Commit

Permalink
moved to demo and interation = 100
Browse files Browse the repository at this point in the history
  • Loading branch information
ssinghalTT committed Mar 6, 2025
1 parent e8b33dc commit 9b88299
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 32 deletions.
36 changes: 36 additions & 0 deletions models/demos/wormhole/resnet50/demo/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

import pytest
from models.demos.ttnn_resnet.demo.demo import run_resnet_imagenet_inference, run_resnet_inference
from models.utility_functions import run_for_wormhole_b0
import ttnn
from models.demos.wormhole.resnet50.tests.test_resnet50_performant_imagenet import (
test_run_resnet50_trace_2cqs_inference,
)


@pytest.mark.parametrize("device_params", [{"l1_small_size": 24576}], indirect=True)
Expand All @@ -25,3 +30,34 @@ def test_demo_imagenet(
)
def test_demo_sample(device, use_program_cache, batch_size, input_loc, imagenet_label_dict, model_location_generator):
run_resnet_inference(batch_size, input_loc, imagenet_label_dict, device, model_location_generator)


@run_for_wormhole_b0()
@pytest.mark.parametrize(
"device_params", [{"l1_small_size": 24576, "trace_region_size": 1605632, "num_command_queues": 2}], indirect=True
)
@pytest.mark.parametrize(
"batch_size, act_dtype, weight_dtype",
((16, ttnn.bfloat8_b, ttnn.bfloat8_b),),
)
# @pytest.mark.parametrize("enable_async_mode", (True), indirect=True)
def test_demo_trace_with_imagenet(
device,
use_program_cache,
batch_size,
imagenet_label_dict,
act_dtype,
weight_dtype,
model_location_generator,
enable_async_mode=True,
):
test_run_resnet50_trace_2cqs_inference(
device,
use_program_cache,
batch_size,
imagenet_label_dict,
act_dtype,
weight_dtype,
enable_async_mode,
model_location_generator,
)
31 changes: 0 additions & 31 deletions models/demos/wormhole/resnet50/tests/test_perf_e2e_resnet50.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,34 +124,3 @@ def test_perf_trace_2cqs(
"resnet50_trace_2cqs",
model_location_generator,
)


@run_for_wormhole_b0()
@pytest.mark.parametrize(
"device_params", [{"l1_small_size": 24576, "trace_region_size": 1605632, "num_command_queues": 2}], indirect=True
)
@pytest.mark.parametrize(
"batch_size, act_dtype, weight_dtype",
((16, ttnn.bfloat8_b, ttnn.bfloat8_b),),
)
@pytest.mark.parametrize("enable_async_mode", (False, True), indirect=True)
def test_perf_trace_2cqs_with_imagenet(
device,
use_program_cache,
batch_size,
imagenet_label_dict,
act_dtype,
weight_dtype,
enable_async_mode,
model_location_generator,
):
test_run_resnet50_trace_2cqs_inference(
device,
use_program_cache,
batch_size,
imagenet_label_dict,
act_dtype,
weight_dtype,
enable_async_mode,
model_location_generator,
)
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_run_resnet50_trace_2cqs_inference(
)
profiler.end(f"compile")
model_version = "microsoft/resnet-50"
iterations = 500
iterations = 100
image_processor = AutoImageProcessor.from_pretrained(model_version)
input_loc = str(model_location_generator("ImageNet_data"))
data_loader = get_data_loader(input_loc, batch_size, iterations)
Expand Down

0 comments on commit 9b88299

Please sign in to comment.