Skip to content

Commit 72e4d5d

Browse files
committed
Cosmetic parameter config fixes
1 parent 0a866ad commit 72e4d5d

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

hls4ml/backends/fpga/fpga_backend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ def generate_conv1d_line_buffer_fn(self, layer_idx, n_partitions, in_W, in_C, ke
685685
686686
The HLS compiler produces suboptimal designs for a im2col algorithm implementation, so a trick we use is
687687
to generate a resulting a result of im2col transformation explicitly, instead of relying on loops. Since
688-
the result depends on the paraleters of the convolution layer (the input size, the kernel size, stride etc),
688+
the result depends on the parameters of the convolution layer (the input size, the kernel size, stride etc),
689689
we need to do this for every convolution layer.
690690
691691
Args:
@@ -782,7 +782,7 @@ def generate_conv2d_line_buffer_fn(
782782
783783
The HLS compiler produces suboptimal designs for a im2col algorithm implementation, so a trick we use is
784784
to generate a resulting a result of im2col transformation explicitly, instead of relying on loops. Since
785-
the result depends on the paraleters of the convolution layer (the input size, the kernel size, stride etc),
785+
the result depends on the parameters of the convolution layer (the input size, the kernel size, stride etc),
786786
we need to do this for every convolution layer.
787787
788788
Args:

hls4ml/backends/fpga/passes/codegen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def _generate_separable_im2col_1d(self, node):
7878
str(node.get_attr('index')) + '_pw',
7979
node.get_attr('n_partitions'),
8080
node.get_output_variable().shape[0],
81-
node.get_output_variable().shape[1],
81+
node.get_input_variable().shape[1],
8282
kernel=1,
8383
)
8484

hls4ml/backends/vivado/passes/convolution_templates.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,14 +320,15 @@ def format(self, node):
320320

321321
params['filt_width'] = 1
322322
params['stride_width'] = 1
323+
params['pad_left'] = params['pad_right'] = 0
323324
params['dilation'] = node.get_attr('dilation', 1)
324325
params['nzeros'] = node.get_weights('pointwise').nzeros
325326
params['index'] = str(node.index) + '_pointwise'
326327
params['weight_t'] = node.get_weights('pointwise').type
327328
params['min_width'] = params['in_width']
328329
params['instructions'] = '0'
329330
if node.model.config.get_config_value('IOType') == 'io_parallel':
330-
params['fill_fn'] = f'fill_buffer_{node.index}_dw'
331+
params['fill_fn'] = f'fill_buffer_{node.index}_pw'
331332
else:
332333
params['fill_fn'] = 'FillConv1DBuffer'
333334

@@ -449,6 +450,8 @@ def format(self, node):
449450

450451
params['filt_height'] = params['filt_width'] = 1
451452
params['stride_height'] = params['stride_width'] = 1
453+
params['pad_left'] = params['pad_right'] = 0
454+
params['pad_top'] = params['pad_bottom'] = 0
452455
params['dilation'] = node.get_attr('dilation', 1)
453456
params['nzeros'] = node.get_weights('pointwise').nzeros
454457
params['index'] = str(node.index) + '_pointwise'

0 commit comments

Comments
 (0)