Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions .github/actions/setup-triton/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
default: false
command:
description: Command to execute
default: DEBUG=1 pip install --no-build-isolation '.[build,tests,tutorials]'
default: DEBUG=1 pip install '.[build,tests,tutorials]' -v
runs:
using: "composite"
steps:
Expand Down Expand Up @@ -66,26 +66,9 @@ runs:
TRITON_CACHE_KEY="$(sha256sum python/setup.py | cut -d\ -f1)"
echo "TRITON_CACHE_KEY=$TRITON_CACHE_KEY" | tee -a $GITHUB_ENV

- name: Load Triton cache
id: triton-cache
uses: ./.github/actions/load
env:
# Increase this value to reset cache
CACHE_NUMBER: 1
with:
path: $HOME/.triton/nvidia
key: triton-nvidia-${{ env.TRITON_CACHE_KEY }}-${{ env.CACHE_NUMBER }}

- name: Build Triton
shell: bash
run: |
cd python
pip install wheel pybind11
${{ inputs.command }}

- name: Save Triton cache
if: steps.triton-cache.outputs.status == 'miss'
uses: ./.github/actions/save
with:
path: ${{ steps.triton-cache.outputs.path }}
dest: ${{ steps.triton-cache.outputs.dest }}
15 changes: 10 additions & 5 deletions .github/workflows/build-test-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,21 @@ jobs:
echo TRITON_TEST_CMD="bash -v -x scripts/test-triton.sh --warning-reports --skip-pytorch-install --reports-dir $GITHUB_WORKSPACE/reports ${{ inputs.ignore_errors && '--ignore-errors' || '' }} $skiplist"
} | tee -a $GITHUB_ENV

- name: Run unit tests
run: |
${{ env.TRITON_TEST_CMD }} --unit

- name: Run core tests
run: |
${{ env.TRITON_TEST_CMD }} --core --skip-pip-install
pwd
cd python/test/unit
pytest -vvv --device xpu "language/test_core.py::test_scan_layouts[True-1-src_layout10-64-32]" || true

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: triton-cache-${{ inputs.driver_version }}
path: ~/.triton/cache

- name: Run interpreter tests
run: |
exit 1
${{ env.TRITON_TEST_CMD }} --interpreter --skip-pip-install

- name: Run Tutorials
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/build-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ name: Build on Windows
on:
workflow_dispatch:

pull_request:
branches:
- main
- release/**
push:
branches:
- main
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ jobs:

strategy:
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
fail-fast: false

uses: ./.github/workflows/build-test-reusable.yml
with:
Expand Down
3 changes: 3 additions & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ def get_llvm_package_info():
with open(llvm_hash_path, "r") as llvm_hash_file:
rev = llvm_hash_file.read(8)
name = f"llvm-{rev}-{system_suffix}"
print(f"MARK: {name}\n")
url = f"https://oaitriton.blob.core.windows.net/public/llvm-builds/{name}.tar.gz"
return Package("llvm", name, url, "LLVM_INCLUDE_DIRS", "LLVM_LIBRARY_DIR", "LLVM_SYSPATH")

Expand Down Expand Up @@ -485,6 +486,7 @@ def build_extension(self, ext):

# configuration
cfg = get_build_type()
print(f"MARK CFG: {cfg}")
build_args = ["--config", cfg]

cmake_args += [f"-DCMAKE_BUILD_TYPE={cfg}"]
Expand Down Expand Up @@ -540,6 +542,7 @@ def build_extension(self, ext):

env = os.environ.copy()
cmake_dir = get_cmake_dir()
print(f"MARK cmake args: {cmake_args}")
subprocess.check_call(["cmake", self.base_dir] + cmake_args, cwd=cmake_dir, env=env)
subprocess.check_call(["cmake", "--build", "."] + build_args, cwd=cmake_dir)
subprocess.check_call(["cmake", "--build", ".", "--target", "mlir-doc"], cwd=cmake_dir)
Expand Down
2 changes: 1 addition & 1 deletion scripts/compile-triton.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ build_triton() {

cd python
# Install triton and its dependencies.
pip install -v -e '.[build,tests]'
pip install -vvv '.[build,tests]'

# Copy compile_commands.json in the build directory (so that cland vscode plugin can find it).
cp $(find $TRITON_PROJ_BUILD -name compile_commands.json) $TRITON_PROJ/
Expand Down
2 changes: 0 additions & 2 deletions scripts/skiplist/lts/language.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ test/unit/language/test_core.py::test_dot_max_num_imprecise_acc[64-float8e5-128-
test/unit/language/test_core.py::test_dot_max_num_imprecise_acc[64-float8e4nv-128-256-128-128-256-256]
test/unit/language/test_core.py::test_dot_max_num_imprecise_acc[64-float8e4b15-128-256-128-128-256-256]
test/unit/language/test_core.py::test_dot_max_num_imprecise_acc[128-float8e5-128-256-128-128-256-256]
# https://github.com/intel/intel-xpu-backend-for-triton/issues/2662
test/unit/language/test_core.py::test_scan_layouts[True-1-src_layout10-64-32]
# https://github.com/intel/intel-xpu-backend-for-triton/issues/2703
test/unit/language/test_core.py::test_chained_reductions[in_shape0-perm0-red_dims0]
test/unit/language/test_core.py::test_dot3d[1-1-32-32-32-32-32-float16-float16]
Expand Down
23 changes: 2 additions & 21 deletions scripts/test-triton.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,7 @@ fi

TRITON_PROJ="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && cd .. && pwd )"
SCRIPTS_DIR="$TRITON_PROJ/scripts"
source "$SCRIPTS_DIR/pytest-utils.sh"

if [ "$TRITON_TEST_REPORTS" == true ]; then
capture_runtime_env
fi
# source "$SCRIPTS_DIR/pytest-utils.sh"

install_deps() {
if [ "$SKIP_PIP" = true ]; then
Expand Down Expand Up @@ -179,24 +175,9 @@ run_core_tests() {
echo "****** Running Triton Core tests ******"
echo "***************************************************"
cd $TRITON_PROJ/python/test/unit
ensure_spirv_dis

TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=language \
pytest -vvv -n ${PYTEST_MAX_PROCESSES:-8} --device xpu language/ --ignore=language/test_line_info.py --ignore=language/test_subprocess.py

TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=subprocess \
pytest -vvv -n ${PYTEST_MAX_PROCESSES:-8} --device xpu language/test_subprocess.py

# run runtime tests serially to avoid race condition with cache handling.
TRITON_DISABLE_LINE_INFO=1 TRITON_TEST_SUITE=runtime \
pytest --verbose --device xpu runtime/

TRITON_TEST_SUITE=debug \
pytest --verbose -n ${PYTEST_MAX_PROCESSES:-8} test_debug.py --forked --device xpu

# run test_line_info.py separately with TRITON_DISABLE_LINE_INFO=0
TRITON_DISABLE_LINE_INFO=0 TRITON_TEST_SUITE=line_info \
pytest -k "not test_line_info_interpreter" --verbose --device xpu language/test_line_info.py
pytest -vvv -n ${PYTEST_MAX_PROCESSES:-8} --device xpu "language/test_core.py::test_scan_layouts[True-1-src_layout10-64-32]"
}

run_regression_tests() {
Expand Down
Loading