Skip to content

Commit 769451f

Browse files
authored
Merge pull request #307 from DeepWok/cx/remove-hardware
Cx/remove hardware
2 parents e34bc47 + 2e357eb commit 769451f

File tree

704 files changed

+171
-73676
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

704 files changed

+171
-73676
lines changed

.github/workflows/buildAndTest.yml

Lines changed: 1 addition & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -220,117 +220,8 @@ jobs:
220220
if-no-files-found: error
221221
overwrite: true
222222

223-
hardware-test:
224-
runs-on: ubuntu-latest
225-
container:
226-
image: bingleilou/mase-docker-cpu-triton:latest
227-
steps:
228-
229-
# -----------
230-
# Clone the MASE repo and its submodules.
231-
# -----------
232-
233-
- name: Get MASE
234-
uses: actions/checkout@v3
235-
with:
236-
submodules: "true"
237-
238-
- name: Set git safe
239-
run: |
240-
git config --global --add safe.directory $PWD
241-
242-
# Choose the git commit to diff against for the purposes of linting.
243-
# Since this workflow is triggered on both pushes and pull requests, w
244-
# have to determine if the pull request target branch is set (which it
245-
# will only be on the PR triggered flow). If it's not, then compare
246-
# against the last commit.
247-
248-
- name: choose-commit
249-
if: ${{ always() }}
250-
env:
251-
# Base ref is the target branch, in text form (not hash)
252-
PR_BASE: ${{ github.base_ref }}
253-
run: |
254-
# Run clang-format
255-
if [ -z "$PR_BASE" ]; then
256-
DIFF_COMMIT_NAME="HEAD^"
257-
else
258-
DIFF_COMMIT_NAME="$PR_BASE"
259-
fi
260-
echo "DIFF_COMMIT_NAME=$DIFF_COMMIT_NAME" >> $GITHUB_ENV
261-
262-
# Since we did a shallow fetch for this repo, we must fetch the commit
263-
# upon which we be diff'ing. The last step set the ref name in the
264-
# $DIFF_COMMIT_NAME environment variable. When running the fetch, resolve
265-
# it to the commit hash and pass that hash along to subsequent steps.
266-
267-
- name: git fetch base commit
268-
continue-on-error: true
269-
run: |
270-
if echo "$DIFF_COMMIT_NAME" | grep -q HEAD; then
271-
DIFF_COMMIT_SHA=$( git rev-parse $DIFF_COMMIT_NAME )
272-
else
273-
git fetch --recurse-submodules=no origin $DIFF_COMMIT_NAME
274-
DIFF_COMMIT_SHA=$( git rev-parse origin/$DIFF_COMMIT_NAME )
275-
fi
276-
echo "DIFF_COMMIT=$DIFF_COMMIT_SHA" >> $GITHUB_ENV
277-
278-
# Run verible-verilog-format to check Verilog/SystemVerilog formatting.
279-
- name: verilog-format
280-
if: ${{ always() }}
281-
shell: bash
282-
run: |
283-
files=$(git diff --name-only $DIFF_COMMIT | grep -e '\.sv$' || echo -n)
284-
if [[ ! -z $files ]]; then
285-
for f in $files
286-
do
287-
if [[ -f $f ]]; then
288-
echo $f
289-
/srcPkgs/verible/bin/verible-verilog-format $f | diff - $f
290-
fi
291-
done
292-
fi
293-
files=$(git diff --name-only $DIFF_COMMIT | grep -e '\.v$' || echo -n)
294-
if [[ ! -z $files ]]; then
295-
for f in $files
296-
do
297-
if [[ -f $f ]]; then
298-
echo $f
299-
/srcPkgs/verible/bin/verible-verilog-format $f | diff - $f
300-
fi
301-
done
302-
fi
303-
304-
# -----------
305-
# Hardware regression test
306-
# -----------
307-
308-
- name: Hardware regression test
309-
run: |
310-
pip3 --version
311-
python3 --version
312-
echo "PYTHONPATH is ${PYTHONPATH}"
313-
export PYTHONPATH=$PYTHONPATH:$PWD/src
314-
just test-hw
315-
# if [ ! -f hardware_report.xml ]; then
316-
# echo "hardware_report.xml not found!"
317-
# ls
318-
# exit 1
319-
# fi
320-
321-
# -----------
322-
# TODO: Upload hardware regression test artifacts
323-
# -----------
324-
# - name: Upload hardware test report
325-
# uses: actions/upload-artifact@v4
326-
# with:
327-
# name: hardware_report
328-
# path: hardware_report.xml
329-
# if-no-files-found: error
330-
# overwrite: true
331-
332223
build-doc:
333-
needs: [software-test, hardware-test]
224+
needs: [software-test]
334225
runs-on: ubuntu-latest
335226
container:
336227
image: bingleilou/mase-docker-cpu-triton:latest
@@ -387,5 +278,3 @@ jobs:
387278
else
388279
echo "Skipped MASE Doc deployment."
389280
fi
390-
391-

Makefile

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
vhls=/mnt/applications/Xilinx/23.1
2-
vhls_version=2023.1
31
local ?= 0
42

53
GPU_AVAILABLE := $(shell command -v nvidia-smi 2> /dev/null)
6-
VIVADO_AVAILABLE := $(shell command -v vivado 2> /dev/null)
74

85
# * Check if a GPU is available
96
ifeq ($(GPU_AVAILABLE),)
@@ -12,14 +9,6 @@ else
129
PLATFORM := gpu
1310
endif
1411

15-
# * Mount Vivado HLS path only if Vivado is available (to avoid path not found errors)
16-
# Include shared folder containing board files etc
17-
ifeq ($(VIVADO_AVAILABLE),)
18-
DOCKER_RUN_EXTRA_ARGS=
19-
else
20-
DOCKER_RUN_EXTRA_ARGS= -v /mnt/applications/:/mnt/applications -v $(vhls):$(vhls)
21-
endif
22-
2312
# * Set docker image according to local flag
2413
# * If local is set, should run locally built image
2514
# * Otherwise pull from dockerhub
@@ -39,7 +28,6 @@ endif
3928
coverage=test/
4029

4130
sw_test_dir = test/
42-
hw_test_dir = src/mase_components/
4331

4432
NUM_WORKERS ?= 1
4533

@@ -48,19 +36,13 @@ sync:
4836
git submodule sync
4937
git submodule update --init --recursive
5038

51-
# Only needed if you are using the MLIR flow - it will be slow!
52-
sync-mlir:
53-
bash mlir-air/utils/github-clone-build-libxaie.sh
54-
bash mlir-air/utils/clone-llvm.sh
55-
bash mlir-air/utils/clone-mlir-aie.sh
56-
5739
# Build Docker container
5840
build-docker:
5941
if [ $(local) -eq 1 ]; then \
6042
if [ ! -d Docker ]; then \
6143
git clone git@github.com:jianyicheng/mase-docker.git Docker; \
6244
fi; \
63-
docker build --build-arg VHLS_PATH=$(vhls) --build-arg VHLS_VERSION=$(vhls_version) -f Docker/Dockerfile-$(PLATFORM) --tag mase-ubuntu2204 Docker; \
45+
docker build -f Docker/Dockerfile-$(PLATFORM) --tag mase-ubuntu2204 Docker; \
6446
else \
6547
docker pull $(img); \
6648
fi
@@ -72,16 +54,8 @@ shell:
7254
-v /$(USER_PREFIX)/$(shell whoami)/.gitconfig:/root/.gitconfig \
7355
-v /$(USER_PREFIX)/$(shell whoami)/.ssh:/root/.ssh \
7456
-v /$(USER_PREFIX)/$(shell whoami)/.mase:/root/.mase:z \
75-
$(DOCKER_RUN_EXTRA_ARGS) \
7657
$(img) /bin/bash
7758

78-
test-hw:
79-
pytest --log-level=DEBUG --verbose \
80-
-n $(NUM_WORKERS) \
81-
--junitxml=hardware_report.xml \
82-
--html=report.html --self-contained-html \
83-
$(hw_test_dir)
84-
8559
test-sw:
8660
pytest --log-level=DEBUG --verbose \
8761
-n $(NUM_WORKERS) \
@@ -92,21 +66,13 @@ test-sw:
9266
--profile --profile-svg \
9367
$(sw_test_dir)
9468

95-
test-all: test-hw test-sw
69+
test-all: test-sw
9670
mkdir -p ./tmp
9771
(cd tmp; python3 ../scripts/test-torch-mlir.py || exit 1)
9872

9973
build:
10074
bash scripts/build-llvm.sh || exit 1
101-
bash scripts/build-mase-hls.sh || exit 1
102-
103-
build-aie:
104-
bash scripts/build-aie.sh || exit 1
105-
bash scripts/build-air.sh || exit 1
10675

10776
clean:
10877
rm -rf llvm
109-
rm -rf aienginev2 mlir-air/build mlir-aie
110-
rm -rf hls/build
111-
rm -rf vck190_air_sysroot
11278
rm -rf tmp mase_output

0 commit comments

Comments
 (0)