Skip to content

Commit

Permalink
update datatype map
Browse files Browse the repository at this point in the history
  • Loading branch information
Chao1Han committed Sep 13, 2024
1 parent 1d02dfe commit c485bd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 4 additions & 4 deletions torch/csrc/distributed/c10d/ProcessGroupXCCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ std::map<c10d::ReduceOp, ccl::reduction> xcclOps = {
std::map<at::ScalarType, ccl::datatype> xcclDatatypes = {
{at::kByte, ccl::datatype::uint8},
{at::kChar, ccl::datatype::int8},
{at::kShort, ccl::datatype::int16},
{at::kInt, ccl::datatype::int32},
{at::kLong, ccl::datatype::int64},
{at::kHalf, ccl::datatype::float16},
Expand Down Expand Up @@ -148,9 +147,9 @@ ProcessGroupXCCL::WorkXCCL::WorkXCCL(
ProcessGroupXCCL::WorkXCCL::WorkXCCL(const WorkXCCL& w)
: Work(w.rank_, w.opType_),
device_(w.device_),
xcclEndEvent_(w.xcclEndEvent_),
blockingWait_(w.blockingWait_),
workStartTime_(w.workStartTime_),
xcclEndEvent_(w.xcclEndEvent_) {}
workStartTime_(w.workStartTime_) {}

ProcessGroupXCCL::WorkXCCL::~WorkXCCL() = default;

Expand All @@ -174,7 +173,8 @@ bool ProcessGroupXCCL::WorkXCCL::isCompleted() {
try {
TORCH_CHECK(flag = ret.test());
} catch (...) {
finishAWorkXCCLError(std::current_exception());
future_->setError(std::current_exception());
finish(std::current_exception());
return true;
}
if (!flag) {
Expand Down
4 changes: 0 additions & 4 deletions torch/csrc/distributed/c10d/ProcessGroupXCCL.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@ class TORCH_API ProcessGroupXCCL : public Backend {
std::vector<ccl::event> rets;

private:
void finishAWorkXCCLError(std::exception_ptr eptr) {
future_->setError(eptr);
finish(eptr);
}
void synchronizeInternal(std::chrono::milliseconds timeout);
std::shared_ptr<std::vector<at::Tensor>> outputs_;
c10::intrusive_ptr<at::ivalue::Future> future_;
Expand Down

0 comments on commit c485bd8

Please sign in to comment.