MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / L3RefillCount

Method L3RefillCount

tensorflow/lite/experimental/ruy/pmu.cc:214–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214float PmuEvents::L3RefillCount() const {
215 // Important: this was discovered in the context of the above experiments,
216 // which also tested the _RD variants of these counters. So it's possible that
217 // it's just not needed here with the default (non _RD) counters.
218 //
219 // Some CPUs implement LL_CACHE_MISS[_RD], some implement
220 // L3D_CACHE_REFILL[_RD]. It seems that either one of these two counters is
221 // zero, or they roughly both agree with each other. Therefore, taking the max
222 // of them is a reasonable way to get something more portable across various
223 // CPUs.
224 return static_cast<float>(
225 std::max(priv->l3d_cache_refill.Count(), priv->ll_cache_miss.Count()));
226}
227
228float PmuEvents::L1TLBRefillCount() const {
229 return static_cast<float>(priv->l1d_tlb_refill.Count());

Callers 1

BenchmarkMethod · 0.80

Calls 2

maxFunction · 0.50
CountMethod · 0.45

Tested by 1

BenchmarkMethod · 0.64