Skip to content
Snippets Groups Projects
Commit d6870770 authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Merge remote-tracking branch 'origin/dev' into scheduling

parents 9ac5bd3e 8da1694c
No related branches found
No related tags found
2 merge requests!50version 0.2.0,!45Improved scheduling
Pipeline #42235 failed
......@@ -64,7 +64,7 @@ void ConvDepthWiseImpl2D_cpu_forward_kernel(const ConvDepthWise_Op<2>::Attrs &at
for (std::size_t batch = 0; batch < dims[0]; ++batch) {
for (std::size_t ch = 0; ch < std::get<2>(attrs); ++ch) {
const std::size_t oIndex = (ch + batch*std::get<2>(attrs)) * oxSize * oySize;
B biasVal = (biases != nullptr) ? biases[ch] : B(0);
B biasVal = ((!std::get<4>(attrs)) && biases != nullptr) ? biases[ch] : B(0);
std::fill(output + oIndex, output+(oIndex+oxSize*oySize), biasVal);
const std::size_t iIndex = (ch + batch*dims[1]) * dims[2] * dims[3];
const std::size_t wIndex = ch * std::get<3>(attrs)[0] * std::get<3>(attrs)[1];
......
......@@ -106,7 +106,8 @@ void ConvImpl2D_cpu_forward_kernel(const Conv_Op<2>::Attrs &attrs, const std::ar
for (std::size_t batch = 0; batch < dims[0]; ++batch) {
for (std::size_t outCh = 0; outCh < std::get<3>(attrs); ++outCh) {
const std::size_t oIndex = (outCh + batch*std::get<3>(attrs)) * oxSize * oySize;
B biasVal = (biases != nullptr) ? biases[outCh] : B(0);
// If NoBias or bias = nullptr, set B(0)
B biasVal = ((!std::get<5>(attrs)) && biases != nullptr) ? biases[outCh] : B(0);
std::fill(output + oIndex, output+(oIndex+oxSize*oySize), biasVal);
for (std::size_t inCh = 0; inCh < dims[1]; ++inCh) {
const std::size_t iIndex = (inCh + batch*dims[1]) * dims[2] * dims[3];
......
0.0.1
\ No newline at end of file
0.2.0
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment