tenstorrent / tt-metal

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

Conv giving low PCC for YOLOX Dark5 module #8970

Open ankitmcw opened 1 month ago

ankitmcw commented 1 month ago

For yolox dark5 module, conv4 is giving low pcc. Currently switching back that conv to fallback.

Unit test parameters

Layers:
self.c4 = nn.Conv2d(768, 384, kernel_size=1, stride=1, bias=False)
self.b4 = nn.BatchNorm2d(384, eps=0.001, momentum=0.03, affine=True, track_running_stats=True)
self.silu = nn.SiLU(inplace=True)

Input shape: (1, 768, 20, 20)

We get PCC = 0.09308027049331724, when output of conv3 is stored and passed to the above conv.

To reproduce, checkout to branch ankit/yolox_dark5_conv4_unittest

Run below command to generate the inputs for test_dar5_conv4 file.

pytest tests/ttnn/integration_tests/yolox_m/test_ttnn_dark5.py

Then run the below command to test the particular combination of ops,

pytest tests/ttnn/integration_tests/yolox_m/test_dark5_conv4.py 

Note: Make sure you have yolox_m.pth file in tests/ttnn/integration_tests/yolox_m/ path.

dvartaniansTT commented 2 weeks ago

@ankitmcw and @saichandax please note the mentioned lines to comment don't actually exist:

"uncommennt line 78-80 in models/experimental/functional_yolox_m/reference/dark5.py"

Please double check this issue and update it.

punithsekar commented 2 weeks ago

Thank you, @dvartaniansTT for the comments. I have updated the issue description and the unit test branch.