| 104 | # This is the {random, large} case. This is the worst case scenario, never re-using the cache |
| 105 | class OpCacheLimitLargeAndRandom(BaseOpCacheLimit): |
| 106 | def setup(self, input): |
| 107 | # Set the cache limit to the total gpu memory for this benchmark |
| 108 | # low=1000, high=2000 results in always creating tensor's of random shape |
| 109 | # between [(1000,1000,3), (1999,1999,3)] |
| 110 | total = torch.cuda.mem_get_info()[1] |
| 111 | super().setup(input, total, low=1000, high=2000) |
| 112 | |
| 113 | def run(self, input): |
| 114 | super().run(input) |