[GPU] Optimize reorder between permute and first convolution (#13459)

This commit is contained in:
Sergey Shlyapnikov 2022-10-14 13:57:58 +04:00 committed by GitHub
parent bbfd5635a6
commit 0b8f1f8c00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -417,6 +417,9 @@ bool layout_optimizer::can_fuse_reorder_to_prev(program_node& prev, program_node
return true;
if (prev.is_type<permute>()) {
if (fmt_prev == format::b_fs_yx_fsv32 && fmt_next == format::byxf)
return true;
auto& permute_order = prev.as<permute>().get_primitive()->permute_order;
if ((fmt_prev == format::b_fs_yx_fsv4 || fmt_prev == format::b_fs_yx_fsv32 || fmt_prev == format::b_fs_zyx_fsv32 ||
fmt_prev == format::b_fs_yx_fsv16 || fmt_prev == format::b_fs_zyx_fsv16 || fmt_prev == format::bs_fs_yx_bsv16_fsv16)