8000 time · Issue #53 · luoyetx/mini-caffe · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jul 3, 2025. It is now read-only.
This repository was archived by the owner on Jul 3, 2025. It is now read-only.

time #53

Open
Open

Description

@zhly0

@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?

Activity

  1. luoyetx commented on Nov 6, 2017

    @luoyetx
    Owner

    @zhly0 consider to use profiler, see this doc

  2. zuoqing1988 commented on May 2, 2018

    @zuoqing1988

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0