diff options
author | Louis Verhaard <louis.verhaard@arm.com> | 2020-05-07 08:12:58 +0200 |
---|---|---|
committer | Tim Hall <tim.hall@arm.com> | 2020-06-18 17:53:52 +0100 |
commit | 3c07c97e0202c1cf01eba06c24b37a8f15ff7a7c (patch) | |
tree | 5856b7727a99b3c0baa00f5486f0c3b53e8e38e6 /ethosu/vela/nn_graph.py | |
parent | 86d49935c3736c7aaa419abda07fa20c37c991a8 (diff) | |
download | ethos-u-vela-3c07c97e0202c1cf01eba06c24b37a8f15ff7a7c.tar.gz |
MLBEDSW-1941: Bug fix shared weights
If same weight tensor was used with different block configs,
errors would occur.
Fixed by always cloning weight tensors, using a global weight
compression cache and modifying the linear allocator to
detect multiple usage of same weight compression.
Change-Id: I91ca59176e1c59c66e0ac7a4227f2b5f0b47053f
Signed-off-by: Louis Verhaard <louis.verhaard@arm.com>
Diffstat (limited to 'ethosu/vela/nn_graph.py')
-rw-r--r-- | ethosu/vela/nn_graph.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ethosu/vela/nn_graph.py b/ethosu/vela/nn_graph.py index ed2ab322..ea35c087 100644 --- a/ethosu/vela/nn_graph.py +++ b/ethosu/vela/nn_graph.py @@ -485,6 +485,7 @@ class Graph: self.bits_per_element = {} self.total_size = {} self.total_elements = {} + self.weight_cache = None # See CompressedWeightCache def get_root_subgraph(self): return self.subgraphs[0] |