[DeepLearning/Models] add MobileNet-V3 Model benchmark#131
Conversation
| ## Configure the buddy-benchmark build. | ||
| ## | ||
| ##===----------------------------------------------------------------------===// | ||
| # #===- CMakeLists.txt - buddy-benchmark cmake root ------------*- cmake -*-===// |
There was a problem hiding this comment.
Please do not modify the format.
| 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.
BUDDY_DEEP_LEARNING_DIR -> BUDDY_BENCHMARK_DEEP_LEARNING_DIR
|
|
||
| # model mlir file | ||
| forward.mlir | ||
| subgraph0.mlir No newline at end of file |
There was a problem hiding this comment.
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.
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.
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.
buddy-mobilenetv3-import.py -> buddy_mobilenetv3_import.py
There was a problem hiding this comment.
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. |
zhanghb97
left a comment
There was a problem hiding this comment.
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.
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.
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.
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.
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.




k230:

local:
