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

[DCU] fix queue empty problem on DCU #9048

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Deleter-D
Copy link
Contributor

PR types

Bug fixes

PR changes

Others

Description

result_queue的超时时间对于DCU平台过短,会偶发queue empty的问题,故增大超时时间。

Copy link

paddle-bot bot commented Aug 29, 2024

Thanks for your contribution!

@Deleter-D Deleter-D changed the title fix queue empty problem on DCU [DCU] fix queue empty problem on DCU Aug 29, 2024
@@ -969,7 +969,11 @@ def predict(self, input_texts: list[str], return_tokens=False):
outputs = []
output_tokens = []
while len(outputs) < self.batch_size:
result = result_queue.get(timeout=1)
if paddle.core.is_compiled_with_rocm():
timeout=10
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里需要确认10是否可行?原因是什么?如果平台更换后,是否会带来新的影响?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

由于用了paddle.core.is_compiled_with_rocm()进行判断,这部分代码的影响只会涉及DCU,其他平台会与之前相同。

Copy link

codecov bot commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.64%. Comparing base (a18e220) to head (9750942).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #9048      +/-   ##
===========================================
+ Coverage    53.58%   53.64%   +0.05%     
===========================================
  Files          652      652              
  Lines       105169   104867     -302     
===========================================
- Hits         56354    56252     -102     
+ Misses       48815    48615     -200     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Deleter-D
Copy link
Contributor Author

这里做一个更加详细的说明,在海光DCU平台上,如果timeout设置的过短,会偶发类似下图的问题。
image
所以这里暂时将timeout增大,确保不影响当前的使用。

Copy link
Collaborator

@DrownFish19 DrownFish19 left a comment

Choose a reason for hiding this comment

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

LGTM

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants