diff --git a/include/tvm/runtime/data_type.h b/include/tvm/runtime/data_type.h index 7236a9e3a2e0..230f73747fad 100644 --- a/include/tvm/runtime/data_type.h +++ b/include/tvm/runtime/data_type.h @@ -467,6 +467,7 @@ struct TypeTraits : public TypeTraitsBase { TVM_FFI_INLINE static void CopyToAnyView(const runtime::DataType& src, TVMFFIAny* result) { // clear padding part to ensure the equality check can always check the v_uint64 part result->v_uint64 = 0; + result->zero_padding = 0; result->type_index = TypeIndex::kTVMFFIDataType; result->v_dtype = src; } @@ -474,6 +475,7 @@ struct TypeTraits : public TypeTraitsBase { TVM_FFI_INLINE static void MoveToAny(runtime::DataType src, TVMFFIAny* result) { // clear padding part to ensure the equality check can always check the v_uint64 part result->v_uint64 = 0; + result->zero_padding = 0; result->type_index = TypeIndex::kTVMFFIDataType; result->v_dtype = src; }