From 4e903f130a6fe3d42cc8def962e29fbb95384e2f Mon Sep 17 00:00:00 2001 From: Simrit-Kaur Date: Wed, 18 Nov 2020 08:34:42 -0800 Subject: [PATCH] Add s390x support for compiler related TCs --- .../compiler/xla/service/cpu/test_target_triple_helper.h | 5 +++++ .../compiler/xla/tests/local_client_aot_test_helper.cc | 2 ++ 2 files changed, 7 insertions(+) diff --git a/tensorflow/compiler/xla/service/cpu/test_target_triple_helper.h b/tensorflow/compiler/xla/service/cpu/test_target_triple_helper.h index 857de4a8143..bfd04ab60a7 100644 --- a/tensorflow/compiler/xla/service/cpu/test_target_triple_helper.h +++ b/tensorflow/compiler/xla/service/cpu/test_target_triple_helper.h @@ -21,8 +21,13 @@ limitations under the License. static const char kTargetCpuForHost[] = "ppc"; static const char kTargetTripleForHost[] = "ppc64le-ibm-linux-gnu"; #else +#if defined(__s390x__) +static const char kTargetCpuForHost[] = "s390x"; +static const char kTargetTripleForHost[] = "systemz-none-linux-gnu"; +#else static const char kTargetCpuForHost[] = ""; static const char kTargetTripleForHost[] = "x86_64-pc-linux"; #endif +#endif #endif diff --git a/tensorflow/compiler/xla/tests/local_client_aot_test_helper.cc b/tensorflow/compiler/xla/tests/local_client_aot_test_helper.cc index 3e9a3ec2314..aa377b57fe6 100644 --- a/tensorflow/compiler/xla/tests/local_client_aot_test_helper.cc +++ b/tensorflow/compiler/xla/tests/local_client_aot_test_helper.cc @@ -73,6 +73,8 @@ int main(int argc, char** argv) { triple_string = "x86_64-pc-windows-msvc19"; } else if (target_cpu == "ppc") { triple_string = "ppc64le-ibm-linux-gnu"; + } else if (target_cpu == "s390x") { + triple_string = "systemz-none-linux-gnu"; } else if (target_cpu == "local") { triple_string = llvm::sys::getDefaultTargetTriple(); } else {