Skip to content

Commit

Permalink
#16895: Use working version of act_block_h_override for first conv in…
Browse files Browse the repository at this point in the history
… resnet. Also, fix PCC check in the demo, as it was not picking up correct values for wormhole
  • Loading branch information
ppopovic committed Jan 20, 2025
1 parent 76b36f5 commit 30dea30
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions models/demos/ttnn_resnet/tests/resnet50_test_infra.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import pytest
import torch
import torchvision
import copy

import ttnn
from ttnn.model_preprocessing import (
Expand Down Expand Up @@ -39,7 +40,7 @@ def load_resnet50_model(model_location_generator):

## copied from ttlib version test:
# golden pcc is ordered fidelity, weight dtype, activation dtype
golden_pcc = {
golden_pcc_obj = {
8: {
(
ttnn.MathFidelity.HiFi4,
Expand Down Expand Up @@ -142,8 +143,8 @@ def load_resnet50_model(model_location_generator):
}

golden_pcc = {
ttnn.device.Arch.WORMHOLE_B0: golden_pcc,
ttnn.device.Arch.GRAYSKULL: golden_pcc,
ttnn.device.Arch.WORMHOLE_B0: copy.deepcopy(golden_pcc_obj),
ttnn.device.Arch.GRAYSKULL: copy.deepcopy(golden_pcc_obj),
}

golden_pcc[ttnn.device.Arch.GRAYSKULL][16][
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,9 @@ def __init__(
if type(device) == ttnn.MeshDevice and device.get_num_devices() > 8:
self.conv1_config.act_block_h_override = 64
else:
self.conv1_config.act_block_h_override = 49 * 32
# Todo: restore after issue #16895 is fixed
# self.conv1_config.act_block_h_override = 49 * 32
self.conv1_config.act_block_h_override = 2 * 32

self.conv1_kernel_size = (4, 4)
self.conv1_stride = (1, 1)
Expand Down

0 comments on commit 30dea30

Please sign in to comment.