diff options
author | Louis Verhaard <louis.verhaard@arm.com> | 2020-09-23 10:27:11 +0200 |
---|---|---|
committer | Louis Verhaard <louis.verhaard@arm.com> | 2020-09-23 15:05:21 +0200 |
commit | 9db529a502fa51c5a2b82e1981c4cdfefa3f85d7 (patch) | |
tree | ae50227abaf70dad255e428145d23da7ed0de766 /ethosu/vela/lut.py | |
parent | d8c032d4be2a641946507b63023456312e333cb8 (diff) | |
download | ethos-u-vela-9db529a502fa51c5a2b82e1981c4cdfefa3f85d7.tar.gz |
MLBEDSW-3070: Fix addressing of weights
Assign different equivalence ids to weights with same values but
different compression, to ensure correct addressing.
Signed-off-by: Louis Verhaard <louis.verhaard@arm.com>
Change-Id: I13aabad71520e4f4a78fb2d6a81740bdd4d1256c
Diffstat (limited to 'ethosu/vela/lut.py')
-rw-r--r-- | ethosu/vela/lut.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/ethosu/vela/lut.py b/ethosu/vela/lut.py index e3373ca2..69aa2a0e 100644 --- a/ethosu/vela/lut.py +++ b/ethosu/vela/lut.py @@ -16,26 +16,16 @@ # Description: # Functionality for lookup table support. import uuid -from functools import lru_cache import numpy as np from . import numeric_util from .high_level_command_stream import CommandType from .tensor import create_const_tensor +from .tensor import create_equivalence_id from .tensor import TensorPurpose -@lru_cache(maxsize=None) -def create_equivalence_id(key): - # Generates equivalence_id based on key. - # The DMA optimization of LUT-s assumes that 2 LUT tensors are identical - # if they have the same equivalence_id. - # So for example all created 256-byte tanh LUT tensors should have - # the same equivalence id. - return uuid.uuid4() - - class LUTState: # Tracks which LUT-s are located in SHRAM. def __init__(self): |