-
Notifications
You must be signed in to change notification settings - Fork 43
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
[DeepLearning/Models] add MobileNet-V3 Model benchmark #131
Conversation
CMakeLists.txt
Outdated
## Configure the buddy-benchmark build. | ||
## | ||
##===----------------------------------------------------------------------===// | ||
# #===- CMakeLists.txt - buddy-benchmark cmake root ------------*- cmake -*-===// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not modify the format.
CMakeLists.txt
Outdated
# BUDDY project. | ||
set(BUDDY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) | ||
set(BUDDY_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin) | ||
set(BUDDY_EXAMPLES_DIR ${BUDDY_SOURCE_DIR}/examples) | ||
set(BUDDY_MLIR_BINARY_DIR ${BUDDY_MLIR_BUILD_DIR}/bin) | ||
set(BUDDY_DEEP_LEARNING_DIR ${BUDDY_SOURCE_DIR}/benchmarks/DeepLearning) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BUDDY_DEEP_LEARNING_DIR
-> BUDDY_BENCHMARK_DEEP_LEARNING_DIR
|
||
# model mlir file | ||
forward.mlir | ||
subgraph0.mlir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add an empty line here.
MemRef<long long, 1> ParamsContainerInt64({34}); | ||
loadParameters(paramsDir, intDir, paramsContainerf32, ParamsContainerInt64); | ||
for (auto _ : state) { | ||
_mlir_ciface_forward(&output, ¶msContainerf32, &ParamsContainerInt64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark should only evaluate the forward function.
MemRef<long long, 1> ParamsContainerInt64({34}); | ||
loadParameters(paramsDir, intDir, paramsContainerf32, ParamsContainerInt64); | ||
|
||
// Call the forward function of the model. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that the benchmark did not clarify these two functions, i.e., scalar vs auto-vectorization
@@ -0,0 +1,78 @@ | |||
# ===- buddy-mobilenetv3-import.py --------------------------------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buddy-mobilenetv3-import.py
-> buddy_mobilenetv3_import.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will use random values as the fake input, so we do not need the following images.
MobileNet-V3 benchmark on local hardware platform is upated. But, build mobileNet-V3 benchmark lib on RV platform has some errors about LLVM.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OSError: The environment variable 'MOBILENETV3_MODEL_PATH' is not set or is invalid.
|
set(BUDDY_OPT_TRIPLE riscv64) | ||
set(BUDDY_OPT_ATTR +v,+m) | ||
set(BUDDY_MLIR_CROSS_LIB_DIR ${BUDDY_MLIR_BUILD_CROSS_DIR}/lib) | ||
else() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMake bug!
Please include BUDDY_OPT_TRIPLE
and BUDDY_OPT_ATTR
for local machine in the else
branch.
) | ||
|
||
add_custom_command( | ||
OUTPUT forward_autoVectorization.o |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird naming convention.
forward_autoVectorization
-> forward_auto_vectorization
@@ -1,5 +1,12 @@ | |||
# Deep Learning Benchmark | |||
|
|||
## Model Level Benchmark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the statement for Python (using model-level benchmark needs the Python environment), e.g., enter the Python environment, configure the Python path, etc.
@@ -0,0 +1,49 @@ | |||
# Buddy Compiler MobileNetV3 Benchmark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s not make the READMEs too scattered. Remove this file and add the necessary information (python env and path) to the deep learning benchmark README.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
k230:
local: