Skip to content

Commit

Permalink
Add torch tensor cache to conv2d unit tests to speedup test execution (
Browse files Browse the repository at this point in the history
…#17708)

The function `torch.randn` takes a significant amount of time while
executing `tests/ttnn/unit_tests/operations/test_new_conv2d.py`. The
idea is to cache torch tensors with specific dimensions and reuse them
in other tests that require tensors of those dimensions. It turns out
that, out of approximately 3000 tensors that needed to be generated,
there were only around 300 unique dimensions. This approach reduces the
test execution time by 10%.
  • Loading branch information
skrsticTT authored Feb 7, 2025
1 parent 3387c94 commit 558da69
Showing 1 changed file with 91 additions and 21 deletions.
Loading

0 comments on commit 558da69

Please sign in to comment.