hanchenye-scalehls/samples/machsuite
Hanchen Ye 5e92d8c1d0 [Samples] Add backprop benchmark from machsuite 2022-04-21 15:13:05 -05:00
..
backprop [Samples] Add backprop benchmark from machsuite 2022-04-21 15:13:05 -05:00
README.md [Samples] Add backprop benchmark from machsuite 2022-04-21 15:13:05 -05:00

README.md

backprop benchmark

The source code is slightly changed to make mlir-clang -memref-fullrank work:

  • RELU function is duplicated to RELU_output and RELU_hidden.
  • add_bias_to_activations function is duplicated to add_bias_to_activations_output and add_bias_to_activations_hidden.
$ mlir-clang backprop.c -function=backprop -S -memref-fullrank -raise-scf-to-affine -I /usr/lib/clang/10.0.0/include -O0 -subindex-to-subview  > backprop.mlir
$ scalehls-opt backprop.mlir -scalehls-materialize-reduction -scalehls-func-duplication -fold-memref-subview-ops -canonicalize -scalehls-func-preprocess="top-func=backprop" > tmp.mlir