Comments (4)
Hi @uikilin100 usually the size of the model itself is the best indicator. The amount of working space needed by tensors is usually a lot less than the data required by all the trained parameters.
from android-nn-driver.
Hi @MatteoArm So if I have a model with size 10M, the memory android-nn-driver needed will be 1 * model size, 2 * model size or other proportion of model size?
from android-nn-driver.
Hi @uikilin100 It'll be 1 * model size + working set size + overhead.
In the test cases I've run, the model size is the biggest (can be lots of megabytes) and the working set size is the smallest (generally the size of the biggest intermediate tensor in your net).
The working set size is affected by the Memory Manager for the backend you are using. The NEON and OpenCL backends use Compute Library which provides a pretty efficient memory manager. The Reference backend doesn't optimise memory at all so will produce big working sets.
The OpenCL backend has the biggest overhead due to compiled OpenCL kernels. I've not seen this exceed a few MB even for models with hundreds of layers.
At the end of the day, you just have to run your model and see, as model complexity affects the results.
from android-nn-driver.
Hi @MatthewARM Thanks for the help
I know the best way to know the memory usage is just run the model.
But it's better when we design model, we know how many memory it need in device.
Thanks for the help.
I will close the issue
from android-nn-driver.
Related Issues (20)
- Missed OP HOT 2
- How much memory consumption between 18.03-18.05 and 18.05-18.08? HOT 2
- question about the schedule for the next release HOT 1
- linux boost HOT 3
- If I have a built image, can I manually run the serivce?
- any android device(which is android Q) can apply this? HOT 1
- Task overlapped with armnn delegate HOT 5
- getType always returns CPU HOT 5
- Is libOpenCL an absolute requirement? HOT 2
- Cannot compile android-nn-driver 21.08
- Root access needed? HOT 1
- ARM Android-nn-driver Build Issue
- version 1.4 & AIDL interface for Android 14 HOT 3
- Is this push_back to vector expected? HOT 2
- Mali OpenCL driver integrated into the Android source tree HOT 6
- Problem running driver HOT 3
- Is there a way to use android-nn-driver on existing smartphones? HOT 10
- Questions about Android Q support HOT 2
- About FP16 and FP32 support in 18.08 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-nn-driver.