Go to file
Hanchen Ye f3c40918e3 [HLSCppDialect] add array operations, and corresponding modification in HLSCppEmitter, ConverToHLSCpp 2020-10-05 23:26:42 -05:00
config remove global dialect registration; update file structure 2020-09-23 14:10:34 -05:00
include [HLSCppDialect] add array operations, and corresponding modification in HLSCppEmitter, ConverToHLSCpp 2020-10-05 23:26:42 -05:00
lib [HLSCppDialect] add array operations, and corresponding modification in HLSCppEmitter, ConverToHLSCpp 2020-10-05 23:26:42 -05:00
samples [SAMPLES] conv2d, maxpool2d, mnist samples emittable 2020-09-24 15:04:59 -05:00
test [HLSCppDialect] add array operations, and corresponding modification in HLSCppEmitter, ConverToHLSCpp 2020-10-05 23:26:42 -05:00
tools [QoREstimation] move this pass to Analysis directory 2020-09-24 15:18:34 -05:00
.clang-format mechanical rename hlsld to scalehls; update file structure 2020-09-06 18:05:16 -05:00
.gitignore build code structure; update readme; remove pymlir directory 2020-08-25 14:11:30 -05:00
CMakeLists.txt change lit report style 2020-09-14 19:56:06 -05:00
README.md [HLSCppDialect] use enum to update attributes definition; enhance pragma operations to support bind_storage, partition, and interface; [HLSCppEmitter] support all enhanced pragma operations 2020-10-04 20:14:22 -05:00

README.md

ScaleHLS Project (scalehls)

This project aims to create a framework that ultimately converts an algorithm written in a high level language into an efficient hardware implementation. With multiple levels of intermediate representations (IRs), MLIR appears to be the ideal tool for exploring ways to optimize the eventual design at various levels of abstraction (e.g. various levels of parallelism). Our framework will be based on MLIR, it will incorporate a backend for high level synthesis (HLS) C/C++ code. However, the key contribution will be our parametrization and optimization of a tremendously large design space.

Quick Start

This setup assumes that you have built LLVM and MLIR in $LLVM_BUILD_DIR and this repository is cloned to $SCALEHLS_DIR. To build and launch the tests, run

mkdir $SCALEHLS_DIR/build
cd $SCALEHLS_DIR/build
cmake -G Ninja .. -DMLIR_DIR=$LLVM_BUILD_DIR/lib/cmake/mlir -DLLVM_DIR=$LLVM_BUILD_DIR/build/lib/cmake/llvm -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_BUILD_TYPE=DEBUG
cmake --build . --target check-scalehls
export PATH=$SCALEHLS_DIR/build/bin:$PATH

After the installation and test successfully completed, you should be able to run

cd $SCALEHLS_DIR
scalehls-opt -convert-to-hlscpp test/Conversion/ConvertToHLSCpp/test_*.mlir
scalehls-opt -convert-to-hlscpp test/EmitHLSCpp/test_*.mlir | scalehls-translate -emit-hlscpp

TODOs List

HLSCpp Dialect

  1. Verifiers for pragma operations.

QoREstimation Pass

  1. Implement comprehensive partition-aware II analysis.
  2. Consider the case of flattened inner loop under a pipelined region.
  3. Support read latency from profiling data.
  4. Support operation chainning.

PragmaDSE Pass

EmitHLSCpp

  1. Emitting array_pragma operation.
  2. Support AffineFor iter_args feature.
  3. TODOs in EmitHLSCpp.cpp.
  4. Support memref/tensor cast/view/subview operations.
  5. Support atomic/complex/extention -related operations.

References

  1. MLIR Documents
  2. mlir-npcomp github
  3. onnx-mlir github
  4. circt github
  5. comba github
  6. dahlia github