From c83823d1eb387f79511895a640c6186c9d9a85dc Mon Sep 17 00:00:00 2001 From: weareyoung18 <3370789544@qq.com> Date: Mon, 22 Dec 2025 16:01:44 +0800 Subject: [PATCH 01/11] [CI] try test for flagtree --- .github/workflows/aipu-build-and-test.yml | 9 +-- .github/workflows/ascend-build-and-test.yml | 9 +-- .github/workflows/coordinator.yml | 57 +++++++++++++++++++ .github/workflows/hcu-build-and-test.yml | 9 +-- .github/workflows/iluvatar-build-and-test.yml | 9 +-- .github/workflows/metax-build-and-test.yml | 9 +-- .github/workflows/mthreads-build-and-test.yml | 9 +-- .github/workflows/nv-build-and-test.yml | 9 +-- .../workflows/tsingmicro-build-and-test.yml | 9 +-- .github/workflows/xpu-build-and-test.yml | 9 +-- 10 files changed, 102 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/coordinator.yml diff --git a/.github/workflows/aipu-build-and-test.yml b/.github/workflows/aipu-build-and-test.yml index b4e5599a5..f0c6cdbe4 100644 --- a/.github/workflows/aipu-build-and-test.yml +++ b/.github/workflows/aipu-build-and-test.yml @@ -1,10 +1,11 @@ name: AIPU-Build-And-Test on: - push: - branches: [ "triton_v3.3.x" ] - pull_request: - branches: [ "triton_v3.3.x" ] + # push: + # branches: [ "triton_v3.3.x" ] + # pull_request: + # branches: [ "triton_v3.3.x" ] + workflow_call: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/ascend-build-and-test.yml b/.github/workflows/ascend-build-and-test.yml index d2b91baa0..bc8e95f33 100644 --- a/.github/workflows/ascend-build-and-test.yml +++ b/.github/workflows/ascend-build-and-test.yml @@ -1,10 +1,11 @@ name: Ascend-Build-And-Test on: - push: - branches: [ "triton_v3.2.x" ] - pull_request: - branches: [ "triton_v3.2.x" ] + # push: + # branches: [ "triton_v3.2.x" ] + # pull_request: + # branches: [ "triton_v3.2.x" ] + workflow_call: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/coordinator.yml b/.github/workflows/coordinator.yml new file mode 100644 index 000000000..54239f8aa --- /dev/null +++ b/.github/workflows/coordinator.yml @@ -0,0 +1,57 @@ +name: Test Coordinator + +on: + push: + branches: + - main + - triton_v3.2.x + - triton_v3.3.x + pull_request: + branches: + - main + - triton_v3.2.x + - triton_v3.3.x + +jobs: + ubuntu-native-aipu: + if: github.ref_name == 'triton_v3.3.x' + uses: ./.github/workflows/aipu-build-and-test.yml + + ubuntu-native-ascend: + if: github.ref_name == 'triton_v3.2.x' + uses: ./.github/workflows/ascend-build-and-test.yml + + ubuntu-native-cambricon: + if: github.ref_name == 'main' + uses: ./.github/workflows/cambricon-build-and-test.yml + + ubuntu-native-hcu: + if: github.ref_name == 'main' + uses: ./.github/workflows/hcu-build-and-test.yml + + ubuntu-native-iluvatar: + if: github.ref_name == 'main' + uses: ./.github/workflows/iluvatar-build-and-test.yml + + ubuntu-native-metax: + if: github.ref_name == 'main' + uses: ./.github/workflows/metax-build-and-test.yml + + ubuntu-native-mthreads: + if: github.ref_name == 'main' + uses: ./.github/workflows/mthreads-build-and-test.yml + + ubuntu-native-nv: + if: | + github.ref_name == 'main' || + github.ref_name == 'triton_v3.2.x' || + github.ref_name == 'triton_v3.3.x' + uses: ./.github/workflows/nv-build-and-test.yml + + ubuntu-native-tsingmicro: + if: github.ref_name == 'triton_v3.3.x' + uses: ./.github/workflows/tsingmicro-build-and-test.yml + + ubuntu-native-xpu: + if: github.ref_name == 'main' + uses: ./.github/workflows/xpu-build-and-test.yml diff --git a/.github/workflows/hcu-build-and-test.yml b/.github/workflows/hcu-build-and-test.yml index 0fc910cec..e0b5098ef 100644 --- a/.github/workflows/hcu-build-and-test.yml +++ b/.github/workflows/hcu-build-and-test.yml @@ -1,10 +1,11 @@ name: Hcu-Build-And-Test on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + # push: + # branches: [ "main" ] + # pull_request: + # branches: [ "main" ] + workflow_call: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/iluvatar-build-and-test.yml b/.github/workflows/iluvatar-build-and-test.yml index d2ec03068..c9532b950 100644 --- a/.github/workflows/iluvatar-build-and-test.yml +++ b/.github/workflows/iluvatar-build-and-test.yml @@ -1,10 +1,11 @@ name: Iluvatar-Build-And-Test on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + # push: + # branches: [ "main" ] + # pull_request: + # branches: [ "main" ] + workflow_call: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/metax-build-and-test.yml b/.github/workflows/metax-build-and-test.yml index cb9ec550d..1e409b66e 100644 --- a/.github/workflows/metax-build-and-test.yml +++ b/.github/workflows/metax-build-and-test.yml @@ -1,10 +1,11 @@ name: Metax-Build-And-Test on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + # push: + # branches: [ "main" ] + # pull_request: + # branches: [ "main" ] + workflow_call: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/mthreads-build-and-test.yml b/.github/workflows/mthreads-build-and-test.yml index d86619fa8..0e87550a8 100644 --- a/.github/workflows/mthreads-build-and-test.yml +++ b/.github/workflows/mthreads-build-and-test.yml @@ -1,10 +1,11 @@ name: Mthreads-Build-And-Test on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + # push: + # branches: [ "main" ] + # pull_request: + # branches: [ "main" ] + workflow_call: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/nv-build-and-test.yml b/.github/workflows/nv-build-and-test.yml index 952169159..dd4ec6155 100644 --- a/.github/workflows/nv-build-and-test.yml +++ b/.github/workflows/nv-build-and-test.yml @@ -3,10 +3,11 @@ name: NV-Build-And-Test on: schedule: - cron: '0 21 * * *' - push: - branches: [ "main", "triton_v3.2.x", "triton_v3.3.x" ] - pull_request: - branches: [ "main", "triton_v3.2.x", "triton_v3.3.x" ] + # push: + # branches: [ "main", "triton_v3.2.x", "triton_v3.3.x" ] + # pull_request: + # branches: [ "main", "triton_v3.2.x", "triton_v3.3.x" ] + workflow_call: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/tsingmicro-build-and-test.yml b/.github/workflows/tsingmicro-build-and-test.yml index 1cf2adf94..143bef229 100644 --- a/.github/workflows/tsingmicro-build-and-test.yml +++ b/.github/workflows/tsingmicro-build-and-test.yml @@ -1,10 +1,11 @@ name: Tsingmicro-Build-And-Test on: - push: - branches: [ "triton_v3.3.x" ] - pull_request: - branches: [ "triton_v3.3.x" ] + # push: + # branches: [ "triton_v3.3.x" ] + # pull_request: + # branches: [ "triton_v3.3.x" ] + workflow_call: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/xpu-build-and-test.yml b/.github/workflows/xpu-build-and-test.yml index e256e8a65..12dba45cd 100644 --- a/.github/workflows/xpu-build-and-test.yml +++ b/.github/workflows/xpu-build-and-test.yml @@ -2,10 +2,11 @@ name: Xpu-Build-And-Test on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + # push: + # branches: [ "main" ] + # pull_request: + # branches: [ "main" ] + workflow_call: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} From ac914d05e49602c66f5734266f49c4d2e6b99039 Mon Sep 17 00:00:00 2001 From: weareyoung18 <3370789544@qq.com> Date: Tue, 23 Dec 2025 14:38:54 +0800 Subject: [PATCH 02/11] fix up --- .../test_ubuntuNativeContainerNV.yml | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 .github/workflows/test_ubuntuNativeContainerNV.yml diff --git a/.github/workflows/test_ubuntuNativeContainerNV.yml b/.github/workflows/test_ubuntuNativeContainerNV.yml new file mode 100644 index 000000000..b868555a0 --- /dev/null +++ b/.github/workflows/test_ubuntuNativeContainerNV.yml @@ -0,0 +1,128 @@ +name: Run Container ubuntu-native + +on: + push: + branches: + - main + pull_request: + branches: + - main +# schedule: +# - cron: '0 21 * * *' +# workflow_call: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test-in-ubuntu-container: + runs-on: ubuntu-latest + container: + image: ubuntu:22.04 + + steps: + - name: Set up Python and Install Dependencies + run: | + DEBIAN_FRONTEND=noninteractive apt-get update -y + DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-pip python3-venv git autotools-dev wget gcc g++ build-essential cmake + DEBIAN_FRONTEND=noninteractive apt-get install -y python3-dev pybind11-dev python3-distutils + pip3 install pybind11 -q + + wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb + dpkg -i cuda-keyring_1.1-1_all.deb + DEBIAN_FRONTEND=noninteractive apt-get update -y + DEBIAN_FRONTEND=noninteractive apt-get install -y cuda-drivers cuda-toolkit + DEBIAN_FRONTEND=noninteractive apt-get install -y libnccl2 libnccl-dev + + - name: Checkout Code + uses: actions/checkout@v6 + with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} + ssh-strict: true + ssh-user: git + persist-credentials: true + clean: true + sparse-checkout-cone-mode: true + fetch-tags: false + show-progress: true + lfs: false + submodules: true + set-safe-directory: true + + - name: Detect Target Branch + shell: bash + run: | + set -x + if [ "${{ github.event_name }}" = "pull_request" ]; then + TARGET_BRANCH="${{ github.base_ref }}" + else + TARGET_BRANCH="${{ github.ref_name }}" + fi + echo "TARGET_BRANCH=$TARGET_BRANCH" >> $GITHUB_ENV + echo "TARGET_BRANCH=$TARGET_BRANCH" + + - name: Prepare LLVM for NVidia + shell: bash + run: | + case "${{ env.TARGET_BRANCH }}" in + "main") LLVM_HASH="10dc3a8e" ;; + "triton_v3.2.x") LLVM_HASH="86b69c31" ;; + "triton_v3.3.x") LLVM_HASH="a66376b0" ;; + "triton_v3.4.x") LLVM_HASH="8957e64a" ;; + "triton_v3.5.x") LLVM_HASH="7d5de303" ;; + *) LLVM_HASH="10dc3a8e" ;; + esac + + LLVM_DIR="$HOME/.flagtree/llvm_builds" + LLVM_FILE="llvm-${LLVM_HASH}-ubuntu-x64" + mkdir -p "$LLVM_DIR" + cd "$LLVM_DIR" + + if [ ! -d "${LLVM_FILE}" ]; then + echo "Downloading LLVM ${LLVM_HASH}..." + wget -q "https://oaitriton.blob.core.windows.net/public/llvm-builds/${LLVM_FILE}.tar.gz" + tar -zxf "${LLVM_FILE}.tar.gz" + rm "${LLVM_FILE}.tar.gz" + else + echo "LLVM ${LLVM_HASH} already exists, skipping download." + fi + echo "LLVM_SYSPATH=$LLVM_DIR/${LLVM_FILE}" >> $GITHUB_ENV + echo "LLVM_LIBRARY_DIR=$LLVM_DIR/${LLVM_FILE}/lib" >> $GITHUB_ENV + + - name: FlagTree Build on NVidia (Main branch) + if: ${{ env.TARGET_BRANCH == 'main' }} + shell: bash + run: | + set -x + pip uninstall -y triton + cd /__w/flagtree/flagtree/python + MAX_JOBS=32 python3 -m pip install . --no-build-isolation + + - name: FlagTree Build on NVidia (triton_v3.2.x branch) + if: ${{ env.TARGET_BRANCH == 'triton_v3.2.x' }} + shell: bash + run: | + set -x + pip uninstall -y triton + cd /__w/flagtree/flagtree/python + MAX_JOBS=32 python3 -m pip install . --no-build-isolation + + - name: FlagTree Build on NVidia (triton_v3.3.x branch) + if: ${{ env.TARGET_BRANCH == 'triton_v3.3.x' }} + shell: bash + run: | + set -x + pip uninstall -y triton + cd /__w/flagtree/flagtree/python + MAX_JOBS=32 python3 -m pip install . --no-build-isolation + + - name: FlagTree Test on NVidia + shell: bash + run: | + set -x + python3 -m pytest -s python/test/unit + if [ -d "python/test/operators" ]; then + python3 -m pytest -s python/test/operators + fi \ No newline at end of file From 08e94398e15a184769bfb2acf744cb5368d4ac8f Mon Sep 17 00:00:00 2001 From: weareyoung18 <3370789544@qq.com> Date: Tue, 23 Dec 2025 15:10:14 +0800 Subject: [PATCH 03/11] fix up --- .github/workflows/test_ubuntuNativeContainerNV.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_ubuntuNativeContainerNV.yml b/.github/workflows/test_ubuntuNativeContainerNV.yml index b868555a0..da66a4693 100644 --- a/.github/workflows/test_ubuntuNativeContainerNV.yml +++ b/.github/workflows/test_ubuntuNativeContainerNV.yml @@ -25,7 +25,7 @@ jobs: - name: Set up Python and Install Dependencies run: | DEBIAN_FRONTEND=noninteractive apt-get update -y - DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-pip python3-venv git autotools-dev wget gcc g++ build-essential cmake + DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-pip python3-venv git autotools-dev wget gcc g++ build-essential cmake ninja-build DEBIAN_FRONTEND=noninteractive apt-get install -y python3-dev pybind11-dev python3-distutils pip3 install pybind11 -q @@ -97,6 +97,8 @@ jobs: run: | set -x pip uninstall -y triton + git config --global --add safe.directory /__w/flagtree/flagtree + export CMAKE_MAKE_PROGRAM=$(which make) cd /__w/flagtree/flagtree/python MAX_JOBS=32 python3 -m pip install . --no-build-isolation From 083da2309141cddaa72cdbe733a1f2639b981a2d Mon Sep 17 00:00:00 2001 From: weareyoung18 <3370789544@qq.com> Date: Tue, 23 Dec 2025 15:25:18 +0800 Subject: [PATCH 04/11] fix up --- .github/workflows/test_ubuntuNativeContainerNV.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_ubuntuNativeContainerNV.yml b/.github/workflows/test_ubuntuNativeContainerNV.yml index da66a4693..0ca9c901a 100644 --- a/.github/workflows/test_ubuntuNativeContainerNV.yml +++ b/.github/workflows/test_ubuntuNativeContainerNV.yml @@ -27,7 +27,8 @@ jobs: DEBIAN_FRONTEND=noninteractive apt-get update -y DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-pip python3-venv git autotools-dev wget gcc g++ build-essential cmake ninja-build DEBIAN_FRONTEND=noninteractive apt-get install -y python3-dev pybind11-dev python3-distutils - pip3 install pybind11 -q + pip3 install --upgrade pip setuptools wheel + pip3 install pybind11 wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb dpkg -i cuda-keyring_1.1-1_all.deb @@ -98,7 +99,10 @@ jobs: set -x pip uninstall -y triton git config --global --add safe.directory /__w/flagtree/flagtree - export CMAKE_MAKE_PROGRAM=$(which make) + export Python3_ROOT_DIR=/usr/bin/python3 + export Python3_INCLUDE_DIR=/usr/include/python3.10 + export CMAKE_MAKE_PROGRAM=$(which ninja) + export PIP_NO_CACHE_DIR=1 cd /__w/flagtree/flagtree/python MAX_JOBS=32 python3 -m pip install . --no-build-isolation From 38868ae4efb295cad1c97d6f970cd66ce7bb2a2f Mon Sep 17 00:00:00 2001 From: weareyoung18 <3370789544@qq.com> Date: Tue, 23 Dec 2025 15:32:11 +0800 Subject: [PATCH 05/11] fix up --- .github/workflows/test_ubuntuNativeContainerNV.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_ubuntuNativeContainerNV.yml b/.github/workflows/test_ubuntuNativeContainerNV.yml index 0ca9c901a..005593da7 100644 --- a/.github/workflows/test_ubuntuNativeContainerNV.yml +++ b/.github/workflows/test_ubuntuNativeContainerNV.yml @@ -99,8 +99,9 @@ jobs: set -x pip uninstall -y triton git config --global --add safe.directory /__w/flagtree/flagtree - export Python3_ROOT_DIR=/usr/bin/python3 - export Python3_INCLUDE_DIR=/usr/include/python3.10 + export Python3_INCLUDE_DIRS=/usr/include/python3.10 + export Python3_LIBRARIES=/usr/lib/x86_64-linux-gnu/libpython3.10.so + export pybind11_DIR=$(python3 -m pybind11 --cmakedir) export CMAKE_MAKE_PROGRAM=$(which ninja) export PIP_NO_CACHE_DIR=1 cd /__w/flagtree/flagtree/python From d4c475bf1e61300e8391294aee64829f62156a95 Mon Sep 17 00:00:00 2001 From: weareyoung18 <3370789544@qq.com> Date: Tue, 23 Dec 2025 15:40:48 +0800 Subject: [PATCH 06/11] fix up --- .github/workflows/test_ubuntuNativeContainerNV.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_ubuntuNativeContainerNV.yml b/.github/workflows/test_ubuntuNativeContainerNV.yml index 005593da7..81e8acf1f 100644 --- a/.github/workflows/test_ubuntuNativeContainerNV.yml +++ b/.github/workflows/test_ubuntuNativeContainerNV.yml @@ -99,13 +99,14 @@ jobs: set -x pip uninstall -y triton git config --global --add safe.directory /__w/flagtree/flagtree - export Python3_INCLUDE_DIRS=/usr/include/python3.10 - export Python3_LIBRARIES=/usr/lib/x86_64-linux-gnu/libpython3.10.so - export pybind11_DIR=$(python3 -m pybind11 --cmakedir) export CMAKE_MAKE_PROGRAM=$(which ninja) export PIP_NO_CACHE_DIR=1 cd /__w/flagtree/flagtree/python - MAX_JOBS=32 python3 -m pip install . --no-build-isolation + MAX_JOBS=4 python3 -m pip install . --no-build-isolation \ + -C="--cmake-args=-DPython3_EXECUTABLE=/usr/bin/python3" \ + -C="--cmake-args=-DPython3_INCLUDE_DIR=/usr/include/python3.10" \ + -C="--cmake-args=-Dpybind11_DIR=$(python3 -m pybind11 --cmakedir)" \ + -v - name: FlagTree Build on NVidia (triton_v3.2.x branch) if: ${{ env.TARGET_BRANCH == 'triton_v3.2.x' }} From 45db0f6936c53f16eddc50e62c7ef6ec4ee28ef3 Mon Sep 17 00:00:00 2001 From: weareyoung18 <3370789544@qq.com> Date: Tue, 23 Dec 2025 15:55:42 +0800 Subject: [PATCH 07/11] fix up --- .github/workflows/test_ubuntuNativeContainerNV.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_ubuntuNativeContainerNV.yml b/.github/workflows/test_ubuntuNativeContainerNV.yml index 81e8acf1f..8af071d5b 100644 --- a/.github/workflows/test_ubuntuNativeContainerNV.yml +++ b/.github/workflows/test_ubuntuNativeContainerNV.yml @@ -26,7 +26,7 @@ jobs: run: | DEBIAN_FRONTEND=noninteractive apt-get update -y DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-pip python3-venv git autotools-dev wget gcc g++ build-essential cmake ninja-build - DEBIAN_FRONTEND=noninteractive apt-get install -y python3-dev pybind11-dev python3-distutils + DEBIAN_FRONTEND=noninteractive apt-get install -y python3.10-dev pybind11-dev python3-distutils pip3 install --upgrade pip setuptools wheel pip3 install pybind11 @@ -105,6 +105,7 @@ jobs: MAX_JOBS=4 python3 -m pip install . --no-build-isolation \ -C="--cmake-args=-DPython3_EXECUTABLE=/usr/bin/python3" \ -C="--cmake-args=-DPython3_INCLUDE_DIR=/usr/include/python3.10" \ + -C="--cmake-args=-DPython3_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.10.so" \ -C="--cmake-args=-Dpybind11_DIR=$(python3 -m pybind11 --cmakedir)" \ -v From 7f3ca24f10d37bf15298683b33b0a3be52ccc085 Mon Sep 17 00:00:00 2001 From: weareyoung18 <3370789544@qq.com> Date: Tue, 23 Dec 2025 16:19:20 +0800 Subject: [PATCH 08/11] fix up --- .github/workflows/test_ubuntuNativeContainerNV.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_ubuntuNativeContainerNV.yml b/.github/workflows/test_ubuntuNativeContainerNV.yml index 8af071d5b..75c5d38a7 100644 --- a/.github/workflows/test_ubuntuNativeContainerNV.yml +++ b/.github/workflows/test_ubuntuNativeContainerNV.yml @@ -24,9 +24,17 @@ jobs: steps: - name: Set up Python and Install Dependencies run: | + # DEBIAN_FRONTEND=noninteractive apt-get update -y + # DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-pip python3-venv git autotools-dev wget gcc g++ build-essential cmake ninja-build + # DEBIAN_FRONTEND=noninteractive apt-get install -y python3.10-dev pybind11-dev python3-distutils + # pip3 install --upgrade pip setuptools wheel + # pip3 install pybind11 + DEBIAN_FRONTEND=noninteractive apt-get update -y - DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-pip python3-venv git autotools-dev wget gcc g++ build-essential cmake ninja-build - DEBIAN_FRONTEND=noninteractive apt-get install -y python3.10-dev pybind11-dev python3-distutils + DEBIAN_FRONTEND=noninteractive apt-get install -y \ + python3 python3-pip python3-venv git \ + build-essential cmake ninja-build \ + python3.10-dev python3-distutils pip3 install --upgrade pip setuptools wheel pip3 install pybind11 @@ -102,7 +110,7 @@ jobs: export CMAKE_MAKE_PROGRAM=$(which ninja) export PIP_NO_CACHE_DIR=1 cd /__w/flagtree/flagtree/python - MAX_JOBS=4 python3 -m pip install . --no-build-isolation \ + MAX_JOBS=32 python3 -m pip install . --no-build-isolation \ -C="--cmake-args=-DPython3_EXECUTABLE=/usr/bin/python3" \ -C="--cmake-args=-DPython3_INCLUDE_DIR=/usr/include/python3.10" \ -C="--cmake-args=-DPython3_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.10.so" \ From c471d58d82a48e66d0fde17712b9bec0b6760d98 Mon Sep 17 00:00:00 2001 From: weareyoung18 <3370789544@qq.com> Date: Tue, 23 Dec 2025 16:23:31 +0800 Subject: [PATCH 09/11] fix up --- .../test_ubuntuNativeContainerNV.yml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test_ubuntuNativeContainerNV.yml b/.github/workflows/test_ubuntuNativeContainerNV.yml index 75c5d38a7..622e8acc8 100644 --- a/.github/workflows/test_ubuntuNativeContainerNV.yml +++ b/.github/workflows/test_ubuntuNativeContainerNV.yml @@ -24,20 +24,20 @@ jobs: steps: - name: Set up Python and Install Dependencies run: | - # DEBIAN_FRONTEND=noninteractive apt-get update -y - # DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-pip python3-venv git autotools-dev wget gcc g++ build-essential cmake ninja-build - # DEBIAN_FRONTEND=noninteractive apt-get install -y python3.10-dev pybind11-dev python3-distutils - # pip3 install --upgrade pip setuptools wheel - # pip3 install pybind11 - DEBIAN_FRONTEND=noninteractive apt-get update -y - DEBIAN_FRONTEND=noninteractive apt-get install -y \ - python3 python3-pip python3-venv git \ - build-essential cmake ninja-build \ - python3.10-dev python3-distutils + DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-pip python3-venv git autotools-dev wget gcc g++ build-essential cmake ninja-build + DEBIAN_FRONTEND=noninteractive apt-get install -y python3.10-dev python3-distutils pip3 install --upgrade pip setuptools wheel pip3 install pybind11 + # DEBIAN_FRONTEND=noninteractive apt-get update -y + # DEBIAN_FRONTEND=noninteractive apt-get install -y \ + # python3 python3-pip python3-venv git \ + # build-essential cmake ninja-build \ + # python3.10-dev python3-distutils + # pip3 install --upgrade pip setuptools wheel + # pip3 install pybind11 + wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb dpkg -i cuda-keyring_1.1-1_all.deb DEBIAN_FRONTEND=noninteractive apt-get update -y From 00fcba73de7640a9ffb8d17dc5f64841d9014639 Mon Sep 17 00:00:00 2001 From: weareyoung18 <3370789544@qq.com> Date: Tue, 23 Dec 2025 16:40:40 +0800 Subject: [PATCH 10/11] fix up --- .../workflows/test_ubuntuNativeContainerNV.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_ubuntuNativeContainerNV.yml b/.github/workflows/test_ubuntuNativeContainerNV.yml index 622e8acc8..a2031aacc 100644 --- a/.github/workflows/test_ubuntuNativeContainerNV.yml +++ b/.github/workflows/test_ubuntuNativeContainerNV.yml @@ -43,6 +43,19 @@ jobs: DEBIAN_FRONTEND=noninteractive apt-get update -y DEBIAN_FRONTEND=noninteractive apt-get install -y cuda-drivers cuda-toolkit DEBIAN_FRONTEND=noninteractive apt-get install -y libnccl2 libnccl-dev + + + - name: Verify Python and pybind11 paths + shell: bash + run: | + echo "Python3 version: $(python3 --version)" + echo "Python3 include: $(python3 -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())')" + PYBIND11_DIR=$(python3 -m pybind11 --cmakedir) + echo "pybind11 CMake dir: $PYBIND11_DIR" + if [ ! -d "$PYBIND11_DIR" ]; then + echo "Error: pybind11 CMake directory not found at $PYBIND11_DIR" + exit 1 + fi - name: Checkout Code uses: actions/checkout@v6 @@ -110,11 +123,13 @@ jobs: export CMAKE_MAKE_PROGRAM=$(which ninja) export PIP_NO_CACHE_DIR=1 cd /__w/flagtree/flagtree/python + + PYBIND11_DIR=$(python3 -m pybind11 --cmakedir) MAX_JOBS=32 python3 -m pip install . --no-build-isolation \ -C="--cmake-args=-DPython3_EXECUTABLE=/usr/bin/python3" \ -C="--cmake-args=-DPython3_INCLUDE_DIR=/usr/include/python3.10" \ -C="--cmake-args=-DPython3_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.10.so" \ - -C="--cmake-args=-Dpybind11_DIR=$(python3 -m pybind11 --cmakedir)" \ + -C="--cmake-args=-Dpybind11_DIR=$PYBIND11_DIR" \ -v - name: FlagTree Build on NVidia (triton_v3.2.x branch) From e59295fc07e2f1cb3aeb8e85e021f13918eeea88 Mon Sep 17 00:00:00 2001 From: weareyoung18 <3370789544@qq.com> Date: Tue, 23 Dec 2025 16:51:56 +0800 Subject: [PATCH 11/11] fix up --- .github/workflows/test_ubuntuNativeContainerNV.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_ubuntuNativeContainerNV.yml b/.github/workflows/test_ubuntuNativeContainerNV.yml index a2031aacc..1200dcfe2 100644 --- a/.github/workflows/test_ubuntuNativeContainerNV.yml +++ b/.github/workflows/test_ubuntuNativeContainerNV.yml @@ -48,14 +48,17 @@ jobs: - name: Verify Python and pybind11 paths shell: bash run: | - echo "Python3 version: $(python3 --version)" - echo "Python3 include: $(python3 -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())')" PYBIND11_DIR=$(python3 -m pybind11 --cmakedir) echo "pybind11 CMake dir: $PYBIND11_DIR" if [ ! -d "$PYBIND11_DIR" ]; then echo "Error: pybind11 CMake directory not found at $PYBIND11_DIR" exit 1 fi + if [ ! -f "$PYBIND11_DIR/pybind11-config.cmake" ]; then + echo "Error: pybind11-config.cmake not found at $PYBIND11_DIR" + exit 1 + fi + echo "pybind11-config.cmake found at $PYBIND11_DIR" - name: Checkout Code uses: actions/checkout@v6 @@ -124,14 +127,13 @@ jobs: export PIP_NO_CACHE_DIR=1 cd /__w/flagtree/flagtree/python - PYBIND11_DIR=$(python3 -m pybind11 --cmakedir) MAX_JOBS=32 python3 -m pip install . --no-build-isolation \ -C="--cmake-args=-DPython3_EXECUTABLE=/usr/bin/python3" \ -C="--cmake-args=-DPython3_INCLUDE_DIR=/usr/include/python3.10" \ -C="--cmake-args=-DPython3_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.10.so" \ -C="--cmake-args=-Dpybind11_DIR=$PYBIND11_DIR" \ -v - + - name: FlagTree Build on NVidia (triton_v3.2.x branch) if: ${{ env.TARGET_BRANCH == 'triton_v3.2.x' }} shell: bash