diff options
Diffstat (limited to 'ethosu/vela/test/testutil.py')
-rw-r--r-- | ethosu/vela/test/testutil.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ethosu/vela/test/testutil.py b/ethosu/vela/test/testutil.py index d4ae97b4..13b6bf40 100644 --- a/ethosu/vela/test/testutil.py +++ b/ethosu/vela/test/testutil.py @@ -56,6 +56,14 @@ def create_elemwise_op(type, name, ifm_shape, ifm2_shape, ofm_shape, datatype=Da return op +def create_op(op_type, inputs, output, attrs=dict()): + op = Operation(op_type, output.name + "_op") + op.inputs = inputs + op.outputs = [output] + op.attrs = attrs + return op + + def create_subgraph(op_list): # Creates subgraph using the given list of operations sg = Subgraph() |