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

Function BM_BFloat16ToFloat

tensorflow/core/framework/bfloat16_test.cc:239–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237BENCHMARK(BM_RoundFloatToBFloat16);
238
239static void BM_BFloat16ToFloat(int iters) {
240 testing::StopTiming();
241 static const int N = 32 << 20;
242 const int64 tot = static_cast<int64>(iters) * N;
243 testing::ItemsProcessed(tot);
244 testing::BytesProcessed(tot * (sizeof(float) + sizeof(bfloat16)));
245
246 bfloat16* inp = new bfloat16[N];
247 float* out = new float[N];
248
249 testing::StartTiming();
250 while (iters--) {
251 BFloat16ToFloat(inp, out, N);
252 }
253 delete[] inp;
254 delete[] out;
255}
256BENCHMARK(BM_BFloat16ToFloat);
257
258} // namespace

Callers

nothing calls this directly

Calls 5

StopTimingFunction · 0.85
ItemsProcessedFunction · 0.85
BytesProcessedFunction · 0.85
StartTimingFunction · 0.85
BFloat16ToFloatFunction · 0.85

Tested by

no test coverage detected