Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support to intel gpu in a custom build #7047

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1115,6 +1115,17 @@ def create_dockerfile_linux(

ENV LD_LIBRARY_PATH=/usr/local/tensorrt/lib/:/opt/tritonserver/backends/tensorrtllm:$LD_LIBRARY_PATH
"""
if FLAGS.enable_intel_gpu and ("openvino" in backends):
df += """
RUN apt-get update && apt-get install -y gpg-agent wget
Copy link
Contributor

@nnshah1 nnshah1 May 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of docker file change - can this be handled in the cmake / build steps for the backend?

Thought:

Can we pass an a cmake variable to customize the build and pull this dependency in

(

server/build.py

Line 2343 in 0a543b8

parser.add_argument(

@tanmayv25 , @nv-kmcgill53 - woud this would also require some changes to how we install backends once build is complete? -

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about having a setup script as a part of the backend repository? We can decide on a standardized approach common across all the backend. The build.py can then access this setup script to install all the runtime dependencies and prepare environment to use the backend.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea of plug and play backends entails building backends at one place and then copying the backend libraries (*.so's) to the runtime environment with tritonserver and core.
Hence, having a script to setup env would help in all use-cases.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will need some design work - but I like that idea

RUN wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \
gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg && \
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy/lts/2350 unified" | \
tee /etc/apt/sources.list.d/intel-gpu-jammy.list
RUN apt-get update && apt-get install -y intel-opencl-icd intel-level-zero-gpu level-zero

"""

with open(os.path.join(ddir, dockerfile_name), "w") as dfile:
dfile.write(df)

Expand Down Expand Up @@ -2252,6 +2263,9 @@ def enable_all():
parser.add_argument(
"--enable-gpu", action="store_true", required=False, help="Enable GPU support."
)
parser.add_argument(
"--enable-intel-gpu", action="store_true", required=False, help="Enable Intel GPU support for OpenVINO backend."
)
parser.add_argument(
"--enable-mali-gpu",
action="store_true",
Expand Down