diff options
author | Tim Hall <tim.hall@arm.com> | 2022-03-16 16:51:16 +0000 |
---|---|---|
committer | Tim Hall <tim.hall@arm.com> | 2022-03-31 10:26:56 +0100 |
commit | 68df8a1f5469daac53b7a418d92204f7026e4228 (patch) | |
tree | 0db9df020c89e25c20ed4a7a738dedd1b0ceb023 /ethosu/vela/high_level_command_to_npu_op.py | |
parent | d85750702229af97c0b0bbda6e397a23254b6144 (diff) | |
download | ethos-u-vela-68df8a1f5469daac53b7a418d92204f7026e4228.tar.gz |
vela: Added debug info to external API
- Added optional name attributes to operators and tensors
Signed-off-by: Tim Hall <tim.hall@arm.com>
Change-Id: I3b5d881a7b1043a6ba4b58fff5d7532b271ba536
Diffstat (limited to 'ethosu/vela/high_level_command_to_npu_op.py')
-rw-r--r-- | ethosu/vela/high_level_command_to_npu_op.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ethosu/vela/high_level_command_to_npu_op.py b/ethosu/vela/high_level_command_to_npu_op.py index 8c5525b0..e6bfc1c4 100644 --- a/ethosu/vela/high_level_command_to_npu_op.py +++ b/ethosu/vela/high_level_command_to_npu_op.py @@ -296,6 +296,7 @@ def create_feature_map(tens: Tensor, box: Box, arch: ArchitectureFeatures, op_sh ) strides = tens.get_strides(shape4D=op_shape4D) fm.strides = NpuShape3D(height=int(strides[2]), width=int(strides[3]), depth=int(strides[1])) + fm.name = tens.name return fm @@ -539,6 +540,7 @@ def convert_command_to_npu_op(cmd: Command, arch: ArchitectureFeatures) -> NpuOp npu_op: NpuOperation if isinstance(cmd, DMA): npu_op = create_dma_op(cmd, arch) + npu_op.name = cmd.out_tensor.name elif isinstance(cmd, NpuStripe): npu_block_type = cmd.ps.primary_op.type.npu_block_type if npu_block_type in (NpuBlockType.ConvolutionMxN, NpuBlockType.VectorProduct): @@ -551,6 +553,7 @@ def convert_command_to_npu_op(cmd: Command, arch: ArchitectureFeatures) -> NpuOp npu_op = create_npu_elementwise_op(cmd, arch) else: assert 0, f"Unknown command type {npu_block_type}" + npu_op.name = cmd.ps.primary_op.name return npu_op |