Megvii-BaseDetection / Megvii-BaseDetection/YOLOX

Inference time is more with fp16 compared to fp32

Open
#1,460 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.6k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

YOLOX-s model, when evaluated using the below command line (without fuse enabled) took an average inference time of 22.712ms, with RTX2080Ti
python -m yolox.tools.eval -n yolox-s -c yolox_s.pth -b 1 -d 1 --conf 0.001 --fp16

The same YOLOX-s model, without fp16 using the below command line, took only 15.309ms with RTX2080Ti.
python -m yolox.tools.eval -n yolox-s -c yolox_s.pth -b 1 -d 1 --conf 0.001

With fp16, it should have taken lesser time. Instead it took more time. What could be the reason for this?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the python -m yolox.tools.eval entry point and reproduce both YOLOX-s commands on an RTX2080Ti, with and without --fp16. Compare the timing path and surrounding evaluation configuration; done means identifying and documenting the cause of the slower fp16 result, or confirming the behavior with evidence.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.