Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time #53

Open
zhly0 opened this issue Oct 16, 2017 · 2 comments
Open

time #53

zhly0 opened this issue Oct 16, 2017 · 2 comments

Comments

@zhly0
Copy link

zhly0 commented Oct 16, 2017

@luoyetx thanks for your nice work!the code is really simplified for caffe inference.
and there is a question:
when I use the time count:
clock_t start = clock();
clock_t end = clock();
float time = (float)(end - start) / CLOCKS_PER_SEC;
the time I get is about 1000ms,but when I use profiler in the mini-caffe,the time I get is about 250ms,I know the clock() is not so accurate,and the time it get is about twice of profile,but why I get four times?

@luoyetx
Copy link
Owner

luoyetx commented Nov 6, 2017

@zhly0 consider to use profiler, see this doc

@zuoqing1988
Copy link

clock() will sum the time of all threads.

use
#include <omp.h>
double t1 = omp_get_wtime();
...
double t2 = omp_get_wtime();
printf("time = %.3f seconds\n",t2-t1);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants