tenstorrent / tt-metal

:metal: TT-NN operator library, and TT-Metalium low level kernel programming model.
Apache License 2.0
303 stars 26 forks source link

Resnet Ops Unit tests #6637

Open saichandax opened 3 months ago

saichandax commented 3 months ago

To create unittests for all the ops in the Resnet model on GS device. unit tests to be created under https://github.com/tenstorrent-metal/tt-metal/blob/main/tests/ttnn/unit_tests/operations

HariniMohan0102 commented 3 months ago

Added unit tests for the supported ops of ResNet50 which includes Conv2d, Relu, MaxPool2d and Linear. The BatchNorm2d and AdaptiveAvgPool2d are not supported.

Among 372 unit tests of Conv2d, 46 failed, 140 passed, 186 skipped -Here are the unique exceptions of the failures: -38 cases fail by error: TT_THROW @ tt_metal/impl/program/program.cpp:488: tt::exception info: Statically allocated circular buffers on core range {} grow to {} B which is beyond max L1 size of {} B [(x=0,y=0) - (x=11,y=2)] 1451616 1048576 -6 cases fail by error: TT_THROW @ tt_metal/impl/program/program.cpp:491: tt::exception info: Statically allocated circular buffers in program {} clash with L1 buffers on core range {}. L1 buffer allocated at {} and static circular buffer region ends at {} 1218 [(x=0,y=0) - (x=11,y=7)] 638976 812896 -2 casses fail by error: TT_THROW @ tt_metal/impl/allocator/allocator.cpp:107: tt::exception info: Out of Memory: Not enough space to allocate {} B {} buffer across {} banks, where each bank needs to store {} B 83499136 L1 98 852032

Among 12 unit tests of Relu, 12 passed Among 8 unit tests of MaxPool2d, 4 passed, 4 skipped Among 2 unit tests of Linear, 2 passed

Note: Details on the failures will be posted here soon.

saichandax commented 3 months ago

commit for the unit tests is here

saichandax commented 3 months ago

PR: #6865