diff --git a/mace/core/net.cc b/mace/core/net.cc index 5af73bf5c3fbac55883d5bf85634c237e2d3324f..93e9750b0ad833bfb3b809f65d4c53ecf6ab6050 100644 --- a/mace/core/net.cc +++ b/mace/core/net.cc @@ -55,7 +55,7 @@ bool SimpleNet::Run(RunMetadata *run_metadata) { if (device_type_ == DeviceType::OPENCL) { #ifndef __USE_OPENCL LOG(FATAL) << "OpenCL is not supported"; -#endif +#else OpenCLRuntime::Get()->command_queue().finish(); op_stats = run_metadata->add_op_stats(); op_stats->set_operator_name(op->debug_def().name()); @@ -73,6 +73,7 @@ bool SimpleNet::Run(RunMetadata *run_metadata) { op_stats->set_all_end_rel_micros( OpenCLRuntime::Get()->GetEventProfilingEndInfo() / 1000 - op_stats->all_start_micros()); +#endif } else { op_stats->set_op_end_rel_micros(NowInMicroSec() - op_stats->all_start_micros());