-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat: Added --build_variant flag for cpu only build. #8329
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
base: main
Are you sure you want to change the base?
feat: Added --build_variant flag for cpu only build. #8329
Conversation
build.py
Outdated
| find /opt/tritonserver/python -maxdepth 1 -type f -name \\ | ||
| "tritonfrontend-*.whl" | xargs -I {} pip install --upgrade {}[all] | ||
| RUN if [ "$(uname -m)" = "ppc64le" ]; then \ | ||
| VARIANT="cpu"; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel that the cpu variant could be applicable for other use cases as well, instead of limiting it to the ppc64le architecture. Can we just parameterize this variant and set all as a default value (this way we can safely remove this uname check here)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, we are working on these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made the changes to remove uname check , added a --build_variant flag which is set to all by default.
build.py
Outdated
| && apt-get install -y --no-install-recommends \ | ||
| clang-15 \ | ||
| && ln -s /usr/bin/clang-15 /usr/bin/clang -f \ | ||
| && ln -s /usr/bin/clang++-15 /usr/bin/clang++ -f \ | ||
| && pip3 install cython ninja; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we installing explicitly on ppc64le architecture and not on other architectures?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were facing linker issue for numpy as it was getting built from source. Hence, need to install clang-15 for ppc64le architecture. For other architectures numpy wheels are available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed these changes as we are no longer facing the linker issue.
mkumatag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,
squash the commits and change the PR heading accordingly
adabaa2 to
ce46097
Compare
|
@mc-nv @dmitry-tokarev-nv @whoisj |
|
These changes make sense to me. @mc-nv to review and determine if the changes are risky or compatible w/ out internal build process or not (I think they should be). |
|
To me looks like the change is about to select the required wheel package dependencies during installation aka
|
|
@Sunidhi-Gaonkar1 please address @mc-nv's concerns. Thank you. |
|
Hi @whoisj @mc-nv Sorry for the delayed response. We tried using enable_gpu flag to build cpu only wheel but it ran into issues due to following reasons:
Hence regardless of enable_gpu flag is set or unset it tries loading up some or the other cuda related library. If any architecture does not have gpu support then this new build_variant flag can be used to enable cpu only build. When build_variant is passed as "cpu" it will not load any cuda related library regardless of whether enable_gpu is set or unset. This creates separate responsibilities for both the flags enable_gpu and build_variant. The default value of the build_variant has been kept as "all". Please let us know your thoughts. |
|
We are also currently facing build failure due to this cuda related library , libnvshmem3-cuda-13, we are working to resolve this issue. |
f6dee1d to
552a0bb
Compare
552a0bb to
cb7c462
Compare
What does the PR do?
Checklist
Agreement
<commit_type>: <Title>pre-commit install, pre-commit run --all)Commit Type:
Check the conventional commit type
box here and add the label to the github PR.
Related PRs:
Where should the reviewer start?
Test plan:
Used below commands to create triton server docker instance and starting up the triton server:
1.sudo docker run --privileged -it -p8000:8000 --volume /model_repository:/var/models --name triton_server_test tritonserver
2../bin/tritonserver --model-repository=/var/models
Tested the simple identity model using below commands in a different session:
1.curl -X POST localhost:8000/v2/repository/index | jq
2.curl localhost:8000/v2/models/simple_identity | jq
Caveats:
Background
Hi team,
This PR includes changes made to add Power support to triton-inference-server for python backend. Can you please review/merge this?
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)