Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
38 changes: 15 additions & 23 deletions benchmarks/DeepLearning/Models/Bert/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ add_custom_command(
${LLVM_MLIR_BINARY_DIR}/mlir-opt
-pass-pipeline
"builtin.module(func.func(tosa-to-linalg-named, tosa-to-linalg, tosa-to-tensor, tosa-to-arith), \
empty-tensor-to-alloc-tensor, convert-elementwise-to-linalg, arith-bufferize, \
func.func(linalg-bufferize, tensor-bufferize), func-bufferize)" |
empty-tensor-to-alloc-tensor, convert-elementwise-to-linalg)" |
${LLVM_MLIR_BINARY_DIR}/mlir-opt
-pass-pipeline
"builtin.module(func.func(buffer-deallocation-simplification, convert-linalg-to-loops), \
eliminate-empty-tensors, func.func(llvm-request-c-wrappers), \
convert-math-to-llvm, convert-math-to-libm, convert-scf-to-cf, \
convert-math-to-llvm, convert-math-to-libm, convert-scf-to-cf, convert-cf-to-llvm, \
convert-arith-to-llvm, expand-strided-metadata, finalize-memref-to-llvm, \
convert-func-to-llvm, reconcile-unrealized-casts)" |
${LLVM_MLIR_BINARY_DIR}/mlir-translate -mlir-to-llvmir -o forward_auto_vectorization.ll
Expand All @@ -43,25 +42,21 @@ add_custom_command(
cat ${CMAKE_CURRENT_SOURCE_DIR}/subgraph0.mlir |
sed -e {s/@subgraph0/@subgraph0_auto_vectorization/} |
${BUDDY_MLIR_BINARY_DIR}/buddy-opt
-pass-pipeline "builtin.module(func.func(tosa-to-linalg-named, tosa-to-linalg, tosa-to-tensor, tosa-to-arith), empty-tensor-to-alloc-tensor, convert-elementwise-to-linalg, func-bufferize-dynamic-offset, arith-bufferize, func.func(linalg-bufferize, tensor-bufferize))" |
-pass-pipeline "builtin.module(func.func(tosa-to-linalg-named, tosa-to-linalg, tosa-to-tensor, tosa-to-arith), empty-tensor-to-alloc-tensor, convert-elementwise-to-linalg)" |
${BUDDY_MLIR_BINARY_DIR}/buddy-opt
-convert-elementwise-to-linalg
-func-bufferize-dynamic-offset
-arith-bufferize
-func-bufferize
-tensor-bufferize
-linalg-bufferize
-finalizing-bufferize
-one-shot-bufferize="bufferize-function-boundaries"
-convert-linalg-to-loops
-lower-affine
-convert-scf-to-cf
-convert-cf-to-llvm
-llvm-request-c-wrappers
-convert-math-to-llvm
-convert-math-to-libm
-convert-arith-to-llvm
-convert-func-to-llvm
-expand-strided-metadata
-lower-affine
-finalize-memref-to-llvm
-convert-arith-to-llvm
-reconcile-unrealized-casts |
${LLVM_MLIR_BINARY_DIR}/mlir-translate -mlir-to-llvmir -o subgraph0_auto_vectorization.ll
COMMAND
Expand All @@ -83,13 +78,12 @@ add_custom_command(
${LLVM_MLIR_BINARY_DIR}/mlir-opt
-pass-pipeline
"builtin.module(func.func(tosa-to-linalg-named, tosa-to-linalg, tosa-to-tensor, tosa-to-arith), \
empty-tensor-to-alloc-tensor, convert-elementwise-to-linalg, arith-bufferize, \
func.func(linalg-bufferize, tensor-bufferize), func-bufferize)" |
empty-tensor-to-alloc-tensor, convert-elementwise-to-linalg)" |
${LLVM_MLIR_BINARY_DIR}/mlir-opt
-pass-pipeline
"builtin.module(func.func(buffer-deallocation-simplification, convert-linalg-to-loops), \
eliminate-empty-tensors, func.func(llvm-request-c-wrappers), \
convert-math-to-llvm, convert-math-to-libm, convert-scf-to-cf, \
convert-math-to-llvm, convert-math-to-libm, convert-scf-to-cf, convert-cf-to-llvm, \
convert-arith-to-llvm, expand-strided-metadata, finalize-memref-to-llvm, \
convert-func-to-llvm, reconcile-unrealized-casts)" |
${LLVM_MLIR_BINARY_DIR}/mlir-translate -mlir-to-llvmir -o forward_buddy_vectorization.ll
Expand All @@ -107,28 +101,26 @@ add_custom_command(
cat ${CMAKE_CURRENT_SOURCE_DIR}/subgraph0.mlir |
sed -e {s/@subgraph0/@subgraph0_buddy_vectorization/} |
${BUDDY_MLIR_BINARY_DIR}/buddy-opt
-pass-pipeline "builtin.module(func.func(tosa-to-linalg-named, tosa-to-linalg, tosa-to-tensor, tosa-to-arith), empty-tensor-to-alloc-tensor, convert-elementwise-to-linalg, func-bufferize-dynamic-offset, arith-bufferize, func.func(linalg-bufferize, tensor-bufferize))" |
-pass-pipeline "builtin.module(func.func(tosa-to-linalg-named, tosa-to-linalg, tosa-to-tensor, tosa-to-arith), empty-tensor-to-alloc-tensor, convert-elementwise-to-linalg)" |
${BUDDY_MLIR_BINARY_DIR}/buddy-opt
-convert-elementwise-to-linalg
-func-bufferize-dynamic-offset
-arith-bufferize
-func-bufferize
-tensor-bufferize
-linalg-bufferize
-finalizing-bufferize
-arith-expand
-one-shot-bufferize="bufferize-function-boundaries"
-batchmatmul-optimize
-convert-linalg-to-affine-loops
-lower-affine
-convert-vector-to-scf
-convert-scf-to-cf
-convert-cf-to-llvm
-llvm-request-c-wrappers
-convert-vector-to-llvm
-convert-math-to-llvm
-convert-math-to-libm
-convert-arith-to-llvm
-convert-func-to-llvm
-expand-strided-metadata
-lower-affine
-finalize-memref-to-llvm
-convert-arith-to-llvm
-reconcile-unrealized-casts |
${LLVM_MLIR_BINARY_DIR}/mlir-translate -mlir-to-llvmir -o subgraph0_buddy_vectorization.ll
COMMAND
Expand Down
80 changes: 37 additions & 43 deletions benchmarks/DeepLearning/Models/LeNet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ add_custom_command(
${BUDDY_MLIR_BINARY_DIR}/buddy-opt
-pass-pipeline
"builtin.module(func.func(tosa-to-linalg-named, tosa-to-linalg, tosa-to-tensor, tosa-to-arith), \
empty-tensor-to-alloc-tensor, convert-elementwise-to-linalg, arith-bufferize, \
func.func(linalg-bufferize, tensor-bufferize), func-bufferize)" |
empty-tensor-to-alloc-tensor, convert-elementwise-to-linalg)" |
${BUDDY_MLIR_BINARY_DIR}/buddy-opt
-pass-pipeline
"builtin.module(func.func(buffer-deallocation-simplification, convert-linalg-to-loops), \
Expand Down Expand Up @@ -47,24 +46,23 @@ add_custom_command(
-pass-pipeline
"builtin.module(func.func(tosa-to-linalg-named, tosa-to-arith, tosa-to-linalg, tosa-to-tensor))" |
${BUDDY_MLIR_BINARY_DIR}/buddy-opt
-convert-elementwise-to-linalg
-func-bufferize-dynamic-offset
-arith-bufferize
-func-bufferize
-tensor-bufferize
-linalg-bufferize
-finalizing-bufferize
-convert-linalg-to-loops
-lower-affine
-convert-scf-to-cf
-llvm-request-c-wrappers
-convert-math-to-llvm
-convert-math-to-libm
-convert-arith-to-llvm
-convert-func-to-llvm
-expand-strided-metadata
-finalize-memref-to-llvm
-reconcile-unrealized-casts |
-eliminate-empty-tensors
-convert-tensor-to-linalg
-one-shot-bufferize="bufferize-function-boundaries"
-convert-linalg-to-affine-loops
-func-bufferize-dynamic-offset
-convert-vector-to-scf
-expand-strided-metadata
-lower-affine
-convert-vector-to-llvm
-convert-arith-to-llvm
-finalize-memref-to-llvm
-convert-scf-to-cf
-convert-cf-to-llvm
-llvm-request-c-wrappers
-convert-arith-to-llvm
-convert-func-to-llvm
-reconcile-unrealized-casts |
${LLVM_MLIR_BINARY_DIR}/mlir-translate -mlir-to-llvmir -o subgraph0_auto_vectorization.ll
COMMAND
${LLVM_MLIR_BINARY_DIR}/clang -O3 ${CLANG_FLAGS_LIST} subgraph0_auto_vectorization.ll
Expand All @@ -85,8 +83,7 @@ add_custom_command(
${BUDDY_MLIR_BINARY_DIR}/buddy-opt
-pass-pipeline
"builtin.module(func.func(tosa-to-linalg-named, tosa-to-linalg, tosa-to-tensor, tosa-to-arith), \
empty-tensor-to-alloc-tensor, convert-elementwise-to-linalg, arith-bufferize, \
func.func(linalg-bufferize, tensor-bufferize), func-bufferize)" |
empty-tensor-to-alloc-tensor, convert-elementwise-to-linalg)" |
${BUDDY_MLIR_BINARY_DIR}/buddy-opt
-pass-pipeline
"builtin.module(func.func(buffer-deallocation-simplification, convert-linalg-to-loops), \
Expand All @@ -113,27 +110,24 @@ add_custom_command(
-pass-pipeline
"builtin.module(func.func(tosa-to-linalg-named, tosa-to-arith, tosa-to-linalg, tosa-to-tensor))" |
${BUDDY_MLIR_BINARY_DIR}/buddy-opt
-convert-elementwise-to-linalg
-func-bufferize-dynamic-offset
-arith-bufferize
-func-bufferize
-tensor-bufferize
-linalg-bufferize
-finalizing-bufferize
-batchmatmul-optimize
-convert-linalg-to-affine-loops
-lower-affine
-convert-vector-to-scf
-convert-scf-to-cf
-llvm-request-c-wrappers
-convert-vector-to-llvm
-convert-math-to-llvm
-convert-math-to-libm
-convert-arith-to-llvm
-convert-func-to-llvm
-expand-strided-metadata
-finalize-memref-to-llvm
-reconcile-unrealized-casts |
-eliminate-empty-tensors
-convert-tensor-to-linalg
-one-shot-bufferize="bufferize-function-boundaries"
-batchmatmul-optimize
-convert-linalg-to-affine-loops
-func-bufferize-dynamic-offset
-convert-vector-to-scf
-expand-strided-metadata
-lower-affine
-convert-vector-to-llvm
-convert-arith-to-llvm
-finalize-memref-to-llvm
-convert-scf-to-cf
-convert-cf-to-llvm
-llvm-request-c-wrappers
-convert-arith-to-llvm
-convert-func-to-llvm
-reconcile-unrealized-casts |
${LLVM_MLIR_BINARY_DIR}/mlir-translate -mlir-to-llvmir -o subgraph0_buddy_vectorization.ll
COMMAND ${LLVM_MLIR_BINARY_DIR}/clang -O3 ${CLANG_FLAGS_LIST} subgraph0_buddy_vectorization.ll
-c -save-temps -o ${CMAKE_CURRENT_BINARY_DIR}/subgraph0_buddy_vectorization.o
Expand Down
18 changes: 6 additions & 12 deletions benchmarks/DeepLearning/Models/MobileNet-V3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,15 @@ add_custom_command(
-linalg-named-op-conversion
-convert-math-to-llvm
-convert-math-to-libm
-one-shot-bufferize
-one-shot-bufferize="bufferize-function-boundaries"
-convert-linalg-to-affine-loops
-lower-affine
-func-bufferize
-tensor-bufferize
-arith-bufferize
-finalizing-bufferize
-convert-vector-to-scf
-expand-strided-metadata
-lower-affine
-convert-vector-to-llvm
-finalize-memref-to-llvm
-convert-scf-to-cf
-convert-cf-to-llvm
-llvm-request-c-wrappers
-convert-arith-to-llvm
-convert-func-to-llvm
Expand Down Expand Up @@ -132,20 +129,17 @@ add_custom_command(
-linalg-named-op-conversion
-convert-math-to-llvm
-convert-math-to-libm
-one-shot-bufferize
-one-shot-bufferize="bufferize-function-boundaries"
-conv-nhwc-fhwc-optimize # conv-nhwc-fhwc optimization
-depthwise-conv-nhwc-hwc-optimize # depthwise-conv-nhwc-hwc optimization
-convert-linalg-to-affine-loops
-lower-affine
-func-bufferize
-tensor-bufferize
-arith-bufferize
-finalizing-bufferize
-convert-vector-to-scf
-expand-strided-metadata
-lower-affine
-convert-vector-to-llvm
-finalize-memref-to-llvm
-convert-scf-to-cf
-convert-cf-to-llvm
-llvm-request-c-wrappers
-convert-arith-to-llvm
-convert-func-to-llvm
Expand Down
35 changes: 13 additions & 22 deletions benchmarks/DeepLearning/Models/Resnet18/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ add_custom_command(
${LLVM_MLIR_BINARY_DIR}/mlir-opt
-pass-pipeline
"builtin.module(func.func(tosa-to-linalg-named, tosa-to-linalg, tosa-to-tensor, tosa-to-arith), \
empty-tensor-to-alloc-tensor, convert-elementwise-to-linalg, arith-bufferize, \
func.func(linalg-bufferize, tensor-bufferize), func-bufferize)" |
empty-tensor-to-alloc-tensor, convert-elementwise-to-linalg)" |
${LLVM_MLIR_BINARY_DIR}/mlir-opt
-pass-pipeline
"builtin.module(func.func(buffer-deallocation-simplification, convert-linalg-to-loops), \
eliminate-empty-tensors, func.func(llvm-request-c-wrappers), \
convert-math-to-llvm, convert-math-to-libm, convert-scf-to-cf, \
convert-math-to-llvm, convert-math-to-libm, convert-scf-to-cf, convert-cf-to-llvm, \
convert-arith-to-llvm, expand-strided-metadata, finalize-memref-to-llvm, \
convert-func-to-llvm, reconcile-unrealized-casts)" |
${LLVM_MLIR_BINARY_DIR}/mlir-translate -mlir-to-llvmir -o forward_auto_vectorization.ll
Expand All @@ -47,21 +46,18 @@ add_custom_command(
"builtin.module(func.func(tosa-to-linalg-named),func.func(tosa-to-linalg),func.func(tosa-to-tensor),func.func(tosa-to-arith))" |
${BUDDY_MLIR_BINARY_DIR}/buddy-opt
-convert-elementwise-to-linalg
-one-shot-bufferize="bufferize-function-boundaries"
-func-bufferize-dynamic-offset
-arith-bufferize
-func-bufferize
-tensor-bufferize
-linalg-bufferize
-finalizing-bufferize
-convert-linalg-to-loops
-lower-affine
-convert-scf-to-cf
-convert-cf-to-llvm
-expand-strided-metadata
-lower-affine
-llvm-request-c-wrappers
-convert-arith-to-llvm
-convert-math-to-llvm
-convert-math-to-libm
-convert-arith-to-llvm
-convert-func-to-llvm
-expand-strided-metadata
-finalize-memref-to-llvm
-reconcile-unrealized-casts |
${LLVM_MLIR_BINARY_DIR}/mlir-translate -mlir-to-llvmir -o subgraph0_auto_vectorization.ll
Expand All @@ -84,13 +80,12 @@ add_custom_command(
${LLVM_MLIR_BINARY_DIR}/mlir-opt
-pass-pipeline
"builtin.module(func.func(tosa-to-linalg-named, tosa-to-linalg, tosa-to-tensor, tosa-to-arith), \
empty-tensor-to-alloc-tensor, convert-elementwise-to-linalg, arith-bufferize, \
func.func(linalg-bufferize, tensor-bufferize), func-bufferize)" |
empty-tensor-to-alloc-tensor, convert-elementwise-to-linalg)" |
${LLVM_MLIR_BINARY_DIR}/mlir-opt
-pass-pipeline
"builtin.module(func.func(buffer-deallocation-simplification, convert-linalg-to-loops), \
eliminate-empty-tensors, func.func(llvm-request-c-wrappers), \
convert-math-to-llvm, convert-math-to-libm, convert-scf-to-cf, \
convert-math-to-llvm, convert-math-to-libm, convert-scf-to-cf, convert-cf-to-llvm,\
convert-arith-to-llvm, expand-strided-metadata, finalize-memref-to-llvm, \
convert-func-to-llvm, reconcile-unrealized-casts)" |
${LLVM_MLIR_BINARY_DIR}/mlir-translate -mlir-to-llvmir -o forward_buddy_vectorization.ll
Expand All @@ -113,24 +108,20 @@ add_custom_command(
"builtin.module(func.func(tosa-to-linalg-named),func.func(tosa-to-linalg),func.func(tosa-to-tensor),func.func(tosa-to-arith))" |
${BUDDY_MLIR_BINARY_DIR}/buddy-opt
-convert-elementwise-to-linalg
-func-bufferize-dynamic-offset
-arith-bufferize
-func-bufferize
-tensor-bufferize
-linalg-bufferize
-finalizing-bufferize
-one-shot-bufferize="bufferize-function-boundaries"
-batchmatmul-optimize
-convert-linalg-to-affine-loops
-expand-strided-metadata
-lower-affine
-convert-vector-to-scf
-convert-scf-to-cf
-convert-cf-to-llvm
-llvm-request-c-wrappers
-convert-vector-to-llvm
-convert-arith-to-llvm
-convert-math-to-llvm
-convert-math-to-libm
-convert-arith-to-llvm
-convert-func-to-llvm
-expand-strided-metadata
-finalize-memref-to-llvm
-reconcile-unrealized-casts |
${LLVM_MLIR_BINARY_DIR}/mlir-translate -mlir-to-llvmir -o subgraph0_buddy_vectorization.ll
Expand Down
Loading