Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
0e7c30a
Windows: Initial Bring-Up
thomthehound Feb 11, 2026
a49d567
Merge branch 'main' into windows-bring-up
thomthehound Feb 11, 2026
ffb6545
Revert unintended submodule pointer update
thomthehound Feb 11, 2026
056ffb1
Bump modulesXilinx submodule to pick up FindXRT Windows fix
thomthehound Feb 11, 2026
5de58f1
fix regex issues and enhance toolchain patching
thomthehound Feb 12, 2026
5420b77
Merge branch 'main' into windows-bring-up
thomthehound Feb 12, 2026
8f186b5
NPU3 is detected but not supported
thomthehound Feb 12, 2026
a080a8d
Merge branch 'windows-bring-up' of https://github.com/thomthehound/ml…
thomthehound Feb 12, 2026
f8672e0
Merge branch 'main' into windows-bring-up
thomthehound Feb 12, 2026
7e06932
Workflows fix attempt
thomthehound Feb 12, 2026
8140809
fix NPU regex and add documentation
thomthehound Feb 12, 2026
417e1ea
Workflows fix attempt No2
thomthehound Feb 13, 2026
a7e47d1
Black formatting and Workflows fix attempt No3
thomthehound Feb 13, 2026
1faf847
Fix minor documentation error
thomthehound Feb 14, 2026
42bd97e
PR fork-branch targetting patch
thomthehound Feb 17, 2026
f25c413
Fix typo and add correct whl expansion in mlirAIEDistro.yml
thomthehound Feb 17, 2026
62ebef6
Skip MLIR AIE Distro releases from forked PRs (no write access)
thomthehound Feb 17, 2026
391044f
Merge branch 'main' into windows-bring-up
thomthehound Feb 17, 2026
df6ac8c
Merge branch 'main' into windows-bring-up
jgmelber Feb 18, 2026
c1e21c1
add build_local.py
thomthehound Feb 24, 2026
d89fd1d
Merge branch 'main' into windows-bring-up
thomthehound Feb 24, 2026
793eb1c
Merge branch 'main' into windows-bring-up
thomthehound Feb 24, 2026
b25293b
Merge branch 'main' into windows-bring-up
thomthehound Feb 28, 2026
6c981f6
Merge branch 'main' into windows-bring-up
thomthehound Feb 28, 2026
27bad7c
resolve conflicts
thomthehound Mar 9, 2026
d404596
Merge branch 'main' into windows-bring-up
thomthehound Mar 9, 2026
ed6168e
windows local build enhancements
thomthehound Mar 9, 2026
516bcb5
Merge branch 'main' into windows-bring-up
thomthehound Mar 9, 2026
4c95c6e
fix Peano-side legacy LLVM IR drift
thomthehound Mar 10, 2026
8ba2f07
Merge branch 'main' into windows-bring-up
thomthehound Mar 10, 2026
7de1975
Merge branch 'main' into windows-bring-up
thomthehound Mar 10, 2026
83de3e1
Ninja 1.13.0 bug workaround
thomthehound Mar 10, 2026
fdc4029
Merge branch 'main' into windows-bring-up
thomthehound Mar 11, 2026
1fdf7e0
Merge branch 'main' into windows-bring-up
thomthehound Mar 11, 2026
f13b097
Ninja 1.13.0 bug workaround No2
thomthehound Mar 11, 2026
9fa3a89
Merge branch 'main' into windows-bring-up
thomthehound Mar 11, 2026
2a33bd8
Merge branch 'main' into windows-bring-up
thomthehound Mar 12, 2026
a54355f
MLIR AIE Distro: only unpack the tested whl
thomthehound Mar 12, 2026
4e20736
Merge branch 'main' into windows-bring-up
thomthehound Mar 12, 2026
0afcea1
Merge branch 'main' into windows-bring-up
thomthehound Mar 12, 2026
1ff1876
Merge branch 'main' into windows-bring-up
thomthehound Mar 13, 2026
dd6a1cd
Merge branch 'main' into windows-bring-up
thomthehound Mar 13, 2026
c7e9602
Merge branch 'main' into windows-bring-up
thomthehound Mar 13, 2026
6dae5cf
roll back aiecc changes
thomthehound Mar 14, 2026
d4e8a5e
Merge branch 'main' into windows-bring-up
thomthehound Mar 14, 2026
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
260 changes: 249 additions & 11 deletions .github/workflows/buildRyzenWheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ jobs:
if [ x"${{ inputs.AIE_COMMIT }}" == x"" ]; then
export AIE_PROJECT_COMMIT=$MLIR_VERSION
else
MLIR_VERSION = "${{ inputs.AIE_COMMIT }}"
export AIE_PROJECT_COMMIT=${MLIR_VERSION:0:7}
export AIE_PROJECT_COMMIT="${{ inputs.AIE_COMMIT }}"
export AIE_PROJECT_COMMIT="${AIE_PROJECT_COMMIT:0:7}"
fi
export AIE_VITIS_COMPONENTS='AIE2;AIE2P'
export DATETIME=$(date +"%Y%m%d%H")
Expand All @@ -181,17 +181,255 @@ jobs:
path: wheelhouse/repaired_wheel/mlir_aie*whl
name: mlir_aie_rtti_${{ matrix.ENABLE_RTTI }}-${{ matrix.python_version }}


build-windows:
name: Build and upload mlir_aie wheels (Windows)

runs-on: windows-2022

permissions:
id-token: write
contents: write
packages: read

strategy:
fail-fast: false
matrix:
include:
- python_version: "3.10"
ENABLE_RTTI: ON

- python_version: "3.10"
ENABLE_RTTI: OFF

- python_version: "3.11"
ENABLE_RTTI: ON

- python_version: "3.11"
ENABLE_RTTI: OFF

- python_version: "3.12"
ENABLE_RTTI: ON

- python_version: "3.12"
ENABLE_RTTI: OFF

- python_version: "3.13"
ENABLE_RTTI: ON

- python_version: "3.13"
ENABLE_RTTI: OFF

- python_version: "3.14"
ENABLE_RTTI: ON

- python_version: "3.14"
ENABLE_RTTI: OFF

steps:
- uses: actions/checkout@v4
with:
submodules: "true"

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
allow-prereleases: true

- name: Set up MSVC dev environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64

# We don't get OpenSSL for free on Windows. Manage the pain.
# Try vcpkg's GHA cache to avoid building OpenSSL for every matrix element.
- name: Enable vcpkg binary caching
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL)
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN)
- name: Install OpenSSL
shell: pwsh
run: |
$vcpkgRoot = $env:VCPKG_INSTALLATION_ROOT
if ($vcpkgRoot) {
$vcpkg = Join-Path $vcpkgRoot "vcpkg.exe"
} else {
$vcpkg = (Get-Command vcpkg.exe -ErrorAction Stop).Source
$vcpkgRoot = Split-Path -Parent $vcpkg
}

Remove-Item Env:VCPKG_ROOT -ErrorAction SilentlyContinue

$env:VCPKG_BINARY_SOURCES = "clear;x-gha,readwrite"
& $vcpkg install openssl:x64-windows

"OPENSSL_ROOT_DIR=$($vcpkgRoot.Replace('\','/'))/installed/x64-windows" |
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Build mlir-aie wheel
shell: bash
env:
# Copy Linux job style: tag-aligned versioning only on version tags.
# Perhaps a literal "" should be here?
AIE_WHEEL_VERSION: ${{ (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')) && github.ref_name || '' }}
ENABLE_RTTI: ${{ matrix.ENABLE_RTTI }}
CMAKE_GENERATOR: Ninja
CMAKE_ARGS: -DAIE_BUILD_CHESS_CLANG=OFF
run: |
set -euo pipefail

# No Vitis on Windows!
unset VITIS XILINXD_LICENSE_FILE || true

git config --global --add safe.directory "$PWD"
MLIR_VERSION=$(git rev-parse --short HEAD)
echo "Building mlir-aie version $MLIR_VERSION"

python -m venv aie-venv
source aie-venv/Scripts/activate

python -m pip install --upgrade pip
pip install -r python/requirements.txt
pip install -r python/requirements_ml.txt
pip install -r python/requirements_dev.txt

export ENABLE_RTTI="${ENABLE_RTTI}"

NO_RTTI="" # Set a default value
NO_RTTI_UNDERSCORE="" # Set a default value
if [ x"$ENABLE_RTTI" == x"OFF" ]; then
NO_RTTI="-no-rtti"
NO_RTTI_UNDERSCORE="_no_rtti"
fi

VERSION=$(utils/clone-llvm.sh --get-wheel-version)

# Grab the MLIR distro wheel and extract
pip -q download "mlir${NO_RTTI}==${VERSION}" -f https://github.com/Xilinx/mlir-aie/releases/expanded_assets/mlir-distro
python -m zipfile -e mlir*.whl .

# Linux-style timestamp magic should work fine on Windows.
find "mlir${NO_RTTI_UNDERSCORE}" -exec touch -a -m -t 201108231405.14 {} \;

# Match Linux wheel version metadata on non-tag builds.
export DATETIME=$(date +"%Y%m%d%H")
if [ x"${{ inputs.AIE_COMMIT }}" == x"" ]; then
export AIE_PROJECT_COMMIT=$MLIR_VERSION
else
export AIE_PROJECT_COMMIT="${{ inputs.AIE_COMMIT }}"
export AIE_PROJECT_COMMIT="${AIE_PROJECT_COMMIT:0:7}"
fi
export AIE_VITIS_COMPONENTS='AIE2;AIE2P'

# Try to always forward slash paths.
ROOT_WIN=$(python -c "import os; print(os.getcwd().replace('\\\\', '/'))")

export MLIR_INSTALL_ABS_PATH="${ROOT_WIN}/mlir${NO_RTTI_UNDERSCORE}"
export MLIR_AIE_SOURCE_DIR="${ROOT_WIN}"
export WHEELHOUSE_DIR="${ROOT_WIN}/wheelhouse"
export CMAKE_MODULE_PATH="${ROOT_WIN}/cmake/modulesXilinx"

mkdir -p "${WHEELHOUSE_DIR}"
pushd utils/mlir_aie_wheels

pip install wheel importlib_metadata "ninja!=1.13.0"
CIBW_ARCHS=AMD64 pip wheel . -v -w "${WHEELHOUSE_DIR}" --no-build-isolation

popd

# Try to repair the wheel on Windows using delvewheel (closest auditwheel equivalent).
pip install delvewheel

OPENSSL_BIN=$(python -c "import os, pathlib; print(pathlib.Path(os.environ['OPENSSL_ROOT_DIR']).joinpath('bin').as_posix())")
python -m delvewheel repair --ignore-existing --analyze-existing-exes --add-path "${OPENSSL_BIN}" -w "${WHEELHOUSE_DIR}/repaired_wheel" "${WHEELHOUSE_DIR}"/mlir_aie*.whl

- name: Upload mlir_aie
uses: actions/upload-artifact@v4
with:
path: wheelhouse/repaired_wheel/mlir_aie*whl
name: mlir_aie_windows_rtti_${{ matrix.ENABLE_RTTI }}-${{ matrix.python_version }}

publish:
name: Publish wheels
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'schedule' ||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
runs-on: ubuntu-latest
needs: [build-repo, build-windows]
permissions:
contents: write
actions: read
steps:
- name: Download wheels (RTTI ON)
uses: actions/download-artifact@v4
with:
pattern: mlir_aie*_rtti_ON-*
path: wheels_on
merge-multiple: true

- name: Download wheels (RTTI OFF)
uses: actions/download-artifact@v4
with:
pattern: mlir_aie*_rtti_OFF-*
path: wheels_off
merge-multiple: true

- name: Flatten wheels (RTTI ON)
run: |
set -euo pipefail
mkdir -p wheels_on_flat
find wheels_on -name 'mlir_aie*whl' -exec cp -f {} wheels_on_flat/ \;

- name: Flatten wheels (RTTI OFF)
run: |
set -euo pipefail
mkdir -p wheels_off_flat
find wheels_off -name 'mlir_aie*whl' -exec cp -f {} wheels_off_flat/ \;

- name: Combine wheels
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: |
set -euo pipefail
mkdir -p wheels_all
cp wheels_on_flat/mlir_aie*whl wheels_all/
cp wheels_off_flat/mlir_aie*whl wheels_all/

- name: Release
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'schedule' ||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1.12.0
with:
artifacts: wheels_all/mlir_aie*whl
token: "${{ secrets.GITHUB_TOKEN }}"
tag: ${{ github.ref_name }}
name: ${{ github.ref_name }}
allowUpdates: true
replacesArtifacts: true
makeLatest: true

- name: Release latest wheels (RTTI ON)
if: github.event_name != 'push'
uses: ncipollo/release-action@v1.12.0
with:
artifacts: wheels_on_flat/mlir_aie*whl
token: "${{ secrets.GITHUB_TOKEN }}"
tag: latest-wheels-3
name: latest-wheels-3
allowUpdates: true
replacesArtifacts: false
makeLatest: false

- name: Release latest wheels (RTTI OFF)
if: github.event_name != 'push'
uses: ncipollo/release-action@v1.12.0
with:
artifacts: wheelhouse/repaired_wheel/mlir_aie*whl
artifacts: wheels_off_flat/mlir_aie*whl
token: "${{ secrets.GITHUB_TOKEN }}"
tag: ${{ github.event_name == 'push' && github.ref_name || (matrix.ENABLE_RTTI == 'ON' && 'latest-wheels-3' || 'latest-wheels-no-rtti') }}
name: ${{ github.event_name == 'push' && github.ref_name || (matrix.ENABLE_RTTI == 'ON' && 'latest-wheels-3' || 'latest-wheels-no-rtti') }}
tag: latest-wheels-no-rtti
name: latest-wheels-no-rtti
allowUpdates: true
replacesArtifacts: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
makeLatest: ${{ github.event_name == 'push' }}
replacesArtifacts: false
makeLatest: false
52 changes: 51 additions & 1 deletion .github/workflows/mlirAIEDistro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,37 @@ jobs:
MATRIX_OS: ${{ matrix.OS }}
MATRIX_ARCH: ${{ matrix.ARCH }}

# We don't get OpenSSL for free on Windows. Manage the pain.
# Try vcpkg's GHA cache to avoid building OpenSSL for every matrix element.
- name: Enable vcpkg binary caching
if: ${{ matrix.OS == 'windows-2022' }}
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL)
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN)

# Install OpenSSL so bootgen.exe can build against it.
- name: Install OpenSSL
if: ${{ matrix.OS == 'windows-2022' }}
shell: pwsh
run: |
$vcpkgRoot = $env:VCPKG_INSTALLATION_ROOT
if ($vcpkgRoot) {
$vcpkg = Join-Path $vcpkgRoot "vcpkg.exe"
} else {
$vcpkg = (Get-Command vcpkg.exe -ErrorAction Stop).Source
$vcpkgRoot = Split-Path -Parent $vcpkg
}

Remove-Item Env:VCPKG_ROOT -ErrorAction SilentlyContinue

$env:VCPKG_BINARY_SOURCES = "clear;x-gha,readwrite"
& $vcpkg install openssl:x64-windows

"OPENSSL_ROOT_DIR=$($vcpkgRoot.Replace('\','/'))/installed/x64-windows" |
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- uses: ./.github/actions/setup_ccache
id: setup_ccache
with:
Expand Down Expand Up @@ -227,6 +258,24 @@ jobs:
PARALLEL_LEVEL=2 \
cibuildwheel --output-dir wheelhouse

- name: Repair wheels (Windows)
if: ${{ matrix.OS == 'windows-2022' }}
shell: pwsh
working-directory: ${{ steps.workspace_root.outputs.WORKSPACE_ROOT }}
run: |
python -m pip install --upgrade pip
pip install delvewheel

$opensslBin = Join-Path $env:OPENSSL_ROOT_DIR "bin"
New-Item -ItemType Directory -Force -Path wheelhouse\repaired_wheel | Out-Null

$wheels = Get-ChildItem wheelhouse\mlir_aie*.whl | ForEach-Object { $_.FullName }
python -m delvewheel repair --ignore-existing --analyze-existing-exes --add-path "$opensslBin" -w wheelhouse\repaired_wheel $wheels

Remove-Item wheelhouse\mlir_aie*.whl -Force
Move-Item wheelhouse\repaired_wheel\*.whl wheelhouse\
Remove-Item wheelhouse\repaired_wheel -Recurse -Force

- name: build aarch ubuntu wheel
if: ${{ matrix.OS == 'ubuntu-22.04' && matrix.ARCH == 'aarch64' }}
working-directory: ${{ steps.workspace_root.outputs.WORKSPACE_ROOT }}
Expand Down Expand Up @@ -382,7 +431,7 @@ jobs:
python -m pip install --upgrade pip
pip install -r python/requirements.txt
pip install -r python/requirements_dev.txt
unzip -o -q dist/mlir_aie\*.whl
unzip -o -q dist/mlir_aie*py3-none*.whl

export PYTHONPATH=mlir_aie/python

Expand Down Expand Up @@ -437,6 +486,7 @@ jobs:
path: dist

- name: Release current commit
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
uses: ncipollo/release-action@v1.12.0
with:
artifacts: "dist/*.whl,dist/*.tar.xz"
Expand Down
Loading
Loading