diff --git a/.github/actions/setup-triton/action.yml b/.github/actions/setup-triton/action.yml index 34855b971d..4a35c5fb40 100644 --- a/.github/actions/setup-triton/action.yml +++ b/.github/actions/setup-triton/action.yml @@ -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: @@ -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 }} diff --git a/.github/workflows/build-test-reusable.yml b/.github/workflows/build-test-reusable.yml index df935322ac..8ca77ed67d 100644 --- a/.github/workflows/build-test-reusable.yml +++ b/.github/workflows/build-test-reusable.yml @@ -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 diff --git a/.github/workflows/build-test-windows.yml b/.github/workflows/build-test-windows.yml index ce520553d4..80d7fdb326 100644 --- a/.github/workflows/build-test-windows.yml +++ b/.github/workflows/build-test-windows.yml @@ -3,10 +3,6 @@ name: Build on Windows on: workflow_dispatch: - pull_request: - branches: - - main - - release/** push: branches: - main diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index df88444224..fa3a0bbc45 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -117,6 +117,7 @@ jobs: strategy: matrix: ${{ fromJson(needs.prepare.outputs.matrix) }} + fail-fast: false uses: ./.github/workflows/build-test-reusable.yml with: diff --git a/python/setup.py b/python/setup.py index 1e6dee4cf6..d8171fb737 100644 --- a/python/setup.py +++ b/python/setup.py @@ -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") @@ -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}"] @@ -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) diff --git a/scripts/compile-triton.sh b/scripts/compile-triton.sh index 64044c018e..0e4da22af8 100755 --- a/scripts/compile-triton.sh +++ b/scripts/compile-triton.sh @@ -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/ diff --git a/scripts/skiplist/lts/language.txt b/scripts/skiplist/lts/language.txt index a652a92cf5..d882ea0f31 100644 --- a/scripts/skiplist/lts/language.txt +++ b/scripts/skiplist/lts/language.txt @@ -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] diff --git a/scripts/test-triton.sh b/scripts/test-triton.sh index ac2a86e25e..ae483c78a5 100755 --- a/scripts/test-triton.sh +++ b/scripts/test-triton.sh @@ -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 @@ -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() {