diff options
author | Håvard Pettersen <havardpe@oath.com> | 2019-06-12 14:13:27 +0000 |
---|---|---|
committer | Håvard Pettersen <havardpe@oath.com> | 2019-06-12 14:13:27 +0000 |
commit | bd4bbed20e8cbf007cb10e768c464d26d3e6e06c (patch) | |
tree | bc9a43ff2d1a39d0271daaafd35ce92f05a8bd9a | |
parent | 7351cd6fa62a169b55806ad41ea98acb76491c45 (diff) |
add float cases to encode/decode conformance test
-rw-r--r-- | eval/src/apps/make_tensor_binary_format_test_spec/make_tensor_binary_format_test_spec.cpp | 373 | ||||
-rw-r--r-- | eval/src/apps/make_tensor_binary_format_test_spec/test_spec.json | 36 |
2 files changed, 234 insertions, 175 deletions
diff --git a/eval/src/apps/make_tensor_binary_format_test_spec/make_tensor_binary_format_test_spec.cpp b/eval/src/apps/make_tensor_binary_format_test_spec/make_tensor_binary_format_test_spec.cpp index 6b10d2782f2..b4b4b628ee2 100644 --- a/eval/src/apps/make_tensor_binary_format_test_spec/make_tensor_binary_format_test_spec.cpp +++ b/eval/src/apps/make_tensor_binary_format_test_spec/make_tensor_binary_format_test_spec.cpp @@ -17,21 +17,48 @@ using Dict = std::vector<vespalib::string>; //----------------------------------------------------------------------------- -nbostream make_sparse() { +template <typename T> std::vector<bool> with_cell_type_opts(); +template <> std::vector<bool> with_cell_type_opts<double>() { return {false, true}; } +template <> std::vector<bool> with_cell_type_opts<float>() { return {true}; } + +template <typename T> uint8_t cell_type(); +template <> uint8_t cell_type<double>() { return 0; } +template <> uint8_t cell_type<float>() { return 1; } + +template <typename T> const char *cell_type_str(); +template <> const char *cell_type_str<double>() { return ""; } +template <> const char *cell_type_str<float>() { return "<float>"; } + +template <typename T> nbostream make_sparse(bool with_cell_type) { nbostream data; - data << uint8_t(0x1); + if (with_cell_type) { + data << uint8_t(0x5); + data << cell_type<T>(); + } else { + data << uint8_t(0x1); + } return data; } -nbostream make_dense() { +template <typename T> nbostream make_dense(bool with_cell_type) { nbostream data; - data << uint8_t(0x2); + if (with_cell_type) { + data << uint8_t(0x6); + data << cell_type<T>(); + } else { + data << uint8_t(0x2); + } return data; } -nbostream make_mixed() { +template <typename T> nbostream make_mixed(bool with_cell_type) { nbostream data; - data << uint8_t(0x3); + if (with_cell_type) { + data << uint8_t(0x7); + data << cell_type<T>(); + } else { + data << uint8_t(0x3); + } return data; } @@ -113,204 +140,226 @@ double mix(std::initializer_list<double> vals) { //----------------------------------------------------------------------------- void make_number_test(Cursor &test, double value) { - TensorSpec spec("double"); - spec.add({{}}, value); - nbostream sparse = make_sparse(); - sparse.putInt1_4Bytes(0); - sparse.putInt1_4Bytes(1); - sparse << value; - nbostream dense = make_dense(); - dense.putInt1_4Bytes(0); - dense << value; - nbostream mixed = make_mixed(); - mixed.putInt1_4Bytes(0); - mixed.putInt1_4Bytes(0); - mixed << value; - set_tensor(test, spec); - add_binary(test, {sparse, dense, mixed}); - if (value == 0.0) { - nbostream empty = make_sparse(); - empty.putInt1_4Bytes(0); - empty.putInt1_4Bytes(0); - add_binary(test, empty); + for (bool with_cell_type: with_cell_type_opts<double>()) { + TensorSpec spec("double"); + spec.add({{}}, value); + nbostream sparse = make_sparse<double>(with_cell_type); + sparse.putInt1_4Bytes(0); + sparse.putInt1_4Bytes(1); + sparse << value; + nbostream dense = make_dense<double>(with_cell_type); + dense.putInt1_4Bytes(0); + dense << value; + nbostream mixed = make_mixed<double>(with_cell_type); + mixed.putInt1_4Bytes(0); + mixed.putInt1_4Bytes(0); + mixed << value; + set_tensor(test, spec); + add_binary(test, {sparse, dense, mixed}); + if (value == 0.0) { + nbostream empty = make_sparse<double>(with_cell_type); + empty.putInt1_4Bytes(0); + empty.putInt1_4Bytes(0); + add_binary(test, empty); + } } } //----------------------------------------------------------------------------- +template <typename T> void make_vector_test(Cursor &test, size_t x_size) { - TensorSpec spec(vespalib::make_string("tensor(x[%zu])", x_size)); - nbostream dense = make_dense(); - dense.putInt1_4Bytes(1); - dense.writeSmallString("x"); - dense.putInt1_4Bytes(x_size); - nbostream mixed = make_mixed(); - mixed.putInt1_4Bytes(0); - mixed.putInt1_4Bytes(1); - mixed.writeSmallString("x"); - mixed.putInt1_4Bytes(x_size); - for (size_t x = 0; x < x_size; ++x) { - double value = val(x); - spec.add({{"x", x}}, value); - dense << value; - mixed << value; + for (bool with_cell_type: with_cell_type_opts<T>()) { + TensorSpec spec(vespalib::make_string("tensor%s(x[%zu])", cell_type_str<T>(), x_size)); + nbostream dense = make_dense<T>(with_cell_type); + dense.putInt1_4Bytes(1); + dense.writeSmallString("x"); + dense.putInt1_4Bytes(x_size); + nbostream mixed = make_mixed<T>(with_cell_type); + mixed.putInt1_4Bytes(0); + mixed.putInt1_4Bytes(1); + mixed.writeSmallString("x"); + mixed.putInt1_4Bytes(x_size); + for (size_t x = 0; x < x_size; ++x) { + double value = val(x); + spec.add({{"x", x}}, value); + dense << static_cast<T>(value); + mixed << static_cast<T>(value); + } + set_tensor(test, spec); + add_binary(test, {dense, mixed}); } - set_tensor(test, spec); - add_binary(test, {dense, mixed}); } +template <typename T> void make_matrix_test(Cursor &test, size_t x_size, size_t y_size) { - TensorSpec spec(vespalib::make_string("tensor(x[%zu],y[%zu])", x_size, y_size)); - nbostream dense = make_dense(); - dense.putInt1_4Bytes(2); - dense.writeSmallString("x"); - dense.putInt1_4Bytes(x_size); - dense.writeSmallString("y"); - dense.putInt1_4Bytes(y_size); - nbostream mixed = make_mixed(); - mixed.putInt1_4Bytes(0); - mixed.putInt1_4Bytes(2); - mixed.writeSmallString("x"); - mixed.putInt1_4Bytes(x_size); - mixed.writeSmallString("y"); - mixed.putInt1_4Bytes(y_size); - for (size_t x = 0; x < x_size; ++x) { - for (size_t y = 0; y < y_size; ++y) { - double value = mix({val(x), val(y)}); - spec.add({{"x", x}, {"y", y}}, value); - dense << value; - mixed << value; + for (bool with_cell_type: with_cell_type_opts<T>()) { + TensorSpec spec(vespalib::make_string("tensor%s(x[%zu],y[%zu])", cell_type_str<T>(), x_size, y_size)); + nbostream dense = make_dense<T>(with_cell_type); + dense.putInt1_4Bytes(2); + dense.writeSmallString("x"); + dense.putInt1_4Bytes(x_size); + dense.writeSmallString("y"); + dense.putInt1_4Bytes(y_size); + nbostream mixed = make_mixed<T>(with_cell_type); + mixed.putInt1_4Bytes(0); + mixed.putInt1_4Bytes(2); + mixed.writeSmallString("x"); + mixed.putInt1_4Bytes(x_size); + mixed.writeSmallString("y"); + mixed.putInt1_4Bytes(y_size); + for (size_t x = 0; x < x_size; ++x) { + for (size_t y = 0; y < y_size; ++y) { + double value = mix({val(x), val(y)}); + spec.add({{"x", x}, {"y", y}}, value); + dense << static_cast<T>(value); + mixed << static_cast<T>(value); + } } + set_tensor(test, spec); + add_binary(test, {dense, mixed}); } - set_tensor(test, spec); - add_binary(test, {dense, mixed}); } //----------------------------------------------------------------------------- +template <typename T> void make_map_test(Cursor &test, const Dict &x_dict_in) { - nbostream sparse_base = make_sparse(); - sparse_base.putInt1_4Bytes(1); - sparse_base.writeSmallString("x"); - sparse_base.putInt1_4Bytes(x_dict_in.size()); - nbostream mixed_base = make_mixed(); - mixed_base.putInt1_4Bytes(1); - mixed_base.writeSmallString("x"); - mixed_base.putInt1_4Bytes(0); - mixed_base.putInt1_4Bytes(x_dict_in.size()); - auto x_perm = make_permutations(x_dict_in); - for (const Dict &x_dict: x_perm) { - TensorSpec spec("tensor(x{})"); - nbostream sparse = sparse_base; - nbostream mixed = mixed_base; - for (vespalib::string x: x_dict) { - double value = val(x); - spec.add({{"x", x}}, value); - sparse.writeSmallString(x); - mixed.writeSmallString(x); - sparse << value; - mixed << value; + for (bool with_cell_type: with_cell_type_opts<T>()) { + nbostream sparse_base = make_sparse<T>(with_cell_type); + sparse_base.putInt1_4Bytes(1); + sparse_base.writeSmallString("x"); + sparse_base.putInt1_4Bytes(x_dict_in.size()); + nbostream mixed_base = make_mixed<T>(with_cell_type); + mixed_base.putInt1_4Bytes(1); + mixed_base.writeSmallString("x"); + mixed_base.putInt1_4Bytes(0); + mixed_base.putInt1_4Bytes(x_dict_in.size()); + auto x_perm = make_permutations(x_dict_in); + for (const Dict &x_dict: x_perm) { + TensorSpec spec(vespalib::make_string("tensor%s(x{})", cell_type_str<T>())); + nbostream sparse = sparse_base; + nbostream mixed = mixed_base; + for (vespalib::string x: x_dict) { + double value = val(x); + spec.add({{"x", x}}, value); + sparse.writeSmallString(x); + mixed.writeSmallString(x); + sparse << static_cast<T>(value); + mixed << static_cast<T>(value); + } + set_tensor(test, spec); + add_binary(test, {sparse, mixed}); + } + if (x_dict_in.empty()) { + TensorSpec spec(vespalib::make_string("tensor%s(x{})", cell_type_str<T>())); + set_tensor(test, spec); + add_binary(test, {sparse_base, mixed_base}); } - set_tensor(test, spec); - add_binary(test, {sparse, mixed}); - } - if (x_dict_in.empty()) { - TensorSpec spec("tensor(x{})"); - set_tensor(test, spec); - add_binary(test, {sparse_base, mixed_base}); } } +template <typename T> void make_mesh_test(Cursor &test, const Dict &x_dict_in, const vespalib::string &y) { - nbostream sparse_base = make_sparse(); - sparse_base.putInt1_4Bytes(2); - sparse_base.writeSmallString("x"); - sparse_base.writeSmallString("y"); - sparse_base.putInt1_4Bytes(x_dict_in.size() * 1); - nbostream mixed_base = make_mixed(); - mixed_base.putInt1_4Bytes(2); - mixed_base.writeSmallString("x"); - mixed_base.writeSmallString("y"); - mixed_base.putInt1_4Bytes(0); - mixed_base.putInt1_4Bytes(x_dict_in.size() * 1); - auto x_perm = make_permutations(x_dict_in); - for (const Dict &x_dict: x_perm) { - TensorSpec spec("tensor(x{},y{})"); - nbostream sparse = sparse_base; - nbostream mixed = mixed_base; - for (vespalib::string x: x_dict) { - double value = mix({val(x), val(y)}); - spec.add({{"x", x}, {"y", y}}, value); - sparse.writeSmallString(x); - sparse.writeSmallString(y); - mixed.writeSmallString(x); - mixed.writeSmallString(y); - sparse << value; - mixed << value; + for (bool with_cell_type: with_cell_type_opts<T>()) { + nbostream sparse_base = make_sparse<T>(with_cell_type); + sparse_base.putInt1_4Bytes(2); + sparse_base.writeSmallString("x"); + sparse_base.writeSmallString("y"); + sparse_base.putInt1_4Bytes(x_dict_in.size() * 1); + nbostream mixed_base = make_mixed<T>(with_cell_type); + mixed_base.putInt1_4Bytes(2); + mixed_base.writeSmallString("x"); + mixed_base.writeSmallString("y"); + mixed_base.putInt1_4Bytes(0); + mixed_base.putInt1_4Bytes(x_dict_in.size() * 1); + auto x_perm = make_permutations(x_dict_in); + for (const Dict &x_dict: x_perm) { + TensorSpec spec(vespalib::make_string("tensor%s(x{},y{})", cell_type_str<T>())); + nbostream sparse = sparse_base; + nbostream mixed = mixed_base; + for (vespalib::string x: x_dict) { + double value = mix({val(x), val(y)}); + spec.add({{"x", x}, {"y", y}}, value); + sparse.writeSmallString(x); + sparse.writeSmallString(y); + mixed.writeSmallString(x); + mixed.writeSmallString(y); + sparse << static_cast<T>(value); + mixed << static_cast<T>(value); + } + set_tensor(test, spec); + add_binary(test, {sparse, mixed}); + } + if (x_dict_in.empty()) { + TensorSpec spec(vespalib::make_string("tensor%s(x{},y{})", cell_type_str<T>())); + set_tensor(test, spec); + add_binary(test, {sparse_base, mixed_base}); } - set_tensor(test, spec); - add_binary(test, {sparse, mixed}); - } - if (x_dict_in.empty()) { - TensorSpec spec("tensor(x{},y{})"); - set_tensor(test, spec); - add_binary(test, {sparse_base, mixed_base}); } } //----------------------------------------------------------------------------- +template <typename T> void make_vector_map_test(Cursor &test, const vespalib::string &mapped_name, const Dict &mapped_dict, const vespalib::string &indexed_name, size_t indexed_size) { - auto type_str = vespalib::make_string("tensor(%s{},%s[%zu])", - mapped_name.c_str(), indexed_name.c_str(), indexed_size); - ValueType type = ValueType::from_spec(type_str); - nbostream mixed_base = make_mixed(); - mixed_base.putInt1_4Bytes(1); - mixed_base.writeSmallString(mapped_name); - mixed_base.putInt1_4Bytes(1); - mixed_base.writeSmallString(indexed_name); - mixed_base.putInt1_4Bytes(indexed_size); - mixed_base.putInt1_4Bytes(mapped_dict.size()); - auto mapped_perm = make_permutations(mapped_dict); - for (const Dict &dict: mapped_perm) { - TensorSpec spec(type.to_spec()); // ensures type string is normalized - nbostream mixed = mixed_base; - for (vespalib::string label: dict) { - mixed.writeSmallString(label); - for (size_t idx = 0; idx < indexed_size; ++idx) { - double value = mix({val(label), val(idx)}); - spec.add({{mapped_name, label}, {indexed_name, idx}}, value); - mixed << value; + for (bool with_cell_type: with_cell_type_opts<T>()) { + auto type_str = vespalib::make_string("tensor%s(%s{},%s[%zu])", cell_type_str<T>(), + mapped_name.c_str(), indexed_name.c_str(), indexed_size); + ValueType type = ValueType::from_spec(type_str); + nbostream mixed_base = make_mixed<T>(with_cell_type); + mixed_base.putInt1_4Bytes(1); + mixed_base.writeSmallString(mapped_name); + mixed_base.putInt1_4Bytes(1); + mixed_base.writeSmallString(indexed_name); + mixed_base.putInt1_4Bytes(indexed_size); + mixed_base.putInt1_4Bytes(mapped_dict.size()); + auto mapped_perm = make_permutations(mapped_dict); + for (const Dict &dict: mapped_perm) { + TensorSpec spec(type.to_spec()); // ensures type string is normalized + nbostream mixed = mixed_base; + for (vespalib::string label: dict) { + mixed.writeSmallString(label); + for (size_t idx = 0; idx < indexed_size; ++idx) { + double value = mix({val(label), val(idx)}); + spec.add({{mapped_name, label}, {indexed_name, idx}}, value); + mixed << static_cast<T>(value); + } } + set_tensor(test, spec); + add_binary(test, mixed); + } + if (mapped_dict.empty()) { + TensorSpec spec(type.to_spec()); // ensures type string is normalized + set_tensor(test, spec); + add_binary(test, mixed_base); } - set_tensor(test, spec); - add_binary(test, mixed); - } - if (mapped_dict.empty()) { - TensorSpec spec(type.to_spec()); // ensures type string is normalized - set_tensor(test, spec); - add_binary(test, mixed_base); } } //----------------------------------------------------------------------------- +template <typename T> void make_typed_tests(test::TestWriter &writer) { + make_vector_test<T>(writer.create(), 3); + make_matrix_test<T>(writer.create(), 2, 3); + make_map_test<T>(writer.create(), {}); + make_map_test<T>(writer.create(), {"a", "b", "c"}); + make_mesh_test<T>(writer.create(), {}, "a"); + make_mesh_test<T>(writer.create(), {"foo", "bar"}, "a"); + make_vector_map_test<T>(writer.create(), "x", {}, "y", 10); + make_vector_map_test<T>(writer.create(), "y", {}, "x", 10); + make_vector_map_test<T>(writer.create(), "x", {"a", "b"}, "y", 3); + make_vector_map_test<T>(writer.create(), "y", {"a", "b"}, "x", 3); +} + void make_tests(test::TestWriter &writer) { make_number_test(writer.create(), 0.0); make_number_test(writer.create(), 42.0); - make_vector_test(writer.create(), 3); - make_matrix_test(writer.create(), 2, 3); - make_map_test(writer.create(), {}); - make_map_test(writer.create(), {"a", "b", "c"}); - make_mesh_test(writer.create(), {}, "a"); - make_mesh_test(writer.create(), {"foo", "bar"}, "a"); - make_vector_map_test(writer.create(), "x", {}, "y", 10); - make_vector_map_test(writer.create(), "y", {}, "x", 10); - make_vector_map_test(writer.create(), "x", {"a", "b"}, "y", 3); - make_vector_map_test(writer.create(), "y", {"a", "b"}, "x", 3); + make_typed_tests<double>(writer); + make_typed_tests<float>(writer); } int main(int, char **) { diff --git a/eval/src/apps/make_tensor_binary_format_test_spec/test_spec.json b/eval/src/apps/make_tensor_binary_format_test_spec/test_spec.json index 701b829e5bc..f6b535e071a 100644 --- a/eval/src/apps/make_tensor_binary_format_test_spec/test_spec.json +++ b/eval/src/apps/make_tensor_binary_format_test_spec/test_spec.json @@ -1,13 +1,23 @@ -{"tensor":{"type":"double","cells":[{"address":{},"value":0}]},"binary":["0x0100010000000000000000","0x02000000000000000000","0x0300000000000000000000","0x010000"]} -{"tensor":{"type":"double","cells":[{"address":{},"value":42}]},"binary":["0x0100014045000000000000","0x02004045000000000000","0x0300004045000000000000"]} -{"tensor":{"type":"tensor(x[3])","cells":[{"address":{"x":0},"value":1},{"address":{"x":1},"value":2},{"address":{"x":2},"value":3}]},"binary":["0x02010178033FF000000000000040000000000000004008000000000000","0x0300010178033FF000000000000040000000000000004008000000000000"]} -{"tensor":{"type":"tensor(x[2],y[3])","cells":[{"address":{"x":0,"y":0},"value":11},{"address":{"x":0,"y":1},"value":12},{"address":{"x":0,"y":2},"value":13},{"address":{"x":1,"y":0},"value":21},{"address":{"x":1,"y":1},"value":22},{"address":{"x":1,"y":2},"value":23}]},"binary":["0x020201780201790340260000000000004028000000000000402A000000000000403500000000000040360000000000004037000000000000","0x03000201780201790340260000000000004028000000000000402A000000000000403500000000000040360000000000004037000000000000"]} -{"tensor":{"type":"tensor(x{})","cells":[]},"binary":["0x0101017800","0x030101780000"]} -{"tensor":{"type":"tensor(x{})","cells":[{"address":{"x":"a"},"value":1},{"address":{"x":"b"},"value":2},{"address":{"x":"c"},"value":3}]},"binary":["0x010101780301613FF00000000000000162400000000000000001634008000000000000","0x03010178000301613FF00000000000000162400000000000000001634008000000000000","0x010101780301613FF00000000000000163400800000000000001624000000000000000","0x03010178000301613FF00000000000000163400800000000000001624000000000000000","0x01010178030162400000000000000001613FF000000000000001634008000000000000","0x0301017800030162400000000000000001613FF000000000000001634008000000000000","0x0101017803016240000000000000000163400800000000000001613FF0000000000000","0x030101780003016240000000000000000163400800000000000001613FF0000000000000","0x01010178030163400800000000000001613FF000000000000001624000000000000000","0x0301017800030163400800000000000001613FF000000000000001624000000000000000","0x0101017803016340080000000000000162400000000000000001613FF0000000000000","0x030101780003016340080000000000000162400000000000000001613FF0000000000000"]} -{"tensor":{"type":"tensor(x{},y{})","cells":[]},"binary":["0x01020178017900","0x0302017801790000"]} -{"tensor":{"type":"tensor(x{},y{})","cells":[{"address":{"x":"bar","y":"a"},"value":21},{"address":{"x":"foo","y":"a"},"value":11}]},"binary":["0x0102017801790203666F6F016140260000000000000362617201614035000000000000","0x030201780179000203666F6F016140260000000000000362617201614035000000000000","0x01020178017902036261720161403500000000000003666F6F01614026000000000000","0x0302017801790002036261720161403500000000000003666F6F01614026000000000000"]} -{"tensor":{"type":"tensor(x{},y[10])","cells":[]},"binary":["0x030101780101790A00"]} -{"tensor":{"type":"tensor(x[10],y{})","cells":[]},"binary":["0x030101790101780A00"]} -{"tensor":{"type":"tensor(x{},y[3])","cells":[{"address":{"x":"a","y":0},"value":11},{"address":{"x":"a","y":1},"value":12},{"address":{"x":"a","y":2},"value":13},{"address":{"x":"b","y":0},"value":21},{"address":{"x":"b","y":1},"value":22},{"address":{"x":"b","y":2},"value":23}]},"binary":["0x030101780101790302016140260000000000004028000000000000402A0000000000000162403500000000000040360000000000004037000000000000","0x0301017801017903020162403500000000000040360000000000004037000000000000016140260000000000004028000000000000402A000000000000"]} -{"tensor":{"type":"tensor(x[3],y{})","cells":[{"address":{"x":0,"y":"a"},"value":11},{"address":{"x":0,"y":"b"},"value":21},{"address":{"x":1,"y":"a"},"value":12},{"address":{"x":1,"y":"b"},"value":22},{"address":{"x":2,"y":"a"},"value":13},{"address":{"x":2,"y":"b"},"value":23}]},"binary":["0x030101790101780302016140260000000000004028000000000000402A0000000000000162403500000000000040360000000000004037000000000000","0x0301017901017803020162403500000000000040360000000000004037000000000000016140260000000000004028000000000000402A000000000000"]} -{"num_tests":12} +{"tensor":{"type":"double","cells":[{"address":{},"value":0}]},"binary":["0x0100010000000000000000","0x02000000000000000000","0x0300000000000000000000","0x010000","0x050000010000000000000000","0x0600000000000000000000","0x070000000000000000000000","0x05000000"]} +{"tensor":{"type":"double","cells":[{"address":{},"value":42}]},"binary":["0x0100014045000000000000","0x02004045000000000000","0x0300004045000000000000","0x050000014045000000000000","0x0600004045000000000000","0x070000004045000000000000"]} +{"tensor":{"type":"tensor(x[3])","cells":[{"address":{"x":0},"value":1},{"address":{"x":1},"value":2},{"address":{"x":2},"value":3}]},"binary":["0x02010178033FF000000000000040000000000000004008000000000000","0x0300010178033FF000000000000040000000000000004008000000000000","0x0600010178033FF000000000000040000000000000004008000000000000","0x070000010178033FF000000000000040000000000000004008000000000000"]} +{"tensor":{"type":"tensor(x[2],y[3])","cells":[{"address":{"x":0,"y":0},"value":11},{"address":{"x":0,"y":1},"value":12},{"address":{"x":0,"y":2},"value":13},{"address":{"x":1,"y":0},"value":21},{"address":{"x":1,"y":1},"value":22},{"address":{"x":1,"y":2},"value":23}]},"binary":["0x020201780201790340260000000000004028000000000000402A000000000000403500000000000040360000000000004037000000000000","0x03000201780201790340260000000000004028000000000000402A000000000000403500000000000040360000000000004037000000000000","0x06000201780201790340260000000000004028000000000000402A000000000000403500000000000040360000000000004037000000000000","0x0700000201780201790340260000000000004028000000000000402A000000000000403500000000000040360000000000004037000000000000"]} +{"tensor":{"type":"tensor(x{})","cells":[]},"binary":["0x0101017800","0x030101780000","0x050001017800","0x07000101780000"]} +{"tensor":{"type":"tensor(x{})","cells":[{"address":{"x":"a"},"value":1},{"address":{"x":"b"},"value":2},{"address":{"x":"c"},"value":3}]},"binary":["0x010101780301613FF00000000000000162400000000000000001634008000000000000","0x03010178000301613FF00000000000000162400000000000000001634008000000000000","0x010101780301613FF00000000000000163400800000000000001624000000000000000","0x03010178000301613FF00000000000000163400800000000000001624000000000000000","0x01010178030162400000000000000001613FF000000000000001634008000000000000","0x0301017800030162400000000000000001613FF000000000000001634008000000000000","0x0101017803016240000000000000000163400800000000000001613FF0000000000000","0x030101780003016240000000000000000163400800000000000001613FF0000000000000","0x01010178030163400800000000000001613FF000000000000001624000000000000000","0x0301017800030163400800000000000001613FF000000000000001624000000000000000","0x0101017803016340080000000000000162400000000000000001613FF0000000000000","0x030101780003016340080000000000000162400000000000000001613FF0000000000000","0x05000101780301613FF00000000000000162400000000000000001634008000000000000","0x0700010178000301613FF00000000000000162400000000000000001634008000000000000","0x05000101780301613FF00000000000000163400800000000000001624000000000000000","0x0700010178000301613FF00000000000000163400800000000000001624000000000000000","0x0500010178030162400000000000000001613FF000000000000001634008000000000000","0x070001017800030162400000000000000001613FF000000000000001634008000000000000","0x050001017803016240000000000000000163400800000000000001613FF0000000000000","0x07000101780003016240000000000000000163400800000000000001613FF0000000000000","0x0500010178030163400800000000000001613FF000000000000001624000000000000000","0x070001017800030163400800000000000001613FF000000000000001624000000000000000","0x050001017803016340080000000000000162400000000000000001613FF0000000000000","0x07000101780003016340080000000000000162400000000000000001613FF0000000000000"]} +{"tensor":{"type":"tensor(x{},y{})","cells":[]},"binary":["0x01020178017900","0x0302017801790000","0x0500020178017900","0x070002017801790000"]} +{"tensor":{"type":"tensor(x{},y{})","cells":[{"address":{"x":"bar","y":"a"},"value":21},{"address":{"x":"foo","y":"a"},"value":11}]},"binary":["0x0102017801790203666F6F016140260000000000000362617201614035000000000000","0x030201780179000203666F6F016140260000000000000362617201614035000000000000","0x01020178017902036261720161403500000000000003666F6F01614026000000000000","0x0302017801790002036261720161403500000000000003666F6F01614026000000000000","0x050002017801790203666F6F016140260000000000000362617201614035000000000000","0x07000201780179000203666F6F016140260000000000000362617201614035000000000000","0x0500020178017902036261720161403500000000000003666F6F01614026000000000000","0x070002017801790002036261720161403500000000000003666F6F01614026000000000000"]} +{"tensor":{"type":"tensor(x{},y[10])","cells":[]},"binary":["0x030101780101790A00","0x07000101780101790A00"]} +{"tensor":{"type":"tensor(x[10],y{})","cells":[]},"binary":["0x030101790101780A00","0x07000101790101780A00"]} +{"tensor":{"type":"tensor(x{},y[3])","cells":[{"address":{"x":"a","y":0},"value":11},{"address":{"x":"a","y":1},"value":12},{"address":{"x":"a","y":2},"value":13},{"address":{"x":"b","y":0},"value":21},{"address":{"x":"b","y":1},"value":22},{"address":{"x":"b","y":2},"value":23}]},"binary":["0x030101780101790302016140260000000000004028000000000000402A0000000000000162403500000000000040360000000000004037000000000000","0x0301017801017903020162403500000000000040360000000000004037000000000000016140260000000000004028000000000000402A000000000000","0x07000101780101790302016140260000000000004028000000000000402A0000000000000162403500000000000040360000000000004037000000000000","0x070001017801017903020162403500000000000040360000000000004037000000000000016140260000000000004028000000000000402A000000000000"]} +{"tensor":{"type":"tensor(x[3],y{})","cells":[{"address":{"x":0,"y":"a"},"value":11},{"address":{"x":0,"y":"b"},"value":21},{"address":{"x":1,"y":"a"},"value":12},{"address":{"x":1,"y":"b"},"value":22},{"address":{"x":2,"y":"a"},"value":13},{"address":{"x":2,"y":"b"},"value":23}]},"binary":["0x030101790101780302016140260000000000004028000000000000402A0000000000000162403500000000000040360000000000004037000000000000","0x0301017901017803020162403500000000000040360000000000004037000000000000016140260000000000004028000000000000402A000000000000","0x07000101790101780302016140260000000000004028000000000000402A0000000000000162403500000000000040360000000000004037000000000000","0x070001017901017803020162403500000000000040360000000000004037000000000000016140260000000000004028000000000000402A000000000000"]} +{"tensor":{"type":"tensor<float>(x[3])","cells":[{"address":{"x":0},"value":1},{"address":{"x":1},"value":2},{"address":{"x":2},"value":3}]},"binary":["0x0601010178033F8000004000000040400000","0x070100010178033F8000004000000040400000"]} +{"tensor":{"type":"tensor<float>(x[2],y[3])","cells":[{"address":{"x":0,"y":0},"value":11},{"address":{"x":0,"y":1},"value":12},{"address":{"x":0,"y":2},"value":13},{"address":{"x":1,"y":0},"value":21},{"address":{"x":1,"y":1},"value":22},{"address":{"x":1,"y":2},"value":23}]},"binary":["0x06010201780201790341300000414000004150000041A8000041B0000041B80000","0x0701000201780201790341300000414000004150000041A8000041B0000041B80000"]} +{"tensor":{"type":"tensor<float>(x{})","cells":[]},"binary":["0x050101017800","0x07010101780000"]} +{"tensor":{"type":"tensor<float>(x{})","cells":[{"address":{"x":"a"},"value":1},{"address":{"x":"b"},"value":2},{"address":{"x":"c"},"value":3}]},"binary":["0x05010101780301613F800000016240000000016340400000","0x0701010178000301613F800000016240000000016340400000","0x05010101780301613F800000016340400000016240000000","0x0701010178000301613F800000016340400000016240000000","0x05010101780301624000000001613F800000016340400000","0x0701010178000301624000000001613F800000016340400000","0x05010101780301624000000001634040000001613F800000","0x0701010178000301624000000001634040000001613F800000","0x05010101780301634040000001613F800000016240000000","0x0701010178000301634040000001613F800000016240000000","0x05010101780301634040000001624000000001613F800000","0x0701010178000301634040000001624000000001613F800000"]} +{"tensor":{"type":"tensor<float>(x{},y{})","cells":[]},"binary":["0x0501020178017900","0x070102017801790000"]} +{"tensor":{"type":"tensor<float>(x{},y{})","cells":[{"address":{"x":"bar","y":"a"},"value":21},{"address":{"x":"foo","y":"a"},"value":11}]},"binary":["0x050102017801790203666F6F01614130000003626172016141A80000","0x07010201780179000203666F6F01614130000003626172016141A80000","0x050102017801790203626172016141A8000003666F6F016141300000","0x07010201780179000203626172016141A8000003666F6F016141300000"]} +{"tensor":{"type":"tensor<float>(x{},y[10])","cells":[]},"binary":["0x07010101780101790A00"]} +{"tensor":{"type":"tensor<float>(x[10],y{})","cells":[]},"binary":["0x07010101790101780A00"]} +{"tensor":{"type":"tensor<float>(x{},y[3])","cells":[{"address":{"x":"a","y":0},"value":11},{"address":{"x":"a","y":1},"value":12},{"address":{"x":"a","y":2},"value":13},{"address":{"x":"b","y":0},"value":21},{"address":{"x":"b","y":1},"value":22},{"address":{"x":"b","y":2},"value":23}]},"binary":["0x070101017801017903020161413000004140000041500000016241A8000041B0000041B80000","0x07010101780101790302016241A8000041B0000041B800000161413000004140000041500000"]} +{"tensor":{"type":"tensor<float>(x[3],y{})","cells":[{"address":{"x":0,"y":"a"},"value":11},{"address":{"x":0,"y":"b"},"value":21},{"address":{"x":1,"y":"a"},"value":12},{"address":{"x":1,"y":"b"},"value":22},{"address":{"x":2,"y":"a"},"value":13},{"address":{"x":2,"y":"b"},"value":23}]},"binary":["0x070101017901017803020161413000004140000041500000016241A8000041B0000041B80000","0x07010101790101780302016241A8000041B0000041B800000161413000004140000041500000"]} +{"num_tests":22} |