aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/lut.py
diff options
context:
space:
mode:
authorLouis Verhaard <louis.verhaard@arm.com>2020-11-02 18:04:27 +0100
committerLouis Verhaard <louis.verhaard@arm.com>2020-11-13 14:10:33 +0100
commite8a5a78dd16ec979c7a7bb1f5bd87e9b2909c32d (patch)
tree0829808f5ce047b12e1813ca382ac73c3300da91 /ethosu/vela/lut.py
parentdda21afda93f3732491efdcf89af2b14396c683f (diff)
downloadethos-u-vela-e8a5a78dd16ec979c7a7bb1f5bd87e9b2909c32d.tar.gz
MLBEDSW-839: Code generation using external API2.0.0.rc1
Added external API to generate register command streams. Existing code generation has been refactored to make use of this API. Change-Id: Ibb4c2b167809869f16470b14da24f08a65c82b7b Signed-off-by: Louis Verhaard <louis.verhaard@arm.com>
Diffstat (limited to 'ethosu/vela/lut.py')
-rw-r--r--ethosu/vela/lut.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ethosu/vela/lut.py b/ethosu/vela/lut.py
index 69aa2a0e..8e28b953 100644
--- a/ethosu/vela/lut.py
+++ b/ethosu/vela/lut.py
@@ -115,14 +115,14 @@ def optimize_high_level_cmd_stream(sg, arch):
if existing_tens is not None:
# LUT is already in SHRAM, no need to perform DMA
lut_tens.address = existing_tens.address
- cmd.ps.primary_op.attrs["lut_index"] = get_lut_index(arch, existing_tens)
+ cmd.ps.primary_op.activation.lut_index = get_lut_index(arch, existing_tens)
continue
# Place the LUT in the last 2 blocks of SHRAM
# Alignment is always on the size of the LUT, 256 for 256-byte LUT, 1K for 1K LUT, etc
address = lut_state.find_best_address(lut_start, lut_end, lut_tens.storage_size())
lut_tens.equivalence_id = uuid.uuid4()
lut_tens.address = address
- cmd.ps.primary_op.attrs["lut_index"] = (address - lut_start) // slot_size
+ cmd.ps.primary_op.activation.lut_index = (address - lut_start) // slot_size
lut_state = lut_state.put(lut_tens)
cmd_stream.append(cmd)
sg.high_level_command_stream = cmd_stream