diff options
author | Jonas Ohlsson <jonas.ohlsson@arm.com> | 2022-03-30 10:30:25 +0200 |
---|---|---|
committer | Jonas Ohlsson <jonas.ohlsson@arm.com> | 2022-03-30 15:54:14 +0200 |
commit | d85750702229af97c0b0bbda6e397a23254b6144 (patch) | |
tree | 389962105a35d5cef595cfeb5d640bd59a0d0ff8 /ethosu/vela/register_command_stream_generator.py | |
parent | cc5f4de1c35ba44fca7ff6295c6ae846f8242344 (diff) | |
download | ethos-u-vela-d85750702229af97c0b0bbda6e397a23254b6144.tar.gz |
Update version of Black to 22.3.0
Update version of Black to 22.3.0 due to updated dependencies.
Updates to fix reported issues due to new version.
Signed-off-by: Jonas Ohlsson <jonas.ohlsson@arm.com>
Change-Id: I60056aae452093ce8dcea1f499ecced22b25eef1
Diffstat (limited to 'ethosu/vela/register_command_stream_generator.py')
-rw-r--r-- | ethosu/vela/register_command_stream_generator.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/ethosu/vela/register_command_stream_generator.py b/ethosu/vela/register_command_stream_generator.py index 3be2898c..be01a75b 100644 --- a/ethosu/vela/register_command_stream_generator.py +++ b/ethosu/vela/register_command_stream_generator.py @@ -521,7 +521,8 @@ def generate_biases(emit: CommandStreamEmitter, biases: List[NpuAddressRange], a def generate_block_config( - emit: CommandStreamEmitter, block_config: NpuShape3D, + emit: CommandStreamEmitter, + block_config: NpuShape3D, ): """Generates OFM_BLK_HEIGHT/WIDTH/DEPTH registers""" emit.cmd0_with_param(cmd0.NPU_SET_OFM_BLK_HEIGHT_M1, block_config.height - 1) @@ -530,7 +531,9 @@ def generate_block_config( def generate_shram_registers( - emit: CommandStreamEmitter, npu_op: NpuBlockOperation, arch_block_config: ArchitectureBlockConfig, + emit: CommandStreamEmitter, + npu_op: NpuBlockOperation, + arch_block_config: ArchitectureBlockConfig, ): """Generates IB_END/IB_START/AB_START/ACC_FORMAT registers""" emit.cmd0_with_param(cmd0.NPU_SET_IFM_IB_END, arch_block_config.layout.ib_end) @@ -775,9 +778,13 @@ def generate_scaling_for_elementwise(emit: CommandStreamEmitter, npu_op: NpuElem if use_advanced_scaling: # Use advanced implementation only when input/output scales differ, # or when we can't guarantee the absence of rounding errors - (opa_scale, opa_shift, ofm_scale, shift, op_to_scale,) = scaling.advanced_elementwise_add_sub_scale( - input_scale, input2_scale, output_scale, bitdepth - ) + ( + opa_scale, + opa_shift, + ofm_scale, + shift, + op_to_scale, + ) = scaling.advanced_elementwise_add_sub_scale(input_scale, input2_scale, output_scale, bitdepth) opb_scale = 0 # Unused for this case if npu_op.reversed_operands: # If the operand order is reversed we also have to swap which operand is scaled |