Skip to content

Commit

Permalink
Merge branch 'master' into update_fuse_layer_norm_grad_for_npu
Browse files Browse the repository at this point in the history
  • Loading branch information
ShawnXuan authored Jan 22, 2025
2 parents ce66dff + 5c62322 commit 9a72438
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions oneflow/core/common/device_type.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ enum DeviceType {
kMeta = 4;
kMLU = 5; // Cambricon MLU
kNPU = 6; // Ascend NPU
kXPU = 7; // KunLunXin
}
2 changes: 2 additions & 0 deletions oneflow/ir/lib/OneFlow/UserOpConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,8 @@ ::oneflow::DeviceType getDeviceTypeFromAttrDictionary(DictionaryAttr attributes)
return ::oneflow::DeviceType::kMLU;
} else if (device_tag.str() == "npu") {
return ::oneflow::DeviceType::kNPU;
} else if (device_tag.str() == "xpu") {
return ::oneflow::DeviceType::kXPU;
} else {
LOG(FATAL) << "unsupported device tag: " << device_tag.str();
return ::oneflow::DeviceType::kInvalidDevice;
Expand Down

0 comments on commit 9a72438

Please sign in to comment.