diff --git a/.github/actions/inductor-xpu-e2e-test/action.yml b/.github/actions/inductor-xpu-e2e-test/action.yml index 4f81534fd..4e1fce079 100644 --- a/.github/actions/inductor-xpu-e2e-test/action.yml +++ b/.github/actions/inductor-xpu-e2e-test/action.yml @@ -51,7 +51,7 @@ runs: shell: bash run: | source activate e2e_ci - source .github/scripts/env.sh + source .github/scripts/env.sh ${{ inputs.pytorch }} if [[ ${{ inputs.suite }} == *"torchbench"* ]]; then if [ "${{ inputs.pytorch }}" != "nightly_wheel" ]; then cd ../ && rm -rf audio && git clone --single-branch -b main https://github.com/pytorch/audio.git @@ -94,7 +94,7 @@ runs: shell: bash run: | source activate e2e_ci - source .github/scripts/env.sh + source .github/scripts/env.sh ${{ inputs.pytorch }} cp .github/scripts/inductor_xpu_test.sh ../pytorch cd ../pytorch diff --git a/.github/scripts/env.sh b/.github/scripts/env.sh index 56d8e3930..4fd192c06 100644 --- a/.github/scripts/env.sh +++ b/.github/scripts/env.sh @@ -1,4 +1,9 @@ #!/bin/bash -source /opt/intel/oneapi/compiler/latest/env/vars.sh -source /opt/intel/oneapi/umf/latest/env/vars.sh -source /opt/intel/oneapi/pti/latest/env/vars.sh + +if [ "$1" != "nightly_wheel" ];then + source /opt/intel/oneapi/compiler/latest/env/vars.sh + source /opt/intel/oneapi/umf/latest/env/vars.sh + source /opt/intel/oneapi/pti/latest/env/vars.sh +else + echo "Don't need to source DL-Essential for nightly wheel" +fi diff --git a/.github/workflows/_linux_ut.yml b/.github/workflows/_linux_ut.yml index e8f948635..b724d4259 100644 --- a/.github/workflows/_linux_ut.yml +++ b/.github/workflows/_linux_ut.yml @@ -98,7 +98,7 @@ jobs: - name: Build Pytorch XPU run: | source activate xpu_op_${ZE_AFFINITY_MASK} - source .github/scripts/env.sh + source .github/scripts/env.sh ${{ inputs.pytorch }} pip install mkl-static==2025.0.1 mkl-include==2025.0.1 if [[ ${{ inputs.abi }} == '0' ]]; then export _GLIBCXX_USE_CXX11_ABI=0 @@ -128,7 +128,7 @@ jobs: - name: Torch Config run: | source activate xpu_op_${ZE_AFFINITY_MASK} - source .github/scripts/env.sh + source .github/scripts/env.sh ${{ inputs.pytorch }} python -c "import torch; print(torch.__config__.show())" python -c "import torch; print(torch.__config__.parallel_info())" python -c "import torch; print(torch.__config__.torch.xpu.device_count())" @@ -143,7 +143,7 @@ jobs: run: | cd ${{ github.workspace }} xpu-smi discovery - source .github/scripts/env.sh + source .github/scripts/env.sh ${{ inputs.pytorch }} source activate xpu_op_${ZE_AFFINITY_MASK} cd ${{ github.workspace }} cd test/regressions @@ -154,7 +154,7 @@ jobs: run: | cd ${{ github.workspace }} xpu-smi discovery - source .github/scripts/env.sh + source .github/scripts/env.sh ${{ inputs.pytorch }} source activate xpu_op_${ZE_AFFINITY_MASK} export ZE_AFFINITY_MASK_OLD=${ZE_AFFINITY_MASK} unset ZE_AFFINITY_MASK @@ -166,7 +166,7 @@ jobs: - name: Run XPU OP Extended UT if: contains(inputs.ut, 'op_extended') || github.event_name == 'schedule' run: | - source .github/scripts/env.sh + source .github/scripts/env.sh ${{ inputs.pytorch }} source activate xpu_op_${ZE_AFFINITY_MASK} export PYTORCH_TEST_WITH_SLOW=1 cd ../pytorch/third_party/torch-xpu-ops/test/xpu/extended/ @@ -174,7 +174,7 @@ jobs: - name: Run XPU OP UT if: contains(inputs.ut, 'op_ut') || github.event_name == 'schedule' run: | - source .github/scripts/env.sh + source .github/scripts/env.sh ${{ inputs.pytorch }} source activate xpu_op_${ZE_AFFINITY_MASK} export PYTORCH_ENABLE_XPU_FALLBACK=1 export PYTORCH_TEST_WITH_SLOW=1 @@ -188,7 +188,7 @@ jobs: - name: Run Torch XPU UT if: contains(inputs.ut, 'torch_xpu') || github.event_name == 'schedule' run: | - source .github/scripts/env.sh + source .github/scripts/env.sh ${{ inputs.pytorch }} source activate xpu_op_${ZE_AFFINITY_MASK} cd ../pytorch TEST_REPORTS_DIR=$(pwd)/test/test-reports diff --git a/.github/workflows/nightly_ondemand_whl.yml b/.github/workflows/nightly_ondemand_whl.yml index 4ffc2e0e9..efed58f4e 100644 --- a/.github/workflows/nightly_ondemand_whl.yml +++ b/.github/workflows/nightly_ondemand_whl.yml @@ -110,7 +110,6 @@ jobs: echo "TORCH_BRANCH_ID=$(python -c 'import torch; print(torch.__version__)')" |tee -a "${GITHUB_OUTPUT}" >> "${GITHUB_ENV}" TORCH_COMMIT_ID=$(python -c 'import torch; print(torch.version.git_version)') echo "TORCH_COMMIT_ID=${TORCH_COMMIT_ID}" |tee -a "${GITHUB_OUTPUT}" >> "${GITHUB_ENV}" - source .github/scripts/env.sh cd ../ && rm -rf pytorch git clone https://github.com/pytorch/pytorch pytorch cd pytorch && git checkout ${TORCH_COMMIT_ID} @@ -129,7 +128,6 @@ jobs: id: pinned run: | source activate e2e_ci - source .github/scripts/env.sh echo "TORCHVISION_COMMIT_ID=$(python -c 'import torchvision; print(torchvision.version.git_version)')" |tee -a "${GITHUB_OUTPUT}" >> "${GITHUB_ENV}" echo "TORCHAUDIO_COMMIT_ID=$(python -c 'import torchaudio; print(torchaudio.version.git_version)')" |tee -a "${GITHUB_OUTPUT}" >> "${GITHUB_ENV}" echo "TRITON_COMMIT_ID=$(python -c 'import triton; print(triton.__version__)')" |tee -a "${GITHUB_OUTPUT}" >> "${GITHUB_ENV}"