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

Add benchmark.py #35

Merged
merged 6 commits into from
Jul 30, 2020
Merged

Add benchmark.py #35

merged 6 commits into from
Jul 30, 2020

Conversation

xiaohangcd
Copy link
Contributor

No description provided.

@CLAassistant
Copy link

CLAassistant commented Jul 28, 2020

CLA assistant check
All committers have signed the CLA.

@jin-s13 jin-s13 requested review from Canwang-sjtu and innerlee July 28, 2020 12:45
@@ -306,6 +306,12 @@ CUDA_VISIBLE_DEVICES=0,1,2,3 ./tools/slurm_train.sh ${PARTITION} ${JOB_NAME} con
CUDA_VISIBLE_DEVICES=4,5,6,7 ./tools/slurm_train.sh ${PARTITION} ${JOB_NAME} config2.py ${WORK_DIR} 4
```

## Benchmark
You can get average training batch for a second, we only care about the model training, not including the IO time and pre-processing time.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this mean: "get average training batch for a second"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

average iter/s

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, our unit is xxx seconds per iter

@innerlee innerlee requested a review from JoannaLXY July 28, 2020 13:08
@innerlee
Copy link
Contributor

need to sign the cla @xiaohangcd

@jin-s13 jin-s13 requested a review from innerlee July 30, 2020 05:04
@@ -0,0 +1,74 @@
import argparse
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename the file to benchmark_inference.py

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this script is for inference, let's change the unit back to items/s.

@@ -306,6 +306,12 @@ CUDA_VISIBLE_DEVICES=0,1,2,3 ./tools/slurm_train.sh ${PARTITION} ${JOB_NAME} con
CUDA_VISIBLE_DEVICES=4,5,6,7 ./tools/slurm_train.sh ${PARTITION} ${JOB_NAME} config2.py ${WORK_DIR} 4
```

## Benchmark
You can get average training time for an iteration, we only care about the model training, not including the IO time and pre-processing time.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

## Benchmark Inference Speed
You can get average inference speed using the following script. Not that it does not includes the IO time and pre-processing time.

@innerlee
Copy link
Contributor

as discussed in meeting, this script is not for measuring training speed.

@jin-s13
Copy link
Collaborator

jin-s13 commented Jul 30, 2020

Please check linting.

## Benchmark
You can get average inference speed using the following script. Not that it does not includes the IO time and pre-processing time.
```shell
python tools/benchmark.py ${MMPOSE_CONFIG_FILE}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

script name

@innerlee
Copy link
Contributor

@xiaohangcd could you run this script using the settings in #40 ? namely, the res50_coco_256x192 and mobilenetv2_coco_256x192, and report the speed here?

@innerlee innerlee merged commit 64cf6a3 into master Jul 30, 2020
@innerlee innerlee deleted the add_benchmark branch July 30, 2020 09:23
@innerlee
Copy link
Contributor

the speed test report does not block merging

shuheilocale pushed a commit to shuheilocale/mmpose that referenced this pull request May 6, 2023
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

Successfully merging this pull request may close these issues.

4 participants