| 57 | ) |
| 58 | |
| 59 | def run(self, input): |
| 60 | # If we exceed the outer bench iterations, we return. |
| 61 | # If we didn't return, we might re-use the cache, which we specifically don't want for |
| 62 | # "OpCacheLimitLargeAndRandom". |
| 63 | # For the other classes (OpCacheLimitZero, OpCacheLimitLarge), we could continue running the |
| 64 | # benchmarks, but then we would not get comparable numbers between all three classes |
| 65 | if self.iter_outer >= self.max_iter_outer: |
| 66 | return |
| 67 | |
| 68 | for ii in range(self.n_tensors): |
| 69 | shape = ( |
| 70 | self.hw[self.iter_outer, 0, ii].item(), |
| 71 | self.hw[self.iter_outer, 1, ii].item(), |
| 72 | 3, |
| 73 | ) |
| 74 | _ = cvcuda.Tensor(shape, cvcuda.Type.F32, cvcuda.TensorLayout.HWC) |
| 75 | |
| 76 | self.iter_outer += 1 |
| 77 | return |
| 78 | |
| 79 | |
| 80 | # This is the {non-random, small} case. The smallest we can choose is 0, so we set the cache limit to 0 and |