Skip to content

Commit

Permalink
Merge pull request fastmachinelearning#1121 from vloncar/merge_templa…
Browse files Browse the repository at this point in the history
…te_missing_rf

Add RF to config templates for "Merge" layers
  • Loading branch information
JanFSchulte authored Nov 11, 2024
2 parents e2fd8a5 + efb4379 commit b44426d
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions hls4ml/backends/catapult/passes/merge_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

merge_config_template = """struct config{index} : nnet::merge_config {{
static const unsigned n_elem = {n_elem};
static const unsigned reuse_factor = {reuse};
}};\n"""

merge_function_template = 'nnet::{merge}<{input1_t}, {input2_t}, {output_t}, {config}>({input1}, {input2}, {output});'
Expand Down
1 change: 1 addition & 0 deletions hls4ml/backends/oneapi/passes/merge_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# Merge templates
merge_config_template = """struct config{index} : nnet::merge_config {{
static const unsigned n_elem = {n_elem};
static const unsigned reuse_factor = {reuse};
}};\n"""

merge_function_template = 'nnet::{merge}<{input1_t}, {input2_t}, {output_t}, {config}>({input1}, {input2}, {output});'
Expand Down
1 change: 1 addition & 0 deletions hls4ml/backends/quartus/passes/merge_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# Merge templates
merge_config_template = """struct config{index} : nnet::merge_config {{
static const unsigned n_elem = {n_elem};
static const unsigned reuse_factor = {reuse};
}};\n"""

merge_function_template = 'nnet::{merge}<{input1_t}, {input2_t}, {output_t}, {config}>({input1}, {input2}, {output});'
Expand Down
1 change: 1 addition & 0 deletions hls4ml/backends/vivado/passes/merge_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

merge_config_template = """struct config{index} : nnet::merge_config {{
static const unsigned n_elem = {n_elem};
static const unsigned reuse_factor = {reuse};
}};\n"""

merge_function_template = 'nnet::{merge}<{input1_t}, {input2_t}, {output_t}, {config}>({input1}, {input2}, {output});'
Expand Down
1 change: 1 addition & 0 deletions hls4ml/templates/catapult/nnet_utils/nnet_merge.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace nnet {

struct merge_config {
static const unsigned n_elem = 10;
static const unsigned reuse_factor = 1;
};

struct dot_config {
Expand Down
1 change: 1 addition & 0 deletions hls4ml/templates/oneapi/firmware/nnet_utils/nnet_merge.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace nnet {

struct merge_config {
static const unsigned n_elem = 10;
static const unsigned reuse_factor = 1;
};

struct dot_config {
Expand Down
1 change: 1 addition & 0 deletions hls4ml/templates/quartus/firmware/nnet_utils/nnet_merge.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace nnet {

struct merge_config {
static const unsigned n_elem = 10;
static const unsigned reuse_factor = 1;
};

struct dot_config {
Expand Down
1 change: 1 addition & 0 deletions hls4ml/templates/vivado/nnet_utils/nnet_merge.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace nnet {

struct merge_config {
static const unsigned n_elem = 10;
static const unsigned reuse_factor = 1;
};

struct dot_config {
Expand Down

0 comments on commit b44426d

Please sign in to comment.