MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / run

Method run

bench/python/all_ops/op_cache_limit.py:59–77  ·  view source on GitHub ↗
(self, input)

Source from the content-addressed store, hash-verified

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

Callers 3

runMethod · 0.45
runMethod · 0.45
runMethod · 0.45

Calls 2

itemMethod · 0.80
TensorMethod · 0.45

Tested by

no test coverage detected