[GNA] WA to fix config parsing of scale factor map (#17060)
* WA to fix config parsing * clang fix * excluded json
This commit is contained in:
1 parent
7d574e3114
commit
0f7e6de346
3 files changed
+11
-2
No files matched your search
@@ -215,7 +215,7 @@ int main(int argc, char* argv[]) {
|
||||
numFrames * numFrameElements);
|
||||
slog::info << "Using scale factor of " << floatScaleFactor << " calculated from first utterance."
|
||||
<< slog::endl;
|
||||
scale_factors_per_input[model->input(i).get_any_name()] = floatScaleFactor;
|
||||
scale_factors_per_input[strip_name(model->input(i).get_any_name())] = floatScaleFactor;
|
||||
}
|
||||
gnaPluginConfig[ov::intel_gna::scale_factors_per_input.name()] = scale_factors_per_input;
|
||||
}
|
||||
|
||||
@@ -367,6 +367,15 @@ bool check_name(const ov::OutputVector& nodes, const std::string& node_name) {
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Strip the name of the input to exclude ":port"
|
||||
* @param name input name
|
||||
* @return striped input name
|
||||
*/
|
||||
std::string strip_name(const std::string& name) {
|
||||
return {name, 0, name.rfind(':')};
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Parse scale factors per input
|
||||
* Format : <input_name1>=<sf1>,<input2>=<sf2> or just <sf>
|
||||
|
||||
Reference in new issue
Block a user