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

update torch-pre version. #1228

Merged
merged 5 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/pytorch_pre_gpu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: pytorch_pre-cuda11_7
name: pytorch_pre-cuda11_8
on:
push:
branches: [ main ]
Expand All @@ -12,15 +12,15 @@ jobs:
build:
uses: ./.github/workflows/resuable_gpu_build.yml
with:
cuda_version: cu117
remote_runtime_docker: bladedisc:latest-runtime-torch-pre-cu117
develop_base_image: nvidia/cuda:11.7.1-cudnn8-devel-ubuntu20.04
runtime_base_image: nvidia/cuda:11.7.1-cudnn8-devel-ubuntu20.04
cuda_version: cu118
remote_runtime_docker: bladedisc:latest-runtime-torch-pre-cu118
develop_base_image: nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04
runtime_base_image: nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04
extra_envs: -e TORCH_BLADE_BUILD_TENSORRT_STATIC=OFF
-e TORCH_BLADE_CI_BUILD_TORCH_VERSION=pre+cu117
-e TORCH_BLADE_CI_BUILD_TORCH_VERSION=pre+cu118
extra_build_args: --build-arg PYTHON_VERSION=PYTHON3.8
exec_command: bash ./scripts/ci/test_pytorch_blade.sh
deploy_command: TORCH_VERSION=pre+cu117 bash ./scripts/ci/deploy_pytorch_blade.sh
deploy_command: TORCH_VERSION=pre+cu118 bash ./scripts/ci/deploy_pytorch_blade.sh
secrets:
ALIYUN_DOCKER_USERNAME: ${{ secrets.ALIYUN_DOCKER_USERNAME }}
ALIYUN_DOCKER_PASSWORD: ${{ secrets.ALIYUN_DOCKER_PASSWORD }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/torchbench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: ./.github/workflows/reusable.yml
with:
name: torch-offcial-benchmark
base_image: bladedisc/bladedisc:latest-runtime-torch-pre-cu117
base_image: bladedisc/bladedisc:latest-runtime-torch-pre-cu118
device: gpu-bench
dockerfile: docker/cronjobs/Dockerfile.torch.bench
extra_run_args: --cap-add=SYS_ADMIN --gpus all
Expand All @@ -30,7 +30,7 @@ jobs:
uses: ./.github/workflows/reusable.yml
with:
name: torch-offcial-benchmark
base_image: bladedisc/bladedisc:latest-runtime-torch-pre-cu117
base_image: bladedisc/bladedisc:latest-runtime-torch-pre-cu118
device: gpu-bench
dockerfile: docker/cronjobs/Dockerfile.torch.bench
extra_run_args: --cap-add=SYS_ADMIN --gpus all
Expand All @@ -45,7 +45,7 @@ jobs:
uses: ./.github/workflows/reusable.yml
with:
name: torch-offcial-benchmark
base_image: bladedisc/bladedisc:latest-runtime-torch-pre-cu117
base_image: bladedisc/bladedisc:latest-runtime-torch-pre-cu118
device: gpu-bench
timeout_minutes: 4320 # 72h
dockerfile: docker/cronjobs/Dockerfile.torch.bench
Expand Down
4 changes: 2 additions & 2 deletions examples/PyTorch/Train/Dynamo/StableDiffusion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ please go to the official [diffusers repo](https://github.com/huggingface/diffus
clone diffusers repo and install requirements in the BladeDISC runtime Docker image.

``` bash
docker run --rm -it -v $PWD:/workspace -w /workspace bladedisc/bladedisc:latest-runtime-torch-pre-cu117 bash
docker run --rm -it -v $PWD:/workspace -w /workspace bladedisc/bladedisc:latest-runtime-torch-pre-cu118 bash
pip install diffusers==0.17.0
```

Expand All @@ -33,4 +33,4 @@ please go to the official [diffusers repo](https://github.com/huggingface/diffus
| Backend | Batch Size | Throughput (samples/sec) | Speedup |
| :-----: | :--------: | :----------------------: | :-----: |
| Eager | 1 | 3.02 | 1.00 |
| TorchBlade | 1 | 3.34 | 1.10 |
| TorchBlade | 1 | 3.34 | 1.10 |
6 changes: 3 additions & 3 deletions pytorch_blade/benchmark/TorchBench/requirements_cuda.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
--pre --extra-index-url https://download.pytorch.org/whl/nightly/cu117 --extra-index-url https://download.pytorch.org/whl/nightly/cpu
--pre --extra-index-url https://download.pytorch.org/whl/nightly/cu118 --extra-index-url https://download.pytorch.org/whl/nightly/cpu
pandas
librosa
torchaudio==2.1.0.dev20230516+cu117
torchaudio==2.1.0.dev20230621+cu118
# may depend on the same day or the previous day
# better verify this dependency locally
torchtext==0.16.0.dev20230516
torchtext==0.16.0.dev20230621
pyyaml
2 changes: 1 addition & 1 deletion pytorch_blade/scripts/build_pytorch_blade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function ci_build() {
}

function test_training_examples() {
if [ "$TORCH_BLADE_CI_BUILD_TORCH_VERSION" == "pre+cu117" ]; then
if [ "$TORCH_BLADE_CI_BUILD_TORCH_VERSION" == "pre+cu118" ]; then
(
cd ../examples/PyTorch/Train/Dynamo/Bert && \
python3 -m pip install -r requirements.txt && \
Expand Down
4 changes: 2 additions & 2 deletions pytorch_blade/scripts/pip/requirements-dev-pre+cpu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ expecttest
aliyun-log-python-sdk==0.6.48.6
cryptography
# please update pytorch_blade/benchmark/TorchBench/requirements_cpu.txt both
torch==2.1.0.dev20230516+cpu
torchvision==0.16.0.dev20230516+cpu
torch==2.1.0.dev20230621+cpu
torchvision==0.16.0.dev20230621+cpu
--pre --extra-index-url https://download.pytorch.org/whl/nightly/cpu
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ py-cpuinfo
aliyun-log-python-sdk==0.6.48.6
cryptography
# please update pytorch_blade/benchmark/TorchBench/requirements_cuda.txt both
torch==2.1.0.dev20230516+cu117
torchvision==0.16.0.dev20230516+cu117
--pre --extra-index-url https://download.pytorch.org/whl/nightly/cu117
torch==2.1.0.dev20230621+cu118
torchvision==0.16.0.dev20230621+cu118
--pre --extra-index-url https://download.pytorch.org/whl/nightly/cu118
5 changes: 4 additions & 1 deletion pytorch_blade/tests/disc/test_dynamo.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def test_capture(self):
import torch._dynamo as dynamo
import torch_blade.dynamo
explain_out = dynamo.explain(func1, b=torch.rand([2]))
self.assertEqual(len(explain_out[2]), 1)
if type(explain_out) is tuple:
self.assertEqual(len(explain_out[2]), 1)
else:
self.assertEqual(explain_out.graph_count, 1)

if __name__ == '__main__':
unittest.main()
Loading