Skip to content

Commit 8880dd2

Browse files
committed
fix conv1x1 stack overflow and conv3x3 buffer overrun
1 parent 901b0a8 commit 8880dd2

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

programming_examples/ml/bottleneck/bottleneck.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ def conv1x1_fn(of_wts, of_act_in, of_act_out, conv1x1):
130130
Worker(
131131
conv1x1_fn,
132132
fn_args=[wts_buf_00.cons(), of_act_l3l2.cons(), of_act_2_3_5.prod(), conv1],
133+
stack_size=0x1000,
133134
)
134135
)
135136

@@ -147,7 +148,7 @@ def conv3x3_fn(of_wts, of_act_in, of_act_out, conv3x3, channel_offset):
147148
elem_out,
148149
tensor_w,
149150
l2_in_c,
150-
l2_out_c,
151+
l2_out_c // 2,
151152
3,
152153
3,
153154
0,
@@ -168,7 +169,7 @@ def conv3x3_fn(of_wts, of_act_in, of_act_out, conv3x3, channel_offset):
168169
elem_out,
169170
tensor_w,
170171
l2_in_c,
171-
l2_out_c,
172+
l2_out_c // 2,
172173
3,
173174
3,
174175
1,
@@ -189,7 +190,7 @@ def conv3x3_fn(of_wts, of_act_in, of_act_out, conv3x3, channel_offset):
189190
elem_out,
190191
tensor_w,
191192
l2_in_c,
192-
l2_out_c,
193+
l2_out_c // 2,
193194
3,
194195
3,
195196
2,

programming_examples/ml/resnet/layers_conv2_x/resnet.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ def conv1_skip_fn(
397397
i,
398398
],
399399
tile=cores[i][0],
400+
stack_size=0x1000,
400401
)
401402
)
402403
workers.append(

0 commit comments

Comments
 (0)