From 797a737b4647bee77b2690f003ed15590e631279 Mon Sep 17 00:00:00 2001 From: "Cui, Yifeng" Date: Thu, 4 Jul 2024 09:09:43 -0700 Subject: [PATCH] Add oneMKL for CI and align environment setup script with bundle --- .github/workflows/inductor_xpu_e2e_ci.yml | 2 +- .github/workflows/inductor_xpu_e2e_nightly.yml | 4 ++-- .github/workflows/pull.yml | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/inductor_xpu_e2e_ci.yml b/.github/workflows/inductor_xpu_e2e_ci.yml index c7d408b33..982b515d9 100644 --- a/.github/workflows/inductor_xpu_e2e_ci.yml +++ b/.github/workflows/inductor_xpu_e2e_ci.yml @@ -66,7 +66,7 @@ jobs: cd ../pytorch pip install -r requirements.txt export USE_XPU=1 - source /opt/intel/oneapi/compiler/latest/env/vars.sh + source /opt/intel/oneapi/pytorch-gpu-dev-0.5/oneapi-vars.sh export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"} python setup.py bdist_wheel pip install --force-reinstall dist/*.whl diff --git a/.github/workflows/inductor_xpu_e2e_nightly.yml b/.github/workflows/inductor_xpu_e2e_nightly.yml index 8307edae7..f1ec3ed06 100644 --- a/.github/workflows/inductor_xpu_e2e_nightly.yml +++ b/.github/workflows/inductor_xpu_e2e_nightly.yml @@ -113,7 +113,7 @@ jobs: echo "TRANSFORMERS_VERSION=$(<.ci/docker/ci_commit_pins/huggingface.txt)" |tee -a "${GITHUB_OUTPUT}" >> "${GITHUB_ENV}" echo "TIMM_COMMIT_ID=$(<.ci/docker/ci_commit_pins/timm.txt)" |tee -a "${GITHUB_OUTPUT}" >> "${GITHUB_ENV}" echo "MODEL_ONLY_NAME=${{ inputs.model }}" |tee -a "${GITHUB_OUTPUT}" >> "${GITHUB_ENV}" - source /opt/intel/oneapi/compiler/latest/env/vars.sh + source /opt/intel/oneapi/pytorch-gpu-dev-0.5/oneapi-vars.sh echo "DRIVER_VERSION=$(dkms status 2>&1 |grep 'intel-i915-dkms' |sed 's/.*\///;s/,.*//')" |tee -a "${GITHUB_OUTPUT}" >> "${GITHUB_ENV}" echo "BUNDLE_VERSION=$(dpcpp --version 2>&1 |grep 'DPC++/C++' |sed 's/.*(//;s/).*//')" |tee -a "${GITHUB_OUTPUT}" >> "${GITHUB_ENV}" . /etc/os-release @@ -133,7 +133,7 @@ jobs: cd ../pytorch pip install -r requirements.txt export USE_XPU=1 - source /opt/intel/oneapi/compiler/latest/env/vars.sh + source /opt/intel/oneapi/pytorch-gpu-dev-0.5/oneapi-vars.sh export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"} python setup.py bdist_wheel pip install --force-reinstall dist/*.whl diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index bd65effa9..5c23e22b3 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -48,7 +48,7 @@ jobs: cd ../pytorch pip install -r requirements.txt export USE_XPU=1 - source /opt/intel/oneapi/compiler/latest/env/vars.sh + source /opt/intel/oneapi/pytorch-gpu-dev-0.5/oneapi-vars.sh export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"} python setup.py bdist_wheel pip install --force-reinstall dist/*.whl @@ -58,7 +58,7 @@ jobs: if: ${{ hashFiles('examples/') != '' }} run: | xpu-smi discovery - source /opt/intel/oneapi/compiler/latest/env/vars.sh + source /opt/intel/oneapi/pytorch-gpu-dev-0.5/oneapi-vars.sh source activate xpu_op_${ZE_AFFINITY_MASK} cd examples pip install pytest @@ -66,7 +66,7 @@ jobs: - name: Run XPU OP Extended UT if: ${{ hashFiles('test/xpu/') != '' }} run: | - source /opt/intel/oneapi/compiler/latest/env/vars.sh + source /opt/intel/oneapi/pytorch-gpu-dev-0.5/oneapi-vars.sh source activate xpu_op_${ZE_AFFINITY_MASK} export PYTORCH_TEST_WITH_SLOW=1 cd ../pytorch/third_party/torch-xpu-ops/test/xpu/extended/ @@ -74,7 +74,7 @@ jobs: - name: Run XPU OP UT if: ${{ hashFiles('test/xpu/') != '' }} run: | - source /opt/intel/oneapi/compiler/latest/env/vars.sh + source /opt/intel/oneapi/pytorch-gpu-dev-0.5/oneapi-vars.sh source activate xpu_op_${ZE_AFFINITY_MASK} export PYTORCH_ENABLE_XPU_FALLBACK=1 export PYTORCH_TEST_WITH_SLOW=1 @@ -87,7 +87,7 @@ jobs: timeout 10000 python run_test_with_only.py - name: Run Torch XPU UT run: | - source /opt/intel/oneapi/compiler/latest/env/vars.sh + source /opt/intel/oneapi/pytorch-gpu-dev-0.5/oneapi-vars.sh source activate xpu_op_${ZE_AFFINITY_MASK} cd ../pytorch TEST_REPORTS_DIR=$(pwd)/test/test-reports