diff options
Diffstat (limited to 'ethosu/vela/architecture_allocator.py')
-rw-r--r-- | ethosu/vela/architecture_allocator.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ethosu/vela/architecture_allocator.py b/ethosu/vela/architecture_allocator.py index b5edcabb..9cc22bb4 100644 --- a/ethosu/vela/architecture_allocator.py +++ b/ethosu/vela/architecture_allocator.py @@ -330,7 +330,7 @@ def find_block_config( # Scale relative to every output OFM element if npu_op_type == NpuBlockType.ElementWise: - relative_cost = ofm_shape.elements() / (height * width * depth) + relative_cost = max(ofm_shape.elements() / (height * width * depth), 1) else: relative_cost = (ifm_fetch + weight_fetch) / ofm_shape.elements() |