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

[DL] Add VGG benchmark. #86

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

45 changes: 45 additions & 0 deletions benchmarks/DeepLearning/Models/VGG-13/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
set(vgg13_TOSA_PIPELINE "builtin.module(func.func(tosa-to-linalg-named),func.func(tosa-to-linalg),func.func(tosa-to-tensor),func.func(tosa-to-arith))")

# Compile MLIR file to object file.
add_custom_command(OUTPUT vgg13-default.o
COMMAND
${LLVM_MLIR_BINARY_DIR}/mlir-opt ${CMAKE_CURRENT_SOURCE_DIR}/vgg13_tosa.mlir
--pass-pipeline="${vgg13_TOSA_PIPELINE}" |
${LLVM_MLIR_BINARY_DIR}/mlir-opt
--test-linalg-transform-patterns="test-generalize-pad-tensor"
--linalg-bufferize
--convert-linalg-to-loops
--func-bufferize
--arith-bufferize
--tensor-bufferize
--finalizing-bufferize
--convert-vector-to-scf
--convert-scf-to-cf
--expand-strided-metadata
--lower-affine
--convert-vector-to-llvm
--memref-expand
--arith-expand
--convert-arith-to-llvm
--finalize-memref-to-llvm
--convert-math-to-llvm
--llvm-request-c-wrappers
--convert-func-to-llvm
--reconcile-unrealized-casts |
${LLVM_MLIR_BINARY_DIR}/mlir-translate --mlir-to-llvmir |
${LLVM_MLIR_BINARY_DIR}/llc -mtriple=${BUDDY_OPT_TRIPLE} -mattr=${BUDDY_OPT_ATTR}
--filetype=obj -o ${CMAKE_CURRENT_BINARY_DIR}/vgg13-default.o
)

add_library(vgg13Default STATIC vgg13-default.o)
set_target_properties(vgg13Default PROPERTIES LINKER_LANGUAGE CXX)

add_executable(vgg13-benchmark Main.cpp VGG13DefaultBenchmark.cpp)
# Link libraries
target_link_directories(vgg13-benchmark PRIVATE ${LLVM_MLIR_LIBRARY_DIR})
target_link_libraries(vgg13-benchmark
vgg13Default
GoogleBenchmark
mlir_c_runner_utils
${OpenCV_LIBS}
)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading