From c8757107a8669927d2fd6e2f758a1c5661a02da7 Mon Sep 17 00:00:00 2001
From: Anna R <annarev@google.com>
Date: Thu, 19 Dec 2019 16:10:28 -0800
Subject: [PATCH] Look for executable_path.python3 for benchmark if
 executable_path is not found.

PiperOrigin-RevId: 286483123
Change-Id: Ibdb70e4d8ecbc0cdd7a284f077a715042da8f085
---
 tensorflow/tools/test/run_and_gather_logs_lib.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tensorflow/tools/test/run_and_gather_logs_lib.py b/tensorflow/tools/test/run_and_gather_logs_lib.py
index f629e3a10b6..f92fb7b9138 100644
--- a/tensorflow/tools/test/run_and_gather_logs_lib.py
+++ b/tensorflow/tools/test/run_and_gather_logs_lib.py
@@ -158,7 +158,10 @@ def run_and_gather_logs(name, test_name, test_args,
 
   try:
     if not gfile.Exists(test_executable):
-      raise ValueError("Executable does not exist: %s" % test_executable)
+      test_executable_py3 = test_executable + ".python3"
+      if not gfile.Exists(test_executable_py3):
+        raise ValueError("Executable does not exist: %s" % test_executable)
+      test_executable = test_executable_py3
     test_args = shlex.split(test_args)
 
     # This key is defined in tf/core/util/reporter.h as