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/test/extapi/test_extapi_encode_weights.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ethosu/vela/test/extapi/test_extapi_encode_weights.py') diff --git a/ethosu/vela/test/extapi/test_extapi_encode_weights.py b/ethosu/vela/test/extapi/test_extapi_encode_weights.py index 47ca02b8..356bbc1a 100644 --- a/ethosu/vela/test/extapi/test_extapi_encode_weights.py +++ b/ethosu/vela/test/extapi/test_extapi_encode_weights.py @@ -19,6 +19,7 @@ import numpy as np import pytest from ethosu.vela import weight_compressor +from ethosu.vela.api import NpuBlockTraversal from ethosu.vela.architecture_features import Accelerator @@ -52,7 +53,7 @@ def test_encode_weights( weights_hwio = np.random.randint(val_max, size=weights_shape, dtype=np.uint8) weights_ohwi = np.transpose(weights_hwio, (3, 0, 1, 2)) is_depthwise = True if depth_control == 2 else False - is_partkernel = True if depth_control == 3 else False + block_traversal = NpuBlockTraversal.PART_KERNEL_FIRST if depth_control == 3 else NpuBlockTraversal.DEPTH_FIRST dilation_xy = (dilation_x, dilation_y) encoded_stream = weight_compressor.encode_weights( @@ -62,7 +63,7 @@ def test_encode_weights( ifm_bitdepth=ifm_bitdepth, ofm_block_depth=ofm_block_depth, is_depthwise=is_depthwise, - is_partkernel=is_partkernel, + block_traversal=block_traversal, ) assert type(encoded_stream) == bytearray -- cgit v1.2.1