Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_export_cpp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gallas Gaye
aidge_export_cpp
Commits
e98d3eee
Commit
e98d3eee
authored
3 months ago
by
Gallas Gaye
Committed by
Gallas Gaye
3 months ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: conv2D export failure when no biases given
parent
b957fede
No related branches found
No related tags found
No related merge requests found
Pipeline
#68002
failed
3 months ago
Stage: static_analysis
Stage: build
Stage: test
Stage: coverage
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aidge_export_cpp/kernels/convolution.hpp
+43
-2
43 additions, 2 deletions
aidge_export_cpp/kernels/convolution.hpp
with
43 additions
and
2 deletions
aidge_export_cpp/kernels/convolution.hpp
+
43
−
2
View file @
e98d3eee
...
...
@@ -65,8 +65,8 @@ void convolution_forward(
int
oOffset
=
NB_OUTPUTS
*
oPos
;
// <--
Bias_T
weightedSum
=
biases
[
output
];
// Check if the biases are defined
Bias_T
weightedSum
=
biases
?
biases
[
output
]
:
0
;
for
(
int
sy
=
0
;
sy
<
KERNEL_HEIGHT
;
++
sy
)
{
if
((
PADDING_Y
!=
0
...
...
@@ -116,4 +116,45 @@ void convolution_forward(
}
}
// Template specialization when biases are not given to the convolution
template
<
int
NB_CHANNELS
,
int
CHANNELS_HEIGHT
,
int
CHANNELS_WIDTH
,
int
NB_OUTPUTS
,
int
OUTPUTS_HEIGHT
,
int
OUTPUTS_WIDTH
,
int
PADDING_Y
,
int
PADDING_X
,
int
STRIDE_Y
,
int
STRIDE_X
,
int
DILATION_Y
,
int
DILATION_X
,
int
KERNEL_HEIGHT
,
int
KERNEL_WIDTH
,
ActivationFunction_T
ACTIVATION
,
typename
Input_T
,
typename
Output_T
,
typename
Weight_T
,
typename
Rescaling_T
>
__attribute__
((
always_inline
))
inline
void
convolution_forward
(
const
Input_T
*
__restrict
inputs
,
Output_T
*
__restrict
outputs
,
const
Weight_T
*
__restrict
weights
,
std
::
nullptr_t
__restrict
,
const
Rescaling_T
&
__restrict
rescaling
)
{
const
float
*
b
=
nullptr
;
convolution_forward
<
NB_CHANNELS
,
CHANNELS_HEIGHT
,
CHANNELS_WIDTH
,
NB_OUTPUTS
,
OUTPUTS_HEIGHT
,
OUTPUTS_WIDTH
,
PADDING_Y
,
PADDING_X
,
STRIDE_Y
,
STRIDE_X
,
DILATION_Y
,
DILATION_X
,
KERNEL_HEIGHT
,
KERNEL_WIDTH
,
ACTIVATION
>
(
inputs
,
outputs
,
weights
,
b
,
rescaling
);
}
#endif // __AIDGE_EXPORT_CPP_KERNELS_CONVOLUTION__
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment