From 199e8e66ba3d959fd0f584683e5b1c1fda77ce6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Davidsson?= Date: Tue, 10 Oct 2023 11:22:59 +0200 Subject: MLBEDSW-8117: Incorrect stride check for IFM/IFM2 and OFM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The constraint check for the IFM/IFM2/OFM strides were coded according to an incorrect version of the specification. Changed the check to verify that the strides are a multiple of 16 bytes. Also changed the wording in the exception message to clarify if it is a stride or value violating the constraint. Test case had two stride settings violating the constraint, after this change one of them still fails the check, so no change to tests, except in comments clarifying what is being tested. Change-Id: I93815d8bb08303b5f747c947c0bbd461b12895e3 Signed-off-by: Björn Davidsson --- ethosu/vela/test/extapi/test_extapi_generate_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ethosu/vela/test') diff --git a/ethosu/vela/test/extapi/test_extapi_generate_commands.py b/ethosu/vela/test/extapi/test_extapi_generate_commands.py index b21aae39..92f6c79b 100644 --- a/ethosu/vela/test/extapi/test_extapi_generate_commands.py +++ b/ethosu/vela/test/extapi/test_extapi_generate_commands.py @@ -861,11 +861,11 @@ def test_cmd1_payload_legality(): op.block_traversal = NpuBlockTraversal.PART_KERNEL_FIRST op.block_config = NpuShape3D(height=16, width=4, depth=16) - # NHWC depth stride not a multiple of 32 passes + # NHWC height stride not a multiple of 16 passes op.ifm.strides = NpuShape3D(depth=16, height=2, width=16) npu_generate_register_command_stream([op], NpuAccelerator.Ethos_U65_256) - # Same depth stride fails for NHCWB16 + # Same height stride fails for NHCWB16 op.ifm = create_feature_map( ifm_shape, 1, -- cgit v1.2.1