Skip to content

Commit 3909a0a

Browse files
hunhoffeclaude
andcommitted
trim trailing whitespace across branch (pre-commit auto-fix)
pre-commit's trailing-whitespace hook flagged 16 files on this branch with stray trailing whitespace (mostly Makefiles, MLIR repeat_count tests, and a couple of workflows + docs). Letting the hook fix them so future pre-push runs are quiet. No functional changes — whitespace only. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
1 parent 7d0a49e commit 3909a0a

16 files changed

Lines changed: 103 additions & 103 deletions

File tree

.github/workflows/buildRyzenWheels.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,14 @@ jobs:
221221

222222
build-windows:
223223
name: Build and upload mlir_aie wheels (Windows)
224-
224+
225225
runs-on: windows-2022
226-
226+
227227
permissions:
228228
id-token: write
229229
contents: write
230230
packages: read
231-
231+
232232
strategy:
233233
fail-fast: false
234234
matrix:
@@ -250,13 +250,13 @@ jobs:
250250

251251
- python_version: "3.13"
252252
ENABLE_RTTI: OFF
253-
253+
254254
- python_version: "3.14"
255255
ENABLE_RTTI: ON
256-
256+
257257
- python_version: "3.14"
258258
ENABLE_RTTI: OFF
259-
259+
260260
steps:
261261
- uses: actions/checkout@v6
262262
with:
@@ -355,32 +355,32 @@ jobs:
355355
CMAKE_ARGS: -DAIE_BUILD_CHESS_CLANG=OFF -DOPENSSL_USE_STATIC_LIBS=TRUE -DAIE_ENABLE_XRT_PYTHON_BINDINGS=OFF
356356
run: |
357357
set -euo pipefail
358-
358+
359359
# No Vitis on Windows!
360360
unset VITIS XILINXD_LICENSE_FILE || true
361-
361+
362362
git config --global --add safe.directory "$PWD"
363363
MLIR_VERSION=$(git rev-parse --short HEAD)
364364
echo "Building mlir-aie version $MLIR_VERSION"
365-
365+
366366
python -m venv aie-venv
367367
source aie-venv/Scripts/activate
368-
368+
369369
python -m pip install --upgrade pip
370370
pip install -r python/requirements_ml.txt
371371
pip install -r python/requirements_dev.txt
372-
372+
373373
export ENABLE_RTTI="${ENABLE_RTTI}"
374-
374+
375375
NO_RTTI="" # Set a default value
376376
NO_RTTI_UNDERSCORE="" # Set a default value
377377
if [ x"$ENABLE_RTTI" == x"OFF" ]; then
378378
NO_RTTI="-no-rtti"
379379
NO_RTTI_UNDERSCORE="_no_rtti"
380380
fi
381-
381+
382382
VERSION=$(utils/clone-llvm.sh --get-wheel-version)
383-
383+
384384
# Grab the MLIR distro wheel and extract
385385
for attempt in 1 2 3; do
386386
rm -f mlir*.whl
@@ -394,10 +394,10 @@ jobs:
394394
sleep $((attempt * 5))
395395
done
396396
python -m zipfile -e mlir*.whl .
397-
397+
398398
# Linux-style timestamp magic should work fine on Windows.
399399
find "mlir${NO_RTTI_UNDERSCORE}" -exec touch -a -m -t 201108231405.14 {} \;
400-
400+
401401
# Match Linux wheel version metadata on non-tag builds.
402402
export DATETIME=$(date +"%Y%m%d%H")
403403
if [ x"${{ inputs.AIE_COMMIT }}" == x"" ]; then
@@ -416,19 +416,19 @@ jobs:
416416
export MLIR_AIE_SOURCE_DIR="${ROOT_WIN}"
417417
export WHEELHOUSE_DIR="${ROOT_WIN}/wheelhouse"
418418
export CMAKE_MODULE_PATH="${ROOT_WIN}/cmake/modulesXilinx"
419-
419+
420420
mkdir -p "${WHEELHOUSE_DIR}"
421421
pushd utils/mlir_aie_wheels
422-
422+
423423
pip install wheel importlib_metadata "ninja!=1.13.0"
424424
CIBW_ARCHS=AMD64 pip wheel . -v -w "${WHEELHOUSE_DIR}" --no-build-isolation
425-
425+
426426
popd
427-
427+
428428
# Try to repair the wheel on Windows using delvewheel (closest auditwheel equivalent).
429429
pip install delvewheel
430430
python -m delvewheel repair --ignore-existing --analyze-existing-exes -w "${WHEELHOUSE_DIR}/repaired_wheel" "${WHEELHOUSE_DIR}"/mlir_aie*.whl
431-
431+
432432
- name: Upload mlir_aie
433433
uses: actions/upload-artifact@v4
434434
with:

.github/workflows/mlirDistro.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ jobs:
157157
- name: set ENV
158158
shell: bash
159159
run: |
160-
160+
161161
PIP_FIND_LINKS_URL="https://github.com/Xilinx/mlir-aie/releases/expanded_assets/mlir-distro"
162162
if [ x"${{ github.event_name }}" == x"pull_request" ]; then
163163
PIP_FIND_LINKS_URL="$PIP_FIND_LINKS_URL https://github.com/Xilinx/mlir-aie/releases/expanded_assets/dev-wheels"
@@ -202,15 +202,15 @@ jobs:
202202
shell: bash
203203
working-directory: ${{ env.TEMP }}
204204
run: |
205-
205+
206206
ls "${{ steps.setup_base.outputs.WORKSPACE_ROOT }}"
207-
207+
208208
if [ x"${{ matrix.OS }}" == x"windows-2022" ]; then
209209
WORKSPACE_ROOT="${{ steps.setup_base.outputs.WORKSPACE_ROOT }}\utils\mlir_wheels"
210210
else
211211
WORKSPACE_ROOT="${{ steps.setup_base.outputs.WORKSPACE_ROOT }}/utils/mlir_wheels"
212212
fi
213-
213+
214214
echo "WORKSPACE_ROOT=$WORKSPACE_ROOT" | tee -a $GITHUB_OUTPUT
215215
216216
# setup llvm
@@ -219,7 +219,7 @@ jobs:
219219
working-directory: ${{ steps.workspace_root.outputs.WORKSPACE_ROOT }}
220220
shell: bash
221221
run: |
222-
222+
223223
curl -s https://codeload.github.com/llvm/llvm-project/zip/${{ needs.get_llvm_project_commit.outputs.LLVM_PROJECT_COMMIT }} -o llvm.zip
224224
unzip -q llvm.zip
225225
rm -rf llvm.zip
@@ -233,7 +233,7 @@ jobs:
233233
shell: bash
234234
working-directory: ${{ steps.workspace_root.outputs.WORKSPACE_ROOT }}
235235
run: |
236-
236+
237237
APPLY_PATCHES=${{ inputs.APPLY_PATCHES == '' && 'true' || inputs.APPLY_PATCHES }} \
238238
CIBW_ARCHS=${{ matrix.ARCH }} \
239239
CMAKE_GENERATOR=Ninja \
@@ -249,12 +249,12 @@ jobs:
249249
working-directory: ${{ steps.workspace_root.outputs.WORKSPACE_ROOT }}
250250
shell: bash
251251
run: |
252-
252+
253253
export APPLY_PATCHES=${{ inputs.APPLY_PATCHES == '' && 'true' || inputs.APPLY_PATCHES }}
254254
./scripts/apply_patches.sh
255-
255+
256256
pip install --upgrade pip
257-
257+
258258
CIBW_ARCHS=${{ matrix.ARCH }} \
259259
CMAKE_GENERATOR=Ninja \
260260
DATETIME=${{ needs.get_llvm_project_commit.outputs.DATETIME }} \
@@ -267,15 +267,15 @@ jobs:
267267
working-directory: ${{ steps.workspace_root.outputs.WORKSPACE_ROOT }}
268268
shell: bash
269269
run: |
270-
270+
271271
rm -rf llvm-project
272272
rm -rf build
273273
274274
- name: Docker prune
275275
if: contains(inputs.MATRIX_OS, 'ubuntu')
276276
shell: bash
277277
run: |
278-
278+
279279
docker system prune -a -f
280280
281281
- name: Get wheel version
@@ -293,7 +293,7 @@ jobs:
293293
working-directory: ${{ steps.workspace_root.outputs.WORKSPACE_ROOT }}
294294
shell: bash
295295
run: |
296-
296+
297297
ccache -s
298298
HOST_CCACHE_DIR="$(ccache --get-config cache_dir)"
299299
rm -rf $HOST_CCACHE_DIR
@@ -309,7 +309,7 @@ jobs:
309309
working-directory: ${{ steps.workspace_root.outputs.WORKSPACE_ROOT }}
310310
shell: bash
311311
run: |
312-
312+
313313
ccache --print-stats
314314
HOST_CCACHE_DIR="$(ccache --get-config cache_dir)"
315315
# Set the timestamp to the beginning of the current hour.
@@ -334,19 +334,19 @@ jobs:
334334
fi
335335
unzip -j wheelhouse/mlir*whl "mlir/bin/$TOOL" -d native_tools/
336336
done
337-
337+
338338
if [ x"${{ matrix.OS }}" == x"ubuntu-22.04" ]; then
339339
PLAT="linux"
340340
elif [ x"${{ matrix.OS }}" == x"windows-2022" ]; then
341341
PLAT="win"
342342
fi
343-
343+
344344
PLAT=${PLAT}_$(echo ${{ matrix.ARCH }} | tr '[:upper:]' '[:lower:]')
345345
pushd native_tools
346346
347347
MLIR_WHEEL_VERSION=${{ steps.get_wheel_version.outputs.MLIR_WHEEL_VERSION }} \
348348
python setup.py bdist_wheel --dist-dir ../wheelhouse --plat $PLAT
349-
349+
350350
popd
351351
352352
# done

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ xrt-smi examine
140140
1. Install IRON library by installing the `mlir-aie` wheels:
141141
142142
For installing the `mlir-aie` wheels, there are 3 options. Note that for whichever path you take,
143-
it is important to sync the `mlir-aie` wheels version, the github repo commit, and the requirements versions.
144-
If you install from something other than the latest wheels, make sure
143+
it is important to sync the `mlir-aie` wheels version, the github repo commit, and the requirements versions.
144+
If you install from something other than the latest wheels, make sure
145145
you use the repo commit -- and installation instructions -- from that point in time.
146146
147147
1. **Latest:** For the latest wheels (not necessarily a release):

docs/Building.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Building the MLIR-AIE Codebase on Linux
22

3-
These instructions will guide you through everything required for building and executing a program on the Ryzen™ AI NPU, starting from a fresh bare-bones **Ubuntu 24.04** or **Ubuntu 24.10** install. It is possible to use **Ubuntu 22.04** however you must follow the documentation on the [xdna-driver](https://github.com/amd/xdna-driver) repository to configure the Linux kernel, driver and runtime for deployment.
3+
These instructions will guide you through everything required for building and executing a program on the Ryzen™ AI NPU, starting from a fresh bare-bones **Ubuntu 24.04** or **Ubuntu 24.10** install. It is possible to use **Ubuntu 22.04** however you must follow the documentation on the [xdna-driver](https://github.com/amd/xdna-driver) repository to configure the Linux kernel, driver and runtime for deployment.
44

55
## Initial Setup
66

@@ -9,7 +9,7 @@ These instructions will guide you through everything required for building and e
99
If starting from `Ubuntu 24.04` you may need to update the Linux kernel to 6.11+ by installing the Hardware Enablement (HWE) stack:
1010

1111
```bash
12-
sudo apt update
12+
sudo apt update
1313
sudo apt install --install-recommends linux-generic-hwe-24.04
1414
sudo reboot
1515
```
@@ -124,7 +124,7 @@ xrt-smi examine
124124
125125
1. Install required Python packages:
126126
```bash
127-
# Install basic Python requirements
127+
# Install basic Python requirements
128128
python3 -m pip install -r python/requirements.txt
129129
```
130130
@@ -204,7 +204,7 @@ If the [upstream packages](#install-from-upstream-packages-ubuntu-2404) do not s
204204
### Update BIOS:
205205
206206
Be sure you have the latest BIOS for your laptop or mini PC, this will ensure the NPU (sometimes referred to as IPU) is enabled in the system. You may need to manually enable the NPU:
207-
```Advanced → CPU Configuration → IPU```
207+
```Advanced → CPU Configuration → IPU```
208208
209209
> **NOTE:** Some manufacturers only provide Windows executables to update the BIOS, please do this before installing Ubuntu.
210210

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ Turn off SecureBoot (Allows for unsigned drivers to be installed):
108108
1. Install IRON library by installing the `mlir-aie` wheels:
109109

110110
For installing the `mlir-aie` wheels, there are 3 options. Note that for whichever path you take,
111-
it is important to sync the `mlir-aie` wheels version, the github repo commit, and the requirements versions.
112-
If you install from something other than the latest wheels, make sure
111+
it is important to sync the `mlir-aie` wheels version, the github repo commit, and the requirements versions.
112+
If you install from something other than the latest wheels, make sure
113113
you use the repo commit -- and installation instructions -- from that point in time.
114114

115115
1. **Latest:** For the latest wheels (not necessarily a release):

programming_examples/ml/magika/Makefile

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ build/%.o: %.cc
4848
mkdir -p ${@D}
4949
ifeq (${devicename}, npu)
5050
ifeq ($(CHESS), true)
51-
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2_FLAGS} -c $< -o ${@F};
52-
else
51+
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2_FLAGS} -c $< -o ${@F};
52+
else
5353
cd ${@D} && ${PEANO_INSTALL_DIR}/bin/clang ${PEANOWRAP2_FLAGS} -c $< -o ${@F}
5454
endif
5555
else ifeq (${devicename}, npu2)
5656
ifeq ($(CHESS), true)
57-
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2P_FLAGS} -c $< -o ${@F};
58-
else
57+
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2P_FLAGS} -c $< -o ${@F};
58+
else
5959
cd ${@D} && ${PEANO_INSTALL_DIR}/bin/clang ${PEANOWRAP2P_FLAGS} -c $< -o ${@F}
6060
endif
6161
else
@@ -66,14 +66,14 @@ build/group0a.o: group0.cc
6666
mkdir -p ${@D}
6767
ifeq (${devicename}, npu)
6868
ifeq ($(CHESS), true)
69-
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2_FLAGS} -DGROUPA -c $< -o ${@F};
70-
else
69+
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2_FLAGS} -DGROUPA -c $< -o ${@F};
70+
else
7171
cd ${@D} && ${PEANO_INSTALL_DIR}/bin/clang ${PEANOWRAP2_FLAGS} -DGROUPA -c $< -o ${@F}
7272
endif
7373
else ifeq (${devicename}, npu2)
7474
ifeq ($(CHESS), true)
75-
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2P_FLAGS} -DGROUPA -c $< -o ${@F};
76-
else
75+
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2P_FLAGS} -DGROUPA -c $< -o ${@F};
76+
else
7777
cd ${@D} && ${PEANO_INSTALL_DIR}/bin/clang ${PEANOWRAP2P_FLAGS} -DGROUPA -c $< -o ${@F}
7878
endif
7979
else
@@ -84,21 +84,21 @@ build/group0b.o: group0.cc
8484
mkdir -p ${@D}
8585
ifeq (${devicename}, npu)
8686
ifeq ($(CHESS), true)
87-
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2_FLAGS} -DGROUPB -c $< -o ${@F};
88-
else
87+
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2_FLAGS} -DGROUPB -c $< -o ${@F};
88+
else
8989
cd ${@D} && ${PEANO_INSTALL_DIR}/bin/clang ${PEANOWRAP2_FLAGS} -DGROUPB -c $< -o ${@F}
9090
endif
9191
else ifeq (${devicename}, npu2)
9292
ifeq ($(CHESS), true)
93-
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2P_FLAGS} -DGROUPB -c $< -o ${@F};
94-
else
93+
cd ${@D} && xchesscc_wrapper ${CHESSCCWRAP2P_FLAGS} -DGROUPB -c $< -o ${@F};
94+
else
9595
cd ${@D} && ${PEANO_INSTALL_DIR}/bin/clang ${PEANOWRAP2P_FLAGS} -DGROUPB -c $< -o ${@F}
9696
endif
9797
else
9898
echo "Device type not supported"
9999
endif
100100

101-
#build/final.xclbin: build/${mlirFileName}.mlir build/group0a.o build/group0b.o build/group1.o build/group2.o
101+
#build/final.xclbin: build/${mlirFileName}.mlir build/group0a.o build/group0b.o build/group1.o build/group2.o
102102
build/final.xclbin: build/${mlirFileName}.mlir build/group0a.o build/group0b.o build/group2.o
103103
mkdir -p ${@D}
104104
ifeq ($(CHESS), true)
@@ -107,7 +107,7 @@ ifeq ($(CHESS), true)
107107
else
108108
cd ${@D} && aiecc -v --aie-generate-xclbin --no-compile-host --xclbin-name=${@F} ${alloc_scheme} \
109109
--no-xchesscc --no-xbridge \
110-
--aie-generate-npu-insts --npu-insts-name=insts.bin $(<:%=../%)
110+
--aie-generate-npu-insts --npu-insts-name=insts.bin $(<:%=../%)
111111
endif
112112

113113
build/final_trace.xclbin: build/${mlirFileName}_trace.mlir build/group0a.o build/group0b.o build/group2.o
@@ -118,7 +118,7 @@ ifeq ($(CHESS), true)
118118
else
119119
cd ${@D} && aiecc -v --aie-generate-xclbin --no-compile-host --xclbin-name=${@F} ${alloc_scheme} \
120120
--no-xchesscc --no-xbridge \
121-
--aie-generate-npu-insts --npu-insts-name=insts.bin $(<:%=../%)
121+
--aie-generate-npu-insts --npu-insts-name=insts.bin $(<:%=../%)
122122
endif
123123

124124
run_py: build/final.xclbin

0 commit comments

Comments
 (0)