Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added check for conv implementation #1155

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
4 changes: 2 additions & 2 deletions hls4ml/backends/vivado/passes/conv_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def transform(self, model, node):
raise Exception(f'Cannot generate instructions for node {node.name} ({node_class})')

def _generate_1d_instructions(self, node):
if node.model.config.get_config_value('IOType') == 'io_stream':
if node.model.config.get_config_value('IOType') == 'io_stream' and node.get_attr('conv_implementation') == 'Encoded':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One should maybe make this check case-insensitive.

min_w, instructions = node.model.config.backend.compute_conv1d_instructions(
node.get_input_variable().shape[0],
node.get_input_variable().shape[1],
Expand All @@ -34,7 +34,7 @@ def _generate_1d_instructions(self, node):
node.set_attr('instructions', '0')

def _generate_2d_instructions(self, node):
if node.model.config.get_config_value('IOType') == 'io_stream':
if node.model.config.get_config_value('IOType') == 'io_stream' and node.get_attr('conv_implementation') == 'Encoded':
min_h, min_w, instructions = node.model.config.backend.compute_conv2d_instructions(
node.get_input_variable().shape[0],
node.get_input_variable().shape[1],
Expand Down
Loading