diff options
author | Tim Hall <tim.hall@arm.com> | 2021-06-08 21:25:57 +0100 |
---|---|---|
committer | Tim Hall <tim.hall@arm.com> | 2021-06-08 21:25:57 +0100 |
commit | d784af7e8995a10fb403157af48371699c35bbfe (patch) | |
tree | bf40b35b030d560049cef9411293b51e3d70ff4a /ethosu/vela/tensor_allocation.py | |
parent | 225e19d3640288e991475ee4c49cb3ffd83cc83b (diff) | |
download | ethos-u-vela-d784af7e8995a10fb403157af48371699c35bbfe.tar.gz |
MLBEDSW-4602: Fix Deepspeech scale & bias reuse issue.
- Deepspeech reuses identical weights and biases throughout
the network. Since biases are now interleaved with weights
there is a scaling issue when the ifm scales differ between
operations using the same weight and scale tensor.
- This commit uses interleaved weights/scales on their first use
but separates scales to source memory on subsequent use (if
the ifm scale is different).
Signed-off-by: Tim Hall <tim.hall@arm.com>
Change-Id: I7aae163438160a919cae04e235966e75355a6148
Diffstat (limited to 'ethosu/vela/tensor_allocation.py')
-rw-r--r-- | ethosu/vela/tensor_allocation.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ethosu/vela/tensor_allocation.py b/ethosu/vela/tensor_allocation.py index d3e2a037..4b5e5e42 100644 --- a/ethosu/vela/tensor_allocation.py +++ b/ethosu/vela/tensor_allocation.py @@ -49,6 +49,7 @@ def linear_allocate_live_ranges(live_ranges, alloc_granularity=Tensor.Allocation if tens.weight_compression_config is not None: for allocated_tens in allocated_tensors: if allocated_tens.weight_compression_config == tens.weight_compression_config: + assert allocated_tens.scale_compression_config == tens.scale_compression_config address = allocated_tens.address break if tens.purpose == TensorPurpose.LUT: |