Skip to content

Commit

Permalink
[luci] Support mx type (Samsung#14302)
Browse files Browse the repository at this point in the history
This supports mx type in luci.

ONE-DCO-1.0-Signed-off-by: Hyukjin Jeong <[email protected]>
  • Loading branch information
jinevening authored and BLee-bot committed Nov 6, 2024
1 parent 7a91d1e commit c43c0c4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler/luci/export/src/CircleExporterUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ circle::TensorType to_circle_tensortype(loco::DataType type)
case loco::DataType::STRING:
return circle::TensorType_STRING;

case loco::DataType::MXFP4:
return circle::TensorType_MXFP4;
case loco::DataType::MXINT8:
return circle::TensorType_MXINT8;

default:
INTERNAL_EXN_V("failed to convert unsupported loco::DataType", oops::to_uint32(type));
}
Expand Down
4 changes: 4 additions & 0 deletions compiler/luci/import/src/CircleReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ loco::DataType luci_datatype(const circle::TensorType type)
return loco::DataType::S8;
case circle::TensorType_INT4:
return loco::DataType::S4;
case circle::TensorType_MXFP4:
return loco::DataType::MXFP4;
case circle::TensorType_MXINT8:
return loco::DataType::MXINT8;
default:
break;
}
Expand Down
5 changes: 5 additions & 0 deletions compiler/luci/logex/src/CircleNodeSummaryBuilders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ std::string to_str(loco::DataType type)
case loco::DataType::BOOL:
return "BOOL";

case loco::DataType::MXFP4:
return "MXFP4";
case loco::DataType::MXINT8:
return "MXINT8";

default:
return "Error";
}
Expand Down

0 comments on commit c43c0c4

Please sign in to comment.