Skip to content

Commit

Permalink
Unique name for 10-experimental-block-pointer with TRITON_INTEL_ENABL…
Browse files Browse the repository at this point in the history
…E_BLOCK_PTR=1 (#1356)

We need a unique name for tutorial `10-experimental-block-pointer with`
with TRITON_INTEL_ENABLE_BLOCK_PTR=1 to implement pass rate and skip
list for tutorials.

Required for #483, #1316.
  • Loading branch information
pbchekin authored Jun 16, 2024
1 parent e0a3716 commit 4240f1c
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-ipex/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 9 additions & 2 deletions .github/actions/setup-pytorch/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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: |
Expand Down
13 changes: 13 additions & 0 deletions python/tutorials/10i-experimental-block-pointer.py
Original file line number Diff line number Diff line change
@@ -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')
2 changes: 1 addition & 1 deletion scripts/test-triton.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 4240f1c

Please sign in to comment.