From e8a5a78dd16ec979c7a7bb1f5bd87e9b2909c32d Mon Sep 17 00:00:00 2001 From: Louis Verhaard Date: Mon, 2 Nov 2020 18:04:27 +0100 Subject: MLBEDSW-839: Code generation using external API 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 --- ethosu/vela/lut.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ethosu/vela/lut.py') 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 -- cgit v1.2.1