From fd4b24d6427bf6e8ad0a153d5f190215ef4da256 Mon Sep 17 00:00:00 2001 From: Clif Houck Date: Thu, 19 Oct 2023 11:38:07 -0500 Subject: [PATCH] Add plumbing for git_repo/repo_tag for tensorflow --- build.py | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/build.py b/build.py index 0705e33599..fcf981766d 100755 --- a/build.py +++ b/build.py @@ -593,7 +593,9 @@ def backend_cmake_args( elif be == "openvino": args = openvino_cmake_args() elif be == "tensorflow": - args = tensorflow_cmake_args(images, library_paths) + args = tensorflow_cmake_args( + images, library_paths, components, components_git_orgs + ) elif be == "python": args = [] elif be == "dali": @@ -848,11 +850,39 @@ def tensorrt_cmake_args(): return cargs -def tensorflow_cmake_args(images, library_paths): +def tensorflow_cmake_args(images, library_paths, components, components_git_orgs): backend_name = "tensorflow" # If platform is jetpack do not use docker images - extra_args = [] + extra_args = [ + cmake_backend_arg( + "tensorflow", "TRITON_COMMON_REPO_TAG", "STRING", components["common"] + ), + cmake_backend_arg( + "tensorflow", + "TRITON_COMMON_GIT_REPO", + "STRING", + components_git_orgs["common"] + "common.git", + ), + cmake_backend_arg( + "tensorflow", "TRITON_CORE_REPO_TAG", "STRING", components["core"] + ), + cmake_backend_arg( + "tensorflow", + "TRITON_CORE_GIT_REPO", + "STRING", + components_git_orgs["core"] + "core.git", + ), + cmake_backend_arg( + "tensorflow", "TRITON_BACKEND_REPO_TAG", "STRING", components["backend"] + ), + cmake_backend_arg( + "tensorflow", + "TRITON_BACKEND_GIT_REPO", + "STRING", + components_git_orgs["backend"] + "backend.git", + ), + ] if target_platform() == "jetpack": if backend_name in library_paths: extra_args = [ @@ -1878,6 +1908,7 @@ def backend_build( install_dir, images, components, + components_git_orgs, github_org, library_paths, ): @@ -2883,6 +2914,7 @@ def enable_all(): script_install_dir, images, components, + components_git_orgs, github_org, library_paths, )