[Relay][Op] type_relations.cc:120: Check failed: t0->dtype == t1->dtype (float32 vs. float16)


#1

Hi,
I’m trying to load fp16 onnx model.
When relay.frontend.from_onnx(onnx_model,shape_dict,dtype=‘float16’), I got an error.

subtract(1f, %96) an internal invariant was violated while typechecking your program [08:36:23] projects/tvm/src/relay/op/type_relations.cc:120: Check failed: t0->dtype == t1->dtype (float32 vs. float16) :
; an internal invariant was violated while typechecking your program [08:36:23] projects/tvm/src/relay/op/type_relations.cc:120: Check failed: t0->dtype == t1->dtype (float32 vs. float16) :

Does anyone know how to solve it?