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

Remove IPEX from workflows #2068

Merged
merged 2 commits into from
Aug 30, 2024
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
8 changes: 7 additions & 1 deletion .github/actions/setup-pytorch/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ runs:
sudo mkdir -p /opt/intel
sudo ln -sfT ${{ inputs.oneapi }} /opt/intel/oneapi

- name: Generate PyTorch cache key
shell: bash
run: |
PYTORCH_CACHE_KEY=$(echo $PYTHON_VERSION $PYTORCH_COMMIT_ID ${{ hashFiles('scripts/patch-pytorch.sh') }} | sha256sum - | cut -d\ -f1)
echo "PYTORCH_CACHE_KEY=$PYTORCH_CACHE_KEY" | tee -a "$GITHUB_ENV"

- name: Load PyTorch from a cache
id: pytorch-cache
uses: ./.github/actions/load
Expand All @@ -76,7 +82,7 @@ runs:
CACHE_NUMBER: 11
with:
path: pytorch
key: pytorch-$PYTHON_VERSION-$PYTORCH_COMMIT_ID-$CACHE_NUMBER
key: pytorch-$PYTORCH_CACHE_KEY-$CACHE_NUMBER

- name: Clone PyTorch repository
if: ${{ steps.pytorch-cache.outputs.status == 'miss' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-triton/action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Builds and installs Triton. Uses git clone in the current directory.
# Sets the following environment variables:
# * LLVM_COMMIT_ID
description: Build and install IPEX wheels
description: Build and install Triton
inputs:
build_llvm:
description: Build LLVM
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/auto-update-translator-cid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,11 @@ jobs:
with:
python-version: '3.10'

- name: Setup PyTorch with IPEX
- name: Setup PyTorch
if: ${{ env.TARGET_PRID == null }}
uses: ./.github/actions/setup-pytorch
with:
repository: Stonepia/pytorch
ref: ""

- name: Setup IPEX
if: ${{ env.TARGET_PRID == null }}
uses: ./.github/actions/setup-ipex
repository: pytorch/pytorch

- name: Install test dependencies
if: ${{ env.TARGET_PRID == null }}
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/build-test-a770.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ on:
description: Runner label, keep empty for default
type: string
default: ""
install_ipex:
# This boolean parameter defines what PyTorch will be used in the workflow:
# true: Stonepia/pytorch (fork) with IPEX
# false: pytorch/pytorch (upstream) without IPX
# In both cases, pytorch_ref below allows specifying a branch, tag, or commit id in the
# corresponding repository. If not specified, a default (pinned) version will be used.
description: Install Intel PyTorch Extension
type: boolean
default: false
pytorch_ref:
description: PyTorch ref, keep empty for default
type: string
Expand Down Expand Up @@ -54,7 +45,6 @@ jobs:
with:
device: a770
runner_label: ${{ inputs.runner_label }}
install_ipex: ${{ inputs.install_ipex }}
pytorch_ref: ${{ inputs.pytorch_ref }}
python_version: ${{ matrix.python }}
upload_test_reports: ${{ inputs.upload_test_reports }}
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/build-test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ on:
description: Runner label, keep empty for default
type: string
default: ""
install_ipex:
# This boolean parameter defines what PyTorch will be used in the workflow:
# true: Stonepia/pytorch (fork) with IPEX
# false: pytorch/pytorch (upstream) without IPX
# In both cases, pytorch_ref below allows specifying a branch, tag, or commit id in the
# corresponding repository. If not specified, a default (pinned) version will be used.
description: Install Intel PyTorch Extension
type: boolean
default: false
pytorch_ref:
description: PyTorch ref, keep empty for default
type: string
Expand Down Expand Up @@ -81,7 +72,6 @@ jobs:
with:
driver_version: ${{ matrix.driver }}
runner_label: ${{ inputs.runner_label }}
install_ipex: ${{ inputs.install_ipex }}
pytorch_ref: ${{ inputs.pytorch_ref }}
python_version: ${{ matrix.python }}
upload_test_reports: ${{ inputs.upload_test_reports }}
Expand Down
29 changes: 2 additions & 27 deletions .github/workflows/build-test-reusable.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Build and test reusable workflow
run-name: ${{ inputs.run_name }} - ${{ inputs.python_version }} - ${{ inputs.install_ipex && 'IPEX' || 'no IPEX' }} - ${{ inputs.runner_label || 'default'}}
run-name: ${{ inputs.run_name }} - ${{ inputs.python_version }} - ${{ inputs.runner_label || 'default'}}

on:
workflow_call:
Expand All @@ -16,15 +16,6 @@ on:
description: Runner label, keep empty for default
type: string
default: ""
install_ipex:
# This boolean parameter defines what PyTorch will be used in the workflow:
# true: Stonepia/pytorch (fork) with IPEX
# false: pytorch/pytorch (upstream) without IPX
# In both cases, pytorch_ref below allows specifying a branch, tag, or commit id in the
# corresponding repository. If not specified, a default (pinned) version will be used.
description: Install Intel PyTorch Extension
type: boolean
default: true
pytorch_ref:
description: PyTorch ref, keep empty for default
type: string
Expand Down Expand Up @@ -100,28 +91,12 @@ jobs:
with:
python-version: ${{ inputs.python_version }}

- name: Setup PyTorch with IPEX
if: ${{ inputs.install_ipex }}
uses: ./.github/actions/setup-pytorch
with:
repository: Stonepia/pytorch
ref: ${{ inputs.pytorch_ref }}

- name: Setup PyTorch without IPEX
if: ${{ !inputs.install_ipex }}
- name: Setup PyTorch
uses: ./.github/actions/setup-pytorch
with:
repository: pytorch/pytorch
ref: ${{ inputs.pytorch_ref }}

- name: Setup IPEX
if: ${{ inputs.install_ipex }}
uses: ./.github/actions/setup-ipex

- name: Setup no-op IPEX
if: ${{ !inputs.install_ipex }}
uses: ./.github/actions/setup-no-op-ipex

- name: Install test dependencies
run: |
pip install pytest pytest-xdist pytest-rerunfailures pytest-select pytest-timeout expecttest defusedxml
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ on:
description: Runner label, keep empty for default
type: string
default: ""
install_ipex:
# This boolean parameter defines what PyTorch will be used in the workflow:
# true: Stonepia/pytorch (fork) with IPEX
# false: pytorch/pytorch (upstream) without IPX
# In both cases, pytorch_ref below allows specifying a branch, tag, or commit id in the
# corresponding repository. If not specified, a default (pinned) version will be used.
description: Install Intel PyTorch Extension
type: boolean
default: false
pytorch_ref:
description: PyTorch ref, keep empty for default
type: string
Expand Down Expand Up @@ -67,7 +58,7 @@ jobs:
CACHE_NUMBER: 2
with:
path: $HOME/.cache/pip
key: pip-3.10-${{ hashFiles('.pre-commit-config.yaml') }}-${{ env.INSTALL_IPEX }}-${{ env.CACHE_NUMBER }}
key: pip-3.10-${{ hashFiles('.pre-commit-config.yaml') }}-${{ env.CACHE_NUMBER }}

- name: Install Python 3.10
uses: actions/setup-python@v5
Expand Down Expand Up @@ -128,7 +119,6 @@ jobs:
with:
driver_version: ${{ matrix.driver }}
runner_label: ${{ inputs.runner_label }}
install_ipex: ${{ inputs.install_ipex || false }}
pytorch_ref: ${{ inputs.pytorch_ref }}
python_version: ${{ matrix.python }}
upload_test_reports: ${{ inputs.upload_test_reports || false }}
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/e2e-accuracy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ run-name: ${{ inputs.run_name }}
on:
workflow_dispatch:
inputs:
install_ipex:
description: Install Intel PyTorch Extension
type: boolean
default: false
pytorch_ref:
description: PyTorch ref, keep empty for default
type: string
Expand Down Expand Up @@ -123,7 +119,6 @@ jobs:
fail-fast: false
uses: ./.github/workflows/e2e-reusable.yml
with:
install_ipex: ${{ inputs.install_ipex }}
pytorch_ref: ${{ inputs.pytorch_ref }}
suite: ${{ matrix.suite }}
mode: ${{ matrix.mode }}
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/e2e-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ run-name: ${{ inputs.run_name }}
on:
workflow_dispatch:
inputs:
install_ipex:
description: Install Intel PyTorch Extension
type: boolean
default: false
pytorch_ref:
description: PyTorch ref, keep empty for default
type: string
Expand Down Expand Up @@ -133,7 +129,6 @@ jobs:
fail-fast: false
uses: ./.github/workflows/e2e-reusable.yml
with:
install_ipex: ${{ inputs.install_ipex }}
pytorch_ref: ${{ inputs.pytorch_ref }}
suite: ${{ matrix.suite }}
mode: ${{ matrix.mode }}
Expand Down
50 changes: 3 additions & 47 deletions .github/workflows/e2e-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ name: E2E reusable workflow
on:
workflow_call:
inputs:
install_ipex:
description: Install Intel PyTorch Extension
type: boolean
default: false
pytorch_ref:
description: PyTorch ref, keep empty for default
type: string
Expand Down Expand Up @@ -87,40 +83,17 @@ jobs:
run: |
pip install wheel

- name: Setup PyTorch with IPEX
if: ${{ inputs.install_ipex }}
uses: ./.github/actions/setup-pytorch
with:
repository: Stonepia/pytorch
ref: ${{ inputs.pytorch_ref }}

- name: Setup PyTorch without IPEX
if: ${{ !inputs.install_ipex }}
- name: Setup PyTorch
uses: ./.github/actions/setup-pytorch
with:
repository: pytorch/pytorch
ref: ${{ inputs.pytorch_ref }}

- name: Set benchmark repository (IPEX)
if: ${{ inputs.install_ipex }}
run: |
echo "BENCHMARK_REPO=weishi-deng/benchmark" | tee -a "$GITHUB_ENV"

- name: Set benchmark repository (PyTorch)
if: ${{ !inputs.install_ipex }}
- name: Set benchmark repository
run: |
echo "BENCHMARK_REPO=pytorch/benchmark" | tee -a "$GITHUB_ENV"

- name: Get benchmark commit id (IPEX)
if: ${{ inputs.install_ipex }}
uses: ./.github/actions/get-commit-id
with:
repository: ${{ env.BENCHMARK_REPO }}
branch: main
variable: BENCHMARK_COMMIT_ID

- name: Get benchmark commit id (PyTorch)
if: ${{ !inputs.install_ipex }}
- name: Get benchmark commit id
run: |
cd pytorch
echo "BENCHMARK_COMMIT_ID=$(<.github/ci_commit_pins/torchbench.txt)" | tee -a "$GITHUB_ENV"
Expand All @@ -134,14 +107,6 @@ jobs:
echo "TRANSFORMERS_VERSION=$(<.ci/docker/ci_commit_pins/huggingface.txt)" >> "${GITHUB_ENV}"
echo "TIMM_COMMIT_ID=$(<.ci/docker/ci_commit_pins/timm.txt)" >> "${GITHUB_ENV}"

- name: Setup IPEX
if: ${{ inputs.install_ipex }}
uses: ./.github/actions/setup-ipex

- name: Setup no-op IPEX
if: ${{ !inputs.install_ipex }}
uses: ./.github/actions/setup-no-op-ipex

- name: Generate Triton cache key
id: triton-key
run: |
Expand Down Expand Up @@ -195,12 +160,6 @@ jobs:
ref: ${{ env.TORCHVISION_COMMIT_ID }}
extra-cache-key: ${{ env.PYTORCH_VERSION }}

# FIXME: old PyTorch does not work with torchdata=0.8.0
- name: Install torchdata package
if: ${{ inputs.suite == 'torchbench' && inputs.install_ipex }}
run: |
pip install 'torchdata<0.8.0'

- name: Install torchtext package
if: ${{ inputs.suite == 'torchbench' }}
uses: ./.github/actions/install-dependency
Expand Down Expand Up @@ -290,9 +249,6 @@ jobs:
PYTORCH_REPO=$PYTORCH_REPO
PYTORCH_COMMIT_ID=$PYTORCH_COMMIT_ID
PYTORCH_VERSION=$PYTORCH_VERSION
IPEX_REPO=$IPEX_REPO
IPEX_COMMIT_ID=$IPEX_COMMIT_ID
IPEX_VERSION=$IPEX_VERSION
LLVM_REPO=llvm/llvm-project
LLVM_COMMIT_ID=$LLVM_COMMIT_ID
BENCHMARK_REPO=$BENCHMARK_REPO
Expand Down
Loading
Loading