-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
50 lines (40 loc) · 1.42 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
user=$(if $(shell id -u),$(shell id -u),9001)
group=$(if $(shell id -g),$(shell id -g),1000)
phism=/workspace
vhls=/tools/Xilinx/2020.2
th=1
example=2mm
# Build Phism
build-docker: test-docker
docker run -it -v $(shell pwd):/workspace -v $(vhls):$(vhls) phism8:latest /bin/bash \
-c "make build-phism"
echo "Phism has been installed successfully!"
# Build docker container
test-docker:
(cd Docker; docker build --build-arg UID=$(user) --build-arg GID=$(group) --build-arg VHLS_PATH=$(vhls) . --tag phism8)
# Enter docker container
shell:
docker run -it -v $(shell pwd):/workspace -v $(vhls):$(vhls) phism8:latest /bin/bash
test-example:
python3 scripts/pb-flow.py ./example/polybench -e $(example) --work-dir ./tmp/phism/pb-flow.tmp --cosim
# Evaluate polybench (baseline) - need to be used in environment
test-polybench:
python3 scripts/pb-flow.py -c -j $(th) example/polybench
# Evaluate polybench (polymer) - need to be used in environment
test-polybench-polymer:
python3 scripts/pb-flow.py -c -p -j $(th) example/polybench
# Build LLVM and Phism - temporary fix for missing mlir-clang
build-phism:
./scripts/build-llvm.sh
./scripts/build-polygeist.sh
(cd ./polygeist/build; make mlir-clang)
./scripts/build-polymer.sh
./scripts/build-phism.sh
# Sync and update submodules
sync:
git submodule sync
git submodule update --init --recursive
clean: clean-phism
rm -rf $(phism)/llvm/build
clean-phism:
rm -rf $(phism)/build