diff options
Diffstat (limited to 'ethosu/vela')
-rw-r--r-- | ethosu/vela/high_level_command_stream_generator.py | 25 | ||||
-rw-r--r-- | ethosu/vela/supported_operators.py | 4 |
2 files changed, 16 insertions, 13 deletions
diff --git a/ethosu/vela/high_level_command_stream_generator.py b/ethosu/vela/high_level_command_stream_generator.py index 50b913d8..8486dadc 100644 --- a/ethosu/vela/high_level_command_stream_generator.py +++ b/ethosu/vela/high_level_command_stream_generator.py @@ -272,18 +272,21 @@ def generate_high_level_command_stream_for_pass(strat, passes, block_configs, id if ( intermediate is not None and intermediate.shape != [] - and intermediate.purpose == TensorPurpose.FeatureMap + and intermediate.purpose in (TensorPurpose.FeatureMap, TensorPurpose.LUT) ): - intermediate_box, _, _ = ofm_box.transform_with_strides_and_skirt( - strides, - skirt, - intermediate.shape, - npu_block_type, - concat_axis, - concat_offset, - split_offsets[0], - upscaling, - ) + if intermediate.purpose is TensorPurpose.FeatureMap: + intermediate_box, _, _ = ofm_box.transform_with_strides_and_skirt( + strides, + skirt, + intermediate.shape, + npu_block_type, + concat_axis, + concat_offset, + split_offsets[0], + upscaling, + ) + else: + intermediate_box = Box([0] * len(intermediate.shape), list(intermediate.shape)) yield from dma_if_necessary(ps, intermediate_box, intermediate) ifm_y_needed = 1 diff --git a/ethosu/vela/supported_operators.py b/ethosu/vela/supported_operators.py index 86cc3c07..b6551cf9 100644 --- a/ethosu/vela/supported_operators.py +++ b/ethosu/vela/supported_operators.py @@ -398,8 +398,8 @@ class SupportedOperators: if ( op.inputs[0].quantization is None - or not op.inputs[0].quantization.is_scaling_equal(op.inputs[1].quantization) - or not op.inputs[0].quantization.is_scaling_equal(op.outputs[0].quantization) + or not op.inputs[0].is_scaling_equal(op.inputs[1]) + or not op.inputs[0].is_scaling_equal(op.outputs[0]) ): print( "Warning: Input/output tensors with different quantization is unsupported for the", op.type, "operator" |