Skip to content
Snippets Groups Projects
Commit 2ae66838 authored by Cyril Moineau's avatar Cyril Moineau
Browse files

Remove is_input and is_output from node_export.

parent a0dc9e6e
No related branches found
No related tags found
No related merge requests found
Showing
with 71 additions and 64 deletions
// MEMINFO {{ name }} // MEMINFO {{ name }}
{# TODO : Suppose graph input is always connected to first input #}
{# Graph input are stored in external memory so giving static values #} {% for inidx in range(nb_in) -%}
{%- if is_input -%} {%- if in_node[inidx] is none -%}
// GRAPH INPUT MEMINFO // GRAPH INPUT MEMINFO
#define {{ in_name[0]|upper }}_SIZE {{ in_chan[0] }} #define {{ in_name[inidx]|upper }}_SIZE {{ in_chan[inidx] }}
#define {{ in_name[0]|upper }}_OFFSET 0 #define {{ in_name[inidx]|upper }}_OFFSET 0
#define {{ in_name[0]|upper }}_STRIDE {{ in_chan[0] }} #define {{ in_name[inidx]|upper }}_STRIDE {{ in_chan[inidx] }}
#define {{ in_name[0]|upper }}_LENGTH {{ in_size[0] }} #define {{ in_name[inidx]|upper }}_LENGTH {{ in_size[inidx] }}
#define {{ in_name[0]|upper }}_CONT_SIZE {{ in_size[0] }} #define {{ in_name[inidx]|upper }}_CONT_SIZE {{ in_size[inidx] }}
#define {{ in_name[0]|upper }}_CONT_OFFSET 0 #define {{ in_name[inidx]|upper }}_CONT_OFFSET 0
#define {{ in_name[0]|upper }}_WRAP_OFFSET 0 #define {{ in_name[inidx]|upper }}_WRAP_OFFSET 0
#define {{ in_name[0]|upper }}_WRAP_SIZE 0 #define {{ in_name[inidx]|upper }}_WRAP_SIZE 0
{% endif -%} {% endif -%}
{% endfor -%}
{% for outidx in range(nb_out) -%} {% for outidx in range(nb_out) -%}
// OUTPUT {{ outidx }} // OUTPUT {{ outidx }}
#define {{ out_name[outidx]|upper }}_SIZE {{ mem_info_size[outidx]}} #define {{ out_name[outidx]|upper }}_SIZE {{ mem_info_size[outidx]}}
......
{% filter indent(width=4, first=False) %}
{% include "./_mem_offset.jinja" %} {% include "./_mem_offset.jinja" %}
aidge_add_float32( aidge_add_float32(
{{in_name[0]}}, {{in_name[0]}},
{{in_name[1]}}, {{in_name[1]}},
...@@ -11,3 +11,4 @@ aidge_add_float32( ...@@ -11,3 +11,4 @@ aidge_add_float32(
{{name|upper}}_IN_1_NB_DIMS, {{name|upper}}_IN_1_NB_DIMS,
{{name|upper}}_OUT_0_NB_DIMS, {{name|upper}}_OUT_0_NB_DIMS,
{{name|upper}}_OUTPUTS_SIZE); {{name|upper}}_OUTPUTS_SIZE);
{% endfilter %}
{% filter indent(width=4, first=False) %}
{% include "./_mem_offset.jinja" %} {% include "./_mem_offset.jinja" %}
aidge_atan <{{name|upper}}_OUTPUTS_SIZE> ({{in_name[0]}}, {{out_name[0]}}); aidge_atan <{{name|upper}}_OUTPUTS_SIZE> ({{in_name[0]}}, {{out_name[0]}});
{% endfilter %}
{% filter indent(width=4, first=False) %}
{% include "./_mem_offset.jinja" %} {% include "./_mem_offset.jinja" %}
float* {{ name|upper }}_INPUTS[] = { float* {{ name|upper }}_INPUTS[] = {
{%- for i in range(nb_in) -%} {%- for i in range(nb_in) -%}
{{ in_name[i] }}{{ ", " if not loop.last else "" }} {{ in_name[i] }}{{ ", " if not loop.last else "" }}
...@@ -18,5 +17,4 @@ aidge_concat<float, {{ nb_in }}> ( ...@@ -18,5 +17,4 @@ aidge_concat<float, {{ nb_in }}> (
{{ name|upper }}_INPUTS, {{ name|upper }}_INPUTS,
{{ name|upper }}_SIZES, {{ name|upper }}_SIZES,
{{ out_name[0] }}); {{ out_name[0] }});
{% endfilter %}
{% filter indent(width=4, first=False) %}
{% include "./_mem_offset.jinja" %} {% include "./_mem_offset.jinja" %}
N2D2_Export::convcellPropagate<{{ in_name[0]|upper }}_NB_CHANNELS, N2D2_Export::convcellPropagate<{{ in_name[0]|upper }}_NB_CHANNELS,
{{ in_name[0]|upper }}_IN_HEIGHT, {{ in_name[0]|upper }}_IN_HEIGHT,
{{ in_name[0]|upper }}_IN_WIDTH, {{ in_name[0]|upper }}_IN_WIDTH,
...@@ -24,4 +24,4 @@ N2D2_Export::convcellPropagate<{{ in_name[0]|upper }}_NB_CHANNELS, ...@@ -24,4 +24,4 @@ N2D2_Export::convcellPropagate<{{ in_name[0]|upper }}_NB_CHANNELS,
{{ out_name[0]|upper }}_WRAP_SIZE, {{ out_name[0]|upper }}_WRAP_SIZE,
{{ out_name[0]|upper }}_STRIDE> {{ out_name[0]|upper }}_STRIDE>
({{in_name[0]}}, {{out_name[0]}}, {{in_name[2]}}, {{in_name[1]}}, {{ name|upper }}_SCALING); ({{in_name[0]}}, {{out_name[0]}}, {{in_name[2]}}, {{in_name[1]}}, {{ name|upper }}_SCALING);
{% endfilter %}
{% filter indent(width=4, first=False) %}
{% include "./_mem_offset.jinja" %} {% include "./_mem_offset.jinja" %}
N2D2_Export::fccellPropagate<{{ in_name[0] | upper }}_NB_CHANNELS, N2D2_Export::fccellPropagate<{{ in_name[0] | upper }}_NB_CHANNELS,
{{ in_name[0] | upper }}_IN_HEIGHT, {{ in_name[0] | upper }}_IN_HEIGHT,
{{ in_name[0] | upper }}_IN_WIDTH, {{ in_name[0] | upper }}_IN_WIDTH,
...@@ -18,3 +18,4 @@ N2D2_Export::fccellPropagate<{{ in_name[0] | upper }}_NB_CHANNELS, ...@@ -18,3 +18,4 @@ N2D2_Export::fccellPropagate<{{ in_name[0] | upper }}_NB_CHANNELS,
{{ out_name[0] | upper }}_WRAP_SIZE, {{ out_name[0] | upper }}_WRAP_SIZE,
{{ out_name[0] | upper }}_STRIDE> {{ out_name[0] | upper }}_STRIDE>
({{ in_name[0] }}, {{ out_name[0] }}, {{ in_name[2] }}, {{ in_name[1] }}, {{ name | upper }}_SCALING); ({{ in_name[0] }}, {{ out_name[0] }}, {{ in_name[2] }}, {{ in_name[1] }}, {{ name | upper }}_SCALING);
{% endfilter %}
{% filter indent(width=4, first=False) %}
{% include "./_mem_offset.jinja" %} {% include "./_mem_offset.jinja" %}
aidge_mul_float32( aidge_mul_float32(
{{in_name[0]}}, {{in_name[0]}},
{{in_name[1]}}, {{in_name[1]}},
...@@ -11,3 +11,4 @@ aidge_mul_float32( ...@@ -11,3 +11,4 @@ aidge_mul_float32(
{{name|upper}}_IN_1_NB_DIMS, {{name|upper}}_IN_1_NB_DIMS,
{{name|upper}}_OUT_0_NB_DIMS, {{name|upper}}_OUT_0_NB_DIMS,
{{name|upper}}_OUTPUTS_SIZE); {{name|upper}}_OUTPUTS_SIZE);
{% endfilter %}
{% filter indent(width=4, first=False) %}
{% include "./_mem_offset.jinja" %} {% include "./_mem_offset.jinja" %}
N2D2_Export::poolcellPropagate<{{ in_name[0]|upper }}_NB_CHANNELS, N2D2_Export::poolcellPropagate<{{ in_name[0]|upper }}_NB_CHANNELS,
{{ in_name[0]|upper }}_IN_HEIGHT, {{ in_name[0]|upper }}_IN_HEIGHT,
{{ in_name[0]|upper }}_IN_WIDTH, {{ in_name[0]|upper }}_IN_WIDTH,
...@@ -25,3 +25,4 @@ N2D2_Export::poolcellPropagate<{{ in_name[0]|upper }}_NB_CHANNELS, ...@@ -25,3 +25,4 @@ N2D2_Export::poolcellPropagate<{{ in_name[0]|upper }}_NB_CHANNELS,
{{ out_name[0]|upper }}_WRAP_SIZE, {{ out_name[0]|upper }}_WRAP_SIZE,
{{ out_name[0]|upper }}_STRIDE> {{ out_name[0]|upper }}_STRIDE>
({{in_name[0]}}, {{out_name[0]}}); ({{in_name[0]}}, {{out_name[0]}});
{% endfilter %}
{% filter indent(width=4, first=False) %}
{% include "./_mem_offset.jinja" %} {% include "./_mem_offset.jinja" %}
aidge_relu_float32({{in_name[0]}}, {{out_name[0]}}, {{name|upper}}_INPUTS_SIZE); aidge_relu_float32({{in_name[0]}}, {{out_name[0]}}, {{name|upper}}_INPUTS_SIZE);
{% endfilter %}
{% filter indent(width=4, first=False) %}
{% include "./_mem_offset.jinja" %} {% include "./_mem_offset.jinja" %}
aidge_slice_float32 ({{in_name[0]}}, {{out_name[0]}}, {{name|upper}}_AXES, {{name|upper}}_STARTS, {{name|upper}}_ENDS, {{name|upper}}_NB_AXES, {{name|upper}}_NB_CHANNELS); aidge_slice_float32 ({{in_name[0]}}, {{out_name[0]}}, {{name|upper}}_AXES, {{name|upper}}_STARTS, {{name|upper}}_ENDS, {{name|upper}}_NB_AXES, {{name|upper}}_NB_CHANNELS);
{% endfilter %}
{% filter indent(width=4, first=False) %}
{% include "./_mem_offset.jinja" %} {% include "./_mem_offset.jinja" %}
aidge_sub_float32({{in_name[0]}}, {{in_name[1]}}, {{out_name[0]}}, {{name|upper}}_OUTPUTS_SIZE); aidge_sub_float32({{in_name[0]}}, {{in_name[1]}}, {{out_name[0]}}, {{name|upper}}_OUTPUTS_SIZE);
{% endfilter %}
aidge_transpose_chw_{{dataformat}} ({{input_name}}, {{output_name}},{{input_name}}_DIMS, {{name}}_PERMUTATIONS, {{output_name}}_DIMS, {{name|upper}}_OUTPUT_DIMS_SIZE, {{name|upper}}_OUTPUT_SIZE); aidge_transpose_chw_{{dataformat}} ({{input_name}}, {{output_name}},{{input_name}}_DIMS, {{name}}_PERMUTATIONS, {{output_name}}_DIMS, {{name|upper}}_OUTPUT_DIMS_SIZE, {{name|upper}}_OUTPUT_SIZE);
\ No newline at end of file
...@@ -44,8 +44,8 @@ def export_params(name:str, ...@@ -44,8 +44,8 @@ def export_params(name:str,
@ExportLibAidgeARM.register("Producer", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.any))) @ExportLibAidgeARM.register("Producer", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.any)))
class Producer_ARMCortexM(ExportNode): class Producer_ARMCortexM(ExportNode):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
super().__init__(node, mem_info, is_input, is_output) super().__init__(node, mem_info)
self.values = np.array(self.operator.get_output(0)) self.values = np.array(self.operator.get_output(0))
if len(self.values.shape) == 4: # Note: export in HWC if len(self.values.shape) == 4: # Note: export in HWC
self.values = np.transpose(self.values, (0, 2, 3, 1)) self.values = np.transpose(self.values, (0, 2, 3, 1))
...@@ -188,7 +188,7 @@ class Scaling(): ...@@ -188,7 +188,7 @@ class Scaling():
# TODO : find a way to remove this dummy exportnode # TODO : find a way to remove this dummy exportnode
@ExportLibAidgeARM.register("Pad2D", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.any))) @ExportLibAidgeARM.register("Pad2D", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.any)))
class Pad_ARMCortexM(ExportNodeCpp): class Pad_ARMCortexM(ExportNodeCpp):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
raise NotImplementedError("Pad2D nodes is not implemented") raise NotImplementedError("Pad2D nodes is not implemented")
...@@ -196,8 +196,8 @@ class Pad_ARMCortexM(ExportNodeCpp): ...@@ -196,8 +196,8 @@ class Pad_ARMCortexM(ExportNodeCpp):
@ExportLibAidgeARM.register("ReLU", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32))) @ExportLibAidgeARM.register("ReLU", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32)))
class ReLU_ARMCortexM(ExportNodeCpp): class ReLU_ARMCortexM(ExportNodeCpp):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
super().__init__(node, mem_info, is_input, is_output) super().__init__(node, mem_info)
self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "relu.jinja") self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "relu.jinja")
...@@ -209,8 +209,8 @@ class ReLU_ARMCortexM(ExportNodeCpp): ...@@ -209,8 +209,8 @@ class ReLU_ARMCortexM(ExportNodeCpp):
@ExportLibAidgeARM.register("Conv2D", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32))) @ExportLibAidgeARM.register("Conv2D", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32)))
class Conv_ARMCortexM(ExportNodeCpp): class Conv_ARMCortexM(ExportNodeCpp):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
super().__init__(node, mem_info, is_input, is_output) super().__init__(node, mem_info)
self.attributes["activation"] = "Linear" self.attributes["activation"] = "Linear"
self.attributes.update(Scaling()("no_scaling")) self.attributes.update(Scaling()("no_scaling"))
# No padding with Conv # No padding with Conv
...@@ -227,8 +227,8 @@ class Conv_ARMCortexM(ExportNodeCpp): ...@@ -227,8 +227,8 @@ class Conv_ARMCortexM(ExportNodeCpp):
@ExportLibAidgeARM.register_metaop("PaddedConv2D", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32))) @ExportLibAidgeARM.register_metaop("PaddedConv2D", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32)))
class PaddedConv_ARMCortexM(ExportNodeCpp): class PaddedConv_ARMCortexM(ExportNodeCpp):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
super().__init__(node, mem_info, is_input, is_output) super().__init__(node, mem_info)
self.attributes["activation"] = "Linear" self.attributes["activation"] = "Linear"
self.attributes.update(Scaling()("no_scaling")) self.attributes.update(Scaling()("no_scaling"))
print(self.attributes) print(self.attributes)
...@@ -253,8 +253,8 @@ class PaddedConv_ARMCortexM(ExportNodeCpp): ...@@ -253,8 +253,8 @@ class PaddedConv_ARMCortexM(ExportNodeCpp):
class Pooling_ARMCortexM(ExportNodeCpp): class Pooling_ARMCortexM(ExportNodeCpp):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
super().__init__(node, mem_info, is_input, is_output) super().__init__(node, mem_info)
self.attributes["activation"] = "Linear" self.attributes["activation"] = "Linear"
self.attributes["pool_type"] = "None" self.attributes["pool_type"] = "None"
# No padding with MaxPooling or AvgPooling # No padding with MaxPooling or AvgPooling
...@@ -273,8 +273,8 @@ class Pooling_ARMCortexM(ExportNodeCpp): ...@@ -273,8 +273,8 @@ class Pooling_ARMCortexM(ExportNodeCpp):
@ExportLibAidgeARM.register("FC", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32))) @ExportLibAidgeARM.register("FC", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32)))
class FC_ARMCortexM(ExportNodeCpp): class FC_ARMCortexM(ExportNodeCpp):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
super().__init__(node, mem_info, is_input, is_output) super().__init__(node, mem_info)
self.attributes["activation"] = "Linear" self.attributes["activation"] = "Linear"
self.attributes.update(Scaling()("no_scaling")) self.attributes.update(Scaling()("no_scaling"))
# No padding with Conv # No padding with Conv
...@@ -290,20 +290,20 @@ class FC_ARMCortexM(ExportNodeCpp): ...@@ -290,20 +290,20 @@ class FC_ARMCortexM(ExportNodeCpp):
@ExportLibAidgeARM.register("MaxPooling2D", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32))) @ExportLibAidgeARM.register("MaxPooling2D", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32)))
class MaxPooling_ARMCortexM(Pooling_ARMCortexM): class MaxPooling_ARMCortexM(Pooling_ARMCortexM):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
super().__init__(node, mem_info, is_input, is_output) super().__init__(node, mem_info)
self.attributes["pool_type"] = "Max" self.attributes["pool_type"] = "Max"
@ExportLibAidgeARM.register("AvgPooling2D", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32))) @ExportLibAidgeARM.register("AvgPooling2D", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32)))
class AvgPooling_ARMCortexM(Pooling_ARMCortexM): class AvgPooling_ARMCortexM(Pooling_ARMCortexM):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
super().__init__(node, mem_info, is_input, is_output) super().__init__(node, mem_info)
self.attributes["pool_type"] = "Avg" self.attributes["pool_type"] = "Avg"
@ExportLibAidgeARM.register_metaop("FcReluScaling", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32))) @ExportLibAidgeARM.register_metaop("FcReluScaling", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32)))
class FC_ARMCortexM(ExportNodeCpp): class FC_ARMCortexM(ExportNodeCpp):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
super().__init__(node, mem_info, is_input, is_output) super().__init__(node, mem_info)
self.attributes["activation"] = "Rectifier" self.attributes["activation"] = "Rectifier"
self.attributes.update(Scaling(self.operator.attr.scaling_factor, self.attributes.update(Scaling(self.operator.attr.scaling_factor,
self.operator.attr.quantized_nb_bits)("floating_point")) self.operator.attr.quantized_nb_bits)("floating_point"))
...@@ -320,8 +320,8 @@ class FC_ARMCortexM(ExportNodeCpp): ...@@ -320,8 +320,8 @@ class FC_ARMCortexM(ExportNodeCpp):
@ExportLibAidgeARM.register("Add", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32))) @ExportLibAidgeARM.register("Add", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32)))
class Add_ARMCortexM(ExportNodeCpp): class Add_ARMCortexM(ExportNodeCpp):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
super().__init__(node, mem_info, is_input, is_output) super().__init__(node, mem_info)
self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "add.jinja") self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "add.jinja")
self.forward_template = str(ROOT / "_Aidge_Arm" / "templates" / "forward_call" / "add.jinja") self.forward_template = str(ROOT / "_Aidge_Arm" / "templates" / "forward_call" / "add.jinja")
...@@ -333,8 +333,8 @@ class Add_ARMCortexM(ExportNodeCpp): ...@@ -333,8 +333,8 @@ class Add_ARMCortexM(ExportNodeCpp):
@ExportLibAidgeARM.register("Sub", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32))) @ExportLibAidgeARM.register("Sub", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32)))
class Sub_ARMCortexM(ExportNodeCpp): class Sub_ARMCortexM(ExportNodeCpp):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
super().__init__(node, mem_info, is_input, is_output) super().__init__(node, mem_info)
self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "sub.jinja") self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "sub.jinja")
self.forward_template = str(ROOT / "_Aidge_Arm" / "templates" / "forward_call" / "sub.jinja") self.forward_template = str(ROOT / "_Aidge_Arm" / "templates" / "forward_call" / "sub.jinja")
...@@ -346,8 +346,8 @@ class Sub_ARMCortexM(ExportNodeCpp): ...@@ -346,8 +346,8 @@ class Sub_ARMCortexM(ExportNodeCpp):
@ExportLibAidgeARM.register("Mul", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32))) @ExportLibAidgeARM.register("Mul", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32)))
class Mul_ARMCortexM(ExportNodeCpp): class Mul_ARMCortexM(ExportNodeCpp):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
super().__init__(node, mem_info, is_input, is_output) super().__init__(node, mem_info)
self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "mul.jinja") self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "mul.jinja")
self.forward_template = str(ROOT / "_Aidge_Arm" / "templates" / "forward_call" / "mul.jinja") self.forward_template = str(ROOT / "_Aidge_Arm" / "templates" / "forward_call" / "mul.jinja")
...@@ -359,8 +359,8 @@ class Mul_ARMCortexM(ExportNodeCpp): ...@@ -359,8 +359,8 @@ class Mul_ARMCortexM(ExportNodeCpp):
@ExportLibAidgeARM.register("Softmax", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32))) @ExportLibAidgeARM.register("Softmax", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32)))
class Softmax_ARMCortexM(ExportNodeCpp): class Softmax_ARMCortexM(ExportNodeCpp):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
super().__init__(node, mem_info, is_input, is_output) super().__init__(node, mem_info)
self.attributes["activation_type"] = "\"SOFTMAX\"" self.attributes["activation_type"] = "\"SOFTMAX\""
self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "activation.jinja") self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "activation.jinja")
...@@ -372,8 +372,8 @@ class Softmax_ARMCortexM(ExportNodeCpp): ...@@ -372,8 +372,8 @@ class Softmax_ARMCortexM(ExportNodeCpp):
@ExportLibAidgeARM.register("Atan", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32))) @ExportLibAidgeARM.register("Atan", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32)))
class Atan_ARMCortexM(ExportNodeCpp): class Atan_ARMCortexM(ExportNodeCpp):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
super().__init__(node, mem_info, is_input, is_output) super().__init__(node, mem_info)
self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "atan.jinja") self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "atan.jinja")
self.forward_template = str(ROOT / "_Aidge_Arm" / "templates" / "forward_call" / "atan.jinja") self.forward_template = str(ROOT / "_Aidge_Arm" / "templates" / "forward_call" / "atan.jinja")
...@@ -385,8 +385,8 @@ class Atan_ARMCortexM(ExportNodeCpp): ...@@ -385,8 +385,8 @@ class Atan_ARMCortexM(ExportNodeCpp):
@ExportLibAidgeARM.register("Slice", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32))) @ExportLibAidgeARM.register("Slice", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32)))
class Slice_ARMCortexM(ExportNodeCpp): class Slice_ARMCortexM(ExportNodeCpp):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
super().__init__(node, mem_info, is_input, is_output) super().__init__(node, mem_info)
self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "slice.jinja") self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "slice.jinja")
self.forward_template = str(ROOT / "_Aidge_Arm" / "templates" / "forward_call" / "slice.jinja") self.forward_template = str(ROOT / "_Aidge_Arm" / "templates" / "forward_call" / "slice.jinja")
...@@ -397,8 +397,8 @@ class Slice_ARMCortexM(ExportNodeCpp): ...@@ -397,8 +397,8 @@ class Slice_ARMCortexM(ExportNodeCpp):
@ExportLibAidgeARM.register("Concat", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32))) @ExportLibAidgeARM.register("Concat", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32)))
class Concat_ARMCortexM(ExportNodeCpp): class Concat_ARMCortexM(ExportNodeCpp):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
super().__init__(node, mem_info, is_input, is_output) super().__init__(node, mem_info)
self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "concat.jinja") self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "concat.jinja")
self.forward_template = str(ROOT / "_Aidge_Arm" / "templates" / "forward_call" / "concat.jinja") self.forward_template = str(ROOT / "_Aidge_Arm" / "templates" / "forward_call" / "concat.jinja")
...@@ -409,8 +409,8 @@ class Concat_ARMCortexM(ExportNodeCpp): ...@@ -409,8 +409,8 @@ class Concat_ARMCortexM(ExportNodeCpp):
@ExportLibAidgeARM.register("Sigmoid", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32))) @ExportLibAidgeARM.register("Sigmoid", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32)))
class Sigmoid_ARMCortexM(ExportNodeCpp): class Sigmoid_ARMCortexM(ExportNodeCpp):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
super().__init__(node, mem_info, is_input, is_output) super().__init__(node, mem_info)
self.attributes["activation_type"] = "\"SIGMOID\"" self.attributes["activation_type"] = "\"SIGMOID\""
self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "activation.jinja") self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "activation.jinja")
...@@ -422,8 +422,8 @@ class Sigmoid_ARMCortexM(ExportNodeCpp): ...@@ -422,8 +422,8 @@ class Sigmoid_ARMCortexM(ExportNodeCpp):
@ExportLibAidgeARM.register("MatMul", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32))) @ExportLibAidgeARM.register("MatMul", aidge_core.ImplSpec(aidge_core.IOSpec(aidge_core.dtype.float32)))
class MatMul_ARMCortexM(ExportNodeCpp): class MatMul_ARMCortexM(ExportNodeCpp):
def __init__(self, node, mem_info, is_input, is_output): def __init__(self, node, mem_info):
super().__init__(node, mem_info, is_input, is_output) super().__init__(node, mem_info)
self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "matmul.jinja") self.config_template = str(ROOT / "_Aidge_Arm" / "templates" / "configuration" / "matmul.jinja")
self.forward_template = str(ROOT / "_Aidge_Arm" / "templates" / "forward_call" / "matmul.jinja") self.forward_template = str(ROOT / "_Aidge_Arm" / "templates" / "forward_call" / "matmul.jinja")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment