"src/targets/gpu/vscode:/vscode.git/clone" did not exist on "f303624d3f71976fefff8f3e2d9ba5b4b99eed27"
Commit b690f385 authored by Paul's avatar Paul
Browse files

Print device time

parent 7d5365d0
...@@ -39,7 +39,10 @@ struct compile_op : action<compile_op> ...@@ -39,7 +39,10 @@ struct compile_op : action<compile_op>
auto inputs = p.parse_shapes(v.at("inputs")); auto inputs = p.parse_shapes(v.at("inputs"));
auto op = gpu::compile_op(v.at("name").to<std::string>(), ctx, inputs, v); auto op = gpu::compile_op(v.at("name").to<std::string>(), ctx, inputs, v);
auto [host_time, device_time] = time_op(ctx, op, inputs, p.get(v, "iterations", 100)); auto [host_time, device_time] = time_op(ctx, op, inputs, p.get(v, "iterations", 100));
std::cout << op << ": " << host_time << "ms" << std::endl; std::cout << op << ": " << host_time << "ms";
if (device_time > 0)
std::cout << ", " << device_time << "ms";
std::cout << std::endl;
} }
}; };
......
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