Comments (5)
I made some investigations through the subgraph and arena_planner, and found that tflite does not provide no an such interface for the moment. I managed to use interpreter->SetCustomAllocationForTensor
to mount an external allocated memory to each tensor. This is a technical viable approach, but in this case we loose the efficiency of memory usage provided by arena_planner. The amount memory we needed to provide externally is 2x to 4x, which does not make practical sense.
A more intelligent solution could be to make arena_planner use a memory pool provided externally. This could help to greatly alleviate the memory fragmentation problem, when we need to load and off-load different models frequently. This involves some modifications to arena.
For the moment I would think that the issue being closed. Probably we could contribute with PR when it is done from our side.
Thank you.
from tensorflow.
@captainst TensorFlow Lite (TFLite) doesn't have a built-in mechanism to directly share memory between different models loaded in separate interpreters. Model quantization is the recommended approach for this issue, kindly refer to this guide.
Thank you!
from tensorflow.
@captainst TensorFlow Lite (TFLite) doesn't have a built-in mechanism to directly share memory between different models loaded in separate interpreters. Model quantization is the recommended approach for this issue, kindly refer to this guide. Thank you!
Thank you! I only need to load one model at a time. So I don't need separate interpreters. Since all the models are of the same structure, I want to use one interpreter to serve all the models, one at a time. If I could find a way to manipulate the weights and quant params inside each tensor.
I'll do some further experiments to see. Thank you again.
from tensorflow.
@captainst Is there any update on this issue?
Thank you!
from tensorflow.
Are you satisfied with the resolution of your issue?
Yes
No
from tensorflow.
Related Issues (20)
- [TFLite] TfLiteInterpreterInvoke has memory leak and increasing duration time HOT 4
- Stable Gradient for BinaryFocalCrossEntropy HOT 2
- Strange issue File already exists in database HOT 4
- bucketize -function wrong results on GPU HOT 2
- Tensorflow build without boringssl on Power architecture HOT 2
- Model works in tensorflow 2.15 perfectly but unable to import the model in tensorflow 2.16! HOT 4
- TFLite: Stable Delegate: C++ Example HOT 6
- TensorFlow v2.12.0 Not Supporting GPU on Ubuntu 22.04 with CUDA 12.4 and cuDNN 9.0 HOT 2
- Unable to use tf and its modules including keras and etc, where the tensorflow==2.15.1 and keras==2.15.0 HOT 5
- Relu activation in TF Lite model return the negative values HOT 7
- LSTM model conversion failed from 'from_keras_model' HOT 3
- C-API support for .keras models HOT 4
- tfm.nlp.layers.RelativePositionEmbedding HOT 2
- Document tf.Dataset.zip/map triggers tf.Dataset.shuffle HOT 1
- Data Service Dynamic sharding policy seems extremely slow HOT 11
- ModuleNotFoundError: No module named 'tflite_support.task' HOT 3
- Notebook is not working anymore HOT 3
- Kubernetes cluster resolver fails when running from within a K8S cluster.
- Tried multiple builds, Bazel, pip, file. non of it is working HOT 5
- tensorflow uninstallable HOT 1
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 tensorflow.