-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add benchmark.py #35
Conversation
docs/getting_started.md
Outdated
@@ -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. |
There was a problem hiding this comment.
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"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
average iter/s
There was a problem hiding this comment.
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
need to sign the cla @xiaohangcd |
tools/benchmark.py
Outdated
@@ -0,0 +1,74 @@ | |||
import argparse |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
.
docs/getting_started.md
Outdated
@@ -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. |
There was a problem hiding this comment.
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.
as discussed in meeting, this script is not for measuring training speed. |
Please check linting. |
docs/getting_started.md
Outdated
## 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} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
script name
@xiaohangcd could you run this script using the settings in #40 ? namely, the |
the speed test report does not block merging |
No description provided.