Minor fixes (#16275)

- Fix are_data_types_suitable_for_onednn not to invalidate output layout
- Fix seg fault of printing resample node info
This commit is contained in:
Taylor Yeonbok Lee 2023-03-14 01:09:54 -07:00 committed by GitHub
parent ae37ca671c
commit 3a96e06d4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -1172,8 +1172,8 @@ layout layout_optimizer::get_expected_layout(layout const& current_layout,
}
bool layout_optimizer::are_data_types_suitable_for_onednn(program_node& node) {
auto in_dt = node.get_dependency(0).get_output_layout().data_type;
auto out_dt = node.get_output_layout().data_type;
auto in_dt = node.get_dependency(0).get_output_layout(false).data_type;
auto out_dt = node.get_output_layout(false).data_type;
if (in_dt == data_types::f32 && (!node.is_type<fully_connected>() && !node.is_type<convolution>()))
return false;

View File

@ -138,7 +138,8 @@ std::string resample_inst::to_string(resample_node const& node) {
axesAndScalesDump += delim;
delim = ", ";
axesAndScalesDump += std::to_string(desc->axes[i]) + ": ";
axesAndScalesDump += std::to_string(desc->scales[i]);
if (desc->scales.size() > i)
axesAndScalesDump += std::to_string(desc->scales[i]);
}
resample_info.add("scales:", axesAndScalesDump);
}