vela: Refactor operators to use Kernel objects
- Normalise kernel availability by requiring all operators offer a kernel
describing how much data they consume from the source, per OFM element,
regardless of whether kernels are relevant to the operation.
Signed-off-by: Tim Hall <tim.hall@arm.com>
Change-Id: Idbcff64879fc2eccf292b6208a7d2038eb388017
diff --git a/ethosu/vela/npu_performance.py b/ethosu/vela/npu_performance.py
index e71e95b..24b4c68 100644
--- a/ethosu/vela/npu_performance.py
+++ b/ethosu/vela/npu_performance.py
@@ -31,7 +31,6 @@
from .nn_graph import SchedulerRewrite
from .operation import NpuBlockType
from .operation import Op
-from .register_command_stream_generator import get_op_kernel
from .tensor import MemArea
from .tensor import shape_num_elements
from .tensor import TensorBlockTraversal
@@ -40,7 +39,7 @@
def rolling_buffer_dims_from_passes(arch, ps1, block_config_ps1, ps2, block_config_ps2):
ofm_block = Block(block_config_ps2[-3], block_config_ps2[-4], block_config_ps2[-1])
- kernel = get_op_kernel(ps2)
+ kernel = ps2.primary_op.kernel
if ps2.npu_block_type in set((NpuBlockType.ConvolutionMxN, NpuBlockType.VectorProduct)):
op = ps2.primary_op