Removed noexcept specifier; removed dead code and restored ostream format (#9563)
This commit is contained in:
parent
62e8923605
commit
91c89e77d8
@ -387,14 +387,6 @@ void make_gna_pwl(const DnnActivation& fun,
|
||||
gna_pwl[1].slope = FLOAT_TO_INT16(s.slope * s.slope_scale);
|
||||
gna_pwl[1].xBase = gna_pwl[1].xBase | s.slope_scale_index;
|
||||
print_segment((int32_t)(gna_pwl[1].xBase & XBASEMASK) / in_scale, gna_pwl[1].yBase / out_scale, 1.0);
|
||||
if (INT32_MAX > x_upper) { // need a right segment
|
||||
gna_pwl.push_back({
|
||||
static_cast<int32_t>(x_upper & XBASEMASK), // zero out the 2 lsb
|
||||
y_upper,
|
||||
0 });
|
||||
|
||||
print_segment((x_upper & XBASEMASK) / in_scale, gna_pwl[2].yBase / out_scale, 0.0);
|
||||
}
|
||||
} else {
|
||||
double min_x_val = -pwl[0].b / pwl[0].m;
|
||||
double max_x_val = (y_max/out_scale - pwl[pwl_size - 2].b) / pwl[pwl_size - 2].m;
|
||||
|
@ -96,7 +96,9 @@ void ExportGnaDescriptorPartiallyFilled(uint32_t number_of_layers, std::ostream&
|
||||
outStream.write(gd, sizeof(gd));
|
||||
outStream.write(gd2, sizeof(gd2));
|
||||
// TODO: GNA2: Scratchpad
|
||||
outStream.fill(constScratchFill);
|
||||
outStream.width(scratchPadSize);
|
||||
auto previousCharacter = outStream.fill(constScratchFill);
|
||||
auto previousWidth = outStream.width(scratchPadSize);
|
||||
outStream << constScratchFill;
|
||||
outStream.width(previousWidth);
|
||||
outStream.fill(previousCharacter);
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ class LayerInfo {
|
||||
bool isFakeQuantize() const noexcept {
|
||||
return isOfType("FakeQuantize");
|
||||
}
|
||||
bool isNonFunctional() const noexcept {
|
||||
bool isNonFunctional() const {
|
||||
return isOfType("reshape") || isOfType("squeeze") || isOfType("unsqueeze") || isTrivialPermute();
|
||||
}
|
||||
bool isReshape() const noexcept {
|
||||
@ -272,7 +272,7 @@ class LayerInfo {
|
||||
return isOfType("permute");
|
||||
}
|
||||
// @brief this not only mathematically trivial, has some WA for kaldi case
|
||||
bool isTrivialPermute() const noexcept {
|
||||
bool isTrivialPermute() const {
|
||||
if (!isPermute()) return false;
|
||||
|
||||
auto layerOrder = layer->GetParamAsInts("order");
|
||||
|
Loading…
Reference in New Issue
Block a user