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

Inference bottlenecked by _local_scalar_dense running on CPU #1050

Open
4 tasks done
JasonWongFGF opened this issue May 22, 2024 · 0 comments
Open
4 tasks done

Inference bottlenecked by _local_scalar_dense running on CPU #1050

JasonWongFGF opened this issue May 22, 2024 · 0 comments
Labels
question Further information is requested

Comments

@JasonWongFGF
Copy link

Before Asking

  • I have read the README carefully. 我已经仔细阅读了README上的操作指引。

  • I want to train my custom dataset, and I have read the tutorials for training your custom data carefully and organize my dataset correctly; (FYI: We recommand you to apply the config files of xx_finetune.py.) 我想训练自定义数据集,我已经仔细阅读了训练自定义数据的教程,以及按照正确的目录结构存放数据集。(FYI: 我们推荐使用xx_finetune.py等配置文件训练自定义数据集。)

  • I have pulled the latest code of main branch to run again and the problem still existed. 我已经拉取了主分支上最新的代码,重新运行之后,问题仍不能解决。

Search before asking

  • I have searched the YOLOv6 issues and found no similar questions.

Question

Using torch.autograd.profiler during inference, these are my results
local_dense
Notice how _local_scalar_dense is executed using the CPU rather than CUDA unlike the rest of the function calls. As a result, my inference speed is heavily bottlenecked by those 3 _local_scalar_dense calls.

My question is . . .

  1. Where _local_scalar_dense is called within the YOLOv6 inference pipeline
  2. Can I forcefully ensure _local_scalar_dense is executed using CUDA

I should also mention this issue is semi-reproducible as I've tried running the same code on multiple systems using the same environment. I'd observe this issue on some but not all.

Additional

No response

@JasonWongFGF JasonWongFGF added the question Further information is requested label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant