Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion torch/csrc/utils/device_lazy_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ void set_requires_device_init(at::DeviceType device_type, bool value);

inline void maybe_initialize_device(at::Device& device) {
// Add more devices here to enable lazy initialization.
if (device.is_cuda() || device.is_xpu() || device.is_privateuseone()) {
if (device.is_cuda() || device.is_xpu() || device.is_privateuseone() ||
device.is_hpu()) {
device_lazy_init(device.type());
}
}
Expand Down