mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Disable background threads for XPU host allocator (#161242)
# Motivation https://github.com/pytorch/pytorch/pull/160505 enables background threads for XPU host allocator. However, it will hang on Windows during program exit. Now disable it until we narrow down the issue. Pull Request resolved: https://github.com/pytorch/pytorch/pull/161242 Approved by: https://github.com/EikanWang
This commit is contained in:
committed by
PyTorch MergeBot
parent
595987d28d
commit
373e25c2eb
@ -30,6 +30,12 @@ struct XPUCachingHostAllocatorImpl
|
||||
bool query_event(XPUEvent& event) override {
|
||||
return event.query();
|
||||
}
|
||||
|
||||
bool pinned_use_background_threads() override {
|
||||
// Using background threads for XPU causes a hang on Windows during program
|
||||
// exit. Will be enabled once the issue is resolved.
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
DECLARE_HOST_ALLOCATOR(
|
||||
|
Reference in New Issue
Block a user