diff options
author | Håvard Pettersen <havardpe@oath.com> | 2018-02-05 13:20:32 +0000 |
---|---|---|
committer | Håvard Pettersen <havardpe@oath.com> | 2018-02-05 13:20:32 +0000 |
commit | 0053375eecf11d35bf8aeccd7ecbd28a4adf9292 (patch) | |
tree | 88067e05d593251c90ea699c40c361b61931c85f /eval/src/apps/tensor_conformance | |
parent | 5a77206ad7fbc7b32ff6988b29ac7fc6f9438b8c (diff) |
allow serializing dense tensor views
needed for fall-back to reference implementation using on-the-fly
generated dense tensors that are not of the 'DenseTensor' class.
Diffstat (limited to 'eval/src/apps/tensor_conformance')
-rw-r--r-- | eval/src/apps/tensor_conformance/generate.cpp | 2 | ||||
-rw-r--r-- | eval/src/apps/tensor_conformance/test_spec.json | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/eval/src/apps/tensor_conformance/generate.cpp b/eval/src/apps/tensor_conformance/generate.cpp index f70c472cbcd..f3a99f8a36c 100644 --- a/eval/src/apps/tensor_conformance/generate.cpp +++ b/eval/src/apps/tensor_conformance/generate.cpp @@ -193,6 +193,8 @@ void generate_tensor_concat(TestBuilder &dst) { spec({x(2),y(2),z(3)}, Seq({1.0, 2.0, 3.0, 1.0, 2.0, 3.0, 4.0, 4.0, 4.0, 5.0, 5.0, 5.0}))); dst.add("concat(a,b,x)", {{"a", spec(y(3), Seq({1.0, 2.0, 3.0}))}, {"b", spec(y(2), Seq({4.0, 5.0}))}}, spec({x(2), y(2)}, Seq({1.0, 2.0, 4.0, 5.0}))); + dst.add("concat(concat(a,b,x),concat(c,d,x),y)", {{"a", spec(1.0)}, {"b", spec(2.0)}, {"c", spec(3.0)}, {"d", spec(4.0)}}, + spec({x(2), y(2)}, Seq({1.0, 3.0, 2.0, 4.0}))); } //----------------------------------------------------------------------------- diff --git a/eval/src/apps/tensor_conformance/test_spec.json b/eval/src/apps/tensor_conformance/test_spec.json index 513d5e8e902..335c4bcb939 100644 --- a/eval/src/apps/tensor_conformance/test_spec.json +++ b/eval/src/apps/tensor_conformance/test_spec.json @@ -1235,6 +1235,7 @@ {"expression":"concat(a,b,x)","inputs":{"a":"0x02020178020179023FF0000000000000400000000000000040080000000000004010000000000000","b":"0x020101780240140000000000004018000000000000"},"result":{"expect":"0x02020178040179023FF00000000000004000000000000000400800000000000040100000000000004014000000000000401400000000000040180000000000004018000000000000"}} {"expression":"concat(a,b,x)","inputs":{"a":"0x0201017A033FF000000000000040000000000000004008000000000000","b":"0x020101790240100000000000004014000000000000"},"result":{"expect":"0x0203017802017902017A033FF0000000000000400000000000000040080000000000003FF000000000000040000000000000004008000000000000401000000000000040100000000000004010000000000000401400000000000040140000000000004014000000000000"}} {"expression":"concat(a,b,x)","inputs":{"a":"0x02010179033FF000000000000040000000000000004008000000000000","b":"0x020101790240100000000000004014000000000000"},"result":{"expect":"0x02020178020179023FF0000000000000400000000000000040100000000000004014000000000000"}} +{"expression":"concat(concat(a,b,x),concat(c,d,x),y)","inputs":{"a":"0x02003FF0000000000000","b":"0x02004000000000000000","c":"0x02004008000000000000","d":"0x02004010000000000000"},"result":{"expect":"0x02020178020179023FF0000000000000400800000000000040000000000000004010000000000000"}} {"expression":"rename(a,x,y)","inputs":{"a":"0x02010178053FF00000000000004000000000000000400800000000000040100000000000004014000000000000"},"result":{"expect":"0x02010179053FF00000000000004000000000000000400800000000000040100000000000004014000000000000"}} {"expression":"rename(a,y,x)","inputs":{"a":"0x0202017905017A053FF000000000000040000000000000004008000000000000401000000000000040140000000000004018000000000000401C00000000000040200000000000004022000000000000402400000000000040260000000000004028000000000000402A000000000000402C000000000000402E0000000000004030000000000000403100000000000040320000000000004033000000000000403400000000000040350000000000004036000000000000403700000000000040380000000000004039000000000000"},"result":{"expect":"0x0202017805017A053FF000000000000040000000000000004008000000000000401000000000000040140000000000004018000000000000401C00000000000040200000000000004022000000000000402400000000000040260000000000004028000000000000402A000000000000402C000000000000402E0000000000004030000000000000403100000000000040320000000000004033000000000000403400000000000040350000000000004036000000000000403700000000000040380000000000004039000000000000"}} {"expression":"rename(a,z,x)","inputs":{"a":"0x0202017905017A053FF000000000000040000000000000004008000000000000401000000000000040140000000000004018000000000000401C00000000000040200000000000004022000000000000402400000000000040260000000000004028000000000000402A000000000000402C000000000000402E0000000000004030000000000000403100000000000040320000000000004033000000000000403400000000000040350000000000004036000000000000403700000000000040380000000000004039000000000000"},"result":{"expect":"0x02020178050179053FF000000000000040180000000000004026000000000000403000000000000040350000000000004000000000000000401C00000000000040280000000000004031000000000000403600000000000040080000000000004020000000000000402A0000000000004032000000000000403700000000000040100000000000004022000000000000402C0000000000004033000000000000403800000000000040140000000000004024000000000000402E00000000000040340000000000004039000000000000"}} @@ -1244,4 +1245,4 @@ {"expression":"tensor(x[10])(x+1)","inputs":{},"result":{"expect":"0x020101780A3FF000000000000040000000000000004008000000000000401000000000000040140000000000004018000000000000401C000000000000402000000000000040220000000000004024000000000000"}} {"expression":"tensor(x[5],y[4])(x*4+(y+1))","inputs":{},"result":{"expect":"0x02020178050179043FF000000000000040000000000000004008000000000000401000000000000040140000000000004018000000000000401C00000000000040200000000000004022000000000000402400000000000040260000000000004028000000000000402A000000000000402C000000000000402E00000000000040300000000000004031000000000000403200000000000040330000000000004034000000000000"}} {"expression":"tensor(x[5],y[4])(x==y)","inputs":{},"result":{"expect":"0x02020178050179043FF000000000000000000000000000000000000000000000000000000000000000000000000000003FF000000000000000000000000000000000000000000000000000000000000000000000000000003FF000000000000000000000000000000000000000000000000000000000000000000000000000003FF00000000000000000000000000000000000000000000000000000000000000000000000000000"}} -{"num_tests":1246} +{"num_tests":1247} |