-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
base: develop
Are you sure you want to change the base?
Conversation
Thanks for your contribution! |
@@ -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 |
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.
这里需要确认10是否可行?原因是什么?如果平台更换后,是否会带来新的影响?
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.
由于用了paddle.core.is_compiled_with_rocm()进行判断,这部分代码的影响只会涉及DCU,其他平台会与之前相同。
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
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.
LGTM
|
PR types
Bug fixes
PR changes
Others
Description
result_queue
的超时时间对于DCU平台过短,会偶发queue empty的问题,故增大超时时间。