Commit d32259c8 authored by Robert Kimball's avatar Robert Kimball Committed by Sang Ik Lee

Add testing for serializing and deserializing graphs (#4105)

* Add serializer/deserializer check to interpreter

* Fix TopK

* Fix GRUCell

* Fix RNNCell. Does anybody test their own code? Apparently not.

* Fix LSTMCell

* Fix MVN

* Fix Select v1

* Fix GroupConvolution

* Fix ScalarConstantLike

* General cleanup

* Revert "General cleanup"

This reverts commit d765d2c2451cf5d3c9a41c4d7d672c278783b0a2.

* Fix op_version_tbl.hpp

* More cleanup

* Fix LSTMSequence

* revert

* Disable INTERPRETER serialize test by default
Co-authored-by: 's avatarScott Cyphers <diyessi@users.noreply.github.com>
parent e07bc028
......@@ -63,7 +63,13 @@ runtime::interpreter::INTExecutable::INTExecutable(const shared_ptr<Function>& f
: m_is_compiled{true}
, m_performance_counters_enabled{enable_performance_collection}
{
#ifdef INTERPRETER_FORCE_SERIALIZE
// To verify that the serializer works correctly let's just run this graph round-trip
string ser = serialize(function);
m_function = deserialize(ser);
#else
m_function = clone_function(*function);
#endif
pass::Manager pass_manager;
pass_manager.register_pass<pass::LikeReplacement>();
pass_manager.register_pass<pass::FusedOpDecomposition>();
......
This diff is collapsed.
......@@ -83,7 +83,7 @@ static const map<element::Type_t, const TypeInfo>& get_type_info_map()
{element::Type_t::i16, TypeInfo(16, false, true, false, "int16_t", "i16")},
{element::Type_t::i32, TypeInfo(32, false, true, true, "int32_t", "i32")},
{element::Type_t::i64, TypeInfo(64, false, true, false, "int64_t", "i64")},
{element::Type_t::u1, TypeInfo(1, false, false, false, "uint8_t", "u1")},
{element::Type_t::u1, TypeInfo(1, false, false, false, "uint1_t", "u1")},
{element::Type_t::u8, TypeInfo(8, false, false, true, "uint8_t", "u8")},
{element::Type_t::u16, TypeInfo(16, false, false, false, "uint16_t", "u16")},
{element::Type_t::u32, TypeInfo(32, false, false, false, "uint32_t", "u32")},
......
......@@ -408,7 +408,7 @@ NGRAPH_TEST(onnx_${BACKEND_NAME}, model_global_lp_pool_p3)
Outputs outputs{execute(function, inputs, "${BACKEND_NAME}")};
EXPECT_TRUE(test::all_close_f(expected_outputs.front(), outputs.front()));
EXPECT_TRUE(test::all_close_f(expected_outputs.front(), outputs.front(), 18));
}
NGRAPH_TEST(onnx_${BACKEND_NAME}, model_convtranspose_output_shape)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment