Skip to content

Commit

Permalink
Handle missing dtype cases in xla::ifrt::DType::DebugString()
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 714066325
  • Loading branch information
junwhanahn authored and Google-ML-Automation committed Jan 10, 2025
1 parent 092b8dd commit d6442fd
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions xla/python/ifrt/dtype.cc
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ std::string DType::DebugString() const {
return "INVALID";
case kPred:
return "PRED";
case kS2:
return "S2";
case kS4:
return "S4";
case kS8:
return "S8";
case kS16:
Expand All @@ -222,6 +226,10 @@ std::string DType::DebugString() const {
return "S32";
case kS64:
return "S64";
case kU2:
return "U2";
case kU4:
return "U4";
case kU8:
return "U8";
case kU16:
Expand All @@ -246,6 +254,20 @@ std::string DType::DebugString() const {
return "TOKEN";
case kOpaque:
return "OPAQUE";
case kF8E3M4:
return "F8E3M4";
case kF8E4M3:
return "F8E4M3";
case kF8E4M3FN:
return "F8E4M3FN";
case kF8E4M3B11FNUZ:
return "F8E4M3B11FNUZ";
case kF8E4M3FNUZ:
return "F8E4M3FNUZ";
case kF8E5M2:
return "F8E5M2";
case kF8E5M2FNUZ:
return "F8E5M2FNUZ";
case kString:
return "STRING";
default:
Expand Down

0 comments on commit d6442fd

Please sign in to comment.