diff options
author | Louis Verhaard <louis.verhaard@arm.com> | 2020-11-02 18:04:27 +0100 |
---|---|---|
committer | Louis Verhaard <louis.verhaard@arm.com> | 2020-11-13 14:10:33 +0100 |
commit | e8a5a78dd16ec979c7a7bb1f5bd87e9b2909c32d (patch) | |
tree | 0829808f5ce047b12e1813ca382ac73c3300da91 /ethosu/vela/test/extapi/test_extapi_encode_weights.py | |
parent | dda21afda93f3732491efdcf89af2b14396c683f (diff) | |
download | ethos-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/test/extapi/test_extapi_encode_weights.py')
-rw-r--r-- | ethosu/vela/test/extapi/test_extapi_encode_weights.py | 5 |
1 files changed, 3 insertions, 2 deletions
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 |