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

chore: PA Migration From Client #7449

Merged
merged 7 commits into from
Jul 29, 2024
Merged

chore: PA Migration From Client #7449

merged 7 commits into from
Jul 29, 2024

Conversation

fpetrini15
Copy link
Contributor

Goal: Build PA separately from client and ensure that there is no impact on CI.

Client changes: triton-inference-server/client#722

# TODO: PA will rebuild the CC clients since it depends on it.
# This should be optimized so that we do not have to build
# the CC clients twice. Similarly, because the SDK expectation is
# that PA is packaged with the python client, we hold off on building
Copy link
Contributor

Choose a reason for hiding this comment

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

Why it is packaged with Python client?

Copy link
Contributor Author

@fpetrini15 fpetrini15 Jul 16, 2024

Choose a reason for hiding this comment

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

I am not sure what the original motivation was (likely convenience). However, this design of packaging PA has been baked into the python client AFAIK starting back in 2022. If we want to break this expectation, that is a separate discussion.

-DTRITON_ENABLE_GPU=${TRITON_ENABLE_GPU} /workspace/client
RUN make -j16 cc-clients java-clients && \
rm -fr ~/.m2

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like a multi-stage build to me: 1. client libs; 2. PA / genai-perf

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I general, yes, however, it's complicated by two things:

  1. The python client, as discussed above, has functionality to package PA in its pip wheel. Therefore, to guarantee its availability, the python client must be built after PA.
  2. PA does (in the current PA repo PR) and should be able to build itself (including its client dependencies) without needing the client libs prebuilt.

-DTRITON_ENABLE_CC_HTTP=ON -DTRITON_ENABLE_CC_GRPC=ON \
-DTRITON_ENABLE_PYTHON_HTTP=ON -DTRITON_ENABLE_PYTHON_GRPC=ON \
-DTRITON_ENABLE_PYTHON_HTTP=OFF -DTRITON_ENABLE_PYTHON_GRPC=OFF \
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can just turn it on and build it as that is what the client stage will look like at the end, avoiding rebuild can leave to the PA stage

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can build the python client here, however, we need to rebuild it as part of the PA build in order for the pip wheel to contain the PA-associated binaries. For this reason, I figured it was best to skip the python client build at this stage. Am I misunderstanding?

RUN cmake -DCMAKE_INSTALL_PREFIX=/workspace/install \
-DTRITON_VERSION=`cat /workspace/TRITON_VERSION` \
-DTRITON_REPO_ORGANIZATION=${TRITON_REPO_ORGANIZATION} \
-DTRITON_COMMON_REPO_TAG=${TRITON_COMMON_REPO_TAG} \
-DTRITON_CORE_REPO_TAG=${TRITON_CORE_REPO_TAG} \
-DTRITON_THIRD_PARTY_REPO_TAG=${TRITON_THIRD_PARTY_REPO_TAG} \
-DTRITON_ENABLE_PERF_ANALYZER=OFF \
Copy link
Contributor

Choose a reason for hiding this comment

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

can remove, this is OFF by default.

Copy link
Contributor Author

@fpetrini15 fpetrini15 Jul 16, 2024

Choose a reason for hiding this comment

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

I saw it was off by default, but wanted to explicitly mark it as off for expectation clarity and JIC it changed. Ultimately, this option will be removed entirely from the client CMakeLists.txt. However, I can remove the option as well.

-DTRITON_ENABLE_CC_HTTP=ON \
-DTRITON_ENABLE_CC_GRPC=ON \
-DTRITON_ENABLE_PYTHON_HTTP=ON \
-DTRITON_ENABLE_PYTHON_GRPC=ON \
Copy link
Contributor

Choose a reason for hiding this comment

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

Should add some TODOs, I don't think these flags will be removed in the final version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you clarify what TODOs are needed here? You're correct in that these flags will not be removed in the final version.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I meant "will be".. PA doesn't have dependency on Python client library, right?

Copy link
Contributor Author

@fpetrini15 fpetrini15 Jul 16, 2024

Choose a reason for hiding this comment

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

You are correct. PA does not depend on the Python client. However, as per current user expectation, the Python client does depend on PA, since it is generally packaged into the python client pip wheel during the build process (see comment above).

We may need to discuss as an org if we want to break this expectation now that PA will be its own repo.

Copy link
Contributor

@GuanLuo GuanLuo left a comment

Choose a reason for hiding this comment

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

approving for now, appears that there are follow-up tasks for clean up and please make sure they are listed and tracked somewhere.

@rmccorm4 rmccorm4 changed the title PA Migration From Client chore: PA Migration From Client Jul 17, 2024
@fpetrini15 fpetrini15 merged commit ceec296 into main Jul 29, 2024
3 checks passed
@fpetrini15 fpetrini15 deleted the fpetrini-migrate-pa branch July 29, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants