[FlexAttention] Add benchmarks #433
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test SPIRVRunner | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
permissions: read-all | |
env: | |
PYTHON_VERSION: '3.9' | |
jobs: | |
tests: | |
name: Tests | |
runs-on: | |
- rolling | |
- runner-0.0.22 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Setup PyTorch | |
uses: ./.github/actions/setup-pytorch | |
- name: Setup Triton | |
uses: ./.github/actions/setup-triton | |
- name: Build SPIRVRunner | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
set -x | |
export LLVM_DIR="$HOME/.triton/llvm/llvm-ubuntu-x64" | |
export CMAKE_PREFIX_PATH="$(python scripts/torch_cmake.py)" | |
cd utils/SPIRVRunner | |
mkdir build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. | |
make -j | |
- name: Test SPIRVRunner | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
set -x | |
export SPIRV_RUNNER_PATH="$GITHUB_WORKSPACE/utils/SPIRVRunner/build/SPIRVRunner" | |
export SPIRV_RUNNER_TESTS="$GITHUB_WORKSPACE/utils/SPIRVRunner/tests" | |
cd utils/SPIRVRunner | |
pytest tests/test_spirv_runner.py |