-
Notifications
You must be signed in to change notification settings - Fork 160
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
[TorchDISC] setup torch-disc building environment and CI job #158
[TorchDISC] setup torch-disc building environment and CI job #158
Conversation
7774287
to
aac1e66
Compare
75052d2
to
f827338
Compare
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.
Overall LGTM
# CPU-TORCH181: | ||
# uses: ./.github/workflows/cpu_reusable.yml | ||
# with: | ||
# extra_envs: -e TORCH_BLADE_BUILD_WITH_CUDA_SUPPORT=OFF |
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.
Nit: Delete these codes if we don't need them
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 should remove the comment symbol when merging to main in the future, so I keep these jobs in the current feature branch.
apt-get install -y clang-8 clang++-8 python3.8 python3.8-dev && \ | ||
rm /usr/bin/python && \ | ||
ln -s /usr/bin/python3.8 /usr/bin/python && \ | ||
python -m pip install --upgrade pip && \ |
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.
Use multi-stage command would improve cache hit rate, such as:
RUN apt-get install lib1 lib2
RUN python -m pip install wheel1 whee2
|
||
|
||
setup( | ||
name='torch_disc', |
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 prefer to eventually build only one wheel between torch_blade
and torch_disc
since they share a lot of things. And users of PyTorch may be confused why we should have two package to support inference and training.
But I think it's fine currently in our POC version.
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.
Agree with that, but a latency problem is that torch-disc depends on lazy_tensor_staging
feature branch of PyTorch which is different from the current version TorchBlade.
This PR builds the TorchDISC pybind library `_torch_disc.so` with Torch LTC, Torch Blade, and official PyTorch source code. And also add a CI job to test it with a rough way: `import _torch_disc`. The CI job includes two parts to reduce the CI time: 1. building devel docker: install PyTorch with `lazy_tensor_staging` branch from source code. 2. build and test torch-disc with the devel image from step1. Develops can build from zero with the guide https://github.com/alibaba/BladeDISC/blob/de3a386114dfcd6038c16c9fbe0737c0a6c5f6ef/torch_disc/README.md
…#158) This PR builds the TorchDISC pybind library `_torch_disc.so` with Torch LTC, Torch Blade, and official PyTorch source code. And also add a CI job to test it with a rough way: `import _torch_disc`. The CI job includes two parts to reduce the CI time: 1. building devel docker: install PyTorch with `lazy_tensor_staging` branch from source code. 2. build and test torch-disc with the devel image from step1. Develops can build from zero with the guide https://github.com/alibaba/BladeDISC/blob/de3a386114dfcd6038c16c9fbe0737c0a6c5f6ef/torch_disc/README.md
This PR builds the TorchDISC pybind library
_torch_disc.so
with Torch LTC, Torch Blade, and official PyTorch source code.And also add a CI job to test it with a rough way:
import _torch_disc
.The CI job includes two parts to reduce the CI time:
lazy_tensor_staging
branch from source code.Develops can build from zero with the guide https://github.com/alibaba/BladeDISC/blob/de3a386114dfcd6038c16c9fbe0737c0a6c5f6ef/torch_disc/README.md