Fix error in perpare_buffer_fusing w.r.t accessing invalid output layout (#13723)
This commit is contained in:
parent
bb296fcb11
commit
454bc61018
@ -120,7 +120,7 @@ void concat_input_order::run(program& p) {
|
|||||||
// 4. Not already aligned
|
// 4. Not already aligned
|
||||||
// 5. Users can accept shuffled features
|
// 5. Users can accept shuffled features
|
||||||
// 6. No fused primitives
|
// 6. No fused primitives
|
||||||
if (!node->is_type<concatenation>() || node->is_output() || node->is_dynamic())
|
if (!node->is_type<concatenation>() || node->is_output() || (node->is_valid_output_layout() && node->is_dynamic()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
auto& concat_node = node->as<concatenation>();
|
auto& concat_node = node->as<concatenation>();
|
||||||
|
@ -311,7 +311,7 @@ void prepare_buffer_fusing::run(program& p) {
|
|||||||
If crop is before concat there can be padding mismtach, since concat changes padding.
|
If crop is before concat there can be padding mismtach, since concat changes padding.
|
||||||
*/
|
*/
|
||||||
auto can_optimize = [](const program_node* node) {
|
auto can_optimize = [](const program_node* node) {
|
||||||
if (node->is_dynamic() || node->is_output() || (!node->get_fused_activations_funcs().empty())) {
|
if ((node->is_valid_output_layout() && node->is_dynamic()) || node->is_output() || (!node->get_fused_activations_funcs().empty())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user