if (Caffe::mode() == Caffe::GPU) {
#ifndef CPU_ONLY
CUDA_CHECK(cudaEventRecord(stop_gpu_, 0));
- CUDA_CHECK(cudaEventSynchronize(stop_gpu_));
#else
NO_GPU;
#endif
}
if (Caffe::mode() == Caffe::GPU) {
#ifndef CPU_ONLY
+ CUDA_CHECK(cudaEventSynchronize(stop_gpu_));
CUDA_CHECK(cudaEventElapsedTime(&elapsed_milliseconds_, start_gpu_,
stop_gpu_));
// Cuda only measure milliseconds
}
if (Caffe::mode() == Caffe::GPU) {
#ifndef CPU_ONLY
+ CUDA_CHECK(cudaEventSynchronize(stop_gpu_));
CUDA_CHECK(cudaEventElapsedTime(&elapsed_milliseconds_, start_gpu_,
stop_gpu_));
#else