Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added test bench generation tcl as a LLVM pass #18

Merged
merged 45 commits into from
Sep 16, 2021
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
d596f87
Added memory partitioning pragma for Vitis HLS LLVM
Sep 9, 2021
f7830a6
Added test bench generation tcl as a LLVM pass
Sep 11, 2021
f0d9ac1
Merge branch 'main' into array-partition
Sep 11, 2021
94c59b9
Merge github.com:kumasento/phism into array-partition
Sep 11, 2021
bf26762
Added pragma insertion for array partitioning
Sep 11, 2021
8a48cb3
Merge branch 'array-partition' of github.com:kumasento/phism into arr…
Sep 11, 2021
41ff64a
Merge branch 'array-partition' of github.com:kumasento/phism into tcl…
Sep 11, 2021
3bae263
Removed unsupported func attr by vhls
Sep 11, 2021
d142403
Replaced tb tclgen script with llvm pass
Sep 11, 2021
a588851
Fixed a typo
Sep 11, 2021
d35cd06
Restored original tbgen in comments
Sep 11, 2021
79dd9d4
Removed assertion for debugging
Sep 11, 2021
98ad46e
Merge branch 'main' into tcl-gen
Sep 11, 2021
cc84f5e
Switch off -xlnarraypartition if such flag is OFF
kumasento Sep 11, 2021
8b62875
Fixed an issue with removing tile.size
kumasento Sep 11, 2021
47476c2
Fixed unit tests
kumasento Sep 11, 2021
5cad4cb
Resurrected the unittest workflow
kumasento Sep 11, 2021
53695c1
Just build-phism in the workflow
kumasento Sep 11, 2021
3373cb6
Array partition unit test simple cases
kumasento Sep 11, 2021
0cddf96
Fixed an issue with the loop bounds
kumasento Sep 12, 2021
01d5802
Rewrite modulo operations
kumasento Sep 12, 2021
959c4cf
Further simplifies GEP expressions
kumasento Sep 12, 2021
5c324db
Added loop naming and flattening pass
Sep 12, 2021
72ca07a
Remove loop flattening which stops loop merging
Sep 12, 2021
f5e0022
An issue with GEP optimisation
kumasento Sep 12, 2021
7799a10
Loop redistribution pass
kumasento Sep 13, 2021
bb2fa60
Loop merge pass
kumasento Sep 13, 2021
290dad7
Loop redis unit tests
kumasento Sep 13, 2021
49952cc
Added unit tests for loop merge
kumasento Sep 13, 2021
85d162d
Makes pb-flow stabler
kumasento Sep 13, 2021
653e1f9
Improved pb-flow and unit tests
kumasento Sep 13, 2021
be955f0
Fixed issues with array partition
kumasento Sep 13, 2021
52012af
Try to restore cache and don't run test
kumasento Sep 13, 2021
e5dd691
Don't cmake if it has been built
kumasento Sep 13, 2021
7fb1e03
Further reduce the chance of cmake runs
kumasento Sep 13, 2021
06fa175
Temporarily removed the python interface
kumasento Sep 13, 2021
451d2c5
Try self-hosted
kumasento Sep 13, 2021
0d5f894
Added back the python test bits
kumasento Sep 13, 2021
9971bb0
Demystifying the python script execution in workflow
kumasento Sep 13, 2021
c15c941
Changes in address calc and inline
kumasento Sep 14, 2021
e69f0e4
Don't inline in MLIR
kumasento Sep 14, 2021
83ef380
Fixed array partitioning issue for mvt
kumasento Sep 14, 2021
162958d
Fixed an issue with the array partitioning
kumasento Sep 15, 2021
81a6006
Added cosim run command
kumasento Sep 16, 2021
5cebe31
Improved logging
kumasento Sep 16, 2021
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
77 changes: 77 additions & 0 deletions .github/workflows/buildAndTest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# This is a basic workflow to help you get started with Actions
name: Build and Test
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on: [push, pull_request]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Build Phism and run its tests.
build-phism:
name: Build and Test Phism
runs-on: self-hosted
steps:
# - name: Configure Environment
# run: echo "${GITHUB_WORKSPACE}/llvm/install/bin" >> $GITHUB_PATH
# Disabled for self-hosted
# - name: Get dependences
# run: |
# sudo apt-get update -y
# sudo apt-get install -y build-essential libtool autoconf pkg-config flex bison libgmp-dev clang-9 libclang-9-dev texinfo python3
# - name: Update the LLVM/Clang version to 9
# run: |
# sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-9 100
# sudo update-alternatives --install /usr/bin/FileCheck FileCheck /usr/bin/FileCheck-9 100


# Clone the Phism repo and its submodules. Do shallow clone to save clone
# time.
- name: Get Phism
uses: actions/checkout@v2
with:
submodules: "true"

# --------
# Restore LLVM from cache and build if it's not in there.
# --------
# Extract the LLVM submodule hash for use in the cache key.
- name: Get LLVM Hash
id: get-llvm-hash
run: echo "::set-output name=hash::$(git rev-parse @:./llvm)"
shell: bash
# Try to fetch LLVM from the cache.
- name: Cache LLVM
id: cache-llvm
uses: actions/cache@v2
with:
path: llvm/build
key: ${{ runner.os }}-llvm-${{ steps.get-llvm-hash.outputs.hash }}
# Build LLVM if we didn't hit in the cache. Even though we build it in
# the previous job, there is a low chance that it'll have been evicted by
# the time we get here.
# Need to delete the test directory to avoid caching them.
- name: Rebuild and Install LLVM
if: steps.cache-llvm.outputs.cache-hit != 'true'
run: |
./scripts/build-llvm.sh ci
rm -rf ./llvm/build/test
# --------
# Build and test Phism in both debug and release mode.
# --------
- name: Build and Test Phism (Assert)
run: |
./scripts/build-phism.sh ci

# Build and test Phism with pb-flow.
- name: Build and Test Phism (pb-flow)
run: |
python3 -m venv env
source env/bin/activate
which python3
python3 -m pip install -r requirements.txt
python3 ./scripts/pb-flow.py ./example/polybench --dataset SMALL --skip-vitis
python3 ./scripts/pb-flow.py ./example/polybench --dataset SMALL --polymer --skip-vitis
python3 ./scripts/pb-flow.py ./example/polybench --dataset SMALL --polymer --loop-transforms --skip-vitis
python3 ./scripts/pb-flow.py ./example/polybench --dataset SMALL --polymer --loop-transforms --array-partition --skip-vitis



10 changes: 10 additions & 0 deletions include/phism/mlir/Transforms/Utils.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//===- Utils.h - Utility functions ------------------ C++-===//

#include "mlir/IR/BuiltinOps.h"

namespace phism {

/// Get the top function for the hardware design.
mlir::FuncOp getTopFunction(mlir::ModuleOp m);

} // namespace phism
Loading