Skip to content

Commit

Permalink
Add plumbing for git_repo/repo_tag for tensorflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ClifHouck committed Dec 19, 2023
1 parent 3bf9ee0 commit 3e1379d
Showing 1 changed file with 35 additions and 4 deletions.
39 changes: 35 additions & 4 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down Expand Up @@ -812,9 +814,8 @@ 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"
extra_args = []

# If a specific TF image is specified use it, otherwise pull from NGC.
if backend_name in images:
Expand All @@ -823,8 +824,36 @@ def tensorflow_cmake_args(images, library_paths):
image = "nvcr.io/nvidia/tensorflow:{}-tf2-py3".format(
FLAGS.upstream_container_version
)

extra_args = [
cmake_backend_arg(backend_name, "TRITON_TENSORFLOW_DOCKER_IMAGE", None, image)
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",
),
cmake_backend_arg(backend_name, "TRITON_TENSORFLOW_DOCKER_IMAGE", None, image),
]
return extra_args

Expand Down Expand Up @@ -1822,6 +1851,7 @@ def backend_build(
install_dir,
images,
components,
components_git_orgs,
github_org,
library_paths,
):
Expand Down Expand Up @@ -2828,6 +2858,7 @@ def enable_all():
script_install_dir,
images,
components,
components_git_orgs,
github_org,
library_paths,
)
Expand Down

0 comments on commit 3e1379d

Please sign in to comment.