aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/high_level_command_stream_generator.py
diff options
context:
space:
mode:
authorLouis Verhaard <louis.verhaard@arm.com>2020-11-02 18:04:27 +0100
committerLouis Verhaard <louis.verhaard@arm.com>2020-11-13 14:10:33 +0100
commite8a5a78dd16ec979c7a7bb1f5bd87e9b2909c32d (patch)
tree0829808f5ce047b12e1813ca382ac73c3300da91 /ethosu/vela/high_level_command_stream_generator.py
parentdda21afda93f3732491efdcf89af2b14396c683f (diff)
downloadethos-u-vela-e8a5a78dd16ec979c7a7bb1f5bd87e9b2909c32d.tar.gz
MLBEDSW-839: Code generation using external API2.0.0.rc1
Added external API to generate register command streams. Existing code generation has been refactored to make use of this API. Change-Id: Ibb4c2b167809869f16470b14da24f08a65c82b7b Signed-off-by: Louis Verhaard <louis.verhaard@arm.com>
Diffstat (limited to 'ethosu/vela/high_level_command_stream_generator.py')
-rw-r--r--ethosu/vela/high_level_command_stream_generator.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ethosu/vela/high_level_command_stream_generator.py b/ethosu/vela/high_level_command_stream_generator.py
index 871a0486..14cd051e 100644
--- a/ethosu/vela/high_level_command_stream_generator.py
+++ b/ethosu/vela/high_level_command_stream_generator.py
@@ -24,6 +24,7 @@ from .high_level_command_stream import NpuStripe
from .nn_graph import PassPlacement
from .nn_graph import SchedulingStrategy
from .numeric_util import round_up_divide
+from .operation import create_activation_function
from .operation import NpuBlockType
from .operation import Op
from .tensor import TensorPurpose
@@ -109,7 +110,7 @@ def generate_high_level_command_stream_for_pass(strat, passes, block_configs, id
concat_offset = concat_start
ps.primary_op.memory_function = op.type
elif op.type.is_relu_op() or op.type in (Op.Tanh, Op.Sigmoid):
- ps.primary_op.activation = op.type
+ ps.primary_op.activation = create_activation_function(op.type)
if strat == SchedulingStrategy.WeightStream:
ofm_step = block_config[-1]