diff --git a/.github/actions/setup-ipex/action.yml b/.github/actions/setup-ipex/action.yml index 3c8a42c2d2..637eedfdba 100644 --- a/.github/actions/setup-ipex/action.yml +++ b/.github/actions/setup-ipex/action.yml @@ -35,7 +35,7 @@ runs: uses: ./.github/actions/load env: # Increase this value to reset cache - CACHE_NUMBER: "1-ptdb" + CACHE_NUMBER: 2 with: path: intel-extension-for-pytorch/dist key: ipex-$PYTHON_VERSION-$IPEX_COMMIT_ID-$CACHE_NUMBER diff --git a/.github/actions/setup-pytorch/action.yml b/.github/actions/setup-pytorch/action.yml index b904af6888..6e31e8f7a1 100644 --- a/.github/actions/setup-pytorch/action.yml +++ b/.github/actions/setup-pytorch/action.yml @@ -75,7 +75,7 @@ runs: uses: ./.github/actions/load env: # Increase this value to reset cache - CACHE_NUMBER: "6" + CACHE_NUMBER: 7 with: path: pytorch key: pytorch-$PYTHON_VERSION-$PYTORCH_COMMIT_ID-$CACHE_NUMBER @@ -90,7 +90,7 @@ runs: path: pytorch - name: Update third_party/xpu_ops - if: ${{ steps.pytorch-cache.outputs.status == 'miss' && inputs.torch_xpu_ops_commit != '' }} + if: ${{ steps.pytorch-cache.outputs.status == 'miss' && inputs.repository == 'pytorch/pytorch' }} shell: bash run: | cd pytorch/third_party @@ -106,6 +106,13 @@ runs: wget https://raw.githubusercontent.com/intel/torch-xpu-ops/main/.github/scripts/apply_torch_pr.py python apply_torch_pr.py --pr-list https://github.com/pytorch/pytorch/pull/124147 --pr-list https://github.com/pytorch/pytorch/pull/126516 + # FIXME: Old PyTorch does not work with numpy==2.0.0 + - name: Install numpy < 2.0.0 + if: ${{ inputs.repository == 'Stonepia/pytorch' }} + shell: bash + run: | + pip install 'numpy<2.0.0' + - name: Build PyTorch if: ${{ steps.pytorch-cache.outputs.status == 'miss' }} shell: bash diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index b79d18660a..a0cbc600f5 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -70,10 +70,10 @@ jobs: uses: ./.github/actions/load env: # Increase this value to reset cache - CACHE_NUMBER: 1 + CACHE_NUMBER: 2 with: path: $HOME/.cache/pip - key: pip-3.10-${{ hashFiles('.pre-commit-config.yaml') }}-${{ env.CACHE_NUMBER }} + key: pip-3.10-${{ hashFiles('.pre-commit-config.yaml') }}-${{ env.INSTALL_IPEX }}-${{ env.CACHE_NUMBER }} - name: Install Python 3.10 uses: actions/setup-python@v5 @@ -118,7 +118,7 @@ jobs: uses: ./.github/actions/load env: # Increase this value to reset cache - CACHE_NUMBER: 1 + CACHE_NUMBER: 2 with: path: $HOME/.cache/pip key: pip-${{ matrix.python }}-${{ hashFiles('python/pyproject.toml', 'python/setup.py') }}-${{ env.CACHE_NUMBER }} @@ -240,7 +240,7 @@ jobs: run_tutorial_test "07-extern-functions" run_tutorial_test "08-grouped-gemm" run_tutorial_test "10-experimental-block-pointer" - TRITON_INTEL_ENABLE_BLOCK_PTR=1 run_tutorial_test "10-experimental-block-pointer" + run_tutorial_test "10i-experimental-block-pointer" - name: Run CXX unittests run: | diff --git a/python/tutorials/10i-experimental-block-pointer.py b/python/tutorials/10i-experimental-block-pointer.py new file mode 100644 index 0000000000..0e46e981e5 --- /dev/null +++ b/python/tutorials/10i-experimental-block-pointer.py @@ -0,0 +1,13 @@ +""" +Block Pointer (Experimental) +============================ +Runs Block Pointer tutorial with TRITON_INTEL_ENABLE_BLOCK_PTR=1. +""" + +import os.path +import runpy + +if __name__ == '__main__': + os.environ['TRITON_INTEL_ENABLE_BLOCK_PTR'] = '1' + dirname = os.path.dirname(__file__) + runpy.run_path(f'{dirname}/10-experimental-block-pointer.py') diff --git a/scripts/test-triton.sh b/scripts/test-triton.sh index aa13275194..ef54357990 100755 --- a/scripts/test-triton.sh +++ b/scripts/test-triton.sh @@ -203,7 +203,7 @@ run_tutorial_tests() { run_tutorial_test "07-extern-functions" run_tutorial_test "08-grouped-gemm" run_tutorial_test "10-experimental-block-pointer" - TRITON_INTEL_ENABLE_BLOCK_PTR=1 run_tutorial_test "10-experimental-block-pointer" + run_tutorial_test "10i-experimental-block-pointer" } test_triton() {