[HPU][Critical Issue Fix] ThreadPool instead of Pool for parallel pre-processing#39002
Conversation
9361ffe to
dbc9328
Compare
|
Regarding the issue you created. |
|
Hi @dsmertin I don't think this solves the issue, but rather propagates it to non-HPU devices. |
|
We can accept the use for threadpool but only with HPU, since on other devices we still wanna make full use of the multiple processes, it could be something like: pool_cls = ThreadPool if is_torch_hpu_available() else Pool
with pool_cls(... |
Let me prepare the change. UPD: |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
ydshieh
left a comment
There was a problem hiding this comment.
LGTM, but would leave @IlyasMoutawwakil for a final ✅ and merge it
thanks
|
@dsmertin no need to update the branch if the tests are passing (or waiting for approval) 😁 |
There had been a problem with Gaudi (HPU) handling multiprocessed pre-processing which was patched with #38790
Indeed there're limitations when different processes try to use one HPU device.
So I changed
Poolwhich is based on creating new processes withThreadPoolwhich uses threads in the same process.