Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
228d90276-1
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
228d90276-1
Commits
cf09e676
Commit
cf09e676
authored
3 years ago
by
zhanghb97
Browse files
Options
Downloads
Patches
Plain Diff
[Docs] Add deep learning benchmark document.
parent
455fd2d1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/DeepLearningBenchmark.md
+45
-0
45 additions, 0 deletions
docs/DeepLearningBenchmark.md
with
45 additions
and
0 deletions
docs/DeepLearningBenchmark.md
0 → 100644
+
45
−
0
View file @
cf09e676
# Deep Learning Benchmark
The deep learning benchmark aims to evaluate models, layers, and operations from different frameworks.
Currently, we support model evaluation, and the layers and operations parts are working in progress.
## Models
### MobileNet (IREE -> MLIR Core -> MLIR Toolchain)
This code generation road depends on different frameworks (i.e., IREE and TensorFlow), which are difficult to automate.
We thus provide a model source code generated from IREE and perform the preprocessing.
The following is the process of generating code.
**1. Build IREE and dependencies**
-
Build IREE.
[
steps
](
https://google.github.io/iree/building-from-source/getting-started/
)
-
Build python bindings and importers.
[
steps
](
https://google.github.io/iree/building-from-source/python-bindings-and-importers/
)
-
Check the tools:
-
`iree/integrations/tensorflow/bazel-bin/iree_tf_compiler/iree-import-tf`
-
`iree-build/iree/tools/iree-opt`
**2. Prepare the model**
-
Download model from TensorFlow Hub.
[
link
](
https://hub.tensorflow.google.cn/google/tf2-preview/mobilenet_v2/classification/4
)
-
Add signature in mode.
[
steps
](
https://google.github.io/iree/ml-frameworks/tensorflow/#missing-serving-signature-in-savedmodel
)
**3. Generate mlir file and preprocess**
-
Generate mlir file.
```
<iree-import-tf> -tf-import-type=savedmodel_v1 -tf-savedmodel-exported-names=predict </path/to/mobilenet/> -o <generated file>
```
-
Lower to MLIR core abstraction.
```
<iree-opt> --iree-util-fold-globals <generated file> -o <output file>
```
-
Preprocess
First of all, erase the
`predict`
function in the output file.
And then, rename the
`predict__ireesm`
function and remove the attribute of the function.
Now you can get the final model file.
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment