"examples/inference/README.md" did not exist on "5e84353ebab5e0ce4fc762f64fabbdd9ac0c282a"
Commit 31ce0380 authored by Astha Rai's avatar Astha Rai
Browse files

added testing printouts

parent 13587ab3
...@@ -87,11 +87,24 @@ int main() ...@@ -87,11 +87,24 @@ int main()
"The runtime parameters seems not supported by the device instance, exiting!"); "The runtime parameters seems not supported by the device instance, exiting!");
}; };
std::cout << "A (nchw): " << a.mDesc << std::endl;
std::cout << "B (nhwc): " << b.mDesc << std::endl;
auto broadcastPermute_invoker_ptr = broadcastPermute.MakeInvokerPointer(); auto broadcastPermute_invoker_ptr = broadcastPermute.MakeInvokerPointer();
float ave_time = float ave_time =
broadcastPermute_invoker_ptr->Run(argument.get(), StreamConfig{nullptr, time_kernel}); broadcastPermute_invoker_ptr->Run(argument.get(), StreamConfig{nullptr, time_kernel});
std::cout << "Perf: " << ave_time << " ms" << std::endl; std::size_t flop = std::size_t(2) * nchw[0] * nchw[1] * nchw[2] * nchw[3];
std::size_t num_btype = sizeof(ADataType) * (nchw[0] * nchw[1] * nchw[2] * nchw[3]) +
sizeof(BDataType) * (nchw[0] * nchw[1] * nchw[2] * nchw[3]);
float tflops = static_cast<float>(flop) / 1.E9 / ave_time;
float gb_per_sec = num_btype / 1.E6 / ave_time;
std::cout << "Perf: " << ave_time << " ms, " << tflops << " TFlops, " << gb_per_sec << " GB/s"
<< std::endl;
bool pass = true; bool pass = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment