Skip to content

Commit

Permalink
add float16 support
Browse files Browse the repository at this point in the history
  • Loading branch information
woinck committed Sep 11, 2023
1 parent 3107921 commit ddccead
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions onnxruntime/core/providers/vitisai/imp/register_xir_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ static void xir_shape_infer(ONNX_NAMESPACE::InferenceContext& ctx) {
updateOutputElemType(ctx, 0, ONNX_NAMESPACE::TensorProto::BOOL);
} else if (data_type->s() == "bfloat16") {
updateOutputElemType(ctx, 0, ONNX_NAMESPACE::TensorProto::BFLOAT16);
} else if (data_type->s() == "float16") {
updateOutputElemType(ctx, 0, ONNX_NAMESPACE::TensorProto::FLOAT16);
} else {
std::cerr << "not supported data_type " << data_type->s();
abort();
vai_assert(false, ", not supported data_type: " + data_type->s());
}
if (shape != nullptr) {
for (auto i = 0; i < shape->ints_size(); ++i) {
Expand Down

0 comments on commit ddccead

Please sign in to comment.