Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Chao1Han committed Sep 14, 2024
1 parent fea20f5 commit e0e27f3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions torch/csrc/distributed/c10d/ProcessGroup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,11 @@ class TORCH_API ProcessGroup : public torch::CustomClassHolder {
tensor = at::empty(
{1},
at::TensorOptions().device(at::DeviceType::CUDA).dtype(at::kByte));
} else if (backendType_ == c10d::ProcessGroup::BackendType::XCCL) {
// set xpu tensor for override cpu dispatch
tensor = at::empty(
{1},
at::TensorOptions().device(at::DeviceType::XPU).dtype(at::kByte));
} else {
// Default to using cpu implementation
tensor = at::empty(
Expand Down

0 comments on commit e0e27f3

Please sign in to comment.