diff options
author | Michael Kuperstein <mkuper@google.com> | 2018-06-29 10:57:24 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-06-29 10:59:52 -0700 |
commit | ec0a702ff1f22b73cec2d8f14c7a84c5a02856fd (patch) | |
tree | bbe4a56f06e157fb69628fd40e4ab66f0ece27ea /tensorflow/compiler/xla/service/hlo_parser_test.cc | |
parent | aa060bebb0fb064460ae4c3e92a0272be4ea04de (diff) |
[XLA] Add key-value version of Sort HLO.
This is only currently implemented in the evaluator backend, and even that implementation is partial - the key and value type must match.
PiperOrigin-RevId: 202673122
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_parser_test.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/hlo_parser_test.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_parser_test.cc b/tensorflow/compiler/xla/service/hlo_parser_test.cc index da1a34ae3c..504ea3fe7a 100644 --- a/tensorflow/compiler/xla/service/hlo_parser_test.cc +++ b/tensorflow/compiler/xla/service/hlo_parser_test.cc @@ -832,6 +832,31 @@ ENTRY ReducePrecision { )" }, +// Sort (Key) +{ +"SortKey", +R"(HloModule sort + +ENTRY Sort { + x = f32[1024]{0} parameter(0) + ROOT sorted = f32[1024]{0} sort(x) +} + +)" +}, +// Sort (Key, Value) +{ +"SortKeyValue", +R"(HloModule sort + +ENTRY Sort { + keys = f32[1024]{0} parameter(0) + values = s32[1024]{0} parameter(1) + ROOT sorted = (f32[1024]{0}, s32[1024]{0}) sort(keys, values) +} + +)" +}, // Conditional { "Conditional", |