Change the inference device on Mac#557
Merged
Merged
Conversation
Change the inference device for Mac to accelerate inference and reduce memory leak
Change inference device to accelerate inference on Mac and reduce memory leak
Contributor
|
把 去掉,直接变成 就可以了 |
Contributor
Author
|
感谢指导,已修改 |
Contributor
|
作者可参考 #516,Mac 使用 CPU 推理速度接近 GPU 速度的两倍,所以考虑暂时在Mac上使用CPU |
Owner
|
@Lion-Wu 离谱,有人分析过为啥吗,是GPU太拉还是CPU太强还是pytorch-gpu对mps的软件优化有点拉还是模型结构特殊 |
Contributor
估计是mps优化的问题,我看GPU占用率忽高忽低的,没法用满,不过只在推理的时候出现这种特殊现象 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using CPU inference on Mac to accelerate inference speed and reduce memory leak